Multi-party joint training method and device of large model, equipment and storage medium

Through the multi-party joint training method of the big model, the client and the server work together, and use rich data resources and computing resources to solve the problem of insufficient computing power in fine-tuning of large language models, improve the model training effect, and be trusted Ensure data security in execution environment.

CN119089983APending Publication Date: 2024-12-06CHINA UNIONPAY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411259961.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

During the fine-tuning process, large language models are limited by the computing resource limitations caused by insufficient client computing power and large amount of pre-trained model parameters, resulting in low model accuracy and training efficiency.

Method used

Using a multi-party joint training method of a large model, the client and the server work together, and the client's rich data resources and the server's computing resources are used to train the model, including the client and the server obtaining the matrix based on the original input data, and performing the Feature extraction and model training, summarizing model subparameters to obtain global model parameters.

Benefits of technology

It effectively alleviates the problem of insufficient computing power of the client, improves the training effect and efficiency of the model, and ensures data security by interacting in a trusted execution environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089983A_ABST
    Figure CN119089983A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a multi-party joint training method and device for a large model, equipment and a storage medium. The method comprises the following steps: obtaining a first matrix by each client and a server according to original input data; each client obtains a second matrix according to the first matrix and the original output data; the server trains the initial model based on the first matrix and the second matrix to obtain model sub-parameters; and summarizing the model sub-parameters corresponding to each client to obtain global model parameters, and feeding back the global model parameters to each client. According to the scheme, model training is completed through combination of multiple parties, rich data resources of the clients and computing power resources of the server are fully utilized, the problem that the computing power of the clients is insufficient is solved, and meanwhile the training effect of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to Internet technology, and in particular to a multi-party joint training method, device, equipment and storage medium for a large model. Background Art

[0002] In recent years, large language models such as LLM and GPT have developed rapidly, and various industries have conducted extensive explorations on the application of large language models in vertical fields. The common method is to fine-tune the model based on the pre-trained model using their own high-quality private professional data. However, each institution often faces the following problems when fine-tuning: first, each institution has limited professional data, which will limit the accuracy of the fine-tuned model; second, a general pre-trained large model usually contains billions or tens of billions of parameters, which often requires a large amount of computing power to fine-tune the pre-trained model, and general institutions are limited by computing resources. Summary of the invention

[0003] The embodiments of the present application provide a multi-party joint training method, device, equipment and storage medium for a large model, so as to alleviate the problem of insufficient client computing power and improve the training effect of the model.

[0004] In a first aspect, an embodiment of the present application provides a multi-party joint training method for a large model, which is applicable to a server and multiple clients, including:

[0005] Each of the client and the server obtains a first matrix according to the original input data;

[0006] Each of the clients obtains a second matrix according to the first matrix and original output data;

[0007] The server trains the initial model based on the first matrix and the second matrix to obtain model sub-parameters;

[0008] The model sub-parameters corresponding to each of the clients are aggregated to obtain global model parameters, and the global model parameters are fed back to each of the clients.

[0009] In a possible implementation, the method further includes:

[0010] Each of the clients authenticates the server, and if the authentication is successful, a secure channel is established, and data is exchanged through the secure channel.

[0011] In a possible implementation manner, the server and each of the clients are in a trusted execution environment;

[0012] The method for judging whether the verification is passed includes:

[0013] Each of the clients performs remote authentication on the server to verify the security of the trusted execution environment of the server and the integrity of the running program. When the security and the integrity meet the preset requirements, the verification is considered to be successful.

[0014] In a possible implementation manner, each of the clients and the server obtains a first matrix according to original input data, including:

[0015] Each of the clients performs feature extraction on the original input data to obtain a third matrix;

[0016] The server further performs feature extraction on the third matrix to obtain the first matrix.

[0017] In a possible implementation, the client includes an encoder;

[0018] Each of the clients performs feature extraction on the original input data to obtain a third matrix, including:

[0019] The encoder of each client performs feature extraction on the original input data to obtain the third matrix.

[0020] In a possible implementation manner, the client further includes a vector conversion module;

[0021] Each of the clients extracts features from the original input data to obtain a third matrix, further comprising:

[0022] The vector conversion module of each of the clients converts the original input data into a first vector matrix;

[0023] The encoder of each client performs feature extraction on the first vector matrix to obtain the third matrix.

[0024] In a possible implementation manner, the server includes an encoder;

[0025] The server further performs feature extraction on the third matrix to obtain the first matrix, including:

[0026] The encoder at the server side performs feature extraction on the third matrix to obtain the first matrix.

[0027] In a possible implementation, the client includes a decoder;

[0028] Each of the clients obtains a second matrix according to the first matrix and the original output data, including:

[0029] The decoder of each of the clients parses the mapping relationship between the first matrix and the original output data to obtain the second matrix.

[0030] In a possible implementation, the client includes a vector conversion module;

[0031] Each of the clients obtains a second matrix according to the first matrix and the original output data, further comprising:

[0032] The vector conversion module of each client converts the original output data into a second vector matrix;

[0033] The decoder of each client parses the mapping relationship between the first matrix and the second vector matrix to obtain the second matrix.

[0034] In a possible implementation manner, the server further includes a storage module, and the global model parameters are temporarily stored in the storage module.

[0035] In a possible implementation, while the secure channel is established after verification, the server authorizes the client after verification;

[0036] Before feeding back the global model parameters to each of the clients, the method includes:

[0037] The server confirms whether the recipient has obtained authorization;

[0038] After successful confirmation, the global model parameters are extracted from the storage module and fed back to each authorized client.

[0039] In a second aspect, an embodiment of the present application provides a multi-party joint training device for a large model, including: a server and multiple clients;

[0040] Each of the client and the server is used to obtain a first matrix according to the original input data;

[0041] Each of the clients is further configured to obtain a second matrix according to the first matrix and original output data;

[0042] The server is also used to train the initial model based on the first matrix and the second matrix to obtain model sub-parameters; summarize the model sub-parameters corresponding to each of the clients to obtain global model parameters, and feed them back to each of the clients.

[0043] In a third aspect, an embodiment of the present application provides a computer device, including: a memory, a processor;

[0044] The memory stores computer-executable instructions;

[0045] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.

[0046] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.

[0047] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.

[0048] The multi-party joint training method, device, equipment and storage medium of the large model provided in the embodiment of the present application, each client and the server obtain a first matrix based on the original input data; each client obtains a second matrix based on the first matrix and the original output data; the server trains the initial model based on the first matrix and the second matrix to obtain model sub-parameters; the model sub-parameters corresponding to each client are summarized to obtain global model parameters, and the global model parameters are fed back to each client. The above scheme completes the model training through multi-party joint efforts, making full use of the rich data resources of each client and the computing power resources of the server, alleviating the problem of insufficient computing power on the client, and also improving the training effect of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0050] Figure 1 A schematic diagram of a scenario of a multi-party joint training method for a large model in one embodiment;

[0051] Figure 2 A schematic diagram of a flow chart of a multi-party joint training method for a large model in one embodiment;

[0052] Figure 3 is a schematic flow chart of a step of obtaining a first matrix in one embodiment;

[0053] Figure 4 A schematic diagram of the structure of a multi-party joint training device for a large model in another embodiment;

[0054] Figure 5 FIG. 1 is a schematic diagram of the structure of a computer in an embodiment.

[0055] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0056] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0057] The multi-party joint training of the large model provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, multiple clients 102 communicate with the server 104 through the network, and each client 102 is independent of each other.

[0058] For example, a multi-party joint training method for a large model is applied to the client 102 and the server 104. Each client 102 and the server 104 obtains a first matrix based on the original input data, and the server 104 transmits the first matrix to each client 102; each client 102 obtains a second matrix based on the first matrix and the original output data and transmits it to the server 104; the server 104 trains the initial model based on the first matrix and the second matrix to obtain model sub-parameters; the model sub-parameters corresponding to each client are summarized to obtain global model parameters, and the global model parameters are fed back to each client.

[0059] Each client 102 and the server 104 may be implemented by an independent server or a server cluster composed of multiple servers. Each client 102 and the server 104 may be directly or indirectly connected via wired or wireless communication, such as via a network connection.

[0060] It should be noted that the network communication between each client 102 and the server 104 is applicable to different network standards, for example, it can be applicable to global system of mobile communication (GSM), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time division synchronous code division multiple access (TD-SCDMA), long term evolution (LTE) system and future 5G network standards. Optionally, the above communication system can be a system in the scenario of ultra-reliable and low latency communications (URLLC) transmission in a 5G communication system.

[0061] Therefore, optionally, the above-mentioned base station can be a base station (Base Transceiver Station, referred to as BTS) and / or a base station controller in GSM or CDMA, or a base station (NodeB, referred to as NB) and / or a radio network controller (Radio Network Controller, referred to as RNC) in WCDMA, or an evolved base station (EvolutionalNode B, referred to as eNB or eNodeB) in LTE, or a relay station or access point, or a base station (gNB) in a future 5G network, etc., and the present application is not limited here.

[0062] In one embodiment, a multi-party joint training method for a large model is provided. This embodiment uses the method applied to the client 102 and the server 104 as an example. Figure 2 As shown, the multi-party joint training method of the large model includes:

[0063] Step 202: Each client and server obtains a first matrix according to the original input data.

[0064] Specifically, when preparing model training, each client needs to prepare the original input data, original output data, and original model parameters in advance; the original input data is the initial data of the model, which can be text, image, audio or other format of original data. The original output data is usually the expected value of the model output, which may be a label or other reference standard. It should be understood that the above-mentioned original input data has been pre-processed by cleaning, feature scaling, normalization, and standardization.

[0065] Each client and server can learn the feature information carried by the original input data. It should be understood that the computing power of the server is much higher than that of the client. Therefore, each client obtains the initial feature information from the original input data based on its capacity, and the server further processes the initial feature information to obtain a deeper feature representation, so that the model can learn to process more complex relationships, thereby improving the recognition accuracy of the model.

[0066] Step 204: Each client obtains a second matrix according to the first matrix and the original output data.

[0067] Specifically, the first data represents the feature information of the original input data, and each client can capture the mapping relationship between the input data and the expected output data through the first data and the original output data, thereby matching the high-level features of the input data with the output data. Therefore, the second matrix represents the mapping relationship between the input and the output.

[0068] Step 206: The server trains the initial model based on the first matrix and the second matrix to obtain model sub-parameters; summarizes the model sub-parameters corresponding to each client to obtain global model parameters, and feeds back to each client.

[0069] Specifically, the server of the present application trains the model based on the first matrix and the second matrix in order to integrate feature information from different sources, thereby improving the model's ability to express data.

[0070] Furthermore, the model training process also involves the calculation of the loss function. The server calculates the loss function based on the result of feature processing and the actual target output. The loss function measures the difference between the model prediction result and the true value. The result of the loss function is then used to calculate the gradient through the backpropagation algorithm, and the parameters of the model are adjusted to minimize the loss function. Among them, the model parameters are updated according to the gradient descent method or other optimization algorithms. Repeat the above steps and iteratively train the model. In each round, the model parameters are continuously adjusted based on the new input data to gradually improve the performance of the model until the model converges or reaches the preset training representation.

[0071] It should be noted that a general large model usually contains billions or tens of billions of parameters, and each client has limited professional data. Therefore, in order to improve the model effect and obtain sufficient computing resources, it is often necessary for multiple data holders and service providers with rich computing resources to cooperate to complete model fine-tuning. Specifically in this embodiment, the server can interact with multiple clients at the same time, and the original input data, original output data and original model parameters of each client are different. After the training is completed, the model sub-parameters corresponding to each client are also different. The server summarizes all the model sub-parameters obtained through training and finally obtains the global model parameters of the large model. In this way, each client can perform recognition work based on the global model parameters.

[0072] In the multi-party joint training method of the above large model, each client and server obtains the first matrix based on the original input data; each client obtains the second matrix based on the first matrix and the original output data; the server trains the initial model based on the first matrix and the second matrix to obtain the model sub-parameters; the model sub-parameters corresponding to each client are summarized to obtain the global model parameters, and then fed back to each client. The above scheme completes the model training through multi-party joint efforts, making full use of the rich data resources of each client and the computing power resources of the server, alleviating the problem of insufficient computing power on the client, and also improving the training effect of the model.

[0073] In one embodiment, the multi-party joint training method of the large model of the present application further includes:

[0074] Each client verifies the server, and if the verification is successful, a secure channel is established and data is exchanged through the secure channel.

[0075] Specifically, the training data of each client may contain personal sensitive information, commercial secrets, etc., and there is a risk of data leakage if it is directly provided to the outside. In addition, a multi-party joint training method is adopted, and the client only contains an embedding layer, and the calculation pressure is relatively small, but the cloud service provider can easily restore the input text through some technical means, such as nearest neighbor search, embedding inversion attack, etc. Further, the cloud will integrate the data of all distributed clients, because all clients can access the same service on the server, so there is also a greater risk of data leakage. Therefore, before each client of the embodiment of the present application interacts with the server for data, it is first verified to reduce the risk of data leakage and embedding inversion attack.

[0076] Optionally, the server and each client are in TEE (Trusted Execution Environment), which is an operating environment independent of other areas of the system based on hardware isolation mechanism, and provides security protection through a combination of software and hardware. The training process of the server and each client is carried out in the TEE environment, and only intermediate data is involved when data is exchanged through a secure channel, which improves data security. Furthermore, unauthorized entities and malware cannot access the TEE environment, and the data between each client is isolated, so other participants and cloud service providers cannot spy on the original data and intermediate calculation result data of a participant.

[0077] Optionally, the verification passing judgment method includes:

[0078] Each client performs remote authentication on the server to verify the security of the server's trusted execution environment and the integrity of the running program. When the security and integrity meet the preset requirements, the verification is considered successful.

[0079] Specifically, each client performs remote authentication on the server based on the TEE remote attestation mechanism. The TEE remote attestation mechanism means that the TEE uses a series of security measures and protocols to prove to the remote verifier the security of its internal environment, the integrity of code and data, and the reliability of execution results.

[0080] The multi-party joint training method of the above-mentioned large model fully utilizes the rich data resources of each client and the computing power resources of the server to improve the model training effect. At the same time, it enables each client and server to run in a TEE environment, and each client remotely authenticates the server based on the TEE remote attestation mechanism to ensure data security.

[0081] See also Figure 3 Optionally, each client and server obtains a first matrix according to the original input data, including:

[0082] Step 302: Each client performs feature extraction on the original input data to obtain a third matrix;

[0083] Step 304: The server further performs feature extraction on the third matrix to obtain a first matrix.

[0084] Specifically, each client includes multiple encoders and decoders, where the encoder is used to extract data features. The encoder converts the input vector into a higher-dimensional feature matrix that captures the potential information of the input data. The decoder is used to recover the original or target domain data from the output of the encoder. The decoder gradually generates an output sequence based on the output of the encoder, such as text generation, image generation, etc.

[0085] Furthermore, the server also includes multiple encoders and decoders, which function in the same way as the client, and whose structures can be the same or different from those of each client. When preparing model training, each client, in addition to preparing the above-mentioned original input data, original output data, and original model parameters in advance, also splits the model according to actual conditions to determine the number of encoders and decoders on the client, and the number of encoders and decoders on the server.

[0086] Each client then extracts features from the original input data to obtain a third matrix, including:

[0087] The encoder of each client performs feature extraction on the original input data to obtain a third matrix.

[0088] Furthermore, the client also includes a vector conversion module (Embedding), which is a technology that maps input data to a continuous vector space. These vectors are usually of lower dimension but can capture the key features of the data. By converting the input data into vector form, Embedding enables computers to process and learn this data more efficiently, thereby improving the performance of various tasks.

[0089] Each client then extracts features from the original input data to obtain a third matrix, which also includes:

[0090] The vector conversion module of each client converts the original input data into a first vector matrix; the encoder of each client performs feature extraction on the first vector matrix to obtain a third matrix.

[0091] Exemplarily, the server further performs feature extraction on the third matrix to obtain a first matrix, including:

[0092] The encoder on the server side performs feature extraction on the third matrix to obtain the first matrix.

[0093] Exemplarily, each client obtains a second matrix according to the first matrix and the original output data, including:

[0094] The decoder of each client parses the mapping relationship between the first matrix and the original output data to obtain a second matrix.

[0095] Exemplarily, each client obtains a second matrix according to the first matrix and the original output data, further comprising:

[0096] The vector conversion module of each client converts the original output data into a second vector matrix;

[0097] The decoder of each client parses the mapping relationship between the first matrix and the second vector matrix to obtain the second matrix.

[0098] Optionally, the server also includes a storage module, and the global model parameters are temporarily stored in the storage module. It should be noted that in addition to storing the global model parameters, the storage module of the server also stores the model sub-parameters corresponding to each client, as well as the training data generated during the training process of each client. Storing the above data in a storage module protected by the TEE environment can effectively prevent the leakage of fine-tuning parameters.

[0099] Optionally, when the secure channel is established after verification, the server authorizes the client after verification; before feeding back the global model parameters to each client, it includes:

[0100] The server confirms whether the recipient has obtained authorization; if successful, it extracts the global model parameters from the storage module and feeds them back to the authorized clients.

[0101] The multi-party joint training method of the above large model fully utilizes the rich data resources of each client and the computing power resources of the server to improve the model training effect. At the same time, it also enables each client and server to run in the TEE environment, and each client remotely authenticates the server based on the TEE remote certification mechanism to ensure data security. After the training is completed, the server will feed back the training results to each authorized client to avoid data leakage and further ensure data security.

[0102] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0103] Based on the same inventive concept, the embodiment of the present application also provides a large model multi-party joint training device for implementing the large model multi-party joint training method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more device embodiments provided below can refer to the limitations of the method above, and will not be repeated here.

[0104] Please continue reading Figure 1 In one embodiment, a multi-party joint training device for a large model is provided, including: a server and multiple clients.

[0105] Each client and server is used to obtain a first matrix according to the original input data;

[0106] Each client is further used to obtain a second matrix according to the first matrix and the original output data;

[0107] The server is also used to train the initial model based on the first matrix and the second matrix to obtain model sub-parameters; summarize the model sub-parameters corresponding to each client to obtain global model parameters, and feed them back to each client.

[0108] See also Figure 4 Optionally, each client and server includes: an authentication module.

[0109] The authentication module is used by each client to authenticate the server. If the authentication is successful, a secure channel is established and data is exchanged through the secure channel.

[0110] Optionally, the verification passing judgment method includes:

[0111] Each client performs remote authentication on the server to verify the security of the server's trusted execution environment and the integrity of the running program. When the security and integrity meet the preset requirements, the verification is considered to be successful, and the server authorizes each client that has passed the verification.

[0112] Optionally, each client includes multiple encoders and decoders, and the server also includes multiple encoders and decoders.

[0113] The encoder of each client is used to extract features from the original input data, obtain the third matrix, and generate it to the encoder of the server.

[0114] The encoder on the server side is used to further extract features from the third matrix to obtain the first matrix, and transmit the first matrix to the encoders on each client side and the decoder on the server side.

[0115] Each client also includes a vector conversion module, which is used to convert the original input data into a first vector matrix; then the encoder of each client is also used to extract features from the first vector matrix to obtain a third matrix and transmit it to the encoder of the server.

[0116] The decoder of each client is used to analyze the mapping relationship between the first matrix and the original output data, obtain the second matrix, and transmit it to the decoder of the server.

[0117] The vector conversion module of each client is also used to convert the original output data into a second vector matrix and transmit it to the decoder of each client; at this time, the decoder of each client is used for the mapping relationship between the first matrix and the second vector matrix to obtain the second matrix and transmit it to the decoder of the server.

[0118] The decoder on the server side is used to train the initial model based on the first matrix and the second matrix to obtain model sub-parameters.

[0119] Optionally, the multi-party joint training device for a large model further includes: a storage module.

[0120] The storage module is used to summarize the model sub-parameters corresponding to each client, obtain the global model parameters, and feed them back to each client; it is also used to store the global model parameters, the model sub-parameters corresponding to each client, and the training data generated during the training process of each client.

[0121] Optionally, the multi-party joint training device for a large model also includes: a computing power acceleration platform.

[0122] The computing power acceleration platform is used to calculate linear operations during model training.

[0123] Please continue reading Figure 4 In order to enable those skilled in the art to fully understand the present application, the steps of the multi-party joint training device for the large model of the present application are described in detail below, taking client A as an example:

[0124] Client A prepares original input data, original output data, and original model parameters in advance, and also splits the model according to actual conditions to determine the number of encoders and decoders on the client side, as well as the number of encoders and decoders on the server side.

[0125] The vector conversion module of client A converts the input data a into a first vector matrix and transmits it to encoder X; encoder X extracts features from the first vector matrix to obtain a third matrix.

[0126] The authentication module of client A verifies the server. If the verification is successful, a secure channel is established. At the same time, the server authorizes the verified client A and transmits the third matrix to the encoder Y of the server.

[0127] The encoder Y of the server further extracts features from the third matrix to obtain a first matrix, and transmits the first matrix to the decoder Y of the server and the decoder X of the client A.

[0128] The vector conversion module of client A converts the output data b into a second vector matrix and transmits it to decoder X; decoder X parses the mapping relationship between the first matrix and the second vector matrix to obtain the second matrix and transmits it to decoder Y of the server.

[0129] The decoder Y of the server trains the initial model based on the first matrix and the second matrix to obtain the model sub-parameters of the client A.

[0130] The storage module on the server aggregates the model sub-parameters corresponding to each client, obtains the global model parameters, and feeds them back to the authorized client A.

[0131] The linear operations in this process can be calculated with the help of the computing power acceleration platform on the server side; at the same time, the storage module on the server side also temporarily stores the global model parameters, the model sub-parameters corresponding to client A, and the training data generated during the training process.

[0132] The multi-party joint training device of the above large model fully utilizes the rich data resources of each client and the computing power resources of the server to improve the model training effect. At the same time, it also enables each client and server to run in the TEE environment, and each client remotely authenticates the server based on the TEE remote certification mechanism to ensure data security. After the training is completed, the server will feed back the training results to each authorized client to avoid data leakage and further ensure data security.

[0133] Each module in the above device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.

[0134] Figure 5 The schematic diagram of the computer structure provided in this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the device 50 also includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.

[0135] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.

[0136] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0137] In the above embodiments, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.

[0138] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.

[0139] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.

[0140] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0141] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0142] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0143] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0144] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

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

[0146] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0147] If the function is implemented in the form of 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 the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0148] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0149] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A multi-party joint training method for a large model, applicable to a server and multiple clients, characterized in that: include: Each of the client and the server obtains a first matrix according to the original input data; Each of the clients obtains a second matrix according to the first matrix and original output data; The server trains the initial model based on the first matrix and the second matrix to obtain model sub-parameters; The model sub-parameters corresponding to each of the clients are aggregated to obtain global model parameters, and the global model parameters are fed back to each of the clients.

2. The method according to claim 1, characterized in that The method further comprises: Each of the clients authenticates the server, and if the authentication is successful, a secure channel is established, and data is exchanged through the secure channel.

3. The method according to claim 2, characterized in that The server and each of the clients are in a trusted execution environment; The method for judging whether the verification is passed includes: Each of the clients performs remote authentication on the server to verify the security of the trusted execution environment of the server and the integrity of the running program. When the security and the integrity meet the preset requirements, the verification is considered to be successful.

4. The method according to claim 1, characterized in that: Each of the client and the server obtains a first matrix according to the original input data, including: Each of the clients performs feature extraction on the original input data to obtain a third matrix; The server further performs feature extraction on the third matrix to obtain the first matrix.

5. The method according to claim 4, characterized in that The client comprises an encoder; Each of the clients performs feature extraction on the original input data to obtain a third matrix, including: The encoder of each client performs feature extraction on the original input data to obtain the third matrix.

6. The method according to claim 5, characterized in that The client also includes a vector conversion module; Each of the clients extracts features from the original input data to obtain a third matrix, further comprising: The vector conversion module of each of the clients converts the original input data into a first vector matrix; The encoder of each client performs feature extraction on the first vector matrix to obtain the third matrix.

7. The method according to claim 4, characterized in that The server includes an encoder; The server further performs feature extraction on the third matrix to obtain the first matrix, including: The encoder at the server side performs feature extraction on the third matrix to obtain the first matrix.

8. The method according to claim 1, characterized in that The client comprises a decoder; Each of the clients obtains a second matrix according to the first matrix and the original output data, including: The decoder of each of the clients parses the mapping relationship between the first matrix and the original output data to obtain the second matrix.

9. The method according to claim 8, characterized in that The client comprises a vector conversion module; Each of the clients obtains a second matrix according to the first matrix and the original output data, further comprising: The vector conversion module of each client converts the original output data into a second vector matrix; The decoder of each client parses the mapping relationship between the first matrix and the second vector matrix to obtain the second matrix.

10. The method according to claim 2, characterized in that The server also includes a storage module, and the global model parameters are temporarily stored in the storage module.

11. The method according to claim 10, characterized in that When a secure channel is established after verification, the server authorizes the verified client. Before feeding back the global model parameters to each of the clients, the method includes: The server confirms whether the recipient has obtained authorization; After successful confirmation, the global model parameters are extracted from the storage module and fed back to each authorized client.

12. A multi-party joint training device for a large model, characterized in that: include: Server and multiple clients; Each of the client and the server is used to obtain a first matrix according to the original input data; Each of the clients is further configured to obtain a second matrix according to the first matrix and original output data; The server is also used to train the initial model based on the first matrix and the second matrix to obtain model sub-parameters; summarize the model sub-parameters corresponding to each of the clients to obtain global model parameters, and feed them back to each of the clients.

13. A computer device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 11 when executed by a processor.

15. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 11 when being executed by a processor.

Citation Information

Patent Citations

  • Federal learning method and device based on edge calculation, equipment and medium

    CN115618965A

  • Federal learning calculation method based on trusted execution environment and related equipment

    CN117688576A

  • Pre-training model fine tuning method and related equipment

    CN118171713A