Adapter parameter group updating method and task processing method

By combining multi-dimensional parameters in a large pre-trained model, an adapter parameter set capable of handling both existing and new tasks is generated. This solves the problem of model skill forgetting caused by limited storage space and achieves model scalability and core task integrity protection.

CN121635929APending Publication Date: 2026-03-10GRG INTELLIGENT TECH SOLUTION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies, when fine-tuning large pre-trained models, employ simple replacement strategies to save storage space, causing the model to forget old task skills. Furthermore, they cannot achieve continuous expansion of model functionality on resource-constrained terminals. Moreover, existing model merging methods may dilute adapter parameters for important tasks, affecting the performance of core functions.

Method used

By identifying reference adapter parameter groups with high similarity and importance from the repository, multi-dimensional parameter combinations are performed to generate a third adapter parameter group that can handle both existing and new tasks. When there are empty slots in the repository, the parameters of the new tasks are stored directly to protect the integrity of the core tasks.

Benefits of technology

While saving storage space, it ensures that the model retains old skills and acquires new skills, improves the model's scalability, protects the processing power of core tasks, and enhances user experience and the ability to continuously expand functionality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121635929A_ABST
    Figure CN121635929A_ABST
Patent Text Reader

Abstract

The invention discloses an adapter parameter group updating method and a task processing method, and belongs to the field of artificial intelligence. The method comprises the steps that under the condition that a first adapter parameter set of a new task is downloaded, a reference adapter parameter set and a reference slot position where the reference adapter parameter set is located are determined from second adapter parameter sets stored in slot positions of a storage library; determining a similarity dynamic threshold based on the importance degree of each task corresponding to the reference adapter parameter group; under the condition that no empty slot exists in the storage library or the similarity between the first adapter parameter set and the reference adapter parameter set is higher than a similarity dynamic threshold value, multi-dimensional parameter combination merging is carried out on the first adapter parameter set and the reference adapter parameter set; and the second adapter parameter set in the reference slot position is updated to the third adapter parameter set obtained through combination, so that the storage space is saved, the obtained third adapter parameter set can process original old tasks and new tasks, and the expandability of the model is 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, and in particular relates to a method for updating adapter parameter groups and a task processing method. Background Technology

[0002] When fine-tuning a large pre-trained model (such as Llama, GPT), the original hundreds of billions of model parameters are typically not modified. Instead, they are "frozen," and new, very small parameter set modules are inserted into the model's network structure. Only these newly inserted modules are trained; these modules are called adapters, and the corresponding parameter sets are called adapter parameter sets. Different adapter parameter sets are trained for different tasks.

[0003] Terminal storage space is limited. In order to save storage space, related technologies adopt a simple replacement strategy, that is, to replace the old adapter parameter set with the new adapter parameter set. This will cause the terminal to "forget" the old tasks or skills, which is not conducive to the continuous expansion of model functions. Summary of the Invention

[0004] This application aims to address at least one of the technical problems existing in related technologies. To this end, this application proposes an adapter parameter group update method and a task processing method, which, while saving storage space, enables the third adapter parameter group to handle not only existing tasks but also new tasks, thereby improving the scalability of the model.

[0005] In a first aspect, this application provides a method for updating an adapter parameter group, the method comprising: When downloading the first adapter parameter group corresponding to a new task, the reference adapter parameter group and the reference slot where the reference adapter parameter group is located are determined from the second adapter parameter groups stored in each slot of the repository; the similarity between the first adapter parameter group and the reference adapter parameter group is higher than the similarity between the first adapter parameter group and other second adapter parameter groups; Obtain and determine the dynamic similarity threshold based on the importance of each task corresponding to the reference adapter parameter group; If there are no empty slots in the repository, or if the similarity between the first adapter parameter group and the reference adapter parameter group is higher than the dynamic similarity threshold, the first adapter parameter group and the reference adapter parameter group are combined in multiple dimensions to obtain the third adapter parameter group. Update the second adapter parameter group in the reference slot to the third adapter parameter group.

[0006] According to the adapter parameter group update method of this application, when downloading the first adapter parameter group corresponding to a new task, a reference adapter parameter group and the reference slot where the reference adapter is located are determined from the second adapter parameter groups stored in each slot of the repository; the similarity between the first adapter parameter group and the reference adapter parameter group is higher than the similarity between the first adapter parameter group and other second adapter parameter groups; a dynamic similarity threshold is obtained and determined based on the importance of each task corresponding to the reference adapter parameter group; when there are no empty slots in the repository, or when the similarity between the first adapter parameter group and the reference adapter parameter group is higher than the dynamic similarity threshold, the first adapter parameter group and the reference adapter parameter group are combined and merged in multiple dimensions to obtain a third adapter parameter group; the second adapter parameter group in the reference slot is updated to the third adapter parameter group. While saving storage space, the obtained third adapter parameter group can not only handle the original tasks, but also handle the new tasks. That is, it not only does not "forget" the old skills, but also has the new skills for the new tasks, thus improving the scalability of the model.

[0007] According to one embodiment of this application, after determining the dynamic similarity threshold, the method further includes: If there is an empty slot in the repository and the similarity between the first adapter parameter group and the reference adapter parameter group is lower than the dynamic similarity threshold, the first adapter parameter group will be stored in an empty slot in the repository.

[0008] According to one embodiment of this application, determining a reference adapter parameter set from a second adapter parameter set stored in each slot of the repository includes: Determine the similarity between the first adapter parameter group and each of the second adapter parameter groups; Use the second adapter parameter group corresponding to the highest similarity as the reference adapter parameter group.

[0009] According to one embodiment of this application, obtaining and determining a dynamic similarity threshold based on the importance of each task corresponding to the reference adapter parameter group includes: Based on the pre-created mapping relationship between adapter parameter groups and tasks, determine each reference task corresponding to the reference adapter parameter group and obtain the importance of each reference task; The maximum importance is determined from the importance of each reference task corresponding to the reference adapter parameter group; The amount of similarity change is determined based on the maximum importance and the importance adjustment factor; Based on the change in similarity, the preset initial similarity threshold is adjusted to obtain the dynamic similarity threshold.

[0010] According to one embodiment of this application, downloading the first adapter parameter group corresponding to the new task includes: downloading the first adapter parameter group corresponding to the new task and the importance of each new task; The parameter combination of the first adapter parameter group and the reference adapter parameter group is performed in multiple dimensions, including: The initial effective weights of each reference task are determined based on the importance of each reference task in the reference adapter parameter group, and the initial effective weights of new tasks are determined based on the importance of new tasks; there is a positive correlation between the initial effective weights and the importance. The initial effective weights of each reference task are adjusted based on the usage frequency and frequency adjustment factor of each reference task to obtain the effective weights of each reference task. Based on the effective weights of each reference task, the initial effective weights of the new task are adjusted to obtain the effective weights of the new task. Based on the effective weights of each reference task and the effective weights of the new task, the first adapter parameter group and the reference adapter parameter group are combined in multiple dimensions to obtain the third adapter parameter group.

[0011] According to one embodiment of this application, the initial effective weights of each reference task are obtained and adjusted based on the usage frequency and frequency adjustment factor of each reference task to obtain the effective weights of each reference task, including: For each reference task, the adjustment ratio of the initial effective weight of the reference task is determined based on the usage frequency and usage frequency adjustment factor of the reference task. The initial effective weights of the reference task are adjusted according to the adjustment ratio of the initial effective weights of the reference task to obtain the effective weights of the reference task.

[0012] According to one embodiment of this application, the initial effective weight of the new task is adjusted based on the effective weight of each reference task to obtain the effective weight of the new task, including: The effective weights of each reference task are summed to obtain the total effective weights. Based on the total effective weight and the weight adjustment factor, determine the adjustment ratio of the initial effective weight of the new task; The initial effective weight of the new task is adjusted by adjusting the initial effective weight of the new task to obtain the effective weight of the new task.

[0013] According to one embodiment of this application, based on the effective weights of each reference task and the effective weights of the new task, a third adapter parameter set is obtained by multi-dimensional parameter combination and merging of the first adapter parameter set and the reference adapter parameter set, including: Based on the total effective weight of each reference task and the effective weight of the new task, the first adapter parameter group and the reference adapter parameter group are weighted and averaged to obtain the third adapter parameter group.

[0014] According to one embodiment of this application, after updating the second adapter parameter group in the reference slot to the third adapter parameter group, the method further includes: Update the mapping relationship between the reference adapter parameter group and the reference task to the mapping relationship between the third adapter parameter group, the reference task, and the new task, and store the importance of the new task; After storing the first adapter parameter set in an empty slot in the repository, the method further includes: Create and store the mapping between the first adapter parameter group and the new task, as well as the importance of the new task.

[0015] Secondly, this application provides a task processing method, including: If the task to be executed input by the user is not a model update task, the target adapter parameter group corresponding to the task to be executed is determined from the second adapter parameter group stored in each slot of the repository. The pre-trained base language model and target adapter parameter set are loaded into memory, and then the base language model and target adapter parameter set are merged to obtain the target language model. Input the task to be executed into the target large language model, and obtain the output result of the target large language model after inference; The intelligent agent processes the output results into instructions to obtain the instructions to be executed. Execute the pending instructions; The target adapter parameter set is updated according to the update method for the adapter parameter set described above.

[0016] The task processing method and decision-making and fusion mechanism provided in this application embodiment can be integrated into a lightweight framework that runs entirely locally on the terminal (e.g., in-vehicle terminal). It can strictly separate the "learning" (the aforementioned adapter parameter update) and "use" (model reasoning) processes, ensuring the continuous evolution of functions and the real-time nature of interaction.

[0017] According to one embodiment of this application, determining the target adapter parameter group corresponding to the task to be executed from the second adapter parameter group stored in each slot of the repository includes: Based on the pre-created mapping relationship between adapter parameter groups and tasks, the target adapter parameter group corresponding to the task to be executed is determined.

[0018] According to one embodiment of this application, the method further includes: If the user inputs a model update task, the basic large language model is updated.

[0019] Thirdly, this application provides an adapter parameter group updating device, comprising: The first processing module is used to determine the reference adapter parameter group and the reference slot where the reference adapter is located from the second adapter parameter groups stored in each slot of the repository when downloading the first adapter parameter group corresponding to the new task; the similarity between the first adapter parameter group and the reference adapter parameter group is higher than the similarity between the first adapter parameter group and other second adapter parameter groups. The second processing module is used to obtain and determine the dynamic similarity threshold based on the importance of each task corresponding to the reference adapter parameter group. The third processing module is used to perform multi-dimensional parameter combination and merge of the first adapter parameter group and the reference adapter parameter group to obtain the third adapter parameter group when there are no empty slots in the repository or when the similarity between the first adapter parameter group and the reference adapter parameter group is higher than the similarity dynamic threshold. The fourth processing module is used to update the second adapter parameter group in the reference slot to the third adapter parameter group.

[0020] Fourthly, this application provides a data processing apparatus, the apparatus comprising: The first processing module is used to determine the target adapter parameter group corresponding to the task to be executed from the second adapter parameter group stored in each slot of the repository, when the task to be executed input by the user is not a model update task. The second processing module is used to load the pre-trained basic large language model and the target adapter parameter set into memory, and to merge the basic large language model and the target adapter parameter set to obtain the target large language model. The third processing module is used to input the task to be executed into the target large language model and obtain the output result of the target large language model after inference. The fourth processing module is used to process the output results into instructions through the intelligent agent to obtain the instructions to be executed; The execution module is used to execute the instructions to be executed. The target adapter parameter set is updated based on the aforementioned adapter parameter set update method.

[0021] Fifthly, this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for updating the adapter parameter group as described in the first aspect above.

[0022] In a sixth aspect, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for updating the adapter parameter group as provided in the first aspect above.

[0023] In a seventh aspect, this application provides a chip including a processor and a communication interface coupled to the processor, the processor being used to run a program or instructions to implement the adapter parameter group update method as provided in the first aspect.

[0024] Eighthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method for updating the adapter parameter group as provided in the first aspect above.

[0025] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects: When downloading the first adapter parameter set corresponding to a new task, the reference adapter parameter set and the reference slot where the reference adapter is located are determined from the second adapter parameter sets stored in each slot of the repository. The similarity between the first adapter parameter set and the reference adapter parameter set is higher than the similarity between the first adapter parameter set and other second adapter parameter sets. The importance of each task corresponding to the reference adapter parameter set is obtained and a dynamic similarity threshold is determined. If there are no empty slots in the repository, or if the similarity between the first adapter parameter set and the reference adapter parameter set is higher than the dynamic similarity threshold, the first adapter parameter set and the reference adapter parameter set are combined and merged in multiple dimensions to obtain the third adapter parameter set. The second adapter parameter set in the reference slot is updated to the third adapter parameter set. While saving storage space, the obtained third adapter parameter set can not only handle the original tasks, but also handle the new tasks. That is, it not only does not "forget" the old skills, but also has the new skills for the new tasks, thus improving the scalability of the model.

[0026] If the similarity between the first adapter parameter group and the reference adapter parameter group is lower than the dynamic similarity threshold, it indicates that the task of the reference adapter parameter group is the core task. In this case, in order not to weaken or "dilute" the ability of the reference adapter parameter group to process the original task, the first adapter parameter group can be directly stored in an empty slot in the repository, thereby protecting the integrity of the reference adapter parameter group in processing the core task.

[0027] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0028] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is a schematic diagram of the system architecture for implementing the adapter parameter group update method provided in the embodiments of this application; Figure 2 This is one of the flowcharts illustrating the method for updating the allocator parameter group provided in the embodiments of this application; Figure 3 This is a second schematic flowchart of the method for updating the organelle parameter group provided in the embodiments of this application; Figure 4 This is one of the flowcharts illustrating the task processing method provided in the embodiments of this application; Figure 5 This is a schematic diagram of the structure of the adapter parameter group updating device provided in the embodiments of this application; Figure 6 This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this application; Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0029] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0030] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0031] With the development of artificial intelligence technology, intelligent connected vehicles are gradually evolving into "supercomputers on four wheels." Their core intelligent experiences, such as human-machine interaction in intelligent cockpits and scene understanding in Advanced Driver Assistance Systems (ADAS), heavily rely on large-scale AI (Artificial Intelligence) models (large language models). To enable these general-purpose large models to accurately serve specific tasks (such as specific road conditions, specific driver habits, and specific interaction languages), the industry commonly adopts Parameter Efficient Fine Tuning (PEFT) technology, especially the Low Rank Adaptation (LoRA) method. This method only requires training a very small set of adapter parameters for each new task, which can extend the functionality of the basic large model without modifying it. However, when applying this technology to resource-constrained in-vehicle terminals, existing solutions have significant drawbacks: 1. The simple replacement strategy adopted to save space, namely, replacing the old adapter parameter set with the new adapter parameter set, will cause the vehicle to "forget" the old skills for handling tasks. For example, it may learn to recognize nighttime road conditions but forget how to handle rainy road conditions, which is unacceptable in practical applications. 2. Insufficient repository space limits the continuous expansion of AI model functionality; 3. Existing model merging methods typically employ a simple parameter averaging method. This "one-size-fits-all" averaging approach poses a significant risk in the automotive field: adapter parameters for a highly important safety-critical task (such as "fatigue driving monitoring") may be "contaminated" or "diluted" by adapter parameters for a less important entertainment task (such as "switching music skins"), thereby leading to a decline in the performance of core safety functions. 4. When performing adapter parameter fusion, the adapter parameters of user preferences or frequently triggered tasks may be weakened, which greatly reduces the user experience.

[0032] To address at least one of the aforementioned technical problems, embodiments of this application provide a method for updating adapter parameter groups and a task processing method.

[0033] The following description, in conjunction with the accompanying drawings, details a method for updating adapter parameter groups and a method for processing tasks provided in this application, through specific embodiments and application scenarios.

[0034] See Figure 1 This application provides a schematic diagram of a system architecture for implementing a method for updating adapter parameter groups, including a terminal 110 and a server 120; Server 120 can send new tasks, along with information such as the first adapter parameter group and importance level corresponding to the new task, to terminal 110.

[0035] The method for updating the adapter parameter group can be applied to terminal 110, and can be executed by the hardware or software in terminal 110.

[0036] Terminal 110 can be VR glasses, smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, and in-vehicle terminals, but is not limited to these.

[0037] Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server or server cluster that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0038] Terminal 110 and server 120 communicate via a network connection.

[0039] Furthermore, the instrumentation parameter group updating method provided in this application embodiment can be executed by an electronic device or a functional module or entity in an electronic device that can implement the instrumentation parameter group updating method. The electronic devices mentioned in this application embodiment include, but are not limited to, mobile phones, tablets, computers, cameras, and wearable devices. The following uses an electronic device as the execution subject to illustrate the instrumentation parameter group updating method provided in this application embodiment.

[0040] like Figure 2 As shown, the method for updating the configurator parameter group includes steps 210, 220, 230, and 240.

[0041] Step 210: When downloading the first adapter parameter group corresponding to the new task, determine the reference adapter parameter group and the reference slot where the reference adapter parameter group is located from the second adapter parameter groups stored in each slot of the repository; the similarity between the first adapter parameter group and the reference adapter parameter group is higher than the similarity between the first adapter parameter group and other second adapter parameter groups.

[0042] In the context of large language models (such as GPT, BERT, etc.), the adapter parameter set refers to a lightweight structure that is fine-tuned on top of a pre-trained large neural network model to adapt to a specific task or application.

[0043] Compared to retraining the entire large language model, fine-tuning using adapter parameter sets requires significantly less computational resources. By adjusting only a limited set of adapter parameters, a large language model can be easily adapted to different tasks. For example, an adapter module can be added to one model for text classification, and another adapter can be added for machine translation. Multiple tasks can share a single set of adapter parameters.

[0044] When downloading a new task in this embodiment, the new first adapter parameter group corresponding to the new task and information such as the importance of the new task will also be downloaded.

[0045] The adapter parameter set is a set of data, including but not limited to at least some of the following: weight matrix, bias term, bottleneck layer parameter set, activation function parameter set, and residual connection parameter set.

[0046] A repository is a collection for storing and managing adapter parameter sets, and can also store model parameters and configuration data for large language models, without limitation.

[0047] The adapter parameter set already stored in the repository is called the second adapter parameter set. The maximum capacity of the repository is K, which represents the number of K slots.

[0048] A set of adapter parameters can have a one-to-one relationship or a one-to-many relationship with a task. That is, a set of adapter parameters can handle multiple tasks. For example, a set of adapter parameters can handle both weather reporting tasks and audio / video playback tasks.

[0049] Assume the repository contains pre-installed adapter parameter sets for m tasks. (Assuming a one-to-one relationship here), the basic tasks supported by each adapter parameter group are as follows: And the importance of each task, which can be specifically represented by a score, respectively. .

[0050] In addition, a mapping relationship between adapter parameter groups and tasks is created during the initialization process. Specifically, this mapping relationship can be a mapping relationship between the slot index corresponding to the adapter parameter group and the task identifier. This mapping relationship can be stored in the task-adapter parameter group mapping table. Available ←{t i}, i=1,2,3,...,m.

[0051] In addition, a task usage frequency tracking table was created during the initialization process. Set the initial usage frequency count of all tasks to 0 (or a base value), i.e. , i=1,2,3,...,m.

[0052] A task importance registry was also created during the initialization process. Assign a predefined level of importance to each of the aforementioned m basic tasks, i.e. , i=1,2,3,...,m.

[0053] The first adapter parameter set corresponding to a new task (the n=m+1th task) is the adapter parameter set downloaded most recently. The first adapter parameter set corresponding to the new task can be downloaded when the server indicates that there is a new task, or it can be checked periodically at certain time points (such as 5 o'clock, 10 o'clock, etc.) or at regular intervals. If there is a new first adapter parameter set corresponding to the task, the first adapter parameter set corresponding to the new task and its importance are downloaded.

[0054] After downloading the first adapter parameter group, it is necessary to find a reference adapter parameter group that is most similar to the first adapter parameter group from the second adapter parameter groups stored in each slot of the repository, as well as the reference slot in the repository where the reference adapter parameter group is stored.

[0055] Specifically, the parameter group similarity between the first adapter parameter group and each second adapter parameter group can be determined, and the second adapter parameter group corresponding to the maximum parameter group similarity can be used as the reference adapter parameter group.

[0056] Step 220: Obtain and determine the dynamic similarity threshold based on the importance of each task corresponding to the reference adapter parameter group.

[0057] As illustrated in the foregoing embodiments, each task has a degree of importance. This degree of importance can be a set of parameters used to characterize the importance of a task, determined from perspectives such as security and user frequency. The higher the degree of importance of a task, the more difficult it is for the adapter parameter set of that task to be merged by the first adapter parameter set of a new task. This is consistent with the actual situation, because the more important a task is, the less likely its corresponding adapter parameter set can be changed arbitrarily (for example, if an early warning task is merged by the parameter set of other tasks, then the early warning task will be affected, and security is undoubtedly more important).

[0058] Therefore, a dynamic similarity threshold needs to be calculated based on the importance of each task corresponding to the reference adapter parameter group. This dynamic similarity threshold is an important indicator for determining whether the first adapter parameter group of a new task can be merged into the reference adapter parameter group.

[0059] Specifically, the maximum importance can be determined from the importance of each task corresponding to the reference adapter parameter group. Then, based on the maximum importance and the preset importance adjustment factor, the similarity change is determined. Based on the similarity change, the preset initial similarity is adjusted to obtain the dynamic similarity threshold. The detailed process is described in the following section.

[0060] Step 230: If there are no empty slots in the repository, or if the similarity between the first adapter parameter group and the reference adapter parameter group is higher than the dynamic similarity threshold, perform multi-dimensional parameter combination and merging on the first adapter parameter group and the reference adapter parameter group to obtain the third adapter parameter group.

[0061] Step 240: Update the second adapter parameter group in the reference slot to the third adapter parameter group.

[0062] As described in the foregoing embodiments, the storage space of the repository is divided into multiple slots, each slot can store a set of adapter parameter groups.

[0063] The reference adapter parameter group is the adapter that is most similar to the first adapter parameter group among the second adapter parameter groups stored in the repository. If there is no empty slot in the repository (no slot for storing parameter groups), it means that the first adapter parameter group of the new task cannot occupy an independent empty slot on its own. In this case, in order for the new task to be executed later, the first adapter parameter group corresponding to the new task and the reference adapter parameter group need to be combined with multi-dimensional parameters to obtain the merged adapter parameter group. The third adapter parameter group obtained after merging generally has the same dimensions as the reference adapter parameter group and / or the first adapter parameter group.

[0064] Therefore, the third adapter parameter group not only supports the original tasks, but also supports new tasks.

[0065] Additionally, if there are empty slots in the repository, it means that the repository has enough space to store the first adapter parameter group of the new task. In this case, it is necessary to determine whether the first adapter parameter group of the new task can be merged with the reference adapter parameter group from the perspective of saving storage space and the importance of the task in the reference adapter parameter group.

[0066] The higher the maximum importance value of each task in the reference adapter parameter group, the higher the determined dynamic similarity threshold, and the lower the probability of merging the two. Conversely, the lower the maximum importance value of each task in the reference adapter parameter group, the lower the determined dynamic similarity threshold, and the higher the probability of merging the two.

[0067] That is, the similarity dynamic threshold is not a preset fixed parameter, but a dynamic parameter that can characterize the importance of the task.

[0068] In this embodiment of the application, when the similarity between the first adapter parameter group and the reference adapter parameter group of the new task is higher than the dynamic similarity threshold, the first adapter parameter group and the reference adapter parameter group of the new task are combined in multiple dimensions to obtain the third adapter parameter group.

[0069] After obtaining the third adapter parameter group, the reference adapter parameter group in the reference slot in the repository is updated to the merged third adapter parameter group, thereby saving storage space in the repository.

[0070] The adapter parameter group update method provided in this application embodiment, when downloading the first adapter parameter group corresponding to a new task, determines the reference adapter parameter group and the reference slot where the reference adapter is located from the second adapter parameter groups stored in each slot of the repository; the similarity between the first adapter parameter group and the reference adapter parameter group is higher than the similarity between the first adapter parameter group and other second adapter parameter groups; obtains and determines a dynamic similarity threshold based on the importance of each task corresponding to the reference adapter parameter group; when there are no empty slots in the repository, or when the similarity between the first adapter parameter group and the reference adapter parameter group is higher than the dynamic similarity threshold, performs multi-dimensional parameter combination and merging on the first adapter parameter group and the reference adapter parameter group to obtain a third adapter parameter group; updates the second adapter parameter group in the reference slot to the third adapter parameter group, saving storage space while ensuring that the merged third adapter parameter group can not only handle the original tasks but also handle the new tasks, that is, it not only does not "forget" the old skills but also has the new skills for the new tasks, thus improving the scalability of the model.

[0071] In some embodiments, after step 220, the method further includes: If there is an empty slot in the repository and the similarity between the first adapter parameter group and the reference adapter parameter group is lower than the dynamic similarity threshold, the first adapter parameter group will be stored in an empty slot in the repository.

[0072] If there are empty slots in the repository, it means there is enough storage space to store the first adapter parameter set for the new task. However, as the previous embodiments have also shown, if the similarity between the first adapter parameter set and the reference adapter parameter set is higher than the dynamic similarity threshold, in order to save storage space, the first adapter parameter set and the reference adapter parameter set are combined in a multi-dimensional parameter combination. Conversely, if the similarity between the first adapter parameter set and the reference adapter parameter set is lower than the dynamic similarity threshold, it means that the task corresponding to the maximum importance of the reference adapter parameter set is the core task. In this case, in order not to weaken or "dilute" the ability of the reference adapter parameter set to process the original task, the first adapter parameter set can be directly stored in an empty slot in the repository, thereby protecting the integrity of the reference adapter parameter set in processing the core task.

[0073] In some embodiments, determining a reference adapter parameter set from a second adapter parameter set stored in each slot of the repository includes: Determine the similarity between the first adapter parameter group and each of the second adapter parameter groups; Use the second adapter parameter group corresponding to the highest similarity as the reference adapter parameter group.

[0074] Each adapter parameter group can be represented by a multi-dimensional matrix. To reduce computational complexity, the multi-dimensional matrix can be flattened to convert it into a one-dimensional vector.

[0075] Similarity can be calculated using similarity algorithms, such as the cosine similarity algorithm.

[0076] In one specific embodiment, it can be determined by the following formula (1): (1), Where n represents the new task, n = m + 1, m is the number of second adapter parameter sets already stored in the repository, and i represents any second adapter parameter set in the repository. The first adapter parameter set characterizing the new task. Let f(·) represent the i-th second adapter parameter set, and let f(·) represent the flattening operation, which transforms the adapter parameter set, represented as a multi-dimensional matrix, into a one-dimensional vector. The first adapter parameter set characterizing the new task Similarity with the i-th second adapter parameter group.

[0077] Next, the first adapter parameter set of the new task n can be compared. With each second adapter parameter group Find the maximum similarity between the two sets of adapter parameters and determine the second adapter parameter group corresponding to the maximum similarity as the reference adapter parameter group. That is, the similarity between the first adapter parameter group and the reference adapter parameter group is higher than the similarity between the first adapter parameter group and other second adapter parameter groups (other second adapter parameter groups in the repository besides the reference adapter parameter group). Determine the index c of the reference slot of the reference adapter parameter group in the repository.

[0078] (2), Where argmax(·) represents finding the maximum similarity, and m represents the number of second adapter parameter groups in each group in the repository. c represents the last second adapter parameter group, and c represents the slot index of the reference adapter parameter group.

[0079] In some embodiments, obtaining and determining a dynamic similarity threshold based on the importance of each task corresponding to the reference adapter parameter group includes: Based on the pre-created mapping relationship between adapter parameter groups and tasks, determine each reference task corresponding to the reference adapter parameter group and obtain the importance of each reference task; The maximum importance is determined from the importance of each reference task corresponding to the reference adapter parameter group; The amount of similarity change is determined based on the maximum importance and the importance adjustment factor; Based on the change in similarity, the preset initial similarity threshold is adjusted to obtain the dynamic similarity threshold.

[0080] The foregoing embodiments have already described the task-adapter parameter group mapping table. The mapping relationship between the storage adapter parameter group and the task can be found in the task-adapter parameter group mapping table. To determine the tasks corresponding to the reference adapter parameter group, the set U can be used. c The set of tasks that characterize the reference adapter parameter group.

[0081] Then, you can find the task importance registration form. Thus, the importance of each task in the reference adapter parameter set is obtained, and the maximum importance Impmax(c) is found, which can be characterized by the following formula (3): (3) Among them, t j Representation set U c Any task in the process, This is represented from the task importance registration form. The importance of the task being searched.

[0082] As illustrated in the foregoing embodiments, the similarity dynamic threshold of this application is related to the maximum importance of each task in the reference adapter parameter group, and there is a positive correlation between the two. That is, the larger the maximum importance Impmax(c), the higher the similarity dynamic threshold S. d The larger it is, the more it can be characterized by the following formula (4): (4), Among them, S bace The initial similarity threshold, also known as the global baseline similarity threshold, is a preset value, such as 0.1 based on experience. α is an importance adjustment factor used to control the influence of importance on the threshold (e.g., it can be manually set to 0.5). The maximum importance and the importance adjustment factor are also included. The product of these two values ​​is the change in similarity. This change in similarity can be summed with the initial similarity threshold to obtain the dynamic similarity threshold.

[0083] Compared to some embodiments that compare the similarity between the first adapter parameters of a new task and a reference adapter parameter set to a fixed similarity, the similarity variation in this embodiment is determined by the importance of the task. The more important the task, the larger this dynamic threshold, indicating that it is difficult for the adapter parameter set of that task to be merged by a new first adapter parameter set. This aligns with reality, because the more important the task, the less likely the corresponding adapter parameter set can change arbitrarily. Therefore, the dynamic similarity threshold is more realistic than a fixed threshold.

[0084] In some embodiments, downloading the first adapter parameter group corresponding to the new task includes: downloading the first adapter parameter group corresponding to the new task and the importance of each new task; The parameter combination of the first adapter parameter group and the reference adapter parameter group is performed in multiple dimensions, including: The initial effective weights of each reference task are determined based on the importance of each reference task in the reference adapter parameter group, and the initial effective weights of new tasks are determined based on the importance of new tasks; there is a positive correlation between the initial effective weights and the importance. The initial effective weights of each reference task are adjusted based on the usage frequency and frequency adjustment factor of each reference task to obtain the effective weights of each reference task. Based on the effective weights of each reference task, the initial effective weights of the new task are adjusted to obtain the effective weights of the new task. Based on the effective weights of each reference task and the effective weights of the new task, the first adapter parameter group and the reference adapter parameter group are combined in multiple dimensions to obtain the third adapter parameter group.

[0085] In addition to downloading the first adapter parameter set for the new task, it is also necessary to download the importance level of the new task.

[0086] Understandably, from a user habit perspective, the higher the frequency of use, the higher the importance of the task. Therefore, when merging the first adapter parameter group and the reference adapter parameter group of a new task in multiple dimensions, the importance and frequency of use of each task are important influencing factors.

[0087] Specifically, based on the positive correlation between the initial effective weights and the importance of the task, it can be represented by the following formula (5): (5), in, Characterizing initial importance, The slope is represented and can be preset to 0.001, t j t represents any task in the task set representing the reference adapter parameter group. j ∈U c , Characterizes the task t corresponding to the reference adapter parameter set. j The degree of importance; Specifically, assuming that the importance score is represented by a numerical value, the importance score of a certain task is 80 points. Based on the above formula (5), the initial effective weight of the task can be determined to be 0.8.

[0088] The initial effective weights of new tasks can also be determined based on the above method.

[0089] The task corresponding to the reference adapter is the reference task. For each reference task, the adjustment ratio of the initial effective weight of the reference task can be determined based on the usage frequency and usage frequency adjustment factor of the reference task. Specifically, this adjustment ratio can be the product of the usage frequency and the usage frequency adjustment factor. The initial effective weight of the reference task is adjusted according to the adjustment ratio of the initial effective weight of the reference task to obtain the effective weight of the reference task. The detailed process will be discussed in later sections.

[0090] In some embodiments, the initial effective weights of each reference task are obtained and adjusted based on the usage frequency and frequency adjustment factor of each reference task to obtain the effective weights of each reference task, including: For each reference task, the adjustment ratio of the initial effective weight of the reference task is determined based on the usage frequency and usage frequency adjustment factor of the reference task. The initial effective weights of the reference task are adjusted according to the adjustment ratio of the initial effective weights of the reference task to obtain the effective weights of the reference task.

[0091] Specifically, in this application embodiment, the effective weight of each reference task is determined by the following formula (6): (6), in, The effective weights are characterized. Characterization from task usage frequency tracking table Reference tasks found in The frequency of use is used to control the contribution of the frequency (e.g., preset to 0.5), β is the frequency adjustment factor, and the product of the frequency of use and the frequency adjustment factor. It's about adjusting the proportions.

[0092] The effective weight of each reference task in the reference adapter parameter group can be determined based on the above formula (6).

[0093] Since the first adapter parameter group and the reference adapter parameter group of the new task have a high degree of similarity, the initial effective weight of the new task can be adjusted according to the effective weight of each reference task in the reference adapter parameter group to obtain the effective weight of the new task.

[0094] In some embodiments, the initial effective weights of the new task are adjusted according to the effective weights of each reference task to obtain the effective weights of the new task, including: The effective weights of each reference task are summed to obtain the total effective weights. Based on the total effective weight and the weight adjustment factor, determine the adjustment ratio of the initial effective weight of the new task; The initial effective weight of the new task is adjusted by adjusting the initial effective weight of the new task to obtain the effective weight of the new task.

[0095] Specifically, the total effective weights of the reference adapter parameter group can be determined using the following formula (7): (7), in, Characterizing the total effective weight, Characterizing arbitrary reference task t j The effective weights, U[c] represent the task set of the reference adapter parameter group c.

[0096] Next, the effective weights of the new task can be determined using the following formula (8): (8), Where γ is the weight adjustment factor, used to control the effective weights of the new task, and is the product of the weight adjustment factor and the total effective weights of the reference task. This refers to the adjustment ratio of the initial effective weights for the new task. The initial effective weight of the new task can be determined based on the aforementioned formula 5. The increment of the initial effective weight can be determined based on the adjustment ratio of the initial effective weight of the new task and the initial effective weight of the new task. Then, the sum of this increment and the initial effective weight is calculated to obtain the effective weight of the new task. .

[0097] In some embodiments, based on the effective weights of each reference task and the effective weights of the new task, a multi-dimensional parameter combination is performed between the first adapter parameter group and the reference adapter parameter group to obtain a third adapter parameter group, including: Based on the total effective weight of each reference task and the effective weight of the new task, the first adapter parameter group and the reference adapter parameter group are weighted and averaged to obtain the third adapter parameter group.

[0098] Specifically, the third adapter parameter set is determined using the following formula (9): (9), in, Characterizes the third adapter parameter set obtained after merging. Characterizing the new task t n The first adapter parameter group, Characterizes the reference adapter parameter set, Characterizing the new task t n Effective weights, The total effective weights of each task in the reference adapter parameter group are represented.

[0099] By performing a weighted average of the first adapter parameter group and the reference adapter parameter group, the corresponding adapters of the first adapter parameter group and the reference adapter parameter group can be realized, enabling the model to have the ability to handle new tasks and reference tasks.

[0100] In some embodiments, after updating the second adapter parameter set in the reference slot to the third adapter parameter set, the method further includes: Update the mapping relationship between the reference adapter parameter group and the reference task to the mapping relationship between the third adapter parameter group, the reference task, and the new task, and store the importance of the new task; After storing the first adapter parameter set in an empty slot in the repository, the method further includes: Create and store the mapping between the first adapter parameter group and the new task, as well as the importance of the new task.

[0101] Continuing with the previous embodiments, using the third adapter parameter group The above reference adapter parameter group in the reference slot is covered. Afterwards, the task-adapter parameter mapping table also needs to be updated, and the reference adapter parameter group needs to be updated. With reference task t c The mapping relationship between them is the third adapter parameter group. With reference task t c And new task t n The mapping relationship between them, i.e. .

[0102] In addition, the task usage frequency tracking table needs to be updated. Initialize the usage frequency for new tasks. Update the task importance register. .

[0103] In the first adapter parameters After storing a new empty slot n, it is also necessary to create a mapping relationship between the first adapter parameter group and the new task in the task-adapter parameter mapping table. and initialize the usage frequency of new tasks. and importance .

[0104] See Figure 3 This application provides a second flowchart illustrating an adapter parameter group update method, comprising the following steps: start; Step 310: Download the first adapter parameter set corresponding to the new task and the importance of each new task; Step 320: Determine the similarity between the first adapter parameter group and each second adapter parameter group; take the second adapter parameter group with the highest similarity as the reference adapter parameter group; Step 330: Obtain and determine the dynamic similarity threshold based on the importance of each task corresponding to the reference adapter parameter group; Step 340: Determine if the repository is full; if yes, proceed to step 350; if no, proceed to step 370. Step 350: Combine and merge the first adapter parameter group and the reference adapter parameter group in multiple dimensions to obtain the third adapter parameter group; then proceed to step 360. Step 360: Update the second adapter parameter group in the reference slot to the third adapter parameter group; End; Step 370: Determine whether the similarity between the first parameter group of the new task and the reference adapter parameter group is higher than the dynamic similarity threshold; if yes, proceed to step 350; if no, proceed to step 380. Step 380; Store the first adapter parameter group in an empty slot in the repository; End.

[0105] The detailed implementation process of steps 310 to 380 above can be found in the aforementioned embodiments, and will not be repeated here.

[0106] See Figure 4 This application provides a flowchart of a task processing method, including the following steps: Start; Step 410: Obtain the task to be executed as input by the user; Step 420: Determine whether the task to be executed is a model update task; if not, proceed to step 430; if yes, proceed to step 480. Step 430: Determine the target adapter parameter group corresponding to the task to be executed from the second adapter parameter group stored in each slot of the repository; Step 440: Load the pre-trained basic large language model and target adapter parameter set into memory to merge the basic large language model and target adapter parameter set to obtain the target large language model; Step 450: Input the task to be executed into the target large language model and obtain the output result of the target large language model after inference; Step 460: The intelligent agent performs instruction conversion processing on the output result to obtain the instruction to be executed; Step 470: Execute the pending instructions; End.

[0107] The target adapter parameter set is updated according to the aforementioned adapter parameter set update method.

[0108] In this embodiment of the application, the user-input task to be executed can be the task to be executed by the terminal, such as "playing in-car music" or "playing the situation of users on the road ahead".

[0109] For details regarding the repository, adapter parameter group, and basic large language model, please refer to the aforementioned implementation of the adapter parameter group update method, which will not be repeated here.

[0110] A model update task refers to a task used to update the basic large language model. If the task to be executed is not a model update task, it means that the task to be executed requires the participation of adapter parameter groups. In this case, the task-adaptor parameter group mapping table H can be queried. Based on the pre-created mapping relationship between adapter parameter groups and tasks in H, the slot index c' of the target adapter parameter group corresponding to the task to be executed can be determined, and the target adapter parameters can be determined from the repository based on the slot index c'. .

[0111] The terminal can load the basic large language model M base Parameters and target adapter parameters into memory In this way, a target large language model is generated to process the tasks to be performed.

[0112] After the target large language model performs inference, it obtains an output result. This output result can include various processing sub-processes of the task to be executed. This output result can be input into an intelligent agent, which can further convert the various sub-processes in the input result into various instructions to be executed. For example, if the task to be executed is "play a song", its corresponding output result can include sub-processes such as "open music software", "get the last song played", and "play the last song played".

[0113] An intelligent agent is a system capable of perceiving its environment, making decisions, and executing actions. Its core characteristics include perception, decision-making, action, and goal orientation. Intelligent agents can possess varying degrees of autonomy, learning ability, and intelligence, and are widely applied in various fields, from robots to software systems, all of which can be considered intelligent agents.

[0114] The intelligent agent can convert these sub-processes into corresponding instructions to be executed. These instructions are system instructions, and for vehicles, they can specifically be onboard system instructions.

[0115] Then, the relevant devices and / or programs can be controlled to execute the instructions to be executed. The relevant devices and / or programs are such as audio players, audio software, etc. In practical applications, the relevant devices and programs corresponding to different tasks to be executed are different.

[0116] The task processing method provided in this application embodiment integrates its decision-making and fusion mechanism into a lightweight framework that runs entirely locally on the terminal (e.g., an in-vehicle terminal). This framework automatically completes the reception, evaluation, decision-making, and fusion of new skills in the background, while in the foreground, it quickly calls the corresponding adapter to perform inference through a mapping table, strictly separating the "learning" and "use" processes, ensuring continuous functional evolution and real-time interaction.

[0117] The target adapter provided in this application embodiment is updated based on the aforementioned adapter parameter group update method. When downloading the first adapter parameter group corresponding to a new task, a reference adapter parameter group and the reference slot where the reference adapter is located are determined from the second adapter parameter groups stored in each slot of the repository. The similarity between the first adapter parameter group and the reference adapter parameter group is higher than the similarity between the first adapter parameter group and other second adapter parameter groups. The importance of each task corresponding to the reference adapter parameter group is obtained and a dynamic similarity threshold is determined. If there are no empty slots in the repository, or if the similarity between the first adapter parameter group and the reference adapter parameter group is higher than the dynamic similarity threshold, the first adapter parameter group and the reference adapter parameter group are combined and merged in multiple dimensions to obtain a third adapter parameter group. The second adapter parameter group in the reference slot is updated to the third adapter parameter group. While saving storage space, this allows the reference adapter parameter group to not only handle the original tasks but also handle new tasks. That is, it not only does not "forget" the old skills but also has the new skills for the new tasks, thus improving the scalability of the model.

[0118] In some embodiments, determining the target adapter parameter group corresponding to the task to be executed from the second adapter parameter group stored in each slot of the repository includes: Based on the pre-created mapping relationship between adapter parameter groups and tasks, the target adapter parameter group corresponding to the task to be executed is determined.

[0119] The mapping relationship has been explained in detail in the aforementioned method for updating adapter parameter groups, and will not be repeated here. The target slot (or index of the target slot) corresponding to the target adapter parameter group can be determined directly based on the mapping relationship, and then the target adapter parameter group can be extracted from the target slot.

[0120] In some embodiments, after step 420, the task processing method further includes: Step 480: Update the basic large language model; End.

[0121] If the user inputs a model update task, the system can check the cloud server to see if there are any new task models that can be updated. If so, the model update step is executed.

[0122] The adapter parameter group updating method provided in this application can be executed by an adapter parameter group updating device. This application uses an adapter parameter group updating device executing the adapter parameter group updating method as an example to illustrate the adapter parameter group updating device provided in this application.

[0123] This application also provides an adapter parameter group updating device.

[0124] like Figure 5 As shown, the adapter parameter group update device includes: a first determining module 510, a second determining module 520, a merging module 530, and an updating module 540.

[0125] The first determining module 510 is used to determine the reference adapter parameter group and the reference slot where the reference adapter is located from the second adapter parameter groups stored in each slot of the repository when downloading the first adapter parameter group corresponding to the new task; the similarity between the first adapter parameter group and the reference adapter parameter group is higher than the similarity between the first adapter parameter group and other second adapter parameter groups. The second determining module 520 is used to obtain and determine the dynamic similarity threshold based on the importance of each task corresponding to the reference adapter parameter group; The merging module 530 is used to perform multi-dimensional parameter combination and merging on the first adapter parameter group and the reference adapter parameter group to obtain a third adapter parameter group when there are no empty slots in the repository or when the similarity between the first adapter parameter group and the reference adapter parameter group is higher than the similarity dynamic threshold. Update module 540 is used to update the second adapter parameter group in the reference slot to the third adapter parameter group.

[0126] In some embodiments, the adapter parameter group updating device further includes: The storage module is used to store the first adapter parameter group in an empty slot in the repository when there is an empty slot in the repository and the similarity between the first adapter parameter group and the reference adapter parameter group is lower than the dynamic similarity threshold.

[0127] In some embodiments, the first determining module 510 is configured to: Determine the similarity between the first adapter parameter group and each of the second adapter parameter groups; Use the second adapter parameter group corresponding to the highest similarity as the reference adapter parameter group.

[0128] In some embodiments, the second determining module 520 is configured to: Based on the pre-created mapping relationship between adapter parameter groups and tasks, determine each reference task corresponding to the reference adapter parameter group and obtain the importance of each reference task; The maximum importance is determined from the importance of each reference task corresponding to the reference adapter parameter group; The amount of similarity change is determined based on the maximum importance and the importance adjustment factor; Based on the change in similarity, the preset initial similarity threshold is adjusted to obtain the dynamic similarity threshold.

[0129] In some embodiments, the adapter parameter group updating device includes: The download module is used to download the first adapter parameter set corresponding to the new task and the importance of each new task. Merging module 530 is used for: The initial effective weights of each reference task are determined based on the importance of each reference task in the reference adapter parameter group, and the initial effective weights of new tasks are determined based on the importance of new tasks; there is a positive correlation between the initial effective weights and the importance. The initial effective weights of each reference task are adjusted based on the usage frequency and frequency adjustment factor of each reference task to obtain the effective weights of each reference task. Based on the effective weights of each reference task, the initial effective weights of the new task are adjusted to obtain the effective weights of the new task. Based on the effective weights of each reference task and the effective weights of the new task, the first adapter parameter group and the reference adapter parameter group are combined in multiple dimensions to obtain the third adapter parameter group.

[0130] In some embodiments, the merging module 530 is specifically used for: For each reference task, the adjustment ratio of the initial effective weight of the reference task is determined based on the usage frequency and usage frequency adjustment factor of the reference task. The initial effective weights of the reference task are adjusted according to the adjustment ratio of the initial effective weights of the reference task to obtain the effective weights of the reference task.

[0131] In some embodiments, the merging module 530 is specifically used for: The effective weights of each reference task are summed to obtain the total effective weights. Based on the total effective weight and the weight adjustment factor, determine the adjustment ratio of the initial effective weight of the new task; The initial effective weight of the new task is adjusted by adjusting the initial effective weight of the new task to obtain the effective weight of the new task.

[0132] In some embodiments, the merging module 530 is specifically used to: perform a weighted average of the first adapter parameter group and the reference adapter parameter group according to the total effective weight of each reference task and the effective weight of the new task to obtain the third adapter parameter group.

[0133] In some embodiments, the update module 540 is further configured to: Update the mapping relationship between the reference adapter parameter group and the reference task to the mapping relationship between the third adapter parameter group, the reference task, and the new task, and store the importance of the new task; The storage module is also used for: Create and store the mapping between the first adapter parameter group and the new task, as well as the importance of the new task.

[0134] The task processing method provided in this application can be executed by a data processing device. This application uses a data processing device executing the task processing method as an example to illustrate the data processing device provided in this application.

[0135] This application also provides a data processing apparatus.

[0136] like Figure 6 As shown, the data processing device includes: a first processing module 610, a second processing module 620, a third processing module 630, a fourth processing module 640, and an execution module 650.

[0137] The first processing module 610 is used to determine the target adapter parameter group corresponding to the task to be executed from the second adapter parameter group stored in each slot of the repository when the task to be executed input by the user is not a model update task. The second processing module 620 is used to load the pre-trained basic large language model and the target adapter parameter set into memory, and to merge the basic large language model and the target adapter parameter set to obtain the target large language model. The third processing module 630 is used to input the task to be executed into the target large language model and obtain the output result of the target large language model after inference. The fourth processing module 640 is used to perform instruction conversion processing on the output results through the intelligent agent to obtain the instruction to be executed; Execution module 650 is used to execute the instructions to be executed; In some embodiments, the first processing module 610 is specifically used for: Based on the pre-created mapping relationship between adapter parameter groups and tasks, the target adapter parameter group corresponding to the task to be executed is determined.

[0138] In some embodiments, the data processing apparatus further includes: The fifth processing module is used to update the basic large language model when the user inputs a model update task.

[0139] The adapter parameter group updating device and data processing device in the embodiments of this application can be electronic devices or components in electronic devices, such as integrated circuits or chips. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM or self-service machine, etc. The embodiments of this application do not specifically limit the scope.

[0140] The adapter parameter group updating device and data processing device in the embodiments of this application can be devices with an operating system. The operating system can be a Microsoft (Windows) operating system, an Android operating system, an iOS operating system, or other possible operating systems. This application embodiment does not specifically limit the specific operating system.

[0141] The adapter parameter group updating device provided in this application embodiment can achieve... Figures 2 to 3 The various processes implemented in the method embodiments of this application, and the data processing apparatus provided in the embodiments of this application, can implement... Figure 4 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0142] In some embodiments, such as Figure 7 As shown, this application embodiment also provides an electronic device 700, including a processor 701, a memory 702, and a computer program stored in the memory 702 and executable on the processor 701. When the program is executed by the processor 701, it implements the various processes of the above-described adapter parameter group update method and / or task processing method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0143] Processor 701 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 701 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0144] The memory 702 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.

[0145] The memory 702 is used to store computer programs that execute the embodiments of this application, and the execution is controlled by the processor 701. The processor 701 is used to execute the computer programs stored in the memory 702 to implement the steps shown in the foregoing method embodiments.

[0146] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0147] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described adapter parameter group update method and / or task processing method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0148] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0149] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described adapter parameter group update method and / or task processing method.

[0150] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0151] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described adapter parameter group update method and / or task processing method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0152] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0153] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0154] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0155] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

[0156] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0157] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.

Claims

1. A method of updating an adapter parameter set, characterized by, The method comprises the following steps: In the case of downloading the first adapter parameter group corresponding to the new task, determining the reference adapter parameter group and the reference slot where the reference adapter parameter group is located from the second adapter parameter groups stored in each slot of the storage library; The similarity between the first adapter parameter group and the reference adapter parameter group is higher than the similarity between the first adapter parameter group and other second adapter parameter groups; Obtaining and determining the dynamic similarity threshold based on the importance of each task corresponding to the reference adapter parameter group; In the case that there is no empty slot in the storage library, or in the case that the similarity between the first adapter parameter group and the reference adapter parameter group is higher than the dynamic similarity threshold, performing multi-dimensional parameter combination on the first adapter parameter group and the reference adapter parameter group to obtain a third adapter parameter group; Updating the second adapter parameter group in the reference slot to the third adapter parameter group.

2. The method of updating an adapter parameter set according to claim 1, characterized in that, After determining the dynamic similarity threshold, the method further comprises the following steps: In the case that there is an empty slot in the storage library, and the similarity between the first adapter parameter group and the reference adapter parameter group is lower than the dynamic similarity threshold, storing the first adapter parameter group in one empty slot in the storage library.

3. The method of updating an adapter parameter set according to claim 2, characterized in that, The method of determining the reference adapter parameter group from the second adapter parameter groups stored in each slot of the storage library comprises the following steps: Determining the similarity between the first adapter parameter group and each second adapter parameter group; Taking the second adapter parameter group corresponding to the maximum similarity as the reference adapter parameter group.

4. The method of updating an adapter parameter set according to claim 2, wherein, The method of obtaining and determining the dynamic similarity threshold based on the importance of each task corresponding to the reference adapter parameter group comprises the following steps: Determining each reference task corresponding to the reference adapter parameter group based on the mapping relationship between the pre-created adapter parameter group and the task, and obtaining the importance of each reference task; Determining the maximum importance from the importance of each reference task corresponding to the reference adapter parameter group; Determining the similarity change amount based on the maximum importance and the importance adjustment factor; Adjusting the preset initial similarity threshold based on the similarity change amount to obtain the dynamic similarity threshold.

5. The method of updating an adapter parameter set according to claim 4, characterized in that, The method of downloading the first adapter parameter group corresponding to the new task comprises the following steps: Downloading the first adapter parameter group corresponding to the new task and the importance of each new task; The method of performing multi-dimensional parameter combination on the first adapter parameter group and the reference adapter parameter group comprises the following steps: Determining the initial effective weight of each reference task according to the importance of each reference task of the reference adapter parameter group, and determining the initial effective weight of the new task according to the importance of the new task; the initial effective weight and the importance are in a positive correlation relationship; Obtaining and adjusting the initial effective weight of each reference task based on the frequency of use of each reference task and the frequency adjustment factor to obtain the effective weight of each reference task. adjust the initial effective weight of the new task according to the effective weight of each reference task to obtain the effective weight of the new task; perform multi-dimensional parameter combination on the first adapter parameter group and the reference adapter parameter group according to the effective weight of each reference task and the effective weight of the new task to obtain a third adapter parameter group.

6. The method of updating an adapter parameter set according to claim 5, characterized in that, The adjusting of the initial effective weight of each reference task according to the usage frequency and the frequency adjustment factor of each reference task to obtain the effective weight of each reference task comprises: For each reference task, determining an adjustment ratio of the initial effective weight of the reference task according to the usage frequency and the usage frequency adjustment factor of the reference task; adjusting the initial effective weight of the reference task according to the adjustment ratio of the initial effective weight of the reference task to obtain the effective weight of the reference task.

7. The method of updating an adapter parameter set according to claim 5, characterized in that, The adjusting of the initial effective weight of the new task according to the effective weight of each reference task to obtain the effective weight of the new task comprises: summing the effective weight of each reference task to obtain a total effective weight; determining an adjustment ratio of the initial effective weight of the new task according to the total effective weight and a weight adjustment factor; The adjustment ratio of the initial effective weight of the new task adjusts the initial effective weight of the new task to obtain the effective weight of the new task.

8. A method of updating an adapter parameter set according to any of claims 7, characterized in that, The adjusting of the initial effective weight of the new task according to the effective weight of each reference task to obtain the effective weight of the new task comprises: performing weighted average processing on the first adapter parameter group and the reference adapter parameter group according to the total effective weight of each reference task and the effective weight of the new task to obtain a third adapter parameter group.

9. The method of updating an adapter parameter set according to claim 4, characterized in that, After the second adapter parameter group in the reference slot is updated to the third adapter parameter group, the method further comprises: updating the mapping relationship between the reference adapter parameter group and the reference task to the mapping relationship between the third adapter parameter group and the reference task and the new task, and storing the importance of the new task; After the first adapter parameter group is stored in the empty slot in the storage library, the method further comprises: creating and storing the mapping relationship between the first adapter parameter group and the new task, and storing the importance of the new task.

10. A task processing method characterized by comprising: comprises: In the case where the user-inputted task to be executed is not a model updating task, determining a target adapter parameter group corresponding to the task to be executed from the second adapter parameter groups stored in each slot of the storage library; loading the pre-trained basic large language model and the target adapter parameter group into the memory to perform combination processing on the basic large language model and the target adapter parameter group to obtain a target large language model; inputting the task to be executed into the target large language model to obtain an output result after the target large language model performs inference; The output result is subjected to instruction conversion processing by the intelligent agent to obtain a to-be-executed instruction; The to-be-executed instruction is executed. The target adapter parameter group is updated according to the updating method of the adapter parameter group in any one of claims 1-9.