Model mounting method, device and equipment, storage medium and vehicle

By adjusting the weight of the target mount model to a null value during the model mount process and inputting the target weight file in the form of a file, the problem of low operation efficiency in the existing technology is solved, and efficient dynamic replacement of weight parameters and real-time updates are achieved.

CN120179303APending Publication Date: 2025-06-20BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311756160.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-19
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The existing model mount method leads to low model operation efficiency, especially when dynamically loading LoRA networks, the weight parameters need to be adjusted dynamically through the application programming interface, resulting in performance fallback.

Method used

By obtaining the model mount instruction, mount the target mount model to the application main model and adjust its model weight to a null value. Then, obtain and enter the target weight file corresponding to the target mount model, and update the empty value as the target weight parameter.

Benefits of technology

Real-time update of target mount model weights is achieved, the operation efficiency of the combined model is improved, performance fallback is avoided, and the accuracy and efficiency of dynamic replacement is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179303A_ABST
    Figure CN120179303A_ABST
Patent Text Reader

Abstract

The invention discloses a model mounting method, device and equipment, a storage medium and a vehicle. The method comprises the steps of obtaining a model mounting instruction, wherein the model mounting instruction is used for indicating to mount a target mounting model to an application main model; in response to the model mounting instruction, mounting the target mounting model to the application main model to obtain an application combination model, and adjusting a model weight in the target mounting model to a null value; and obtaining a target weight file corresponding to the target mounting model, inputting the target weight file into the target mounting model in the application combination model, and updating the null value into a target weight parameter of the target weight file. According to the embodiment of the invention, the model operation efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of artificial intelligence technology, and particularly relates to a model mounting method, device, equipment, storage medium and vehicle. Background Art

[0002] In the field of AIGC (Artificial Intelligence Generated Content) inference acceleration, the commonly used inference main model often has difficulty in efficiently meeting the requirement of dynamically loading the LoRA (Low-Rank Adaptation of Large Language Models) network. Therefore, in actual AIGC services, different LoRA models need to be dynamically loaded onto the main model according to user requirements.

[0003] Since the weight parameters adapted to different LoRA models are different, in related technologies, after different LoRA models are mounted onto the main model to obtain a combined model, the weight parameters of the LoRA models in different combined models are usually dynamically adjusted by using an application programming interface. However, during the process of adjusting by using the application programming interface, serious performance degradation often occurs, thus reducing the operation efficiency of the model. Summary of the Invention

[0004] Embodiments of this application provide a model mounting method, device, equipment, storage medium and vehicle, which can solve the problem of low operation efficiency of the model caused by the existing model mounting method.

[0005] In a first aspect, embodiments of this application provide a model mounting method, and the method includes:

[0006] Obtain a model mounting instruction, where the model mounting instruction is used to indicate mounting a target mounting model onto an application main model;

[0007] In response to the model mounting instruction, mount the target mounting model onto the application main model to obtain an application combined model, and adjust the model weights in the target mounting model to null values;

[0008] Obtain a target weight file corresponding to the target mounting model, and input the target weight file into the target mounting model in the application combined model to update the null values to the target weight parameters of the target weight file.

[0009] In some embodiments, before obtaining the target weight file corresponding to the target mounting model, the method further includes:

[0010] Obtain the target weight parameters of the target mounting model;

[0011] Convert the target weight parameters of the target mounting model into a target weight file corresponding to the target mounting model that conforms to the input format.

[0012] The obtaining of the target weight file corresponding to the target mounting model includes:

[0013] Obtain the target weight file corresponding to the target mounting model that conforms to the input format.

[0014] In some embodiments, before obtaining the target weight parameters of the target mounting model, the method further includes:

[0015] When there are at least two mounting models of the target category, mount the at least two mounting models to the training main model respectively to obtain at least two training combined models, where the at least two mounting models include the target mounting model;

[0016] Convert the model formats of the at least two training combined models into a general format;

[0017] Match the attribute features of each node in the at least two training combined models in the general format, and determine and obtain the model weights of the mounting models in each of the training combined models based on the matching results of the attribute features. The nodes include the modules in the training main model and the mounting models.

[0018] In some embodiments, the attribute features include node weights. The matching of the attribute features of each node in the at least two training combined models in the general format and the determination and obtaining of the model weights of the mounting models in each of the training combined models based on the matching results of the attribute features include:

[0019] Based on the model structures of the at least two training combined models, match the node weights of the nodes with the same hierarchical structure in the at least two training combined models;

[0020] When there is an abnormal node in the first training combined model, determine the node weight of the abnormal node as the model weight of the mounting model in the first training combined model, and obtain the model weight of the mounting model in the first training combined model, where the abnormal node is a node with the same position in the hierarchical structure and different node weights in the first training combined model and the second training combined model. The first training combined model is any one of the at least two training combined models, and the second training combined model is any one of the at least two training combined models other than the first training combined model.

[0021] In some embodiments, converting the target weight parameters of the target mounting model into a target weight file corresponding to the target mounting model that conforms to the input format includes:

[0022] Converting the format of the model weights of the target mounting model from a matrix format to a binary format;

[0023] Writing the model weights in the binary format into a preset file template to obtain the target weight file that conforms to the input format.

[0024] In some embodiments, the target mounting model includes at least one model unit, the weight file includes at least one unit weight, and each model unit corresponds to one unit weight. Inputting the target weight file into the target mounting model in the application combination model includes:

[0025] Adding at least one identity unit to the target mounting model, where the output of the identity unit is equal to the input of the identity unit, and each identity unit corresponds to one of the model units;

[0026] Inputting each unit weight in the at least one unit weight into the corresponding model unit through the corresponding identity unit.

[0027] In a second aspect, an embodiment of the present application provides a model mounting device, which includes:

[0028] An acquisition module, configured to acquire a model mounting instruction, where the model mounting instruction is used to indicate mounting a target mounting model to an application main model;

[0029] A mounting module, configured to respond to the model mounting instruction, mount the target mounting model to the application main model to obtain an application combination model, and adjust the model weights in the target mounting model to null values;

[0030] An input module, configured to acquire the target weight file corresponding to the target mounting model, input the target weight file into the target mounting model in the application combination model, and update the null values to the target weight parameters of the target weight file.

[0031] In a third aspect, an embodiment of the present application provides a model mounting device, which includes: a processor and a memory storing computer program instructions;

[0032] When the processor executes the computer program instructions, the above model mounting method is implemented.

[0033] Fourthly, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above model mounting method is implemented.

[0034] Fifthly, an embodiment of the present application provides a vehicle, which includes computer program instructions. When the computer program instructions are executed by a processor, the above model mounting method is implemented.

[0035] In the present application, when mounting a mounted model onto a main model for application, the model weights in the target mounted model can be adjusted to null values, and the target weight file corresponding to the target mounted model is input into the target mounted model in the application combined model, so as to update the null values to the target weight parameters of the target weight file. In this way, during the application process of the target mounted model, the weights that want to be given to the target mounted model can be input into the target mounted model in the form of input, realizing the real-time update of the weights of the target mounted model. Compared with the related technology, inputting the model weights into the mounted model in the form of a file can improve the processing speed compared with calling an interface for weight update, and will not cause the processing speed performance of the application combined model to regress after mounting the model, thus accurately and efficiently realizing the dynamic replacement of the weight parameters of the mounted model and improving the operation efficiency of the combined model. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0037] Figure 1 is a schematic flowchart of a model mounting method provided by an embodiment of the present application;

[0038] Figure 2 is a schematic structural diagram of a model mounting device provided by an embodiment of the present application;

[0039] Figure 3 is a schematic hardware structure diagram of a model mounting device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0040] The features and exemplary embodiments of various aspects of the present application will be described in detail below. To make the objectives, technical solutions, and advantages of the present application clearer and more understandable, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application and not to limit the present application. For those skilled in the art, the present application can be implemented without some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.

[0041] It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.

[0042] 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 embodiments will be described in detail below in conjunction with the accompanying drawings.

[0043] Specifically, to solve the problems of the prior art, the embodiments of the present application provide a model mounting method, apparatus, device, storage medium, and vehicle. The model mounting method provided by the embodiments of the present application will be introduced first below.

[0044] Figure 1 The flowchart of the model mounting method provided by an embodiment of the present application is shown. This method can be applied to the in-vehicle computer of a vehicle or a cloud server communicatively connected to the vehicle. The method includes the following steps:

[0045] S110, obtain a model mounting instruction, where the model mounting instruction is used to indicate mounting a target mounting model to an application main model;

[0046] In this embodiment, the application main model is responsible for the core part of model inference. The application main model can mount one mounted model each time. The mounted model can expand a certain aspect of the function of the application main model. Different mounted models are mounted on the application main model, and different aspects of the function of the application main model can be expanded. The mounted model is an attachment module or component at a certain model level of the main model, and is usually mounted on the main model in a way such as connection or embedding. The model mounting instruction is used to indicate mounting the target mounted model to the application main model.

[0047] Among them, the main model can be a TensorRT model in the PyTorch (Baidu deep learning framework) format, and the mounted model can be a LoRA model.

[0048] S120, in response to the model mounting instruction, mount the target mounted model to the application main model to obtain an application combined model, and adjust the model weights in the target mounted model to null values;

[0049] In this embodiment, in response to the model mounting instruction, the target mounted model can be mounted on the application main model to realize the fusion of the application main model and the target mounted model, and an application combined model is obtained. The model weights in the target mounted model are the inherent attributes of the mounted model. The model weights are used to affect the inference algorithm of the target mounted model, thereby affecting the response of the target mounted model to the input data. After the target mounted model is mounted to the application main model, the model weights in the application combined model need to be adjusted to null values.

[0050] S130, obtain the target weight file corresponding to the target mounted model, and input the target weight file into the target mounted model in the application combined model to update the null value to the target weight parameters of the target weight file.

[0051] In this embodiment, the mounted model includes the target mounted model. The corresponding relationship between each weight file and the mounted model can be set in advance. When it is detected that there is a target mounted model mounted to the application main model, the target weight file corresponding to the target mounted model can be obtained based on the corresponding relationship, and the target weight file is input into the mounted target mounted model. The weight file includes the weight parameters obtained in advance.

[0052] Specifically, the target weight file is used as an input item of the target mounted model in the application combined model, so as to adjust the model weights of the target mounted model in the application combined model from null values to the target weight parameters of the target weight file. In this way, the dynamic switching of the weight parameters of the mounted model in the combined model can be realized during the application process of the target mounted model.

[0053] In the embodiments of the present application, when mounting a mounted model onto a main model for application, the model weights in the target mounted model can be adjusted to null values, and the target weight file corresponding to the target mounted model is input into the target mounted model in the application combined model, so as to update the null values to the target weight parameters of the target weight file. In this way, during the application process of the target mounted model, the weights that want to be given to the target mounted model can be input into the target mounted model in the form of input, realizing real-time update of the weights of the target mounted model. Compared with the related technologies, inputting the model weights into the mounted model in the form of a file can improve the processing speed compared with calling an interface for weight update, and will not cause the processing speed performance of the application combined model after mounting the model to regress. Thus, the dynamic replacement of the weight parameters of the mounted model is accurately and efficiently realized, and the operation efficiency of the combined model is improved.

[0054] As an optional embodiment, before the above S130, it may further include:

[0055] Obtain the target weight parameters of the target mounted model;

[0056] Convert the target weight parameters of the target mounted model into a target weight file corresponding to the target mounted model that conforms to the input format;

[0057] The above S130 may include:

[0058] Obtain the target weight file corresponding to the target mounted model that conforms to the input format.

[0059] As an optional embodiment, the converting the target weight parameters of the target mounted model into a target weight file corresponding to the target mounted model that conforms to the input format includes:

[0060] Convert the format of the model weights of the target mounted model from matrix format to binary format;

[0061] Write the model weights in binary format into a preset file template to obtain the target weight file that conforms to the input format.

[0062] In this embodiment, the model weights of the target mounted model can be converted from the weight matrix in matrix format to binary format, and the model weights in binary format are written into a preset file template, and the file template is a file template that conforms to the input format, to obtain a target weight file including the mounted model weights, and the target weight file conforms to the input format of the model, where the input format is a file format that allows being used as the input of the model.

[0063] In this way, the mounted model weights can be deployed in different application environments and architectures in the form of a file, improving the flexibility of the application of the mounted model weights.

[0064] As an alternative embodiment, obtaining the target weight parameters of the target mounting model includes:

[0065] When there are at least two mounting models of the target category, respectively mounting the at least two mounting models into the training main model to obtain at least two training combined models, where the at least two mounting models include the target mounting model;

[0066] Converting the model formats of the at least two training combined models into a general format;

[0067] Matching the attribute features of each node in the at least two training combined models in the general format, and determining and obtaining the model weights of the mounting models in each of the training combined models based on the matching results of the attribute features. The nodes include the modules in the training main model and the mounting models.

[0068] In this embodiment, the training main model is the main model during the training process. Different mounting models can be mounted on the same training main model to obtain different training combined models. In different training combined models, since the main models in the training combined models are the same, the attribute features of each module on the main model are the same. However, the attribute features of different mounting models in different training combined models are different. Therefore, the attribute features of each node in the at least two training combined models can be matched, and the nodes with different attribute features in any two training combined models are determined as the nodes where the mounting models are located. The features of each node can include node weights, node levels, node biases, etc.

[0069] Specifically, before performing the attribute feature matching, the formats of all training combined models can be exported to the general format. For example, the general format can be in the form of ONNX (Open Neural Network Exchange). ONNX (Open Neural Network Exchange) is an open deep learning model representation standard, which can realize the attribute feature matching of models across platforms and frameworks.

[0070] As an alternative embodiment, the attribute features include node weights. Matching the attribute features of each node in the at least two training combined models in the general format, and determining and obtaining the model weights of the mounting models in each of the training combined models based on the matching results of the attribute features includes:

[0071] Based on the model structures of the at least two training combined models, matching the node weights of each node with the same hierarchical structure in the at least two training combined models;

[0072] In the case that there is an abnormal node in the first training combined model, determine the node weight of the abnormal node as the model weight of the mounted model in the first training combined model, and obtain the model weight of the mounted model in the first training combined model, where the abnormal node is a node with the same hierarchical structure position and different node weights in the first training combined model and the second training combined model, where the first training combined model is any one of the at least two training combined models, and the second training combined model is any one of the at least two training combined models other than the first training combined model.

[0073] In this embodiment, since the model structures of the main models in different training combined models are the same, and the connection methods between the mounted models and the main models in different training combined models are the same, the model structures of different training combined models are the same. Also, since the model weights of different mounted models are different, therefore, according to the model structure of the training combined model, by traversing and comparing the weights of each node in each training combined model, the ONNX nodes with different weights but the same position in each training combined model can be marked as the abnormal nodes in the training combined model. This abnormal node is the mounted model in the training combined model, and then the model weight of the mounted model in ONNX format can be obtained.

[0074] Exemplarily, taking the first training combined model and the second training combined model as an example, the first training combined model is any one of the at least two training combined models, and the second training combined model is any one of the at least two training combined models other than the first training combined model. The node weights of each node in each level can be traversed according to the model structures of the first training combined model and the second training combined model. The node with the same position but different node weights in the first training combined model and the second training combined model is determined as the mounted model in the first training combined model. Similarly, the node with the same position but different node weights in the second training combined model and the first training combined model is determined as the mounted model in the second training combined model.

[0075] Through the above method, the mounted model can be accurately and quickly queried from the training combined model.

[0076] As an optional embodiment, the target mounted model includes at least one model unit, the weight file includes at least one unit weight, and each model unit corresponds to one unit weight. The step of inputting the target weight file into the target mounted model in the application combined model includes:

[0077] Add at least one identity unit to the target mounting model, where the output of the identity unit is equal to the input of the identity unit, and each identity unit corresponds to one model unit;

[0078] Input each unit weight in the at least one unit weight into the corresponding model unit through the corresponding identity unit.

[0079] In this embodiment, during the process of inputting the weight file into the combined model, the model weight input can be completed by adding identity units to the mounting model and inputting the unit weights of each model unit into the corresponding model unit through the identity units.

[0080] Among them, the identity unit can be an Identity unit. The Identity unit is a special glue unit where the input of the unit is equal to the output. Through the Identity unit, a bypass path can be introduced to allow information to pass directly without additional transformation.

[0081] In the above manner, the target weight parameters can be accurately and quickly introduced into the mounting model of the combined model in the form of file input.

[0082] As an alternative embodiment, after inputting the weight file into the mounting model of the combined model to update the weight parameters of the mounting model, the method may further include:

[0083] Receive the input data of the mounting model;

[0084] Perform inference on the input data based on the updated weight parameters to obtain the output data of the mounting model.

[0085] In this embodiment, in the combined model, the mounting model can, with relatively low power consumption, assist the main model in accurately understanding and generating images of special objects that the main model cannot understand or has difficulty supporting, or certain specific image styles. The mounting model cannot run independently, so the mounting model needs to be mounted on the main model to obtain the final image generation model.

[0086] Specifically, after selecting the mounting model, a specific object module that matches the function of the mounting model can be determined in the main model, and then the mounting model can be connected to the main model according to the connection method of the specific object module.

[0087] Specifically, a specific object module in the main model that matches the function of the mounted model can be determined. The input data originally intended to be input into the specific object module is input into the specific object module and the mounted model simultaneously. After that, in response to the input data, the specific object module can obtain module output data. Similarly, the mounted model can also obtain the output data of the mounted model based on the updated weight parameters in response to the input data. The module output data and the output data of the mounted model can be added together to obtain the fused data, and the fused data is used as the model output at the level of the mounted model in the combined model and output to the next level, thus completing the mounting of the mounted model.

[0088] In this embodiment, by using the mounted model to adjust the parameters of the main model, the image generation accuracy of the main model can be improved with relatively low power consumption.

[0089] Based on the model mounting method provided in the above embodiment, correspondingly, the present application also provides a specific implementation manner of the model mounting device. Please refer to the following embodiments.

[0090] First, refer to Figure 2 , the model mounting device 200 provided in the embodiment of the present application includes the following modules:

[0091] An obtaining module 201, configured to obtain a model mounting instruction for instructing to mount a target mounted model to an application main model;

[0092] A mounting module 202, configured to, in response to the model mounting instruction, mount the target mounted model to the application main model to obtain an application combined model, and set the model weights in the target mounted model to null values;

[0093] An input module 203, configured to obtain a target weight file corresponding to the target mounted model, input the target weight file into the target mounted model in the application combined model, and update the null values to the target weight parameters of the target weight file.

[0094] When the device applies by mounting the mounted model to the main model, it can adjust the model weights in the target mounted model to null values, and input the target weight file corresponding to the target mounted model into the target mounted model in the application combined model to update the null values to the target weight parameters of the target weight file. In this way, during the application process of the target mounted model, the weights that want to be given to the target mounted model can be input into the target mounted model in the form of input, realizing the real-time update of the weights of the target mounted model. Compared with related technologies, inputting the model weights into the mounted model in the form of a file can improve the processing speed compared with calling an interface to update the weights, and will not cause the processing speed performance of the application combined model after mounting the model to regress, thus accurately and efficiently realizing the dynamic replacement of the weight parameters of the mounted model and improving the operation efficiency of the combined model.

[0095] As an implementation manner of the present application, the above-mentioned model mounting device 200 may further include:

[0096] A parameter obtaining module, configured to obtain the target weight parameters of the target mounted model;

[0097] A conversion module, configured to convert the target weight parameters of the target mounted model into a target weight file corresponding to the target mounted model that conforms to the input format;

[0098] The above-mentioned input module 203 may further be configured to:

[0099] Obtain the target weight file corresponding to the target mounted model that conforms to the input format.

[0100] As an implementation manner of the present application, the above-mentioned parameter obtaining module may further include:

[0101] A training unit, configured to, when there are at least two mounted models of the target category, respectively mount the at least two mounted models to a training main model to obtain at least two training combined models, where the at least two mounted models include the target mounted model;

[0102] A conversion unit, configured to convert the model formats of the at least two training combined models into a general format;

[0103] A matching unit, configured to match the attribute features of each node in the at least two training combined models in the general format, and determine and obtain the model weights of the mounted models in each of the training combined models based on the matching result of the attribute features, where the nodes include the modules in the training main model and the mounted models.

[0104] As an implementation manner of the present application, the above-mentioned matching unit may further include:

[0105] A matching subunit, configured to match the node weights of each node with the same hierarchical structure in the at least two training combined models based on the model structures of the at least two training combined models;

[0106] A determining subunit, configured to, when there is an abnormal node in the first training combined model, determine the node weight of the abnormal node as the model weight of the mounted model in the first training combined model, and obtain the model weight of the mounted model in the first training combined model, where the abnormal node is a node with the same position in the hierarchical structure and different node weights in the first training combined model and the second training combined model, where the first training combined model is any one of the at least two training combined models, and the second training combined model is any one of the at least two training combined models other than the first training combined model.

[0107] As an implementation manner of the present application, the above conversion module may further be configured to:

[0108] Convert the format of the model weight of the target mounted model from a matrix format to a binary format;

[0109] Write the model weight in the binary format into a preset file template to obtain the target weight file that conforms to the input format.

[0110] As an implementation manner of the present application, the above input module 203 may further be configured to:

[0111] Add at least one identity unit to the target mounted model, where the output of the identity unit is equal to the input of the identity unit, and each identity unit corresponds to one model unit;

[0112] Input each unit weight in the at least one unit weight into the corresponding model unit through the corresponding identity unit.

[0113] The model mounting device provided by the embodiments of the present invention can implement each step in the above method embodiments. To avoid repetition, details are not described here again.

[0114] Figure 3 FIG. shows a schematic hardware structure diagram of a model mounting device provided by an embodiment of the present application.

[0115] The model mounting device may include a processor 301 and a memory 302 storing computer program instructions.

[0116] Specifically, the above-mentioned processor 301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured as one or more integrated circuits for implementing the embodiments of the present application.

[0117] The memory 302 may include a mass storage for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disc, a magneto-optical disc, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In a suitable case, the memory 302 may include removable or non-removable (or fixed) media. In a suitable case, the memory 302 may be internal or external to the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid state memory.

[0118] The memory may include a read only memory (ROM), a random access memory (RAM), a magnetic disk storage media device, an optical storage media device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present disclosure.

[0119] The processor 301 reads and executes the computer program instructions stored in the memory 302 to implement any one of the model mounting methods in the above embodiments.

[0120] In one example, the model mounting device may further include a communication interface 303 and a bus 310. Among them, as Figure 3 shown, the processor 301, the memory 302, and the communication interface 303 are connected through the bus 310 and complete communication with each other.

[0121] The communication interface 303 is mainly used to implement communication between each module, device, unit, and / or device in the embodiments of the present application.

[0122] The bus 310 includes hardware, software, or both, and couples the components of the model mounting device to each other. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, the bus 310 may include one or more buses. Although the embodiments of the present application describe and illustrate specific buses, the present application contemplates any suitable bus or interconnect.

[0123] The model mounting device may be based on the above embodiments, so as to implement the model mounting method and device in combination with the above.

[0124] In addition, in combination with the model mounting method in the above embodiments, the embodiments of the present application may provide a computer storage medium to implement. Computer program instructions are stored on the computer storage medium; when the computer program instructions are executed by a processor, any one of the model mounting methods in the above embodiments is implemented, and the same technical effects can be achieved. To avoid repetition, it will not be described in detail here. Among them, the above computer-readable storage medium may include a non-transitory computer-readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disc, etc., which are not limited herein.

[0125] In addition, the embodiments of the present application also provide a vehicle, including computer program instructions, which can implement the steps and corresponding contents of the foregoing method embodiments when executed by a processor.

[0126] It should be clear that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, the detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present application.

[0127] The functional blocks shown in the above structural block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, and so on. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted via a data signal carried in a carrier wave over a transmission medium or a communication link. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical discs, hard disks, fiber optic media, radio frequency (RF) links, and so on. The code segment can be downloaded via a computer network such as the Internet, an intranet, and so on.

[0128] It should also be noted that the exemplary embodiments mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps can be executed in the order mentioned in the embodiments, or different from the order in the embodiments, or several steps can be executed simultaneously.

[0129] The aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of methods, devices, and vehicles according to embodiments of the present disclosure. It should be understood that each block in the flowcharts and / or block diagrams, and the combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the functions / actions specified in one or more blocks of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each block in the block diagram and / or flowchart, and the combinations of blocks in the block diagram and / or flowchart, can also be implemented by dedicated hardware that performs the specified functions or actions, or by a combination of dedicated hardware and computer instructions.

[0130] The above is only the specific implementation manner of the present application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, modules, and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein. It should be understood that the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present application.

Claims

1. A model mounting method, characterized in that, The method includes: Obtaining a model mounting instruction for instructing to mount a target mounting model to an application main model; In response to the model mounting instruction, mounting the target mounting model to the application main model to obtain an application combined model, and adjusting the model weights in the target mounting model to null values; Obtaining a target weight file corresponding to the target mounting model, and inputting the target weight file into the target mounting model in the application combined model to update the null values to the target weight parameters of the target weight file.

2. The model mounting method according to claim 1, characterized in that, Before obtaining the target weight file corresponding to the target mounting model, it includes: Obtaining the target weight parameters of the target mounting model; Converting the target weight parameters of the target mounting model into a target weight file corresponding to the target mounting model that conforms to the input format; The obtaining the target weight file corresponding to the target mounting model includes: Obtaining the target weight file corresponding to the target mounting model that conforms to the input format.

3. The model mounting method according to claim 2, characterized in that, The obtaining the target weight parameters of the target mounting model includes: When there are at least two mounting models in the target category, respectively mounting the at least two mounting models to a training main model to obtain at least two training combined models, where the at least two mounting models include the target mounting model; Converting the model formats of the at least two training combined models into a general format; Matching the attribute features of each node in the at least two training combined models in the general format, and determining and obtaining the model weights of the mounting models in each of the training combined models based on the matching results of the attribute features, where the nodes include the modules in the training main model and the mounting models.

4. The model mounting method according to claim 3, characterized in that, The attribute features include node weights. The matching the attribute features of each node in the at least two training combined models in the general format and determining and obtaining the model weights of the mounting models in each of the training combined models based on the matching results of the attribute features includes: Based on the model structures of the at least two training combined models, matching the node weights of the nodes with the same hierarchical structure in the at least two training combined models; When there is an abnormal node in a first training combined model, determining the node weight of the abnormal node as the model weight of the mounting model in the first training combined model, and obtaining the model weight of the mounting model in the first training combined model, where the abnormal node is a node with the same position in the hierarchical structure and different node weights in the first training combined model and a second training combined model, where the first training combined model is any one of the at least two training combined models, and the second training combined model is any one of the at least two training combined models other than the first training combined model.

5. The model mounting method according to claim 2, characterized in that, The converting the target weight parameters of the target mounting model into a target weight file corresponding to the target mounting model that conforms to the input format includes: Converting the format of the model weights of the target mounting model from a matrix format to a binary format; Write the model weights in the binary format to a preset file template to obtain the target weight file that conforms to the input format.

6. The model mounting method according to claim 1, characterized in that, The target mounted model includes at least one model unit, and the weight file includes at least one unit weight. Each model unit corresponds to one unit weight. The step of inputting the target weight file into the target mounted model in the application combined model includes: Add at least one identity unit in the target mounted model. The output of the identity unit is equal to the input of the identity unit, and each identity unit corresponds to one of the model units; Input each unit weight in the at least one unit weight into the corresponding model unit through the corresponding identity unit.

7. A model mounting device, characterized in that, The device includes: An acquisition module, configured to acquire a model mounting instruction, where the model mounting instruction is used to indicate mounting a target mounted model to an application main model; A mounting module, configured to respond to the model mounting instruction, mount the target mounted model to the application main model to obtain an application combined model, and adjust the model weights in the target mounted model to null values; An input module, configured to acquire the target weight file corresponding to the target mounted model, input the target weight file into the target mounted model in the application combined model, and update the null values to the target weight parameters of the target weight file.

8. A model mounting device, characterized in that, The model mounting device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the model mounting method according to any one of claims 1-6 is implemented.

9. A computer storage medium, characterized in that, Computer program instructions are stored on the computer storage medium, and when the computer program instructions are executed by the processor, the model mounting method according to any one of claims 1-6 is implemented.

10. A vehicle, characterized in that, The vehicle includes at least one of the above-mentioned model mounting device, model mounting equipment, and computer storage medium.