Industrial quality inspection-oriented adaptive model multiplexing method based on dynamic rank redistribution
By introducing a learnable rank weight matrix and a dynamic redistribution mechanism, the problems of high training and inference costs, slow updates, and rigid parameter allocation in industrial quality inspection models are solved. This enables rapid adaptive model optimization with a fixed number of parameters, improving recognition accuracy and convergence speed.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-04-03
AI Technical Summary
Existing industrial quality inspection models suffer from high training and inference costs, delayed model updates due to frequent environmental changes, and limited expressive power due to rigid parameter allocation. Furthermore, existing methods lack dynamic rank allocation capabilities, making it difficult to adapt quickly with a fixed number of parameters.
A learnable rank weight matrix is introduced, and combined with a high-rank preheating and dynamic redistribution mechanism, the module importance index is calculated through preheating training and orthogonal constraint optimization, dynamic rank redistribution is performed, and the rank weight matrix is optimized by back gradient propagation to achieve automatic adjustment of module-level rank resources.
Without significantly increasing the total number of parameters, this method improves the recognition accuracy and convergence speed of quality inspection tasks, reduces retraining costs, enhances the flexibility and generalization performance of the model, and is suitable for rapid adaptation under low computing power conditions.
Smart Images

Figure CN121785591A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of deep learning and large model applications in industrial quality inspection, specifically to an adaptive model reuse method based on dynamic rank allocation for industrial quality inspection. Background Technology
[0002] With the widespread application of deep learning and large model technology in industrial quality inspection, language-based or multimodal intelligent inspection models have become an important part of production line automation. Industrial quality inspection tasks typically involve high-resolution images, complex defect morphologies, and multi-condition equipment environments. Models need to have good generalization and rapid adaptation capabilities to cope with frequent changes in camera position, lighting conditions, and new defect types.
[0003] However, current mainstream industrial quality inspection models generally adopt efficient parameter fine-tuning methods using full-parameter fine-tuning or fixed-rank configurations. These methods have the following prominent problems in actual production deployment: 1. High training and inference costs: Full-parameter fine-tuning requires updating a large number of model parameters, resulting in huge memory usage and computational overhead; while fixed-rank low-rank adaptation methods often require repeated trials when the rank is not chosen properly, increasing parameter tuning costs and training cycles. 2. Frequent environmental changes and lagging model updates: On industrial quality inspection production lines, production line switching, camera adjustments, and the appearance of new defect samples can cause input distribution drift, requiring the model to quickly complete adaptive updates. However, traditional fine-tuning methods are slow to update and lack flexibility, failing to meet the needs of real-time quality inspection and rapid deployment. 3. Rigid parameter allocation and limited expressive power: Existing low-rank adaptation methods mostly use fixed-rank configurations, that is, assigning the same rank value to all modules, ignoring the differences in importance of different modules in the feature extraction and decision-making stages. This uniform configuration leads to limited expression of some key modules and wasted resources of some redundant modules, thereby reducing the overall model's accuracy and convergence efficiency.
[0004] Current research has attempted to optimize model structure through methods such as module importance analysis, rank pruning, or rank incrementing to reduce costs and improve adaptability. However, these methods typically have the following shortcomings: they only target unidirectional adjustments (such as decrementing or incrementing ranks only), lacking true dynamic allocation capabilities; they cannot achieve rank redistribution while ensuring a constant total number of parameters; and they require additional computational complexity when evaluating module importance, making them difficult to apply quickly in industrial scenarios.
[0005] Therefore, in industrial environments with limited computing resources and rapid iteration of quality inspection tasks, there is an urgent need for a new industrial quality inspection model adaptive method that can achieve dynamic rank allocation under fixed parameter budget, automatically adjust the model structure according to the importance of modules, and quickly adapt under small sample conditions, so as to simultaneously take into account model performance, computational efficiency and engineering deployability. Summary of the Invention
[0006] The summary section of this application is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0007] To address the problems and shortcomings of existing technologies, this invention aims to provide an adaptive model reuse method based on dynamic rank weight allocation for industrial quality inspection. By introducing a learnable rank weight matrix and combining high-rank preheating and dynamic redistribution mechanisms, the method achieves rapid model transfer and stable optimization across multiple scenarios without significantly increasing the total number of parameters. This allows for rapid model adaptation under low computational power conditions, effectively improving the recognition accuracy and convergence speed of quality inspection tasks, significantly reducing retraining costs, and enhancing the flexibility and generalization performance of the quality inspection model. This addresses the problems mentioned in the background technology.
[0008] To achieve the above objectives, the present invention provides the following technical solution: As a first aspect of this application, the present invention discloses an adaptive model reuse method based on dynamic rank allocation for industrial quality inspection, comprising the following steps: Step 1: In the context of industrial quality inspection tasks, obtain the set of functional modules and their parameter matrices of the pre-trained visual or multimodal model; Step 2: Introduce an additional set of learnable parameter matrices for each functional module and learn to obtain a new parameter matrix; Step 3: Under a unified high-rank configuration, perform preheating training and orthogonal constraint optimization on the parameter matrix set in the new parameter matrix; Step 4: Based on the convergence result of the rank weight matrix in the parameter matrix set, calculate the importance index of each functional module; Step 5: Normalize the importance index results of all the functional modules to form an importance vector; Step 6: Dynamically assign rank to the functional modules based on the importance vector; Step 7: Optimize the rank weight matrix through back gradient propagation to achieve dynamic updating and adaptation of rank importance.
[0009] Preferably, the parameter matrix set in step 2 Including the rank-weight matrix Dimensionality reduction matrix and the increasing dimension matrix , represented as The set of functional modules Each functional module Corresponding parameter matrix The new parameter matrix after learning Represented as, ; in, Represented as functional modules The old parameters before training. It is represented as a unified initial high-rank configuration value.
[0010] Preferably, the objective of the preheating training optimization in step 3 is represented as follows: ; in, To measure the model's performance on quality inspection tasks, This is represented as an orthogonal constraint term; the orthogonal constraint term is expressed as, in, This can be represented as a forced orthogonal transformation of the dimension-reduced matrix. This can be represented as a forced orthogonal transformation of the increased-dimensional matrix. Represented as an identity matrix with dimensions equal to 1 / 2. and same.
[0011] Preferably, the key indicator mentioned in step 4 is defined using the PQ index, expressed as follows: ; in, Represented as functional modules The rank-weight vector, Represented as an adjustable norm hyperparameter and satisfying , Represented as a rank-weight matrix The length of the diagonal.
[0012] Preferably, in step 5, the results of the important indicators are normalized to obtain an importance distribution vector. Represented as, ; The importance vector This is used to reflect the relative contribution of each module in the task feature representation and to provide a basis for the subsequent dynamic rank allocation stage.
[0013] Preferably, step 6 involves distinguishing between unimportant and important functional modules based on the scores of the important indicators, with the unimportant functional modules being selected from those with the highest scores on the important indicators. Of the functional modules, the most important functional modules are those with the lowest importance index scores. Each functional module; for the less important functional modules, remove user-preset parameters. The rank, and for the important functional modules, add user-preset... The rank is adjusted to obtain a new rank. .
[0014] Preferably, step 7 is a configuration based on the new rank. The rank-weight matrix of each functional module is maintained. To ensure that the continuously trainable state participates in subsequent training updates, the rank weight matrix As a trainable diagonal matrix, gradient backpropagation is performed only on the rank-weight matrix. The inner diagonal parameters are updated to achieve joint adaptive optimization of module importance and parameter allocation.
[0015] As a second aspect of this application, the present invention also discloses an electronic device, comprising: At least one processor, and a memory communicatively connected to said at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the steps described above in the adaptive model reuse method based on dynamic rank allocation for industrial quality inspection.
[0016] As a third aspect of this application, the present invention also discloses a computer storage medium storing a computer program thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the above-described adaptive model reuse method based on dynamic rank allocation for industrial quality inspection.
[0017] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention provides an adaptive model reuse method based on dynamic rank weight allocation for industrial quality inspection. First, a set of functional modules and their parameter matrices of a pre-trained visual or multimodal model are obtained within the industrial quality inspection task scenario. An additional set of learnable parameter matrices is introduced for each functional module, and a new parameter matrix is obtained through learning. Under a unified high-rank configuration, the parameter matrix set in the new parameter matrix undergoes pre-training and orthogonal constraint optimization. Then, based on the convergence results of the rank weight matrices in the parameter matrix set, the importance index of each functional module is calculated, and the importance index results of all functional modules are normalized to form an importance vector. Dynamic rank weight allocation is performed on the functional modules according to the importance vector, and the diagonal parameters within the rank weight matrix are optimized through backpropagation, achieving dynamic updating and adaptation of rank importance. The proposed method does not rely on full parameter fine-tuning and can achieve adaptive optimization of the model structure under computationally limited conditions. By introducing a trainable diagonal matrix, the weight changes in each rank direction reflect the activation intensity of features within the module, and the importance index of the functional module is calculated in conjunction with the PQ index, thereby achieving automatic adjustment of module-level rank resources. This invention's method dynamically optimizes the model structure while maintaining a constant total number of parameters, concentrating limited computing resources on key modules. This enables high-precision detection and rapid updates even in low-computing-power environments. It improves the detection accuracy and adaptability for industrial quality inspection tasks, significantly enhancing the robustness and generalization ability of industrial quality inspection systems. It is suitable for intelligent manufacturing scenarios such as high-performance deployment and continuous updates of industrial models. Attached Figure Description
[0018] The accompanying drawings, which form part of this application, are used to provide a further understanding of the application and to make other features, objects, and advantages of the application more apparent. The illustrative embodiments and descriptions of this application are used to explain the application and do not constitute an undue limitation of the application.
[0019] In the attached diagram: Figure 1 This is a flowchart illustrating the steps of an adaptive model reuse method based on dynamic rank allocation for industrial quality inspection in an embodiment of the present invention. Figure 2 This is an execution flowchart of the adaptive model reuse method based on dynamic rank allocation for industrial quality inspection in an embodiment of the present invention. Detailed Implementation
[0020] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0021] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0022] Example This invention discloses an adaptive model reuse method based on dynamic rank allocation for industrial quality inspection. The invention is further illustrated below with specific embodiments. It should be understood that these embodiments are for illustrative purposes only and not for limiting the scope of the invention. After reading this invention, any modifications of the invention in various equivalent forms by those skilled in the art fall within the scope defined by the appended claims. (Refer to...) Figure 1 and Figure 2 As shown, the present invention mainly includes the following steps: Step 1: In the context of industrial quality inspection tasks, obtain the set of functional modules and their parameter matrices of the pre-trained visual or multimodal model; Step 2: Introduce an additional set of learnable parameter matrices for each functional module and learn to obtain a new parameter matrix; Step 3: Under a unified high-rank configuration, perform preheating training and orthogonal constraint optimization on the parameter matrix set in the new parameter matrix; Step 4: Based on the convergence result of the rank weight matrix in the parameter matrix set, calculate the importance index of each functional module; Step 5: Normalize the importance index results of all functional modules to form an importance vector; Step 6: Dynamically assign rank to functional modules based on importance vectors; Step 7: Optimize only the rank weight matrix through back gradient propagation to achieve dynamic updating and adaptation of rank importance.
[0023] Specifically, step 1 involves acquiring a set of functional modules from a pre-trained visual or multimodal model within an industrial quality inspection task scenario. This is based on the specific requirements of industrial quality inspection, including defect detection types, image resolution requirements, and real-time constraints. Based on these requirements, the necessary functional modules are determined, such as a visual encoder, text decoder, and cross-modal attention mechanism. After directly downloading the pre-trained model using open-source platforms (such as Hugging Face and ModelScope), the individual functional modules are extracted by analyzing the model configuration file. The set of functional modules is represented as follows: Each functional module The corresponding parameter matrix is , and These represent the shape of the parameter matrix, i.e., the input dimension and the output dimension, respectively.
[0024] For step 2, an additional set of learnable parameter matrices is introduced for each functional module, and new parameter matrices are obtained through learning. This set of learnable parameter matrices represents... Represented as, ; ; ; ; in, It is represented as a learnable rank-weight matrix. For the first Trainable parameters for each rank direction are used to measure the importance of that direction in the task features. and Represented as a reduced-dimensional matrix and an increased-dimensional matrix, respectively. Represented as a unified initial high-rank configuration value. Dimensionality reduction matrix. Used to compress high-dimensional input features into a low-rank space, increasing the dimensionality of a matrix. Used to restore low-rank spatial features to the output dimension. Dimensionality reduction matrix. and the increasing dimension matrix Each functional module is approximated by low-rank decomposition. Corresponding parameter matrix It can be adapted to specific tasks, such as defect detection or product classification, with very few parameters. Specifically, For a diagonal matrix, its diagonal elements Characterizes the importance of the corresponding rank direction. Each diagonal element During training, the rank direction is automatically updated via gradient backpropagation. The larger the value, the more critical the rank direction is in the task feature mapping, thus achieving joint adaptive optimization of module importance and parameter allocation during model fine-tuning.
[0025] So, each functional module Corresponding parameter matrix The new parameter matrix after learning is represented as follows: ; in, Represented as functional modules The old parameters that were not used before training are not used in subsequent training. These are represented as the increased-dimensional matrix, the learnable rank-weight matrix, and the reduced-dimensional matrix, respectively, representing additional parameters introduced for subsequent training. The new parameters obtained through this training... It is derived from the old parameters. and The result is obtained by adding them together.
[0026] Step 3 involves pre-training and orthogonal constraint optimization of the parameter matrix set in the new parameter matrix under a unified high-rank configuration. Specifically, pre-training optimization is performed on all functional modules, and the optimization objective is expressed as follows: ; in, To measure the model's performance on quality inspection tasks, such as the error in defect classification or detection. Represented as orthogonal constraint terms, used to control the parameter matrix. and This reduces complexity and prevents overfitting, ensuring stable model operation in industrial environments. The orthogonal constraint term is expressed as... ; in, Represented as an upgraded matrix of input features. This is represented as the output feature dimension reduction matrix. This can be represented as a forced orthogonal transformation of the dimension-reduced matrix. This is represented as a forced orthogonal transformation of the increased-dimensional matrix. Represented as an identity matrix, its dimensions are... and The same. After warm-up training and orthogonal constraints, we can obtain the trained... Learnable parameter matrix representation Thanks to the orthogonal constraint terms, Each row and column represents a parameter direction, which does not coincide with other directions. This indicates the importance of each direction. It facilitates subsequent increases and decreases in rank.
[0027] For step 4, based on the convergence results of the learnable rank weight matrix, the importance index of each functional module is calculated. Specifically, after the high-rank preheating training is completed, the importance index is calculated based on the learnable rank weight matrix. The convergence result is used to calculate the convergence result for each functional module. Importance metrics. Here, we define importance metrics using the PQ index to measure the sparsity and uniformity of module parameter distribution. First, we extract the rank-weight vector for each functional module. Then, based on the PQ index, the importance index score of the functional module is calculated and expressed as: ; in, Represented as functional modules The rank weight vector. Represented as an adjustable norm hyperparameter, satisfying (For example ). Represented as a rank dimension, it is a learnable rank-weight matrix. The diagonal length. The importance index, PQ index, comprehensively measures the balance of distribution along the rank direction within a module and its effective utilization rate. When When the value is relatively large (generally above 0.7), it indicates that the module parameters are evenly distributed and the rank direction is highly effective; the rank value should be retained or increased. When the value is small, it indicates that the parameters are concentrated or there is redundancy, and the rank value should be appropriately reduced.
[0028] In step 4, the importance index is based on the rank-weighted matrix. Calculate the size of the diagonal elements. The sparsity of diagonal elements indicates whether rank adjustment is needed. By traversing each functional module, a set of importance index scores for each functional module is obtained to quantify the relative influence of each functional module in the representation of task features, laying the foundation for subsequent dynamic allocation of module ranks.
[0029] Step 5 involves normalizing the importance index results of all functional modules to form an importance vector. Specifically, the PQ index results are normalized to obtain the importance vector of the functional modules, represented as follows: ; This importance vector This importance vector serves as the basis for the subsequent dynamic rank reallocation phase, used to perform ordered optimization and reallocation of rank resources for each module under a fixed total parameter budget. This is used to reflect the relative contribution of each module in the task feature representation and to provide a basis for the dynamic rank allocation stage.
[0030] Step 6 involves dynamically assigning ranks to functional modules based on their importance distribution vectors. Specifically, this involves dynamically assigning ranks to functional modules based on their importance distribution vectors. Let the total rank of all functional modules be denoted as . The module's rank is adjusted according to the constraint that the total rank remains unchanged. The adjusted total rank constraint must be satisfied as follows: Furthermore, the importance of functional modules is differentiated into unimportant and important modules based on the importance score in step 4. Moreover, the importance of a module can be determined according to user-defined criteria; here, we use the simplest method: setting the module with the highest importance score. The functional modules are considered important modules, and the one with the lowest importance index score is... These modules are considered unimportant. For unimportant functional modules, remove user-preset settings. The rank, and for important functional modules, add user presets. The rank is adjusted to obtain a new rank. .
[0031] For step 7, only the rank-weight matrix is optimized through backpropagation to achieve dynamic updating and adaptation of rank importance. After completing the rank-weight distribution, it is necessary to maintain the rank-weight matrix of each functional module. To maintain a continuously trainable state, gradient backpropagation is performed only on the rank-weight matrix. The diagonal parameters and the weight matrix corresponding to the amplified rank are updated, while the parameters of the backbone network and frozen modules remain unchanged, in order to reduce training overhead and improve few-sample transfer performance. Specifically, in the configuration of the new rank... Below, the rank-weight matrix of the preservative functional model is... Instead of resetting, it continues to participate in subsequent training updates, so as to continue reflecting the real-time contribution strength of the rank components in subsequent fine-tuning. Combined with gradient backpropagation, the effectiveness estimate of the module's rank direction is continuously updated during training, achieving structural adaptation and dynamic updating. This allows the model to automatically update the importance of the rank direction during continuous training, maintaining the dynamic optimality of the structure. Due to the rank weight matrix... As a trainable diagonal matrix, each diagonal parameter is automatically updated during training via gradient backpropagation. The larger the value, the more critical the rank direction is in the task feature mapping, thus achieving joint adaptive optimization of module importance and parameter allocation during model fine-tuning.
[0032] This invention comprises two parts: a high-rank pre-training stage and a modular rank redistribution stage. In the first stage, each functional module of the pre-trained language or multimodal model undergoes pre-training in a high-rank configuration, enabling the model to establish an overall representation of the target quality inspection task with unified expressive power, thus forming preliminary task adaptability. In the second stage, based on the functional module importance assessment results, a dynamic rank redistribution mechanism is adopted to reduce the rank of modules contributing less in the high-rank stage and increase the rank of key modules, thereby achieving adaptive scheduling of learning resources among modules under a fixed parameter budget. Subsequently, lightweight fine-tuning is performed on the adjusted structure, allowing the model to quickly adapt to new industrial quality inspection scenarios, such as production line changes, camera switching, or changes in defect types. Through the "high-rank pre-training – adaptive rank redistribution" two-stage strategy, rapid migration and stable optimization of the model in multiple scenarios are achieved without significantly increasing the total number of parameters. This effectively improves the recognition accuracy and convergence speed of quality inspection tasks, significantly reduces retraining costs, and is suitable for intelligent manufacturing scenarios such as high-performance deployment and continuous updating of industrial models.
[0033] To implement the above embodiments, this application also discloses an electronic device. The electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). Various programs and data required for the operation of the electronic device are also stored in the RAM. The processing unit, ROM, and RAM are interconnected via a bus. An input / output (I / O) interface is also connected to the bus. Typically, the following devices can be connected to the I / O interface: input devices including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices including, for example, magnetic tape, hard disk, etc.; and communication devices. The communication device allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although electronic devices with various devices are shown, it should be understood that it is not required to implement or possess all of the shown devices. More or fewer devices may be implemented or possessed alternatively.
[0034] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the functions defined above in the methods of some embodiments of this disclosure.
[0035] It should be noted that the computer storage medium in some embodiments of this disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0036] In some embodiments of this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer storage medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0037] In other implementations, clients and servers may communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol), and may interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0038] The aforementioned computer storage medium may be included within the aforementioned electronic device, or it may exist independently without being assembled into the electronic device. The aforementioned computer storage medium carries one or more programs, which, when executed by the electronic device, enable the electronic device to implement an adaptive model reuse method based on dynamic rank allocation for industrial quality inspection.
[0039] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0040] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Units described in some embodiments of the present disclosure may be implemented in software or hardware. The described units may also be located in a processor, and the names of these units do not necessarily constitute a limitation on the unit itself.
[0041] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0042] All technologies not described in detail in this invention are existing technologies. The above descriptions are merely some preferred embodiments of this disclosure and explanations of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalent features without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. An adaptive model reuse method based on dynamic rank allocation for industrial quality inspection, characterized in that, Includes the following steps: Step 1: In the context of industrial quality inspection tasks, obtain the set of functional modules and their parameter matrices of the pre-trained visual or multimodal model; Step 2: Introduce an additional set of learnable parameter matrices for each functional module and learn to obtain a new parameter matrix; Step 3: Under a unified high-rank configuration, perform preheating training and orthogonal constraint optimization on the parameter matrix set in the new parameter matrix; Step 4: Based on the convergence result of the rank weight matrix in the parameter matrix set, calculate the importance index of each functional module; Step 5: Normalize the importance index results of all the functional modules to form an importance vector; Step 6: Dynamically assign rank to the functional modules based on the importance vector; Step 7: Optimize the rank weight matrix through back gradient propagation to achieve dynamic updating and adaptation of rank importance.
2. The adaptive model reuse method based on dynamic rank allocation for industrial quality inspection according to claim 1, characterized in that: The parameter matrix set in step 2 Including the rank-weight matrix Dimensionality reduction matrix and the increasing dimension matrix , represented as The set of functional modules Each functional module Corresponding parameter matrix The new parameter matrix after learning Represented as, ; in, Represented as functional modules The old parameters before training. It is represented as a unified initial high-rank configuration value.
3. The adaptive model reuse method based on dynamic rank allocation for industrial quality inspection according to claim 2, characterized in that: The objective of the preheating training optimization in step 3 is expressed as follows: ; in, To measure the model's performance on quality inspection tasks, This is represented as an orthogonal constraint term; the orthogonal constraint term is expressed as, in, This can be represented as a forced orthogonal transformation of the dimension-reduced matrix. This can be represented as a forced orthogonal transformation of the increased-dimensional matrix. Represented as an identity matrix with dimensions equal to 1 / 2. and same.
4. The adaptive model reuse method based on dynamic rank allocation for industrial quality inspection according to claim 3, characterized in that: The key indicators mentioned in step 4 are defined using the PQ index, and are expressed as follows: ; in, Represented as functional modules The rank-weight vector, Represented as an adjustable norm hyperparameter and satisfying , Represented as a rank-weight matrix The length of the diagonal.
5. The adaptive model reuse method based on dynamic rank allocation for industrial quality inspection according to claim 4, characterized in that: In step 5, the results of the important indicators are normalized to obtain the importance distribution vector. Represented as, ; The importance vector This is used to reflect the relative contribution of each module in the task feature representation and to provide a basis for the subsequent dynamic rank allocation stage.
6. The adaptive model reuse method based on dynamic rank allocation for industrial quality inspection according to claim 5, characterized in that: Step 6 involves distinguishing between unimportant and important functional modules based on the scores of the important indicators. The unimportant functional modules are selected based on the scores of the important indicators. Of the functional modules, the most important functional modules are those with the lowest importance index scores. Each functional module; for the less important functional modules, remove user-preset parameters. The rank, and for the important functional modules, add user-preset... The rank is adjusted to obtain a new rank. .
7. The adaptive model reuse method based on dynamic rank allocation for industrial quality inspection according to claim 6, characterized in that: Step 7 is a configuration based on the new rank. The rank-weight matrix of each functional module is maintained. To ensure that the continuously trainable state participates in subsequent training updates, the rank weight matrix For a trainable diagonal matrix, gradient backpropagation is only applied to the rank-weighted matrix. The diagonal parameters are updated to achieve joint adaptive optimization of module importance and parameter allocation.
8. An electronic device, characterized in that, include: At least one processor, and a memory communicatively connected to said at least one processor; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the steps of the method according to any one of claims 1 to 7.
9. A computer storage medium storing a computer program thereon, characterized in that: When the computer program is executed by the processor, it performs the steps as described in any one of claims 1 to 7.