Model updating method and device, computer device and storage medium

By selecting nodes with strong computing capabilities from among the computing nodes, and using computing power and memory values ​​to determine the updated model parameter matrix, the problem of the policy model reward function being susceptible to noise interference is solved, thus improving computational efficiency and reducing communication overhead.

CN120996123BActive Publication Date: 2026-02-03PENG CHENG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511536080.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-02-03
Estimated Expiration
2045-10-27

AI Technical Summary

Technical Problem

In existing technologies, artificial intelligence models suffer from low computational efficiency and increased communication costs during cross-task distributed training because the reward function of the policy model is susceptible to noise interference during inference.

Method used

By obtaining the computing power and memory values ​​of each node in multiple computing nodes, a computing power score is determined, target computing nodes are selected, and the updated model parameter matrix is ​​determined based on the model parameter matrix output by these nodes after processing the data. The target model is then updated using the differential model parameter matrix.

Benefits of technology

It improves the computational efficiency of model updates, reduces the waste of computing resources and communication overhead, and achieves more efficient data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120996123B_ABST
    Figure CN120996123B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a model updating method and device, computer equipment and a storage medium. The method comprises: in a plurality of computing nodes, determining a computing power value and a memory value corresponding to each computing node, determining a computing capability score of each computing node according to the computing power value and the memory value, and screening a plurality of target computing nodes from the plurality of computing nodes according to the computing capability score; obtaining to-be-processed data, and dividing batch processing data of each target computing node in the to-be-processed data according to the computing power value and the memory value of each computing node; obtaining a model parameter matrix output by each target computing node after loading a target model to process corresponding batch processing data; determining an updated model parameter matrix of the target model according to each model parameter matrix; determining a differential model parameter matrix between the updated model parameter matrix and a model parameter matrix of the target model, and updating the target model in each computing node according to the differential model parameter matrix to obtain an updated target model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a model update method, apparatus, computer device, and storage medium. Background Technology

[0002] With the development of artificial intelligence technology, artificial intelligence models need to accelerate reasoning through algorithm optimization, hardware adaptation, and architectural innovation.

[0003] In related technologies, during the reasoning process of artificial intelligence models, process rewards are automatically generated through policy models to help computer devices process data in the correct direction of model reasoning, thereby improving the computational efficiency of the model reasoning process. However, the reward function of policy models is easily affected by noise in open domain tasks, resulting in inaccurate reward generation, which in turn affects the computational efficiency of artificial intelligence models during reasoning. Furthermore, mechanisms such as process rewards increase the communication cost of cross-task distributed training. Summary of the Invention

[0004] This application provides a model update method, apparatus, computer device, and storage medium, which can improve the computational efficiency of model updates and reduce the communication costs between different devices during the model update process.

[0005] To achieve the above objectives, one embodiment of this application provides a model update method, including:

[0006] The computing power and memory values ​​corresponding to each computing node are obtained in multiple computing nodes, and each computing node locally stores the target model;

[0007] Based on the computing power and memory values ​​corresponding to each computing node, a computing capability score is determined for each computing node, and multiple target computing nodes are selected from the multiple computing nodes based on the computing capability scores.

[0008] Acquire the data to be processed, and divide the data to be processed into batch data corresponding to each target computing node based on the computing power and memory value corresponding to each computing node.

[0009] Obtain the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch data;

[0010] The updated model parameter matrix corresponding to the target model is determined based on each of the model parameter matrices;

[0011] Determine the difference model parameter matrix between the updated model parameter matrix and the target model's model parameter matrix, and update the target model in each computing node according to the difference model parameter matrix to obtain the updated target model.

[0012] To achieve the above objectives, one embodiment of this application provides a model update apparatus, including:

[0013] The first acquisition module is used to acquire the computing power value and memory value corresponding to each computing node in multiple computing nodes, wherein each computing node locally stores the target model;

[0014] The first determining module is used to determine the computing power score corresponding to each computing node based on the computing power value and memory value corresponding to each computing node, and to select multiple target computing nodes from the multiple computing nodes based on the computing power score.

[0015] The second acquisition module is used to acquire the data to be processed, and to divide the batch processing data corresponding to each target computing node from the data to be processed according to the computing power value and memory value corresponding to each computing node.

[0016] The third acquisition module is used to acquire the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch data;

[0017] The second determining module is used to determine the updated model parameter matrix corresponding to the target model based on each of the model parameter matrices;

[0018] The third determining module is used to determine the difference model parameter matrix between the updated model parameter matrix and the target model model parameter matrix, and to update the target model in each computing node according to the difference model parameter matrix to obtain the updated target model.

[0019] In some implementations, the first determining module is used for:

[0020] Obtain the first weight of the computing power value and the second weight of the memory value;

[0021] Multiply the first weight by the computing power value corresponding to each computing node to obtain the first result;

[0022] Multiply the second weight by the memory value corresponding to each computing node to obtain the second result;

[0023] The first result and the second result are added together to obtain the computing power score corresponding to each computing node.

[0024] In some implementations, the first determining module is used for:

[0025] For each computing node, obtain the first index corresponding to the computing power value and the second index corresponding to the memory value;

[0026] The first index result is determined based on the computing power value and the first index, and the second index result is determined based on the memory value and the second index;

[0027] The first index result and the second index result are added together to obtain the target result, thereby obtaining the target result for each computing node;

[0028] The amount of data that each computing node can process is determined based on the number of the plurality of computing nodes and the target result of each computing node;

[0029] Based on the amount of data each computing node can process and the computing power score, multiple target computing nodes are selected from the multiple computing nodes.

[0030] In some implementations, the first determining module is used for:

[0031] Determine the model length of the target model, and multiply the model length by the amount of data that each computing node can process to obtain the first multiplication result;

[0032] Divide the first multiplication result by the computing power score to obtain the processing time of each computing node;

[0033] The computing nodes whose processing time is less than or equal to the preset time are identified as target computing nodes.

[0034] In some implementations, the first determining module is used for:

[0035] The target results of each computing node are summed to obtain the accumulated target result;

[0036] Multiply the preset total data volume by the target result of each computing node, and then divide by the accumulated target result to obtain the amount of data that each computing node can process.

[0037] In some implementations, the second acquisition module is used for:

[0038] The partitioning ratio of multiple target computing nodes is generated based on the amount of data that each target computing node can process;

[0039] The data to be processed is divided according to the division ratio to obtain the batch processing data corresponding to each target computing node.

[0040] In some implementations, the second determining module is used for:

[0041] Each computing node's contribution weight is generated based on the amount of data it can process.

[0042] The model parameter matrix is ​​aggregated based on the contribution weight to obtain the updated model parameter matrix corresponding to the target model.

[0043] In some implementations, the third determining module is used for:

[0044] The difference model parameter matrix is ​​hashed and encrypted to obtain encrypted difference model parameter features;

[0045] The parameter matrix of the difference model is pruned to obtain simplified parameter features of the difference model;

[0046] Incremental update features are generated based on the encrypted differential model parameter features and the simplified differential model parameter features;

[0047] Based on the incremental update features and the differential model parameter matrix, the target model in each computing node is updated to obtain the updated target model.

[0048] In some implementations, the third determining module is used for:

[0049] Determine the weight values ​​of each model parameter in the difference model parameter matrix;

[0050] Model parameters whose absolute weight values ​​are greater than a preset pruning threshold are retained, while model parameters whose absolute weight values ​​are less than or equal to the preset pruning threshold are zeroed out, thereby pruning the difference model parameter matrix and obtaining simplified difference model parameter features.

[0051] In some implementations, the third determining module is used for:

[0052] Before generating incremental update features based on the encrypted differential model parameter features and the simplified differential model parameter features, the first number of the non-zero weight values ​​in the simplified differential model parameter features is obtained;

[0053] Obtain the second non-zero weight value in the difference model parameter matrix;

[0054] Divide the first number by the second number to obtain the target ratio;

[0055] When the target ratio is less than or equal to a preset threshold, incremental update features are generated based on the encrypted differential model parameter features and the simplified differential model parameter features.

[0056] In some implementations, the third determining module is used for:

[0057] Obtain the first weight coefficients corresponding to the parameter matrix of the difference model;

[0058] Obtain the second weight coefficient corresponding to the incremental update feature;

[0059] Obtain the version of the target model and the third weight coefficient corresponding to the version;

[0060] The incremental update data is obtained by adding the result of multiplying the first weight coefficient and the difference model parameter matrix, the result of multiplying the second weight coefficient and the incremental update feature, and the result of multiplying the third weight coefficient and the version.

[0061] The incremental update data is sent to each computing node to update the target model in each computing node and obtain the updated target model.

[0062] To achieve the above objectives, one aspect of this application provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute the steps in the model update method provided in this application.

[0063] To achieve the above objectives, one aspect of this application provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, it implements the steps in the model update method provided in this application.

[0064] In this embodiment, the computing power and memory values ​​of each computing node are obtained from multiple computing nodes, and each computing node locally stores the target model. A computing capability score is determined for each computing node based on its computing power and memory values, and multiple target computing nodes are selected from among the multiple computing nodes based on the computing capability scores. Data to be processed is obtained, and batch processing data corresponding to each target computing node is divided from the data to be processed based on its computing power and memory values. The model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch processing data is obtained. An updated model parameter matrix corresponding to the target model is determined based on each model parameter matrix. A difference model parameter matrix is ​​determined between the updated model parameter matrix and the model parameter matrix of the target model, and the target model in each computing node is updated based on the difference model parameter matrix to obtain the updated target model.

[0065] Therefore, by determining the computing power and memory values ​​corresponding to each computing node, a computing capability score is established for each node. This score reflects the computing power level of each node and can be used to filter out multiple target computing nodes, i.e., selecting the nodes with the strongest computing capabilities. Next, the data to be processed is acquired, and based on the computing power and memory values ​​of each computing node, batch processing data corresponding to each target computing node is partitioned within the data to be processed. This allows for reasonable allocation of data to be processed to each target computing node. Then, the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch processing data is obtained. Based on each model parameter matrix, the updated model parameter matrix corresponding to the target model is determined. Combining the model parameter matrices output from multiple computing nodes allows for a more accurate determination of the updated model parameter matrix corresponding to the target model. Finally, the difference model parameter matrix between the updated model parameter matrix and the target model's model parameter matrix is ​​determined. Based on this difference model parameter matrix, the target model in each computing node is updated to obtain the updated target model. This allows for the generation of corresponding incremental update data based on the difference model parameter matrix between the updated and target models. This incremental update data is then used to update the target model in each computing node to obtain the updated target model. Compared to related technologies that accelerate model inference by automatically generating process rewards through a policy model, this application selects target computing nodes with stronger computing capabilities based on the computing power scores of each computing node for accelerated model inference. Furthermore, combining multiple target computing nodes allows for a more accurate and rapid determination of the difference model parameter matrix of the target model. Then, updating the target model on each computing node based on this difference model parameter matrix reduces the waste of computing resources caused by generating process rewards through a policy model, as well as the waste of computing resources due to errors in process rewards. This improves the computer's data processing efficiency. Simultaneously, since it only involves receiving data sent by computing nodes and sending data to computing nodes, it also reduces communication overhead during the accelerated model inference process.

[0066] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description

[0067] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0068] Figure 1 This is a schematic diagram of the system framework corresponding to the model update method provided in the embodiments of this application;

[0069] Figure 2 This is a schematic diagram of a scenario for the model update method provided in an embodiment of this application;

[0070] Figure 3 This is a flowchart illustrating the model update method provided in an embodiment of this application;

[0071] Figure 4 This is another schematic diagram of the model update method provided in the embodiments of this application;

[0072] Figure 5 This is a schematic diagram of the structure of the model update device provided in the embodiments of this application;

[0073] Figure 6 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation

[0074] To enable those skilled in the art to better understand the solutions of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0075] It should be noted that in various specific embodiments of this application, when processing is required based on object-related data such as computing power data and memory data, the object's permission or consent will be obtained first. Furthermore, the collection, use, and processing of this data will comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require obtaining sensitive personal information of an object, separate permission or consent from the object will be obtained through pop-ups or redirects to confirmation pages. Only after obtaining the object's separate permission or consent will the necessary object-related data for the normal operation of the embodiments of this application be obtained.

[0076] In some processes described in the specification, claims and the foregoing drawings, there are multiple steps that appear in a specific order. However, it should be clearly understood that these steps may be performed in any order or in parallel. The step numbers are only used to distinguish the different steps and do not represent any execution order.

[0077] The model update method provided in this application relates to the field of computer technology. The model update method provided in this application can be used in numerous general-purpose or special-purpose computer system environments or configurations, such as in terminals, servers, or software running on terminals or servers. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing 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; the software can be an application implementing the model update method, but is not limited to the above forms.

[0078] The model update method provided in this application can be executed by a computer program module, which is integrated within the model update device. Generally, the program module includes routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in a distributed computing environment, where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, the program module can reside in local and remote computer storage media, including storage devices.

[0079] Before providing a further detailed description of the embodiments of this application, the nouns and terms used in the embodiments of this application are explained, and the nouns and terms used in the embodiments of this application shall be interpreted as follows:

[0080] Sign-hash: Essentially, it involves first compressing the original data into a fixed-length "hash value" using a hash algorithm, and then digitally signing this hash value using a private key. This ensures data integrity and security.

[0081] Data pruning: This involves using the `prune` function to remove unnecessary elements from data structures, simplify complex objects, or optimize redundant parts of algorithms. This simplifies data structures, preserves core information, and improves efficiency.

[0082] The above is a detailed description of some of the relevant terms in this application. If other terms are involved later, they will be described in detail thereafter.

[0083] The technical problems existing in the relevant technology are as follows:

[0084] With the development of artificial intelligence technology, artificial intelligence models need to accelerate reasoning through algorithm optimization, hardware adaptation, and architectural innovation.

[0085] In related technologies, during the reasoning process of artificial intelligence models, process rewards are automatically generated through policy models to help computer devices process data in the correct direction of model reasoning, thereby improving the computational efficiency of the model reasoning process. However, the reward function of policy models is easily affected by noise in open domain tasks, resulting in inaccurate reward generation, which in turn affects the computational efficiency of artificial intelligence models during reasoning. Furthermore, mechanisms such as process rewards increase the communication cost of cross-task distributed training.

[0086] To address the aforementioned issues, this application's embodiments determine a computing capability score for each computing node based on its computing power and memory values. This score reflects the computing power of each node and allows for the selection of multiple target computing nodes, specifically those with high computing capabilities. Next, the data to be processed is acquired, and based on the computing power and memory values ​​of each computing node, batch processing data corresponding to each target computing node is partitioned within this data. This allows for reasonable allocation of data to each target computing node. Finally, the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch processing data is obtained. Based on each model parameter matrix, the updated model parameter matrix corresponding to the target model is determined. This approach combines the model parameter matrices output from multiple computing nodes to more accurately determine the updated model parameter matrix corresponding to the target model. Finally, the difference model parameter matrix between the updated model parameter matrix and the target model's model parameter matrix is ​​determined. Based on this difference model parameter matrix, the target model in each computing node is updated to obtain the updated target model. This allows for the generation of corresponding incremental update data based on the difference model parameter matrix between the updated and target models. This incremental update data is then used to update the target model in each computing node to obtain the updated target model. Compared to related technologies that accelerate model inference by automatically generating process rewards through a policy model, this application selects target computing nodes with stronger computing capabilities based on the computing power scores of each computing node for accelerated model inference. Furthermore, combining multiple target computing nodes allows for a more accurate and rapid determination of the difference model parameter matrix of the target model. Then, updating the target model on each computing node based on this difference model parameter matrix reduces the waste of computing resources caused by generating process rewards through a policy model, as well as the waste of computing resources due to errors in process rewards. This improves the computer's data processing efficiency. Simultaneously, since it only involves receiving data sent by computing nodes and sending data to computing nodes, it also reduces communication overhead during the accelerated model inference process.

[0087] The system architecture used in this application embodiment is as follows:

[0088] Please see Figure 1 , Figure 1 This is a schematic diagram of the system framework corresponding to the model update method provided in this application embodiment. The model update method provided in this application embodiment can be applied to this system framework.

[0089] It includes terminal 140, Internet 130, gateway 120, server 110, etc.

[0090] Terminal 140 or server 110 can be a device that executes the model update method.

[0091] Terminal 140 includes, but is not limited to, mobile phones, computers, and smart voice interaction devices. This application embodiment can be applied to various scenarios, including but not limited to model training and data inference. Furthermore, it can be a single device or a collection of multiple devices. For example, multiple desktop computers can be interconnected via a local area network, sharing a single monitor to work collaboratively, forming a single terminal 140. Terminal 140 can communicate with the Internet 130 via wired or wireless means to exchange data.

[0092] Server 110 refers to a computer system that can provide certain services to terminal 140. Compared to ordinary terminal 140, server 110 has higher requirements in terms of stability, security, and performance. Server 110 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server 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.

[0093] Gateway 120, also known as an internetwork connector or protocol converter, is a computer system or device that acts as a translator, enabling network interconnection at the transport layer. It bridges the gap between two systems using different communication protocols, data formats, languages, or even completely different architectures. Gateways can also provide filtering and security functions. Messages sent from terminal 140 to server 110 are forwarded to the corresponding server 110 via gateway 120. Messages sent from server 110 to terminal 140 are also forwarded to the corresponding terminal 140 via gateway 120.

[0094] The model update method in this application can be applied to various scenarios, such as model training. No limitation is imposed on the scenarios in which the model update method in this application can be applied.

[0095] The application scenarios of this application are as follows:

[0096] Please see Figure 2 , Figure 2 This is a schematic diagram of a scenario for the model update method provided in the embodiments of this application.

[0097] This scenario includes a central device and multiple computing nodes. Each computing node can be a computer device that can load the target model stored locally for corresponding data processing. For example, each computing node can load the target model to perform corresponding task processing, or each computing node can load the target model and input training data to train the model.

[0098] In this application, from the perspective of the central device, the central device can obtain the computing power and memory values ​​corresponding to each computing node in multiple computing nodes, and each computing node locally stores the target model; based on the computing power and memory values ​​corresponding to each computing node, determine the computing capability score corresponding to each computing node, and select multiple target computing nodes from multiple computing nodes based on the computing capability scores; obtain the data to be processed, and divide the data to be processed into batch processing data corresponding to each target computing node based on the computing power and memory values ​​corresponding to each computing node; obtain the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch processing data; determine the updated model parameter matrix corresponding to the target model based on each model parameter matrix; determine the difference model parameter matrix between the updated model parameter matrix and the model parameter matrix of the target model, and update the target model in each computing node based on the difference model parameter matrix to obtain the updated target model.

[0099] From the perspective of each target computing node, each target computing node can obtain the corresponding batch processing data, and then input the batch processing data into the target model locally on each target computing node to obtain the corresponding model parameter matrix of the target model. Then, the model parameter matrix is ​​sent to the central device. The central device integrates the model parameter matrix sent by each target computing node and returns the corresponding incremental update data. Each target computing node can update its local target model through the incremental update data to obtain the updated target model.

[0100] As can be seen from the above, compared with the related technologies that accelerate model inference by automatically generating process rewards through policy models, this application can select target computing nodes with stronger computing capabilities based on the computing power scores of each computing node for model inference acceleration. Furthermore, by combining multiple target computing nodes, the differential model parameter matrix of the target model can be determined more accurately and quickly. Then, the target model of each computing node is updated based on the differential model parameter matrix, which reduces the waste of computing resources caused by generating process rewards through policy models and the waste of computing resources caused by process reward errors. This improves the computer's data processing efficiency. At the same time, since it only involves receiving data sent by computing nodes and sending data to computing nodes, it also reduces the communication overhead in the process of accelerating model inference.

[0101] The model update method, apparatus, computer equipment, and storage medium provided in the embodiments of this application will be described in detail below.

[0102] Please see Figure 3 , Figure 3 This is a flowchart illustrating the model update method provided in this application embodiment. The model update method provided in this application embodiment may include the following steps:

[0103] Step 210: Obtain the computing power and memory values ​​corresponding to each computing node in multiple computing nodes. Each computing node locally stores the target model.

[0104] Step 220: Determine the computing power score for each computing node based on the computing power and memory values ​​corresponding to each computing node, and select multiple target computing nodes from multiple computing nodes based on the computing power scores.

[0105] Step 230: Obtain the data to be processed, and divide the batch processing data corresponding to each target computing node in the data to be processed according to the computing power value and memory value corresponding to each computing node;

[0106] Step 240: Obtain the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch data;

[0107] Step 250: Determine the updated model parameter matrix corresponding to the target model based on each model parameter matrix;

[0108] Step 260: Determine the difference model parameter matrix between the updated model parameter matrix and the target model's model parameter matrix, and update the target model in each computing node according to the difference model parameter matrix to obtain the updated target model.

[0109] Steps 210 to 260 will be described in detail below.

[0110] In step 210, the computing power and memory values ​​corresponding to each computing node are obtained in multiple computing nodes, and the target model is stored locally on each computing node.

[0111] In this context, each computing node uses corresponding computing power and memory values. For example, the computing power value can be the floating-point value corresponding to floating-point operations (FLOPs). Memory (Mem) is hardware that temporarily stores data and program instructions; its function is to "provide 'data to be computed' for computing power"—because the CPU / GPU computing units cannot directly read the hard drive (it's too slow), they must first load the data into memory and then retrieve the data from memory for computation. The memory value can be the remaining available memory size corresponding to each computing node.

[0112] Each compute node stores the target model locally. This target model can be a model that needs to be continuously iterated and updated to learn more knowledge and achieve more accurate inference and prediction capabilities. The target model stored locally on each compute node can be the same version.

[0113] In step 220, the computing power score of each computing node is determined based on the computing power and memory value of each computing node, and multiple target computing nodes are selected from multiple computing nodes based on the computing power score.

[0114] The computing power of each computing node is mainly reflected in two parts: computing power and memory size. Higher computing power means a stronger ability to process data, and larger memory means a node can process more data simultaneously. Therefore, based on the computing power and memory values ​​of each computing node, a computing power score can be determined. A higher score indicates stronger computing power, and a lower score indicates weaker computing power. Finally, multiple target computing nodes can be selected from among these nodes based on their computing power scores.

[0115] In some implementations, a computing power score is determined for each computing node based on its computing power and memory values, including:

[0116] (1.1) Obtain the first weight of the computing power value and the second weight of the memory value;

[0117] (1.2) Multiply the first weight by the computing power value corresponding to each computing node to obtain the first result;

[0118] (1.3) Multiply the second weight by the memory value corresponding to each computing node to obtain the second result;

[0119] (1.4) Add the first result and the second result together to obtain the computing power score corresponding to each computing node.

[0120] The specific calculation method can be expressed by the following formula:

[0121] .in, As the first weight, The second weight is denoted by i, where i is the computing node, Flop is the computing power value, and Mem is the memory value. The sum of the first and second weights is 1, and the values ​​of the first and second weights are in the range (0,1). As the first result, As the second result, The calculation ability is scored. The first weight is 0.7, and the second weight is 0.3.

[0122] The advantage of doing this is that it allows for the reasonable allocation of weights to computing power and memory values, thereby combining the two to jointly determine the computing power score corresponding to the computing node. The resulting computing power score can more accurately reflect the true computing power of the computing node.

[0123] In some implementations, multiple target computing nodes are selected from multiple computing nodes based on computing power scores, including:

[0124] (2.1) For each computing node, obtain the first index corresponding to the computing power value and the second index corresponding to the memory value;

[0125] (2.2) Determine the first index result based on the computing power value and the first index, and determine the second index result based on the memory value and the second index;

[0126] (2.3) Add the first exponent result and the second exponent result to obtain the target result, so as to obtain the target result for each calculation node;

[0127] (2.4) Determine the amount of data that each computing node can process based on the number of multiple computing nodes and the target result of each computing node;

[0128] (2.5) Select multiple target computing nodes from multiple computing nodes based on the amount of data that each computing node can process and the computing power score.

[0129] Specifically, for each computing node, a first index corresponding to the computing power value and a second index corresponding to the memory value are obtained. The first index can be the same as the value of the first weight mentioned above, and the second index can be the same as the value of the second weight mentioned above. The first index can be 0.7, and the second index can be 0.3.

[0130] Then, the first index result is determined based on the computing power value and the first index, and the second index result is determined based on the memory value and the second index. The first index result and the second index result are added together to obtain the target result. The target result for each computing node can be calculated in this way.

[0131] Then, based on the number of computing nodes and the target output of each computing node, the amount of data that each computing node can process is determined. For example, the amount of data that each computing node can process can be obtained by multiplying the proportion of the target output of each computing node to the total target output of all computing nodes by the amount of data that needs to be processed.

[0132] In some implementations, the amount of data that each computing node can process is determined based on the number of multiple computing nodes and the target result of each computing node, including:

[0133] (2.4.1) The cumulative target result is obtained by summing the target results of each computing node;

[0134] (2.4.2) Multiply the preset total data volume by the target result of each computing node, and then divide by the accumulated target result to obtain the amount of data that can be processed by each computing node.

[0135] The specific calculation method for the amount of data that each computing node can process can be expressed by the following formula:

[0136] Where i represents a specific computing node among multiple computing nodes, and j represents each computing node that needs to be traversed. Indicates the target result. The result of the first index. For the second index result, To accumulate the target results, This represents the amount of data that a given computing node can process. The preset total data volume for all nodes can be the same as the amount of data to be processed.

[0137] The advantage of doing this is that the amount of data that each computing node can process can be accurately determined based on the memory and computing power of each computing node.

[0138] Finally, based on the amount of data each computing node can process and its computing power score, multiple target computing nodes are selected from among the multiple computing nodes.

[0139] In some implementations, multiple target computing nodes are selected from a pool of computing nodes based on the amount of data each computing node can process and its computing power score, including:

[0140] (2.5.1) Determine the model length of the target model and multiply the model length by the amount of data that each computing node can process to obtain the first multiplication result;

[0141] (2.5.2) Divide the result of the first multiplication by the computing power score to obtain the processing time of each computing node;

[0142] (2.5.3) The computing nodes whose processing time is less than or equal to the preset time are determined as the target computing nodes.

[0143] The specific calculation formula is as follows:

[0144] .in, This refers to the model length, which can also be understood as the number of parameters, the number of computational operations, etc., representing the complexity of the model itself. For preset duration, Processing time for each computing node. This is the result of the first multiplication.

[0145] This filtering method can be used to select computing nodes whose processing time is less than or equal to the preset time, and then these computing nodes can be identified as target computing nodes.

[0146] The advantage of doing this is that by selecting target computing nodes with shorter processing times, the speed of model inference can be accelerated.

[0147] In step 230, the data to be processed is obtained, and the batch processing data corresponding to each target computing node is divided in the data to be processed according to the computing power value and memory value corresponding to each computing node.

[0148] As mentioned above, the amount of data that can be processed by each computing node can be calculated using the computing power and memory values ​​corresponding to each computing node. Based on this amount of data that can be processed, batch processing data corresponding to each target computing node can be divided from the data to be processed.

[0149] In some implementations, based on the computing power and memory values ​​corresponding to each computing node, batch processing data corresponding to each target computing node is divided from the data to be processed, including:

[0150] (1.1) Generate the partition ratio of multiple target computing nodes based on the amount of data that each target computing node can process;

[0151] (1.2) Divide the data to be processed according to the division ratio to obtain the batch processing data corresponding to each target computing node.

[0152] Assuming there are four computing nodes, with target computing node A processing 40 data points, target computing node B processing 30 data points, target computing node C processing 20 data points, and target computing node D processing 10 data points, then the partition ratio is A:B:C:D = 4:3:2:1.

[0153] The data to be processed can be divided according to the partition ratio to obtain the batch processing data corresponding to each target computing node. For example, if the dataset is D, it can be divided according to the partition ratio A:B:C:D=4:3:2:1 to obtain the batch processing data corresponding to target computing node A, target computing node B, target computing node C and target computing node D respectively.

[0154] In step 240, the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch data is obtained.

[0155] Each target computing node operates locally. It loads the target model and processes the corresponding batch data to train the target model, thereby obtaining the model parameter matrix after locally training and updating the target model. For example, the model parameter matrix contains the weight parameters of different parameters of the model.

[0156] In step 250, the updated model parameter matrix corresponding to the target model is determined based on each model parameter matrix.

[0157] It is understandable that, since the batch data processed by each target computing node is different, the contribution of each target computing node to updating the target model is different. Therefore, the updated model parameter matrix corresponding to the target model can be determined based on the contribution of each target computing node and the model parameter matrix of each target computing node.

[0158] In some implementations, the updated model parameter matrix corresponding to the target model is determined based on each model parameter matrix, including:

[0159] (1.1) Generate the contribution weight of each computing node based on the amount of data that each computing node can process;

[0160] (1.2) Aggregate each model parameter matrix according to the contribution weight to obtain the updated model parameter matrix corresponding to the target model.

[0161] Assuming there are four computing nodes, target computing node A can process 40 data points, target computing node B can process 30 data points, target computing node C can process 20 data points, and target computing node D can process 10 data points. Then, the contribution weight of target computing node A is 0.4, the contribution weight of target computing node B is 0.3, the contribution weight of target computing node C is 0.2, and the contribution weight of target computing node D is 0.1.

[0162] Then, each model parameter matrix is ​​aggregated based on its contribution weight to obtain the updated model parameter matrix corresponding to the target model. Assuming the target model has parameters for a certain category, the contribution weight of target computing node A is multiplied by the weight parameter matrix for that category in the model parameter matrix output by target computing node A to obtain the first weight parameter matrix for that category of parameters corresponding to target computing node A.

[0163] The contribution weight of target computing node B is multiplied by the weight parameter matrix of the parameters for that category in the model parameter matrix output by target computing node B to obtain the second weight parameter matrix of the parameters for that category corresponding to target computing node B. The contribution weight of target computing node C is multiplied by the weight parameter matrix of the parameters for that category in the model parameter matrix output by target computing node C to obtain the third weight parameter matrix of the parameters for that category corresponding to target computing node C. The contribution weight of target computing node D is multiplied by the weight parameter matrix of the parameters for that category in the model parameter matrix output by target computing node D to obtain the fourth weight parameter matrix of the parameters for that category corresponding to target computing node D. Finally, the first, second, third, and fourth weight parameter matrices are summed to obtain the updated weight parameter matrix of the parameters for that category.

[0164] Similarly, for each category of the target model's parameters, the corresponding updated weight parameter matrix can be calculated using the above method. The updated weight parameter matrices for all categories are then aggregated to generate the updated model parameter matrix corresponding to the target model.

[0165] In step 260, the difference model parameter matrix between the updated model parameter matrix and the target model model parameter matrix is ​​determined, and the target model in each computing node is updated according to the difference model parameter matrix to obtain the updated target model.

[0166] In this approach, the target model for each computing node can be of the same version. The model parameter matrix of the target model can be obtained, and then the updated model parameter matrix is ​​subtracted from the original model parameter matrix to obtain the difference model parameter matrix. Specifically, this can be represented as: .in This indicates updating the model parameter matrix. This represents the model parameter matrix of the target model. This represents the difference model parameter matrix. Finally, the target model in each computing node is updated based on the difference model parameter matrix to obtain the updated target model. For example, if the target model version is V3.0, the updated target model becomes the target model for the next iteration, with a model version of V4.0.

[0167] In some implementations, the updated target model is obtained by updating the target model in each computing node based on the difference model parameter matrix, including:

[0168] (1.1) The difference model parameter matrix is ​​hashed and encrypted to obtain the encrypted difference model parameter features;

[0169] (1.2) Prune the parameter matrix of the difference model to obtain simplified parameter features of the difference model;

[0170] (1.3) Generate incremental update features based on the parameter features of the encrypted differential model and the parameter features of the simplified differential model;

[0171] (1.4) Based on the incremental update features and the difference model parameter matrix, the target model in each computing node is updated to obtain the updated target model.

[0172] The specific calculation method for generating incremental update features is shown in the following formula:

[0173] .in, For the parameter characteristics of the encrypted differential model, To simplify the parameter characteristics of the difference model, To preset the pruning threshold, This is for incremental feature updates.

[0174] SignHash (usually referred to as "signed hashing" or "symbolic hashing") is an extension technique based on traditional hash functions. Its core is to add "symbolic attributes" (such as positive / negative, 0 / 1, etc.) to the hash value to lightweightly represent the "direction" and "features" of parameter updates, thereby achieving more flexible feature processing.

[0175] By pruning the parameter matrix of the difference model, parameters with minimal contribution can be removed while preserving as much data precision as possible. For example, some weights can be set to 0 or deleted entirely.

[0176] Finally, incremental update features are generated by combining encrypted differential model parameter features and simplified differential model parameter features. For example, the two can be combined to generate incremental update features. The simplified differential model parameter features can be compressed and then encrypted using encrypted differential model parameter features to generate corresponding compressed data. This compressed data can reduce data transmission time while ensuring security.

[0177] In some implementations, the difference model parameter matrix is ​​pruned to obtain simplified difference model parameter features, including:

[0178] (1.2.1) Determine the weight values ​​of each model parameter in the difference model parameter matrix;

[0179] (1.2.2) Model parameters whose absolute weight values ​​are greater than the preset pruning threshold are retained, and model parameters whose absolute weight values ​​are less than or equal to the preset pruning threshold are zeroed out, so as to prune the difference model parameter matrix and obtain simplified difference model parameter features.

[0180] The calculation method can be expressed as follows:

[0181] The preset pruning threshold is... , This represents the weight value of a model parameter in the difference model parameter matrix. Model parameters whose absolute weight value is greater than a preset pruning threshold are retained, while model parameters whose absolute weight value is less than or equal to the preset pruning threshold are reset to zero. This process prunes the difference model parameter matrix to obtain simplified difference model parameter features.

[0182] The advantage of doing this is that some weight data that contributes little or is useless can be deleted, thereby simplifying the data of the difference model parameter matrix without affecting the data accuracy of the difference model parameter matrix.

[0183] In some implementations, before generating incremental update features based on encrypted differential model parameter features and simplified differential model parameter features, the method further includes:

[0184] (2.1) Obtain the first non-zero weight value in the simplified difference model parameter features;

[0185] (2.2) Obtain the second non-zero weight value in the difference model parameter matrix;

[0186] (2.3) Divide the first number by the second number to obtain the target ratio;

[0187] Incremental update features are generated based on the parameter features of the encrypted differential model and the parameter features of the simplified differential model, including:

[0188] (2.4) When the target ratio is less than or equal to the preset threshold, incremental update features are generated based on the encrypted differential model parameter features and the simplified differential model parameter features.

[0189] The specific judgment method can be expressed as follows:

[0190] The preset pruning threshold can be... , The preset threshold is greater than 0 and less than 1, and can be set according to actual needs. The numerator is the first non-zero weight value of the simplified difference model parameter features, which can be the L0 norm of the simplified difference model parameter features. The denominator is the second non-zero weight value in the difference model parameter matrix.

[0191] Divide the first number by the second number to obtain the target ratio. When the target ratio is less than or equal to a preset threshold, generate incremental update features based on the parameters of the encrypted differential model and the simplified differential model.

[0192] When the target ratio is greater than the preset threshold, it is considered that the simplified difference model parameter features cannot be used as the basis for generating incremental update features, nor can they be used as the basis for generating subsequent incremental update data. Therefore, the training of the data to be processed in this round cannot generate a useful update model parameter matrix. Then, the next round of data to be processed is obtained, and the process returns to step 210 to continue processing the next round of data to be processed.

[0193] The advantage of doing this is that it can accurately determine whether the updated model parameter matrix corresponding to the data to be processed in each round is used to update the target model, so as to avoid useless updates of the updated model parameter matrix to update the target model, thus ensuring the efficiency of model inference acceleration, that is, the efficiency of model update.

[0194] In some implementations, the target model in each computing node is updated based on the incremental update features and the difference model parameter matrix to obtain the updated target model, including:

[0195] (3.1) Obtain the first weight coefficients corresponding to the parameter matrix of the difference model;

[0196] (3.2) Obtain the second weight coefficient corresponding to the incremental update feature;

[0197] (3.3) Obtain the version of the target model and the third weight coefficient corresponding to the version;

[0198] (3.4) Add the result of multiplying the first weight coefficient and the difference model parameter matrix, the result of multiplying the second weight coefficient and the incremental update feature, and the result of multiplying the third weight coefficient and the version to obtain the incremental update data;

[0199] (3.5) Send incremental update data to each computing node to update the target model in each computing node using incremental update data to obtain the updated target model.

[0200] The specific calculation method can be expressed as follows:

[0201] .in As the first weighting coefficient, This is the second weighting coefficient. This is the third weighting coefficient. For the version of the target model, The parameter matrix of the difference model. This is for incremental feature updates.

[0202] The incremental update data can be obtained by multiplying the first weight coefficient by the difference model parameter matrix, the second weight coefficient by the incremental update feature, and the third weight coefficient by the version. This incremental update data is then sent to each computing node, allowing each node to update its target model using this data.

[0203] The process involves simplifying and compressing the updated model parameter matrix to obtain the difference model parameter matrix, then further simplifying and compressing the difference model parameter matrix to obtain the incremental update features. Finally, incremental update data is generated based on these incremental update features, thus achieving cascaded compression. The incremental update data has a lower data volume, which is beneficial for each computing node to quickly update the target model based on the incremental update data, resulting in the updated target model.

[0204] As described above, in this embodiment, the computing power and memory values ​​of each computing node are obtained from multiple computing nodes, and each computing node locally stores the target model. Based on the computing power and memory values ​​of each computing node, a computing capability score is determined for each computing node, and multiple target computing nodes are selected from the multiple computing nodes based on the computing capability scores. Data to be processed is obtained, and based on the computing power and memory values ​​of each computing node, batch processing data corresponding to each target computing node is divided from the data to be processed. The model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch processing data is obtained. An updated model parameter matrix corresponding to the target model is determined based on each model parameter matrix. A difference model parameter matrix is ​​determined between the updated model parameter matrix and the model parameter matrix of the target model, and the target model in each computing node is updated based on the difference model parameter matrix to obtain the updated target model.

[0205] Therefore, by determining the computing power and memory values ​​corresponding to each computing node, a computing capability score is established for each node. This score reflects the computing power level of each node and can be used to filter out multiple target computing nodes, i.e., selecting the nodes with the strongest computing capabilities. Next, the data to be processed is acquired, and based on the computing power and memory values ​​of each computing node, batch processing data corresponding to each target computing node is partitioned within the data to be processed. This allows for reasonable allocation of data to be processed to each target computing node. Then, the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch processing data is obtained. Based on each model parameter matrix, the updated model parameter matrix corresponding to the target model is determined. Combining the model parameter matrices output from multiple computing nodes allows for a more accurate determination of the updated model parameter matrix corresponding to the target model. Finally, the difference model parameter matrix between the updated model parameter matrix and the target model's model parameter matrix is ​​determined. Based on this difference model parameter matrix, the target model in each computing node is updated to obtain the updated target model. This allows for the generation of corresponding incremental update data based on the difference model parameter matrix between the updated and target models. This incremental update data is then used to update the target model in each computing node to obtain the updated target model. Compared to related technologies that accelerate model inference by automatically generating process rewards through a policy model, this application selects target computing nodes with stronger computing capabilities based on the computing power scores of each computing node for accelerated model inference. Furthermore, combining multiple target computing nodes allows for a more accurate and rapid determination of the difference model parameter matrix of the target model. Then, updating the target model on each computing node based on this difference model parameter matrix reduces the waste of computing resources caused by generating process rewards through a policy model, as well as the waste of computing resources due to errors in process rewards. This improves the computer's data processing efficiency. Simultaneously, since it only involves receiving data sent by computing nodes and sending data to computing nodes, it also reduces communication overhead during the accelerated model inference process.

[0206] Please see Figure 4 , Figure 4 This is another schematic flowchart of the model update method provided in this application embodiment. The model update method provided in this application embodiment may include the following steps:

[0207] Step 301: Obtain the computing power and memory values ​​corresponding to each computing node in multiple computing nodes. Each computing node locally stores the target model.

[0208] Step 302: Determine the computing power score for each computing node based on its computing power and memory values.

[0209] Step 303: For each computing node, obtain the first index corresponding to the computing power value and the second index corresponding to the memory value;

[0210] Step 304: Determine the first index result based on the computing power value and the first index, and determine the second index result based on the memory value and the second index;

[0211] Step 305: Add the first exponent result and the second exponent result to obtain the target result, so as to obtain the target result for each calculation node;

[0212] Step 306: Determine the amount of data that each computing node can process based on the number of multiple computing nodes and the target result of each computing node;

[0213] Step 307: Select multiple target computing nodes from among multiple computing nodes based on the amount of data each computing node can process and its computing power score;

[0214] Step 308: Obtain the data to be processed, and divide the batch processing data corresponding to each target computing node in the data to be processed according to the computing power value and memory value corresponding to each computing node;

[0215] Step 309: Obtain the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch data;

[0216] Step 310: Determine the updated model parameter matrix corresponding to the target model based on each model parameter matrix;

[0217] Step 311: Determine the difference model parameter matrix between the updated model parameter matrix and the target model's model parameter matrix;

[0218] Step 312: Perform hash encryption on the difference model parameter matrix to obtain the encrypted difference model parameter features;

[0219] Step 313: Prune the parameter matrix of the difference model to obtain simplified parameter features of the difference model;

[0220] Step 314: Generate incremental update features based on the parameter features of the encrypted differential model and the parameter features of the simplified differential model;

[0221] Step 315: Update the target model in each computing node according to the incremental update features and the difference model parameter matrix to obtain the updated target model.

[0222] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed description of the model update method above, which will not be repeated here.

[0223] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a model update apparatus provided in an embodiment of this application, which can execute the model update method described above. In this embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program with a predetermined function, which works together with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functions of that module or unit.

[0224] Model update device 400, including:

[0225] The first acquisition module 410 is used to acquire the computing power value and memory value corresponding to each computing node in multiple computing nodes, and each computing node locally stores the target model;

[0226] The first determining module 420 is used to determine the computing power score of each computing node based on the computing power value and memory value of each computing node, and to select multiple target computing nodes from multiple computing nodes based on the computing power score.

[0227] The second acquisition module 430 is used to acquire the data to be processed and, based on the computing power and memory values ​​corresponding to each computing node, divide the data to be processed into batch processing data corresponding to each target computing node in the data to be processed.

[0228] The third acquisition module 440 is used to acquire the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch data;

[0229] The second determining module 450 is used to determine the updated model parameter matrix corresponding to the target model based on each model parameter matrix;

[0230] The third determining module 460 is used to determine the difference model parameter matrix between the updated model parameter matrix and the target model's model parameter matrix, and to update the target model in each computing node according to the difference model parameter matrix to obtain the updated target model.

[0231] In some implementations, the first determining module 420 is configured to:

[0232] Obtain the first weight of computing power and the second weight of memory;

[0233] Multiply the first weight by the computing power value corresponding to each computing node to obtain the first result;

[0234] Multiply the second weight by the memory value corresponding to each computing node to obtain the second result;

[0235] The first and second results are added together to obtain the computing power score for each computing node.

[0236] In some implementations, the first determining module 420 is configured to:

[0237] For each computing node, obtain the first index corresponding to the computing power value and the second index corresponding to the memory value;

[0238] The first index result is determined based on the computing power value and the first index, and the second index result is determined based on the memory value and the second index.

[0239] The target result is obtained by adding the first exponent result and the second exponent result, thus obtaining the target result for each computing node;

[0240] The amount of data that each computing node can process is determined based on the number of multiple computing nodes and the target result of each computing node;

[0241] Multiple target computing nodes are selected from among multiple computing nodes based on the amount of data each computing node can process and its computing power score.

[0242] In some implementations, the first determining module 420 is configured to:

[0243] Determine the model length of the target model, and multiply the model length by the amount of data that each computing node can process to obtain the first multiplication result;

[0244] Divide the result of the first multiplication by the computing power score to obtain the processing time of each computing node;

[0245] Nodes whose processing time is less than or equal to the preset time are identified as target computing nodes.

[0246] In some implementations, the first determining module 420 is configured to:

[0247] The cumulative target result is obtained by summing the target results of each computing node.

[0248] Multiply the preset total data volume by the target result of each computing node, and then divide by the accumulated target result to obtain the amount of data that each computing node can process.

[0249] In some implementations, the second acquisition module 430 is used for:

[0250] The partitioning ratio of multiple target computing nodes is generated based on the amount of data that each target computing node can process;

[0251] The data to be processed is divided according to the division ratio to obtain the batch processing data corresponding to each target computing node.

[0252] In some implementations, the second determining module 450 is configured to:

[0253] Each computing node's contribution weight is generated based on the amount of data it can process.

[0254] The model parameter matrix is ​​aggregated based on the contribution weight to obtain the updated model parameter matrix corresponding to the target model.

[0255] In some implementations, the third determining module 460 is used for:

[0256] The difference model parameter matrix is ​​hashed and encrypted to obtain the encrypted difference model parameter features;

[0257] The parameter matrix of the difference model is pruned to obtain simplified parameter features of the difference model;

[0258] Incremental update features are generated based on the parameter features of the encrypted differential model and the parameter features of the simplified differential model;

[0259] Based on the incremental update features and the difference model parameter matrix, the target model in each computing node is updated to obtain the updated target model.

[0260] In some implementations, the third determining module 460 is used for:

[0261] Determine the weight values ​​of each model parameter in the difference model parameter matrix;

[0262] Model parameters whose absolute weight values ​​are greater than a preset pruning threshold are retained, while model parameters whose absolute weight values ​​are less than or equal to the preset pruning threshold are zeroed out. This process prunes the difference model parameter matrix to obtain simplified difference model parameter features.

[0263] In some implementations, the third determining module 460 is used for:

[0264] Before generating incremental update features based on the encrypted differential model parameter features and the simplified differential model parameter features, obtain the first number of the non-zero weight values ​​in the simplified differential model parameter features;

[0265] Obtain the second non-zero weight value in the difference model parameter matrix;

[0266] Divide the first number by the second number to get the target ratio;

[0267] When the target proportion is less than or equal to the preset threshold, incremental update features are generated based on the parameter features of the encrypted differential model and the parameter features of the simplified differential model.

[0268] In some implementations, the third determining module 460 is used for:

[0269] Obtain the first weight coefficients corresponding to the parameter matrix of the difference model;

[0270] Obtain the second weight coefficient corresponding to the incrementally updated feature;

[0271] Obtain the version of the target model and the corresponding third weight coefficient;

[0272] The incremental update data is obtained by multiplying the first weight coefficient by the difference model parameter matrix, the second weight coefficient by the incremental update feature, and the third weight coefficient by the version.

[0273] Incremental update data is sent to each computing node to update the target model in each computing node and obtain the updated target model.

[0274] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed description of the model update method above, which will not be repeated here.

[0275] As described above, in this embodiment, the first acquisition module 410 acquires the computing power and memory values ​​corresponding to each computing node in multiple computing nodes, and each computing node locally stores the target model; the first determination module 420 determines the computing capability score corresponding to each computing node based on the computing power and memory values ​​corresponding to each computing node, and selects multiple target computing nodes from multiple computing nodes based on the computing capability scores; the second acquisition module 430 acquires the data to be processed, and divides the batch processing data corresponding to each target computing node in the data to be processed based on the computing power and memory values ​​corresponding to each computing node; the third acquisition module 440 acquires the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch processing data; the second determination module 450 determines the updated model parameter matrix corresponding to the target model based on each model parameter matrix; the third determination module 460 determines the difference model parameter matrix between the updated model parameter matrix and the model parameter matrix of the target model, and updates the target model in each computing node based on the difference model parameter matrix to obtain the updated target model.

[0276] Therefore, by determining the computing power and memory values ​​corresponding to each computing node, a computing capability score is established for each node. This score reflects the computing power level of each node and can be used to filter out multiple target computing nodes, i.e., selecting the nodes with the strongest computing capabilities. Next, the data to be processed is acquired, and based on the computing power and memory values ​​of each computing node, batch processing data corresponding to each target computing node is partitioned within the data to be processed. This allows for reasonable allocation of data to be processed to each target computing node. Then, the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch processing data is obtained. Based on each model parameter matrix, the updated model parameter matrix corresponding to the target model is determined. Combining the model parameter matrices output from multiple computing nodes allows for a more accurate determination of the updated model parameter matrix corresponding to the target model. Finally, the difference model parameter matrix between the updated model parameter matrix and the target model's model parameter matrix is ​​determined. Based on this difference model parameter matrix, the target model in each computing node is updated to obtain the updated target model. This allows for the generation of corresponding incremental update data based on the difference model parameter matrix between the updated and target models. This incremental update data is then used to update the target model in each computing node to obtain the updated target model. Compared to related technologies that accelerate model inference by automatically generating process rewards through a policy model, this application selects target computing nodes with stronger computing capabilities based on the computing power scores of each computing node for accelerated model inference. Furthermore, combining multiple target computing nodes allows for a more accurate and rapid determination of the difference model parameter matrix of the target model. Then, updating the target model on each computing node based on this difference model parameter matrix reduces the waste of computing resources caused by generating process rewards through a policy model, as well as the waste of computing resources due to errors in process rewards. This improves the computer's data processing efficiency. Simultaneously, since it only involves receiving data sent by computing nodes and sending data to computing nodes, it also reduces communication overhead during the accelerated model inference process.

[0277] This application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described model update method. This computer device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0278] Please see Figure 6 , Figure 6 The hardware structure of a computer device according to another embodiment is illustrated. The computer device includes:

[0279] The processor 501 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0280] The memory 502 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 502 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 502 and is called and executed by the processor 501 using the model update method of the embodiments of this application.

[0281] The input / output interface 503 is used to implement information input and output;

[0282] The communication interface 504 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0283] Bus 505 transmits information between various components of the device (e.g., processor 501, memory 502, input / output interface 503, and communication interface 504);

[0284] The processor 501, memory 502, input / output interface 503, and communication interface 504 are connected to each other within the device via bus 505.

[0285] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described model update method.

[0286] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0287] The model update method, model update apparatus, computer equipment, and storage medium provided in this application embodiment obtain the computing power value and memory value corresponding to each computing node in multiple computing nodes, with each computing node locally storing the target model; determine the computing capability score corresponding to each computing node based on the computing power value and memory value corresponding to each computing node, and select multiple target computing nodes from multiple computing nodes based on the computing capability score; obtain the data to be processed, and divide the data to be processed into batch processing data corresponding to each target computing node based on the computing power value and memory value corresponding to each computing node; obtain the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch processing data; determine the updated model parameter matrix corresponding to the target model based on each model parameter matrix; determine the difference model parameter matrix between the updated model parameter matrix and the model parameter matrix of the target model, and update the target model in each computing node according to the difference model parameter matrix to obtain the updated target model.

[0288] Therefore, by determining the computing power and memory values ​​corresponding to each computing node, a computing capability score is established for each node. This score reflects the computing power level of each node and can be used to filter out multiple target computing nodes, i.e., selecting the nodes with the strongest computing capabilities. Next, the data to be processed is acquired, and based on the computing power and memory values ​​of each computing node, batch processing data corresponding to each target computing node is partitioned within the data to be processed. This allows for reasonable allocation of data to be processed to each target computing node. Then, the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch processing data is obtained. Based on each model parameter matrix, the updated model parameter matrix corresponding to the target model is determined. Combining the model parameter matrices output from multiple computing nodes allows for a more accurate determination of the updated model parameter matrix corresponding to the target model. Finally, the difference model parameter matrix between the updated model parameter matrix and the target model's model parameter matrix is ​​determined. Based on this difference model parameter matrix, the target model in each computing node is updated to obtain the updated target model. This allows for the generation of corresponding incremental update data based on the difference model parameter matrix between the updated and target models. This incremental update data is then used to update the target model in each computing node to obtain the updated target model. Compared to related technologies that accelerate model inference by automatically generating process rewards through a policy model, this application selects target computing nodes with stronger computing capabilities based on the computing power scores of each computing node for accelerated model inference. Furthermore, combining multiple target computing nodes allows for a more accurate and rapid determination of the difference model parameter matrix of the target model. Then, updating the target model on each computing node based on this difference model parameter matrix reduces the waste of computing resources caused by generating process rewards through a policy model, as well as the waste of computing resources due to errors in process rewards. This improves the computer's data processing efficiency. Simultaneously, since it only involves receiving data sent by computing nodes and sending data to computing nodes, it also reduces communication overhead during the accelerated model inference process.

[0289] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0290] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0291] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0292] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0293] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0294] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0295] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0296] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0297] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0298] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0299] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A model update method, characterized in that, include: The computing power and memory values ​​corresponding to each computing node are obtained in multiple computing nodes, and each computing node locally stores the target model; Based on the computing power and memory values ​​corresponding to each computing node, a computing capability score is determined for each computing node, and multiple target computing nodes are selected from the multiple computing nodes based on the computing capability scores. Acquire the data to be processed, and divide the data to be processed into batch data corresponding to each target computing node based on the computing power and memory value corresponding to each computing node. Obtain the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch data; The updated model parameter matrix corresponding to the target model is determined based on each of the model parameter matrices; Determine the difference model parameter matrix between the updated model parameter matrix and the target model's model parameter matrix; The difference model parameter matrix is ​​hashed and encrypted to obtain encrypted difference model parameter features; The parameter matrix of the difference model is pruned to obtain simplified parameter features of the difference model; Incremental update features are generated based on the encrypted differential model parameter features and the simplified differential model parameter features; Based on the incremental update features and the differential model parameter matrix, the target model in each computing node is updated to obtain the updated target model.

2. The model update method according to claim 1, characterized in that, The step of determining the computing power score for each computing node based on its computing power and memory values ​​includes: Obtain the first weight of the computing power value and the second weight of the memory value; Multiply the first weight by the computing power value corresponding to each computing node to obtain the first result; Multiply the second weight by the memory value corresponding to each computing node to obtain the second result; The first result and the second result are added together to obtain the computing power score corresponding to each computing node.

3. The model update method according to claim 1, characterized in that, The step of selecting multiple target computing nodes from the multiple computing nodes based on the computing power score includes: For each computing node, obtain the first index corresponding to the computing power value and the second index corresponding to the memory value; The first index result is determined based on the computing power value and the first index, and the second index result is determined based on the memory value and the second index; The first index result and the second index result are added together to obtain the target result, thereby obtaining the target result for each computing node; The amount of data that each computing node can process is determined based on the number of the plurality of computing nodes and the target result of each computing node; Based on the amount of data each computing node can process and the computing power score, multiple target computing nodes are selected from the multiple computing nodes.

4. The model update method according to claim 3, characterized in that, The step of selecting multiple target computing nodes from the multiple computing nodes based on the amount of data each computing node can process and the computing power score includes: Determine the model length of the target model, and multiply the model length by the amount of data that each computing node can process to obtain the first multiplication result; Divide the first multiplication result by the computing power score to obtain the processing time of each computing node; The computing nodes whose processing time is less than or equal to the preset time are identified as target computing nodes.

5. The model update method according to claim 3, characterized in that, The step of determining the amount of data that each computing node can process based on the number of the plurality of computing nodes and the target result of each computing node includes: The target results of each computing node are summed to obtain the accumulated target result; Multiply the preset total data volume by the target result of each computing node, and then divide by the accumulated target result to obtain the amount of data that each computing node can process.

6. The model update method according to claim 3, characterized in that, The step of dividing the batch processing data corresponding to each target computing node from the data to be processed based on the computing power and memory value corresponding to each computing node includes: The partitioning ratio of multiple target computing nodes is generated based on the amount of data that each target computing node can process; The data to be processed is divided according to the division ratio to obtain the batch processing data corresponding to each target computing node.

7. The model update method according to claim 3, characterized in that, The step of determining the updated model parameter matrix corresponding to the target model based on each of the model parameter matrices includes: The contribution weight of each computing node is generated based on the amount of data that each computing node can process; The model parameter matrix is ​​aggregated according to the contribution weight to obtain the updated model parameter matrix corresponding to the target model.

8. The model update method according to claim 1, characterized in that, The pruning process of the difference model parameter matrix to obtain simplified difference model parameter features includes: Determine the weight values ​​of each model parameter in the difference model parameter matrix; Model parameters whose absolute weight values ​​are greater than a preset pruning threshold are retained, while model parameters whose absolute weight values ​​are less than or equal to the preset pruning threshold are zeroed out, thereby pruning the difference model parameter matrix and obtaining simplified difference model parameter features.

9. The model update method according to claim 1, characterized in that, Before generating the incremental update features based on the encrypted differential model parameter features and the simplified differential model parameter features, the method further includes: Obtain the first non-zero weight value in the parameter features of the simplified difference model; Obtain the second non-zero weight value in the difference model parameter matrix; Divide the first number by the second number to obtain the target ratio; The step of generating incremental update features based on the encrypted differential model parameter features and the simplified differential model parameter features includes: When the target ratio is less than or equal to a preset threshold, incremental update features are generated based on the encrypted differential model parameter features and the simplified differential model parameter features.

10. The model update method according to claim 1, characterized in that, The step of updating the target model in each computing node according to the incremental update features and the difference model parameter matrix to obtain the updated target model includes: Obtain the first weight coefficients corresponding to the parameter matrix of the difference model; Obtain the second weight coefficient corresponding to the incremental update feature; Obtain the version of the target model and the third weight coefficient corresponding to the version; The incremental update data is obtained by adding the result of multiplying the first weight coefficient and the difference model parameter matrix, the result of multiplying the second weight coefficient and the incremental update feature, and the result of multiplying the third weight coefficient and the version. The incremental update data is sent to each computing node to update the target model in each computing node and obtain the updated target model.

11. A model update apparatus, characterized in that, include: The first acquisition module is used to acquire the computing power value and memory value corresponding to each computing node in multiple computing nodes, wherein each computing node locally stores the target model; The first determining module is used to determine the computing power score corresponding to each computing node based on the computing power value and memory value corresponding to each computing node, and to select multiple target computing nodes from the multiple computing nodes based on the computing power score. The second acquisition module is used to acquire the data to be processed, and to divide the batch processing data corresponding to each target computing node from the data to be processed according to the computing power value and memory value corresponding to each computing node. The third acquisition module is used to acquire the model parameter matrix output by each target computing node after loading the target model and processing the corresponding batch data; The second determining module is used to determine the updated model parameter matrix corresponding to the target model based on each of the model parameter matrices; The third determining module is used to determine the difference model parameter matrix between the updated model parameter matrix and the target model model parameter matrix, and to perform hash encryption processing on the difference model parameter matrix to obtain encrypted difference model parameter features; The parameter matrix of the difference model is pruned to obtain simplified parameter features of the difference model; Incremental update features are generated based on the encrypted differential model parameter features and the simplified differential model parameter features; the target model in each computing node is updated based on the incremental update features and the differential model parameter matrix to obtain the updated target model.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the model update method according to any one of claims 1 to 10.

13. A computer device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor executes the computer program, it implements the model update method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Model updating method and device, computer storage medium and electronic equipment

    CN113791798A

  • Heterogeneous cluster model training method and system, electronic equipment and medium

    CN118428450A