Data processing method, apparatus, device, and medium

By performing local model parameter fusion and global momentum indication in federated learning, the training direction of the object recognition model is optimized, which solves the problems of slow model convergence and instability caused by data differences, and improves the performance and applicability of the model.

CN115222064BActive Publication Date: 2026-02-24TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111604853.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-04-15
Filing Date
2021-12-24
Publication Date
2026-02-24
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

In federated learning, the significant differences in data among various data holders and the inconsistent degree of model optimization lead to slow and unstable model convergence, affecting the performance and applicability of the federated model.

Method used

By acquiring the local model parameters of N local recognition models, parameter fusion is performed to generate a global model. The global federated momentum is used to indicate the training direction, and the parameters of the local recognition models are updated. The model is then optimized by combining the training learning rate and training gradient.

Benefits of technology

This improved the performance and applicability of the object recognition model, ensured consistency in training direction across clients, and enhanced the model's convergence speed and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115222064B_ABST
    Figure CN115222064B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data processing method, device and equipment and medium, the method comprising: obtaining local model parameters corresponding to the rth synchronization cycle of N local identification models, performing parameter fusion on the local model parameters corresponding to the N local identification models respectively to obtain a target global model corresponding to the rth synchronization cycle; obtaining a historical global model of the N local identification models at the (r-1)th synchronization cycle, generating a global federated momentum corresponding to the rth synchronization cycle according to the historical global model and the target global model; and sending the global federated momentum to N clients to enable the N clients to perform parameter updating on the associated local identification models according to the global federated momentum to obtain an object identification model. The embodiments of the present application can improve the training efficiency of the local identification model and improve the model performance of the object identification model obtained by training the local identification model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a data processing method, apparatus, device, and medium. Background Technology

[0002] Federated learning has emerged as a novel training method to address data silos across departments and even platforms. It allows for model training and parameter acquisition without requiring data from individual data providers, thus enabling joint training while maintaining data privacy. However, federated learning requires substantial data distributed among different data holders, necessitating collaboration among these holders in model building. This collaborative model building process requires parameter fusion of the trained models from each data holder.

[0003] Currently, due to the significant differences in data among various data holders, and the varying degrees of optimization of the models trained by each data holder, the convergence speed of federated training models is slow and unstable, resulting in poor performance of the finally trained federated models, which cannot meet the needs of practical application scenarios and have poor applicability. Summary of the Invention

[0004] This application provides a data processing method, apparatus, device, and medium that can improve the performance and applicability of object recognition models.

[0005] One embodiment of this application provides a data processing method, including:

[0006] Obtain the local model parameters corresponding to N local recognition models in the r-th synchronization period; the N local recognition models are independently trained by different clients, and each client includes multimedia sample data for training the associated local recognition model. The multimedia sample data contains objects with the target object type. N and r are both positive integers greater than 1, and N is the number of clients.

[0007] The parameters of the local models corresponding to the N local recognition models are fused to obtain the target global model corresponding to the r-th synchronization cycle.

[0008] Obtain the historical global model of N local recognition models at the (r-1)th synchronization period. Based on the historical global model and the target global model, generate the global federated momentum corresponding to the rth synchronization period. The historical global model is generated based on the local model parameters uploaded by N clients at the (r-1)th synchronization period. The global federated momentum is used to indicate the training direction of the N local recognition models.

[0009] The global federated momentum is sent to N clients, so that each of the N clients updates the parameters of the associated local recognition model according to the global federated momentum to obtain the object recognition model; the object recognition model is used to identify objects with the target object type contained in the multimedia data.

[0010] Specifically, based on the historical global model and the target global model, the global federated momentum corresponding to the r-th synchronization cycle is generated, including:

[0011] Obtain the training learning rate of N local recognition models in the r-th synchronization period, and obtain the model parameter difference between the target global model and the historical global model;

[0012] The ratio between the model parameter difference and the training learning rate is defined as the global federated momentum.

[0013] Specifically, the parameters of the local models corresponding to the N local recognition models are fused to obtain the target global model corresponding to the r-th synchronization cycle, including:

[0014] Obtain M local model parameters from the local model parameters corresponding to N local recognition models; M is a positive integer less than N;

[0015] Obtain the training influence weights corresponding to the M local model parameters, and sum the training influence weights with the M local model parameters to obtain the fusion model parameters. Then, determine the recognition model carrying the fusion model parameters as the target global model.

[0016] One embodiment of this application provides a data processing method, including:

[0017] When the number of training iterations of the target local recognition model satisfies the requirements of the r-th synchronization cycle, the local model parameters corresponding to the target local recognition model are uploaded to the service device. This allows the service device to determine the global federated momentum corresponding to the r-th synchronization cycle based on the target global model generated by the local model parameters uploaded by N clients in the r-th synchronization cycle and the historical global model in the (r-1)-th synchronization cycle. The local model parameters uploaded by the N clients include the local model parameters corresponding to the target local recognition model. The historical global model is generated based on the local model parameters uploaded by the N clients in the (r-1)-th synchronization cycle. The global federated momentum is used to indicate the training direction of the N local recognition models. N and r are both positive integers greater than 1.

[0018] The system receives the global federated momentum returned by the receiving service device, updates the parameters of the target local identification model based on the global federated momentum, and determines the target local identification model after parameter update as the object identification model. The object identification model is used to identify objects with the target object type contained in multimedia data.

[0019] The above methods also include:

[0020] Acquire multimedia sample data, input the multimedia sample data into the target local recognition model, and output the object space features corresponding to the multimedia sample data through the target local recognition model;

[0021] Based on the object space features and the label information corresponding to the multimedia sample data, determine the training loss function corresponding to the target local recognition model;

[0022] The training gradient of the target local recognition model is determined based on the training loss function. The parameters of the target local recognition model are updated based on the training gradient and the corresponding training learning rate of the target local recognition model. The number of training iterations of the target local recognition model is then counted.

[0023] Specifically, the local target recognition model is updated with parameters based on global federated momentum, and the updated local recognition model is then determined as the object recognition model. This includes:

[0024] Obtain the training gradient and training learning rate of the target local recognition model in the r-th synchronization cycle;

[0025] The number of cyclic training cycles of the target local recognition model in the r-th synchronization cycle is obtained, and the ratio between the global federated momentum and the number of cyclic training cycles is determined as the unit federated momentum.

[0026] The parameters of the target local recognition model are updated based on the training learning rate, training gradient, and unit federated momentum.

[0027] When the updated target local recognition model meets the training termination condition, the updated target local recognition model is determined as the object recognition model.

[0028] The multimedia data includes images of faces to be identified, and the target object type includes face types.

[0029] The method also includes:

[0030] Acquire the face image to be recognized, input the face image to be recognized into the object recognition model, and obtain the face spatial features corresponding to the face image to be recognized in the object recognition model;

[0031] The face classification result corresponding to the face image to be identified is determined based on the face spatial features; the face classification result is used to characterize the identity verification result of the object with face type contained in the face image to be identified.

[0032] One embodiment of this application provides a data processing apparatus, including:

[0033] The first acquisition module is used to acquire the local model parameters corresponding to N local recognition models in the r-th synchronization period. The N local recognition models are independently trained by different clients. Each client includes multimedia sample data for training the associated local recognition model. The multimedia sample data contains objects with the target object type. N and r are both positive integers greater than 1, and N is the number of clients.

[0034] The parameter fusion module is used to fuse the parameters of the local models corresponding to the N local recognition models to obtain the target global model corresponding to the r-th synchronization cycle.

[0035] The generation module is used to obtain the historical global model of N local recognition models at the (r-1)th synchronization period. Based on the historical global model and the target global model, the global federated momentum corresponding to the rth synchronization period is generated. The historical global model is generated based on the local model parameters uploaded by N clients at the (r-1)th synchronization period. The global federated momentum is used to indicate the training direction of the N local recognition models.

[0036] The sending module is used to send the global federated momentum to N clients, so that the N clients can update the parameters of the associated local recognition model according to the global federated momentum to obtain the object recognition model; the object recognition model is used to identify objects with the target object type contained in the multimedia data.

[0037] The generation module includes:

[0038] The first acquisition unit is used to acquire the training learning rate of N local recognition models in the r-th synchronization period and to acquire the model parameter difference between the target global model and the historical global model.

[0039] The first determining unit is used to determine the global federated momentum as the ratio between the model parameter difference and the training learning rate.

[0040] The parameter fusion module includes:

[0041] The second acquisition unit is used to acquire M local model parameters from the local model parameters corresponding to the N local recognition models respectively; M is a positive integer less than N;

[0042] The second determining unit is used to obtain the training influence weights corresponding to the M local model parameters, perform a weighted summation of the training influence weights and the M local model parameters to obtain the fusion model parameters, and determine the recognition model carrying the fusion model parameters as the target global model.

[0043] One embodiment of this application provides a data processing apparatus, including:

[0044] The parameter upload module is used to upload the local model parameters corresponding to the target local recognition model to the service device when the number of training cycles of the target local recognition model meets the requirements of the r-th synchronization cycle. This allows the service device to determine the global federated momentum corresponding to the r-th synchronization cycle based on the target global model generated by the local model parameters uploaded by N clients in the r-th synchronization cycle and the historical global model in the (r-1)-th synchronization cycle. The local model parameters uploaded by the N clients include the local model parameters corresponding to the target local recognition model. The historical global model is generated based on the local model parameters uploaded by the N clients in the (r-1)-th synchronization cycle. The global federated momentum is used to indicate the training direction of the N local recognition models. N and r are both positive integers greater than 1.

[0045] The first parameter update module is used to receive the global federated momentum returned by the service device, update the parameters of the target local recognition model according to the global federated momentum, and determine the target local recognition model after parameter update as the object recognition model; the object recognition model is used to identify objects with the target object type contained in the multimedia data.

[0046] The data processing device also includes:

[0047] The output module is used to acquire multimedia sample data, input the multimedia sample data into the target local recognition model, and output the object space features corresponding to the multimedia sample data through the target local recognition model.

[0048] The first determining module is used to determine the training loss function corresponding to the target local recognition model based on the object space features and the label information corresponding to the multimedia sample data.

[0049] The second parameter update module is used to determine the training gradient of the target local recognition model based on the training loss function, update the parameters of the target local recognition model based on the training gradient and the corresponding training learning rate of the target local recognition model, and count the number of training times corresponding to the target local recognition model.

[0050] The first parameter update module includes:

[0051] The third acquisition unit is used to acquire the training gradient and training learning rate of the target local recognition model in the r-th synchronization period;

[0052] The third determining unit is used to obtain the number of cyclic training cycles of the target local recognition model in the r-th synchronization cycle, and to determine the ratio between the global federated momentum and the number of cyclic training cycles as the unit federated momentum.

[0053] The parameter update unit is used to update the parameters of the target local recognition model based on the training learning rate, training gradient, and unit federated momentum.

[0054] The fourth determining unit is used to determine the target local recognition model after parameter update as the object recognition model when the target local recognition model after parameter update meets the training termination condition.

[0055] The multimedia data includes images of faces to be identified, and the target object type includes face types.

[0056] The data processing device also includes:

[0057] The second acquisition module is used to acquire the face image to be recognized, input the face image to be recognized into the object recognition model, and acquire the face spatial features corresponding to the face image to be recognized in the object recognition model.

[0058] The second determining module is used to determine the face classification result corresponding to the face image to be identified based on the face spatial features; the face classification result is used to characterize the identity verification result of the object with face type contained in the face image to be identified.

[0059] One aspect of this application provides a computer device, including a memory and a processor. The memory is connected to the processor, the memory is used to store computer programs, and the processor is used to call the computer programs so that the computer device executes the method provided in one aspect of this application.

[0060] One aspect of this application provides a computer-readable storage medium storing a computer program adapted to be loaded and executed by a processor, so that a computer device having a processor performs the method provided in one aspect of this application.

[0061] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in the above aspect.

[0062] This application embodiment obtains the local model parameters corresponding to N local recognition models in the r-th synchronization period. These N local recognition models are independently trained by different clients. Each client includes multimedia sample data used to train its associated local recognition model. The multimedia sample data contains objects of the target object type. The parameters of the local models corresponding to the N local recognition models are fused to obtain the target global model corresponding to the r-th synchronization period. Each synchronization period corresponds to one global model. The historical global models of the N local recognition models in the (r-1)-th synchronization period are obtained. Based on the historical global models and the target global model, a global federated momentum corresponding to the r-th synchronization period is generated. The global federated momentum is sent to the N clients, enabling each client to update the parameters of its associated local recognition model according to the global federated momentum, thus obtaining the object recognition model. In this application, by periodically acquiring local model parameters uploaded by N clients, generating a target global model and global federated momentum based on these local model parameters, and sending the target global model and global federated momentum to the N clients, the training direction of the local recognition models trained by the N clients is controlled so that the convergence direction of the local recognition models corresponding to each client does not deviate too far from each other. This can improve the performance of the final object recognition model and enhance its applicability. Attached Figure Description

[0063] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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.

[0064] Figure 1 This is a schematic diagram of a network architecture provided in an embodiment of this application;

[0065] Figure 2 This is a schematic diagram of a federated training scenario for a local recognition model provided in an embodiment of this application;

[0066] Figure 3 This is a timing diagram of a data processing method provided in an embodiment of this application;

[0067] Figure 4 This is a schematic diagram of a local identification model training method based on global federated momentum provided in an embodiment of this application;

[0068] Figure 5 This is a schematic diagram of a method for training a local recognition model based on global federated momentum, provided in an embodiment of this application.

[0069] Figure 6 This is a schematic diagram of a user authentication scenario provided in an embodiment of this application;

[0070] Figure 7 This is a schematic diagram of a product recognition scenario provided in an embodiment of this application;

[0071] Figure 8 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;

[0072] Figure 9 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;

[0073] Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application;

[0074] Figure 11 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0075] 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 of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0076] This application relates to Artificial Intelligence (AI) technology, Blockchain technology, and cloud technology. Artificial intelligence utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results—theories, methods, technologies, and application systems. In other words, artificial intelligence is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine capable of reacting in a manner similar to human intelligence. Artificial intelligence studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities. Artificial intelligence technology is a comprehensive discipline involving a wide range of fields, encompassing both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, and mechatronics. AI software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning. This application specifically relates to computer vision (CV) technology, a subfield of artificial intelligence.

[0077] Computer vision is a science that studies how to enable machines to "see." More specifically, it refers to using cameras and computers to replace human eyes in recognizing and measuring targets, and then performing image processing to create images more suitable for human observation or transmission to instruments. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, 3D object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), and common biometric recognition technologies such as facial recognition and fingerprint recognition. This application specifically relates to facial recognition within computer vision. Through federated learning, joint training is performed while ensuring data privacy across clients. The resulting object recognition model can be applied to various clients to recognize facial images and obtain facial recognition results, which can then be used as the basis for user authentication.

[0078] This application relates to cloud storage, a concept derived from cloud computing. Cloud storage is a new concept that extends and develops from cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to aggregate a large number of storage devices (also called storage nodes) of various types in a network through application software or application interfaces to work together and provide data storage and business access functions. Currently, the storage method of a storage system is as follows: logical volumes are created. When creating a logical volume, physical storage space is allocated to each logical volume. This physical storage space may consist of the disks of one or several storage devices. The client stores data on a logical volume, which means storing the data on the file system. The file system divides the data into many parts, each part being an object. The object contains not only data but also additional information such as a data identifier (ID entity, ID). The file system writes each object to the physical storage space of the logical volume and records the storage location information of each object. Thus, when a client requests access to data, the file system can allow the client to access the data based on the storage location information of each object.

[0079] The process of allocating physical storage space for a logical volume in a storage system is as follows: Based on the capacity estimate of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of Redundant Array of Independent Disks (RAID), the physical storage space is pre-divided into strips. A logical volume can be understood as a strip, thus allocating physical storage space to the logical volume. In this application, the multimedia sample data held by each client can be stored on different logical volumes, meaning that the multimedia sample data held by each client can be stored on a file system. For any multimedia sample data held by a client, the file system can divide it into many parts, each part being an object. An object can contain not only multimedia sample data but also data identifiers of the multimedia sample data. The file system writes each object to the physical storage space of the logical volume and records the storage location information of each object. During federated training of the recognition model, the client can request access to the multimedia sample data in the file system, and the file system can allow the client to access the multimedia sample data based on the object's storage location information.

[0080] Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and cryptographic algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks (also known as blocks) linked using cryptography. These blocks are linked through random hashing (also known as hash algorithms). Each subsequent block contains the cryptographic hash of the previous block, its corresponding timestamp, and transaction data (usually represented by a hash value calculated using a Merkle tree algorithm). This design makes the block content tamper-proof. The distributed ledger linked by blockchain technology allows two parties to effectively record transactions and permanently verify them. All client and service devices involved in this application can be blockchain nodes within the same blockchain system. During the federated training of the recognition model, uploaded local model parameters, the target global model, and global federated momentum can be stored on the blockchain to ensure the traceability of parameter fusion during the federated training process.

[0081] This application can also be applied to the field of security management. For example, in office areas (such as enterprises) where access needs to be restricted, access control must be verified for personnel entering and exiting. Only personnel with access rights can enter, and those without access rights cannot. This can be achieved through the embodiments of this application. For instance, information on specific personnel with access rights can be collected to obtain target facial image data. When a person (i.e., the person waiting to enter) wants to enter the office area, an information collection authorization prompt can be output. Upon receiving the authorization instruction from the person waiting to enter, the facial image data of the person waiting to enter is collected and used as the facial image to be identified. This facial image is then input into an object recognition model to extract features from the facial image to obtain a verification result. This verification result is compared with the target facial image data. If the target facial image data contains the facial image data corresponding to the verification result, it is determined that the person waiting to enter can enter the office area; if the target facial image data does not contain the facial image data corresponding to the verification result, it is determined that the person waiting to enter cannot enter the office area.

[0082] Please see Figure 1 , Figure 1 This is a schematic diagram of a network architecture provided in an embodiment of this application. Figure 1 As shown, this network architecture may include a server 10d and a user terminal cluster. The user terminal cluster may include one or more user terminals; the number of user terminals is not limited here. Figure 1As shown, the user terminal cluster can specifically include user terminal 10a, user terminal 10b, and user terminal 10c. Server 10d can be 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. User terminals 10a, 10b, and 10c can all include: smartphones, tablets, laptops, PDAs, mobile internet devices (MIDs), wearable devices (such as smartwatches and smart bracelets), and smart TVs, etc., intelligent terminals with multimedia data recognition capabilities. Figure 1 As shown, user terminals 10a, 10b, and 10c can each connect to server 10d via a network, so that each user terminal can interact with server 10d through the network connection.

[0083] like Figure 1As shown, each user terminal in the user terminal cluster can integrate a client. Each user terminal can integrate one or more clients, such as different clients integrated into a single user terminal. Different clients can hold different multimedia data, and all multimedia data held by different clients can be used to train the recognition model (here, it is assumed that the multimedia data held by the clients involved in this application is of the same type, such as face image data held by different clients). Since training the recognition model requires a large amount of sample data, and the multimedia data held by different clients may involve privacy or confidential information—meaning that the multimedia data held by each client cannot be publicly disclosed—a federated training method can be used to train the recognition model. In other words, each client can use its own multimedia data as multimedia sample data to train the recognition model, training independently on its own multimedia sample data. Different clients can periodically synchronize model parameters (the synchronized model parameters can be called local model parameters). That is, each client can periodically upload the trained model parameters to server 10d. Server 10d can collect the local model parameters uploaded by each client and fuse them to obtain the target global model for each period. Then, the target global model can be distributed to each client. Each client can continue to train its own local model parameters based on the target global model until the training termination condition is met (e.g., reaching the convergence condition or the number of training iterations reaches the preset maximum number of iterations), resulting in a trained object recognition model. This object recognition model can be used to identify objects with the target object type contained in the multimedia data, improving the generalization recognition effect of the object recognition model. The target object type can include, but is not limited to: faces, plants, goods, pedestrians, various animals, and various scenes.

[0084] like Figure 2 As shown, Figure 2 This is a federated training scene diagram of a local recognition model provided in an embodiment of this application, such as... Figure 2 The client 1 shown can be the one described above. Figure 1 The client 2 integrated in the user terminal 10a shown has the permission to train a recognition model in a federated manner. Figure 1 The client N integrated into the user terminal 10b shown has the permission to train a recognition model in a federated manner. The client N can be one of the aforementioned... Figure 1 The client with federated training and recognition model permissions integrated in the user terminal 10c shown can be the service device described above. Figure 1 Server 10d is shown. (As shown) Figure 2As shown, the number of clients participating in the federated training of the recognition model is N, where N can be a positive integer greater than 1, such as 2, 3, ... Each client can hold face sample data for training the recognition model, and the face sample data held by each client is independent of each other. For example, to ensure data privacy, client 1 will not share its face sample data with other devices (e.g., client 2, client N, server device, etc.). Therefore, each client can use its own face sample data to perform local training of the recognition model locally (the recognition model trained locally by the client can be called the local recognition model, and the model parameters obtained by the client through local training can be called the local model parameters).

[0085] Because the face sample data used by each client differs, each client needs to periodically upload local model parameters to the parameter service device. This allows the service device to synchronize the local model parameters trained by the N clients, i.e., to fuse the local model parameters trained by the N clients to obtain a global model. For example, if every 50 training iterations (also called training times or training steps) is set as a synchronization period, then each client needs to upload its local model parameters to the service device once every 50 training iterations. Figure 2As shown, when client 1 completes 50 training iterations of the local recognition model locally, it can send model parameter 1 (i.e., the local model parameters obtained by client 1 in the 50th training iteration) to the service device. Similarly, when client 2 completes 50 training iterations of the local recognition model locally, it can send model parameter 2 (obtained by client 2 in the 50th training iteration) to the service device. Client N can send its own model parameter N (obtained by client N in the 50th training iteration) to the service device. After receiving the local model parameters (including model parameter 1, model parameter 2, ..., model parameter N) obtained by the 50th training iteration from each of the N clients, the service device can perform parameter fusion on the local model parameters corresponding to the N local recognition models to obtain the target global model. Based on the target global model, the global federated momentum can be calculated, and then the target global model and global federated momentum can be returned to each client. Each client can update its local model parameters according to the target global model and global federated momentum returned by the service device and continue training. When each client completes 100 training iterations of its local recognition model, the above operation needs to be repeated to obtain the target global model corresponding to the next synchronization cycle for continued training until the local recognition model meets the above training termination condition. The local model parameters at this time are saved, and the local recognition model containing the current local model parameters can be identified as the model that has been trained. This application can identify the trained local recognition model as the object recognition model.

[0086] Please see Figure 3 , Figure 3 This is a timing diagram illustrating a data processing method provided in an embodiment of this application. It can be understood that this data processing method can be executed interactively by a client and a service device, and the client can be the aforementioned... Figure 1 The client integrated into any user terminal in the user terminal cluster shown can be served by a separate server (such as the one mentioned above). Figure 1 The server shown (10d) can be a server cluster consisting of multiple servers, or a user terminal, etc. Figure 3 As shown, the data processing method may include the following steps:

[0087] Step S101: When the number of training iterations of the target local recognition model meets the r-th synchronization cycle, the local model parameters corresponding to the target local recognition model are uploaded to the service device.

[0088] Specifically, when the multimedia data held by N clients (N can be a positive integer greater than 1) is of the same type, and the multimedia data held by the N clients involves data privacy and data security, it means that the multimedia data held by the N clients cannot be aggregated. If it is necessary to use the multimedia data held by the N clients to train the recognition model, then, under the premise of ensuring the data security and privacy of each client, a federated training method can be used to train the recognition model. In federated training, the multimedia data held by the N clients can all be used as multimedia sample data. Among them, multimedia sample data can include facial image data, user financial data, video data, user product data, etc., and each multimedia sample data can contain an object with a target object type, which can include object types such as face, pedestrian, and product.

[0089] Because the facial sample data used by each client differs, each client needs to periodically send data to the service device (as described above). Figure 2The parameter service device in the corresponding embodiment uploads local model parameters so that the service device can synchronize the local model parameters trained by N clients, that is, perform parameter fusion on the local model parameters trained by N clients to obtain a global model. Each client can use its multimedia data to independently train the recognition model locally (the recognition model independently trained by each client can be called a local recognition model), and each client can periodically upload its independently trained local recognition model parameters for synchronization. In this embodiment, the synchronization period can be set according to actual needs. For example, the synchronization period can be set to K training times (also called training steps), which means that every K training steps of the local recognition model in the client, the local model parameters corresponding to the local recognition model need to be uploaded to the service device for synchronization. The value of K is a positive integer greater than 1, such as 100, 400, 1600, etc. In this context, the r-th synchronization period refers to the r-th time each client uploads its local recognition model to the service device. The value of r can be a positive integer greater than 1, such as 2, 3, ... If the synchronization period K is 100, then when the training times of the local recognition model corresponding to each of the N clients reach 100, each client can upload the local model parameters obtained after the 100th training to the service device. At this time, the service device receives the local model parameters sent by each client for the first time (r is 1). When the training times of the local recognition model corresponding to each client reach 200, each client can upload the local model parameters obtained after the 200th training to the service device. At this time, the service device receives the local model parameters sent by each client for the second time (r is 2). In other words, r in this embodiment can represent the number of times the service device receives the local model parameters sent by each client.

[0090] It is understandable that the training process of the local recognition model for each of the N clients is similar, only the multimedia sample data used is different. Below, we will select any one of the N clients as the target client and describe the training process of the local recognition model using this target client as an example. The local recognition model trained locally by this target client can be called the target local recognition model. This target local recognition model can be any one of the local recognition models corresponding to the N clients. The target client can use the multimedia sample data it holds to train the target local recognition model. When the number of training iterations of the target local recognition model satisfies the r-th synchronization cycle, the local model parameters corresponding to the target local recognition model are uploaded to the service device. r refers to the number of times each client uploads the local model parameters corresponding to its respective local recognition model.

[0091] Optionally, the specific method for the target client to train the target local recognition model may include: acquiring multimedia sample data, inputting the multimedia sample data into the target local recognition model, and outputting the object space features corresponding to the multimedia sample data through the target local recognition model. Based on the object space features and the label information corresponding to the multimedia sample data, the training loss function corresponding to the target local recognition model is determined; the training gradient of the target local recognition model is determined based on the training loss function; the parameters of the target local recognition model are updated based on the training gradient and the training learning rate corresponding to the target local recognition model; and the number of training iterations of the target local recognition model is counted.

[0092] Specifically, during the training of the target local recognition model, the target client can read its own multimedia sample data and form a batch of the read multimedia sample data. The multimedia sample data contained in this batch can be input into the target local recognition model. A set or batch of multimedia sample data is used to train the target local recognition model once, and each set or batch of multimedia sample data is labeled. For example, the multimedia sample data used in the p-th training process can be labeled as X. p After acquiring the multimedia sample data, the target client can then obtain the label information carried by the multimedia sample data. This label information can refer to manually annotated multimedia sample data. The label information carried by the multimedia sample data can serve as the expected recognition result of the target local recognition model for the multimedia sample data. After the target client inputs the multimedia sample data into the target local recognition model, it can extract the object space features corresponding to the multimedia sample data. Based on the label information and the object space features corresponding to the multimedia sample data, the target local recognition model's training loss function is determined. Here, the object space features can be understood as the actual prediction result of the target local recognition model for the multimedia sample data. By comparing the difference between the object space features and the label information, the target local recognition model's training loss function is determined. Furthermore, the target client can determine the training gradient of the target local recognition model based on the training loss function. Based on this training gradient and the training learning rate of the target local recognition model, the parameters of the target local recognition model are updated, and the number of training iterations of the target local recognition model is counted. When the training iterations of the target local recognition model reach the number of synchronization cycles, the target client can upload the local model parameters corresponding to the target local recognition model whose training iterations have reached the synchronization cycle to the service device. The local model parameters uploaded to the service device by different clients can be represented using different identifiers. The local recognition model uploaded by the target client can be represented as follows: .

[0093] Among them, the training loss function corresponding to the target local recognition model can adopt a classification function, such as the softmax function (normalized multi-class classification function, which assigns a probability value to each output classification result, representing the possibility of belonging to each category. The input is a vector, and the output is also a vector. The value of each element in the output vector is between 0 and 1, and the sum of each element is 1), the sigmoid function (binary classification function, which converts the output classification result into a probability for classification. The input data of the sigmoid function can be any real value, and the output result is in the range of 0 to 1). Alternatively, the CosFace function (which maximizes the inter-class difference and minimizes the intra-class difference by normalization and maximizing the cosine decision boundary) and the ArcFace function (which optimizes the inter-class distance from the inverse cosine space by adding an m to the angle, making the cosine value smaller in the monotonic interval) can be selected, etc. After determining the training loss function of the target local recognition model, the training gradient corresponding to the target local recognition model can be calculated according to the chain rule. The calculation formula of the training gradient corresponding to the target local recognition model can be shown in formula (1):

[0094] (1)

[0095] Among them, in formula (1) This refers to the training gradient of the target local recognition model. This indicates gradient calculation. This refers to the training loss function corresponding to the target local recognition model. This refers to the local model parameters corresponding to the target local recognition model. This refers to multimedia sample data used to train a local target recognition model.

[0096] Optionally, the target local recognition model can be a Convolutional Neural Network (CNN). The CNN extracts features from the multimedia sample data to obtain the corresponding object space features. This target local recognition model may include convolutional processing layers, normalization layers, and pooling layers. The target client inputs the multimedia sample data into the target local recognition model, and the specific method by which the model outputs the corresponding object space features can include: in the convolutional processing layer, the multimedia sample data is convolved to obtain convolutional feature information; in the normalization layer, the convolutional feature information is normalized to obtain normalized convolutional feature information; and in the pooling layer, the normalized convolutional feature information is pooled to obtain the corresponding object space features. Here, the convolutional neural network is a type of feedforward neural network that can be used for feature extraction from multimedia sample images.

[0097] Specifically, the target client can input multimedia sample data into the target local recognition model. In the convolutional processing layer, multiple convolutional kernels are used to perform convolution processing on the multimedia sample data to obtain the convolutional feature information corresponding to the multimedia sample data. The convolutional processing layer contains one or more convolutional kernels (also called filters or receptive fields). Convolution operation refers to matrix multiplication between the convolutional kernel and submatrices located at different positions in the input vector. The number of rows in the output matrix after the convolution operation is... Number of columns It is determined by the size of the input vector, the size of the convolution kernel, the stride, and the padding. = ( / stride+1, = ( ) / stride+1. , These represent the number of input vectors and the number of rows in the convolution kernel, respectively. , These represent the dimension of each input vector and the number of columns in the convolution kernel, respectively. After obtaining the convolutional feature information corresponding to the multimedia sample data, the convolutional feature information can be normalized in the normalization layer to obtain normalized convolutional feature information. Normalization is used to solve the comparability between feature indicators. After normalization, all indicators are on the same order of magnitude, which facilitates comprehensive comparison. In the pooling layer, the normalized convolutional feature information is pooled to obtain the object space features corresponding to the multimedia sample data.

[0098] Step S102: Obtain the local model parameters corresponding to the N local recognition models in the r-th synchronization period; the N local recognition models are independently trained by different clients, and each client includes multimedia sample data for training the associated local recognition model. The multimedia sample data contains objects with the target object type. N and r are both positive integers greater than 1, and N is the number of clients.

[0099] Specifically, when the training iterations of the local recognition model in each of the N clients meet the requirements of the r-th synchronization period, the N clients can upload the local model parameters corresponding to their associated local recognition models to the service device. The service device can then obtain the local model parameters corresponding to the N local recognition models in the r-th synchronization period. The N local recognition models are independently trained by different clients. Each client includes multimedia sample data for training its associated local recognition model. This multimedia sample data contains objects of a target object type, such as faces, goods, or animals. For example, if the multimedia sample data used by each client for training the associated local recognition model is all face sample data, each client uses this face sample data to train its local recognition model, resulting in a local recognition model for face recognition. For instance, if the number of training iterations in the r-th synchronization period is 50, when the training iterations of the local recognition model associated with each of the N clients reach 50 in the r-th synchronization period, the local model parameters corresponding to the 50th training iteration are uploaded to the service device. The number of training iterations in each synchronization cycle can be set to be the same or different, depending on specific needs. This embodiment of the application does not impose any restrictions on this.

[0100] Step S103: Perform parameter fusion on the local model parameters corresponding to the N local recognition models to obtain the target global model corresponding to the r-th synchronization cycle.

[0101] Specifically, after receiving the local model parameters corresponding to N local recognition models, the service device can fuse these N local model parameters to obtain the target global model corresponding to the r-th synchronization period. Since the multimedia sample data used by each client to independently train its associated local recognition model contains objects of the target object type, such as face data, product data, item data, etc., the local recognition models independently trained by each client have the same data processing functions, such as face recognition and product recognition. However, because the data between clients cannot be shared, the parameters of the N local recognition models can be fused to obtain the target global model corresponding to the r-th synchronization period. This solves the problem of inconsistent optimization directions of the associated local recognition models due to the differences in multimedia sample data between clients during training, leading to slow and unstable model convergence (a phenomenon known as client bias). This ultimately results in poor model performance and unsuitability for practical applications, improving model training efficiency and providing a better-performing final model.

[0102] Optionally, the service device may fuse the local model parameters corresponding to the N local recognition models to obtain the target global model corresponding to the r-th synchronization period by the following specific method: Obtain M local model parameters from the local model parameters corresponding to the N local recognition models, where M is a positive integer less than N; obtain the training influence weights corresponding to the M local model parameters; perform a weighted summation of the training influence weights and the M local model parameters to obtain the fused model parameters; and determine the recognition model carrying the fused model parameters as the target global model.

[0103] Specifically, after receiving local model parameters from N clients, the service device can randomly select M local model parameters from these N parameters. Since the number of N local model parameters may be enormous, selecting M parameters from N reduces computation and improves parameter fusion efficiency. The training influence weights corresponding to each of the M local model parameters are obtained; these weights can be the same or different, depending on specific needs, and this embodiment does not impose such limitations. Based on the training influence weights of the M local model parameters, a weighted sum is performed to obtain the fused model parameters. The recognition model carrying these fused model parameters is then determined as the target global model. Furthermore, by selecting M local model parameters from N and generating the target global model based on these M parameters, the randomness of model parameter fusion is increased, thereby improving the generalization effect of the trained object recognition model.

[0104] When the service device fuses the local model parameters uploaded by each client to generate the target global model, it can use the following formula (2) for calculation:

[0105] = (2)

[0106] Among them, in formula (2) This refers to the target global model corresponding to the r-th synchronization cycle, and N refers to the total number of local recognition models associated with each client (one client corresponds to one local recognition model). This refers to the weights corresponding to the local model parameters of the i-th local recognition model during the r-th synchronization period. It refers to the local model parameters of the i-th local recognition model.

[0107] Specifically, the weights corresponding to the local model parameters of each local recognition model in the r-th synchronization cycle can be the same or different, and can be customized according to specific needs. This application embodiment does not impose any restrictions here. Among them, when the weights corresponding to the local model parameters of each local recognition model are the same, the target global model can be calculated using the following formula (3):

[0108] (3)

[0109] Among them, in formula (3) This refers to the target global model corresponding to the r-th synchronization cycle, and N refers to the total number of local recognition models associated with each client (one client corresponds to one local recognition model). It refers to the local model parameters of the i-th local recognition model.

[0110] Step S104: Obtain the historical global model of N local recognition models during the (r-1)th synchronization cycle (which can be represented as...). Based on the historical global model and the target global model, the global federated momentum corresponding to the r-th synchronization cycle is generated. The historical global model is generated based on the local model parameters uploaded by N clients in the (r-1)-th synchronization cycle. The global federated momentum is used to indicate the training direction of the N local recognition models.

[0111] Specifically, the service device can acquire the historical global model of N local recognition models at the (r-1)th synchronization period. The (r-1)th synchronization period refers to the previous synchronization period before the r-th synchronization period. The historical global model is generated based on the local model parameters uploaded by N clients at the (r-1)th synchronization period, and there is one historical global model in each historical synchronization period. Based on the historical global model at the (r-1)th synchronization period and the target global model corresponding to the r-th synchronization period, a global federated momentum corresponding to the r-th synchronization period is generated. The global federated momentum indicates the training direction of the N local models.

[0112] The service device generates the target global model for the r-th synchronization period based on the local model parameters uploaded by each client, and obtains the historical global model for the (r-1)-th synchronization period. Based on this target global model and the historical global model, it determines the global model gradient, which indicates the training direction of the local model parameters associated with each client. Specifically, the calculation method for the global model gradient generated by the service device based on the target global model and the historical global model can be calculated using the following formula (4):

[0113] = -β (4)

[0114] Among them, in formula (4) This refers to the global model gradient in the r-th synchronization cycle. This refers to the historical global model corresponding to the (r-1)th synchronization cycle. It refers to the target global model corresponding to the r-th synchronization cycle. This refers to the learning rate of the local recognition model in the client corresponding to the r-th synchronization cycle. β refers to the global federated momentum in the (r-1)th synchronization period, and β is a parameter of the global federated momentum in the (r-1)th synchronization period. This parameter β can be set according to the actual application requirements.

[0115] Optionally, the specific method by which the service device generates the global federated momentum corresponding to the r-th synchronization period may include: obtaining the training learning rate of N local recognition models in the r-th synchronization period, obtaining the model parameter difference between the target global model and the historical global model, and determining the ratio between the model parameter difference and the training learning rate as the global federated momentum.

[0116] Specifically, the service device can obtain the training learning rate of N local recognition models in the r-th synchronization cycle. This training learning rate refers to the learning speed associated with each client, and the learning speed of the local recognition model in the client can be determined based on this training learning rate. For example, during the training of the local recognition model, the smaller the number of training iterations of the local recognition model, the further the local recognition model is from the convergence condition, and the larger the training learning rate is set during the training process of the local recognition model in this case. Conversely, the larger the number of training iterations of the local recognition model, the closer the local recognition model is to the convergence condition, and the smaller the training learning rate is set during the training process of the local recognition model in this case. In other words, the training learning rate can adaptively decrease during the training process as the number of training iterations of the local recognition model increases. The service device can obtain the model parameter difference between the target global model and the historical global model, and obtain the ratio between the model parameter difference and the training learning rate. The ratio between the model parameter difference and the training learning rate is determined as the global federated momentum.

[0117] The formula for generating the global federated momentum corresponding to the r-th synchronization cycle of the service device can be shown in (5).

[0118] (5)

[0119] Among them, in formula (5) It refers to the global federated momentum corresponding to the r-th synchronization cycle. This refers to the model parameters corresponding to the target global model in the r-th synchronization cycle. This refers to the model parameters corresponding to the historical global model in the (r-1)th synchronization cycle. This refers to the training learning rate of N local recognition models in the r-th synchronization period. In the same synchronization period, the training learning rate used by the N local recognition models can be the same.

[0120] Since multimedia sample data cannot be shared between different clients, the optimization directions of the local recognition models associated with each client are inconsistent. Therefore, global federated momentum can be used to indicate the training direction of the local recognition model associated with each of the N clients. This ensures that the convergence directions of the local recognition models associated with each client do not deviate too far from each other.

[0121] Step S105: The global federated momentum is sent to N clients so that the N clients update the parameters of the associated local recognition model according to the global federated momentum to obtain the object recognition model; the object recognition model is used to identify objects with the target object type contained in the multimedia data.

[0122] Specifically, after the service device obtains the global federated momentum corresponding to the r-th synchronization cycle, it can send the global federated momentum to N clients, that is, to each client, so that the N clients can update the parameters of the associated local recognition model according to the global federated momentum to obtain the object recognition model.

[0123] Step S106: Receive the global federated momentum returned by the service device, update the parameters of the target local identification model according to the global federated momentum, and determine the target local identification model after parameter update as the object identification model; the object identification model is used to identify objects with target object type contained in multimedia data.

[0124] Specifically, each of the N clients can receive the global federated momentum returned by the service device, and update the parameters of its associated local recognition model according to the global federated momentum. Based on the updated local recognition model, the object recognition model is determined. The object recognition model is used to identify objects with the target object type contained in the multimedia data.

[0125] Optionally, each client updates the parameters of the local target recognition model based on the global federated momentum. The specific method for determining the updated local recognition model as the object recognition model may include: obtaining the training gradient and training learning rate of the local target recognition model in the r-th synchronization period; obtaining the number of cyclic training iterations of the local target recognition model within the r-th synchronization period, determining the ratio between the global federated momentum and the number of cyclic training iterations as the unit federated momentum; updating the parameters of the local target recognition model based on the training learning rate, training gradient, and unit federated momentum; and determining the updated local target recognition model as the object recognition model when it meets the training termination condition.

[0126] Specifically, taking the target client corresponding to the target local recognition model as an example, the target client can obtain the training gradient and training learning rate of the target local recognition model in the r-th synchronization period. The training gradient of the target local recognition model in the r-th synchronization period can be calculated by formula (1), which will not be elaborated here. The target client can obtain the number of cyclic trainings of the target local recognition model in the r-th synchronization period, and obtain the ratio between the global federated momentum and the number of cyclic trainings, and determine the ratio between the global federated momentum and the number of cyclic trainings as the unit federated momentum. After obtaining the unit federated momentum, the target client can determine the sum between the unit federated momentum and the training gradient of the target local recognition model in the r-th synchronization period, and obtain the product between the sum of the unit federated momentum and the training gradient of the target local recognition model in the r-th synchronization period and the training learning rate of the target local recognition model in the r-th synchronization period. The target client can obtain the difference between the target local recognition model and the above product, and use this difference to update the parameters of the target local recognition model. After updating the parameters of the target local recognition model, the initial target local recognition model for the next synchronization cycle is obtained. That is, the target local recognition model with updated parameters is used for training. When the number of training times reaches the cycle training number of the (r+1)th synchronization cycle, the local model parameters corresponding to the target local recognition model that has reached the cycle training number of the (r+1)th synchronization cycle are uploaded to the service device. The service device can obtain the global federated momentum corresponding to the (r+1)th synchronization cycle based on the local model parameters uploaded by N clients, and then send the global federated momentum corresponding to the (r+1)th synchronization cycle to N clients. The N clients can update their respective associated local recognition models based on the global federated momentum corresponding to the (r+1)th synchronization cycle. This process is repeated. When the target local recognition model with updated parameters meets the training termination condition, the target local recognition model with updated parameters that meets the termination condition is determined as the object recognition model.

[0127] Optionally, after receiving the global federated momentum returned by the service device, the target client can update the parameters of the target local recognition model based on the global federated momentum, and determine the updated target local recognition model as the object recognition model. The parameter update of the target local recognition model based on the global federated momentum can be expressed by formula (6):

[0128] (6)

[0129] Among them, in formula (6) This refers to the target local recognition model after parameter updates in the target client. This refers to the local target recognition model before the parameters are updated in the target client. This refers to the training learning rate of the target local recognition model in the target client during the r-th synchronization period. This refers to the training gradient of the target local recognition model. It refers to the global federated momentum corresponding to the r-th synchronization cycle. This refers to the number of training cycles of the target local recognition model within the r-th synchronization cycle.

[0130] Optionally, the multimedia data includes a face image to be identified, and the target object type includes a face type. After the target client acquires the face image to be identified, it can input the face image to be identified into an object recognition model, where the face spatial features corresponding to the face image to be identified are obtained. Based on the face spatial features, the face classification result corresponding to the face image to be identified is determined. The face classification result is used to characterize the authentication result of the object with the face type contained in the face image to be identified.

[0131] Optionally, the target client trains a target local recognition model to obtain an object recognition model. Then, it acquires a face image to be recognized and inputs it into the object recognition model. The object recognition model obtains the facial spatial features corresponding to the face image and determines the face classification result based on these features. This face classification result is used to characterize the authentication result of objects with face types included in the face image. For example, in the scenario of identity verification for enterprise visitors, the enterprise can manage access permissions for its employees, requiring identity verification of visitors. Only those who pass the verification can enter the enterprise. This identity verification process can be implemented using the object recognition model in the proposed embodiment. When person A is located within the spatial area corresponding to the terminal device, the terminal device can activate its camera to capture a real-time facial image of person A (understandably, the terminal device can integrate the aforementioned client, allowing it to pre-capture a facial image of person A and use the aforementioned object recognition model to obtain facial feature information from the image; both the pre-captured facial image and its facial feature information can be stored in the aforementioned client), and display the captured real-time facial image on the terminal screen of the terminal device; the client can use the captured real-time facial image as the face image to be recognized, and then recognize the face image to be recognized. The face image is input into the object recognition model. The model obtains the facial spatial features corresponding to the face image to be recognized and compares these features with the facial feature information pre-stored in the client. If the facial spatial features match the pre-stored facial feature information, the face image to be recognized is determined to be a valid face, indicating that person A has passed identity verification and has the right to enter the enterprise. If the facial spatial features do not match the pre-stored facial feature information, the face image to be recognized is determined to be an invalid face, indicating that person A has not passed identity verification and does not have the right to enter the enterprise.

[0132] like Figure 4 As shown, Figure 4 This is a schematic diagram of a local recognition model training method based on global federated momentum provided in an embodiment of this application, as shown below. Figure 4 As shown, the service device provides each of the N clients with an initial local recognition model. Each client can then use its own locally stored multimedia sample data to iteratively train this initial local recognition model. Figure 4As shown, each client has a corresponding training gradient, which can be calculated using formula (1), and will not be elaborated further in this embodiment. During the training of their respective associated local recognition models, each client can guide the training direction of each local recognition model through global federated momentum and equivalent global training gradient (i.e., the aggregation of training gradients corresponding to each client), ensuring that the convergence direction of the local recognition model associated with each client is as close as possible to the global convergence direction. When the number of iterations reaches the number of periodic training cycles corresponding to the synchronization cycle, the client can upload the local model vehicle parameters of the local recognition model that has reached the number of periodic training cycles to the service device.

[0133] When the service device receives local model parameters from N clients, it determines the global federated momentum based on these parameters and fuses them to obtain an aggregated recognition model (the target global model). After obtaining the global federated momentum corresponding to the current synchronization period, the service device sends this momentum and the aggregated recognition model to each client. Upon receiving the global federated momentum and the aggregated recognition model, each client determines the ratio between the local federated momentum and the number of training cycles (i.e., unit federated momentum). Each client updates the parameters of its associated local recognition model based on the unit federated momentum, the training learning rate, and the training gradient. The service device then sends the aggregated recognition model (the target global model corresponding to the current synchronization period) to each client, allowing them to use it as a reference for better parameter updates to their associated local recognition models. In this way, by using a global federated momentum, the training direction of the local recognition models associated with each client is controlled, ensuring that the convergence direction of the local recognition models corresponding to each client does not deviate too far from the global convergence direction. That is, the convergence directions of the local recognition models associated with each client are not too far apart, thereby reducing the client offset phenomenon, which is that the optimization direction of the local recognition models associated with each client is inconsistent, resulting in a slower and more unstable convergence speed of the final object recognition model.

[0134] Specifically, when the number of training steps of the local recognition model in each client meets the training termination condition, the local recognition model with updated parameters can be identified as the object recognition model. This training termination condition can refer to the default number of termination cycles. For example, when r is 1000 times, the parameters of the local recognition models associated with each client are updated based on the target global model corresponding to the 1000th synchronization cycle, resulting in the updated local recognition model, which can then be identified as the object recognition model. Alternatively, the training termination condition can refer to the number of training iterations corresponding to each client. For instance, when the number of training steps for each client is the target number of training iterations, the updated local recognition model in each client meets the training termination condition, and the local recognition model that meets the training iteration count and is updated with updated parameters is identified as the object recognition model. Figure 4 For details, please refer to S101-S106. The specific content shown will not be repeated here.

[0135] like Figure 5 As shown, Figure 5 This is a schematic diagram of a method for training a local recognition model based on global federated momentum, as provided in an embodiment of this application. Figure 5 As shown, the client can read the locally stored training data S51 and process the training data (i.e., multimedia sample data) in batches to obtain one or more training data batches, such as the first training data batch X1, the second training data batch X2, etc. One training data batch can be used for one iteration of training the local recognition model. The training data is then input into the local recognition model for object space feature extraction S52 to obtain the object space features corresponding to the training data. If the training data is face image data, spatial feature extraction can be performed on the face image data to obtain a feature map that retains the spatial structure information of the face image. Convolutional neural networks (such as CNNs) can be used to extract features from the training data. After the client obtains the object space features corresponding to the training data, it can calculate the training loss function and training gradient S53 corresponding to the local recognition model. After each iteration of training of the local recognition model, it determines whether the current training step count has reached the synchronization period S54. If the current training step count of the local recognition model has reached the synchronization period, then training continues. If the current training step count of the local recognition model has reached the synchronization period, then the local model parameters corresponding to the local recognition model that has reached the synchronization period are uploaded to the service device S55.

[0136] In this process, after receiving the local model parameters uploaded by each client within the current synchronization period, the service device can fuse the parameters of each client's uploaded local model to obtain the target global model (S56). The service device can also calculate the global federated momentum corresponding to the current synchronization period based on the historical global model corresponding to the previous synchronization period and the target global model corresponding to the current synchronization period (S57). After obtaining the target global model and global federated momentum, the service device can send them to each client (S58). Upon receiving the target global model and global federated momentum from the service device, each client can determine whether the training termination condition is met (S59). If the training termination condition is met, the process ends, and the target global model is used as the object recognition model to identify objects of the target object type. If the training termination condition is not met, the parameters of each client's local recognition model are updated (S60) based on the target global model and global federated momentum to obtain the updated local recognition model. Training of the updated local recognition model continues until the training termination condition is met. If the training termination condition is that the training synchronization period meets the target synchronization period, after each client receives the target global model and global federated momentum sent by the service device, it can determine whether the current synchronization period meets the target synchronization period. If the current synchronization period meets the target synchronization period, the training termination condition is met, and model training ends, using the target global model sent by the service in the current synchronization period as the object recognition model. If the current synchronization period does not meet the target synchronization period, the parameters of the local recognition model are updated based on the target global model and global federated momentum sent by the service device, and training continues on the updated local recognition model until the synchronization period meets the target synchronization period. Figure 5 The specific content of steps S51-S60 shown can be compared with the specific content of S101-S106 above, and will not be repeated here in the embodiments of this application.

[0137] like Figure 6 As shown, Figure 6 This is a schematic diagram illustrating a user authentication scenario provided in an embodiment of this application. For example... Figure 6 As shown, when the multimedia sample data is facial image data, if user A wants to access a restricted business, user A needs to be authenticated. Only after successful authentication will the access gate be opened, allowing user A to access the restricted business. Figure 6As shown, the client 1 installed on user terminal 60a can capture the face image of user A, obtaining the face image data of user A. User A can align their face with the detection box 60b of client 1, making their face appear within the detection box 60b, thus facilitating the acquisition of user A's full face information. Client 1 can acquire the face data 60c in the detection box 60b in real time, obtaining the face data to be recognized. After acquiring the face data 60c, client 1 can input the face data 60c into the object recognition model 60d to extract features from the face data 60c, obtaining the object space features corresponding to user A, i.e., the face recognition result. At the same time, client 1 can check whether there is a face image matching user A in the existing face image database. If there is no face image of user A in the face image database, it directly returns an identity verification failure result, prompting user A that access is prohibited. If face image 60e of user A exists in the face image database, then face image 60e is compared with the face recognition result output by object recognition model 60d. If face image 60e and the face recognition result are the same, it can be determined that user A's identity verification is successful, and the identity verification success result is returned to client 1, and the access door is opened; if face image 60e and the face recognition result are different, it can be determined that user A's identity verification is unsuccessful, and the identity verification failure result is returned to client 1, reminding user A that entry is prohibited.

[0138] like Figure 7 As shown, Figure 7 This is a schematic diagram illustrating a product recognition scenario provided in an embodiment of this application. For example... Figure 7 As shown, when the multimedia sample data is product data, the client 2 installed on the user terminal 70a can perform object recognition on the products on the conveyor belt to obtain the corresponding attribute information of the products, such as product type, product size, product quantity, etc., and record this attribute information for subsequent management. When the user terminal 70a detects the appearance of a product, it can display the product on the conveyor belt in the detection frame 70b, and collect the product image data 70c corresponding to the product on the conveyor belt in real time. This real-time collected product image data is identified as the image data to be recognized. In the object recognition model 70d, feature extraction is performed on the image data to be recognized to obtain the object recognition result corresponding to the image data to be recognized, and the object recognition result is recorded to facilitate subsequent product management, such as obtaining the quantity of products for timely production, etc.

[0139] It is understood that in the specific embodiments of this application, user information such as facial image data, user financial data, and user product data are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of user information such as facial image data, user financial data, and user product data must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0140] This application embodiment obtains the local model parameters corresponding to N local recognition models in the r-th synchronization period. These N local recognition models are independently trained by different clients. Each client includes multimedia sample data used to train its associated local recognition model. The multimedia sample data contains objects of the target object type. The parameters of the local models corresponding to the N local recognition models are fused to obtain the target global model corresponding to the r-th synchronization period. Each synchronization period corresponds to one global model. The historical global models of the N local recognition models in the (r-1)-th synchronization period are obtained. Based on the historical global models and the target global model, a global federated momentum corresponding to the r-th synchronization period is generated. The global federated momentum is sent to the N clients, enabling each client to update the parameters of its associated local recognition model according to the global federated momentum, thus obtaining the object recognition model. In this application, by periodically acquiring local model parameters uploaded by N clients, generating a target global model and global federated momentum based on these local model parameters, and sending the target global model and global federated momentum to the N clients, the training direction of the local recognition models trained by the N clients is controlled so that the convergence direction of the local recognition models corresponding to each client does not deviate too far from each other. This can improve the performance of the final object recognition model and enhance its applicability.

[0141] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. Figure 8 As shown, the above-mentioned data processing device can be applied to the above-mentioned Figure 1 The client on any user terminal in the user terminal cluster shown can be a computer program (including program code) in a computer device. The data processing device 1 may include: a first acquisition module 11, a parameter fusion module 12, a generation module 13, and a sending module 14;

[0142] The first acquisition module 11 is used to acquire the local model parameters corresponding to N local recognition models in the r-th synchronization period. The N local recognition models are independently trained by different clients. Each client includes multimedia sample data for training the associated local recognition model. The multimedia sample data contains objects with the target object type. N and r are both positive integers greater than 1, and N is the number of clients.

[0143] Parameter fusion module 12 is used to fuse the parameters of the local models corresponding to the N local recognition models to obtain the target global model corresponding to the r-th synchronization cycle.

[0144] The generation module 13 is used to obtain the historical global model of N local recognition models in the (r-1)th synchronization period, and generate the global federated momentum corresponding to the rth synchronization period based on the historical global model and the target global model. The historical global model is generated based on the local model parameters uploaded by N clients in the (r-1)th synchronization period, and the global federated momentum is used to indicate the training direction of the N local recognition models.

[0145] The sending module 14 is used to send the global federated momentum to N clients, so that the N clients update the parameters of the associated local recognition model according to the global federated momentum to obtain the object recognition model; the object recognition model is used to identify objects with the target object type contained in the multimedia data.

[0146] The generation module 13 includes:

[0147] The first acquisition unit 1301 is used to acquire the training learning rate of N local recognition models in the r-th synchronization period and to acquire the model parameter difference between the target global model and the historical global model.

[0148] The first determining unit 1302 is used to determine the ratio between the model parameter difference and the training learning rate as the global federated momentum.

[0149] The parameter fusion module 12 includes:

[0150] The second acquisition unit 1201 is used to acquire M local model parameters from the local model parameters corresponding to N local recognition models respectively; M is a positive integer less than N;

[0151] The second determining unit 1202 is used to obtain the training influence weights corresponding to the M local model parameters, perform a weighted summation of the training influence weights and the M local model parameters to obtain the fusion model parameters, and determine the recognition model carrying the fusion model parameters as the target global model.

[0152] This application embodiment obtains the local model parameters corresponding to N local recognition models in the r-th synchronization period. These N local recognition models are independently trained by different clients. Each client includes multimedia sample data used to train its associated local recognition model. The multimedia sample data contains objects of the target object type. The parameters of the local models corresponding to the N local recognition models are fused to obtain the target global model corresponding to the r-th synchronization period. Each synchronization period corresponds to one global model. The historical global models of the N local recognition models in the (r-1)-th synchronization period are obtained. Based on the historical global models and the target global model, a global federated momentum corresponding to the r-th synchronization period is generated. The global federated momentum is sent to the N clients, enabling each client to update the parameters of its associated local recognition model according to the global federated momentum, thus obtaining the object recognition model. In this application, by periodically acquiring local model parameters uploaded by N clients, generating a target global model and global federated momentum based on these local model parameters, and sending the target global model and global federated momentum to the N clients, the training direction of the local recognition models trained by the N clients is controlled so that the convergence direction of the local recognition models corresponding to each client does not deviate too far from each other. This can improve the performance of the final object recognition model and enhance its applicability.

[0153] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. Figure 9 As shown, the above-mentioned data processing device can be applied to the above-mentioned Figure 1 The corresponding service device in the embodiment (e.g., server 10d). The data processing device 2 may include: a parameter upload module 21, a first parameter update module 22, an output module 23, a first determination module 24, a second parameter update module 25, a second acquisition module 26, and a second determination module 27;

[0154] The parameter upload module 21 is used to upload the local model parameters corresponding to the target local recognition model to the service device when the number of training times of the target local recognition model meets the requirements of the r-th synchronization period. This allows the service device to determine the global federated momentum corresponding to the r-th synchronization period based on the target global model generated by the local model parameters uploaded by N clients in the r-th synchronization period and the historical global model in the (r-1)-th synchronization period. The local model parameters uploaded by the N clients include the local model parameters corresponding to the target local recognition model. The historical global model is generated based on the local model parameters uploaded by the N clients in the (r-1)-th synchronization period. The global federated momentum is used to indicate the training direction of the N local recognition models. N and r are both positive integers greater than 1.

[0155] The first parameter update module 22 is used to receive the global federated momentum returned by the service device, update the parameters of the target local recognition model according to the global federated momentum, and determine the target local recognition model after parameter update as the object recognition model; the object recognition model is used to identify objects with target object type contained in multimedia data.

[0156] The data processing device 2 further includes:

[0157] Output module 23 is used to acquire multimedia sample data, input the multimedia sample data into the target local recognition model, and output the object space features corresponding to the multimedia sample data through the target local recognition model.

[0158] The first determining module 24 is used to determine the training loss function corresponding to the target local recognition model based on the object space features and the label information corresponding to the multimedia sample data.

[0159] The second parameter update module 25 is used to determine the training gradient of the target local recognition model according to the training loss function, update the parameters of the target local recognition model according to the training gradient and the training learning rate corresponding to the target local recognition model, and count the number of training times corresponding to the target local recognition model.

[0160] The first parameter update module 22 includes:

[0161] The third acquisition unit 2201 is used to acquire the training gradient and training learning rate of the target local recognition model in the r-th synchronization period;

[0162] The third determining unit 2202 is used to obtain the number of periodic training cycles of the target local recognition model in the rth synchronization cycle, and to determine the ratio between the global federated momentum and the number of periodic training cycles as the unit federated momentum.

[0163] The parameter update unit 2203 is used to update the parameters of the target local recognition model based on the training learning rate, training gradient and unit federated momentum.

[0164] The fourth determining unit 2204 is used to determine the target local recognition model after parameter update as the object recognition model when the target local recognition model after parameter update meets the training termination condition.

[0165] The multimedia data includes images of faces to be identified, and the target object type includes face types.

[0166] Data processing device 2 also includes:

[0167] The second acquisition module 26 is used to acquire the face image to be recognized, input the face image to be recognized into the object recognition model, and acquire the face space features corresponding to the face image to be recognized in the object recognition model.

[0168] The second determining module 27 is used to determine the face classification result corresponding to the face image to be identified based on the face spatial features; the face classification result is used to characterize the identity verification result of the object with face type contained in the face image to be identified.

[0169] In this embodiment, when the training iterations of the target local recognition model satisfy the r-th synchronization cycle, the local model parameters corresponding to the target local recognition model are uploaded to the service device. This allows the service device to determine the global federated momentum corresponding to the r-th synchronization cycle based on the target global model generated by the local model parameters uploaded by N clients in the r-th synchronization cycle, and the historical global model from the (r-1)-th synchronization cycle. The service device receives the global federated momentum returned by the service device, updates the parameters of the target local recognition model based on the global federated momentum, and determines the updated local recognition model as the object recognition model. In this application, by periodically acquiring the local model parameters uploaded by N clients, generating the target global model and global federated momentum based on these parameters, and sending the target global model and global federated momentum to the N clients, the training direction of the local recognition models trained by the N clients is controlled. This ensures that the convergence direction of the local recognition models corresponding to each client does not deviate too far from each other, improving the performance and applicability of the final object recognition model.

[0170] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 10 As shown, the computer device 1000 may include a processor 1001, a network interface 1004, and a memory 1005. Furthermore, the computer device 1000 may also include a user interface 1003 and at least one communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. Optionally, the network interface 1004 may include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1005 may also be at least one storage device located remotely from the processor 1001. Figure 10 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application.

[0171] In such Figure 10 In the computer device 1000 shown, the network interface 1004 provides network communication functionality; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

[0172] Obtain the local model parameters corresponding to N local recognition models in the r-th synchronization period; the N local recognition models are independently trained by different clients, and each client includes multimedia sample data for training the associated local recognition model. The multimedia sample data contains objects with the target object type. N and r are both positive integers greater than 1, and N is the number of clients.

[0173] The parameters of the local models corresponding to the N local recognition models are fused to obtain the target global model corresponding to the r-th synchronization cycle.

[0174] Obtain the historical global model of N local recognition models at the (r-1)th synchronization period. Based on the historical global model and the target global model, generate the global federated momentum corresponding to the rth synchronization period. The historical global model is generated based on the local model parameters uploaded by N clients at the (r-1)th synchronization period. The global federated momentum is used to indicate the training direction of the N local recognition models.

[0175] The global federated momentum is sent to N clients, so that each of the N clients updates the parameters of the associated local recognition model according to the global federated momentum to obtain the object recognition model; the object recognition model is used to identify objects with the target object type contained in the multimedia data.

[0176] It should be understood that the computer device 1000 described in the embodiments of this application can execute the foregoing text. Figure 3 The description of the data processing method in the corresponding embodiments can also be performed as described above. Figure 8 The description of the data processing device 1 in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated here.

[0177] Please see Figure 11 , Figure 11 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 11As shown, the computer device 2000 may include a processor 2001, a network interface 2004, and a memory 2005. Furthermore, the computer device 2000 may also include a user interface 2003 and at least one communication bus 2002. The communication bus 2002 is used to enable communication between these components. The user interface 2003 may include a display screen and a keyboard; optionally, the user interface 2003 may also include a standard wired interface or a wireless interface. Optionally, the network interface 2004 may include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 2005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 2005 may also be at least one storage device located remotely from the processor 2001. Figure 11 As shown, the memory 2005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.

[0178] In such Figure 11 In the computer device 2000 shown, the network interface 2004 provides network communication functionality; the user interface 2003 is mainly used to provide an input interface for the user; and the processor 2001 can be used to call the device control application program stored in the memory 2005 to achieve:

[0179] When the number of training iterations of the target local recognition model satisfies the requirements of the r-th synchronization cycle, the local model parameters corresponding to the target local recognition model are uploaded to the service device. This allows the service device to determine the global federated momentum corresponding to the r-th synchronization cycle based on the target global model generated by the local model parameters uploaded by N clients in the r-th synchronization cycle and the historical global model in the (r-1)-th synchronization cycle. The local model parameters uploaded by the N clients include the local model parameters corresponding to the target local recognition model. The historical global model is generated based on the local model parameters uploaded by the N clients in the (r-1)-th synchronization cycle. The global federated momentum is used to indicate the training direction of the N local recognition models. N and r are both positive integers greater than 1.

[0180] The system receives the global federated momentum returned by the receiving service device, updates the parameters of the target local identification model based on the global federated momentum, and determines the target local identification model after parameter update as the object identification model. The object identification model is used to identify objects with the target object type contained in multimedia data.

[0181] It should be understood that the computer device 2000 described in the embodiments of this application can execute the foregoing text. Figure 3The description of the data processing method in the corresponding embodiments can also be performed as described above. Figure 9 The description of the data processing device 1 in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated here.

[0182] Furthermore, it should be noted that this application embodiment also provides a computer-readable storage medium, which stores the computer program executed by the data processing device 1 and the computer program executed by the data processing device 2 mentioned above. The computer program includes program instructions, and when the processor executes the program instructions, it can execute the aforementioned... Figure 3 The description of the data processing method in the corresponding embodiments is already provided and will not be repeated here. Similarly, the beneficial effects of using the same method will not be repeated here. For technical details not disclosed in the computer-readable storage medium embodiments related to this application, please refer to the description of the method embodiments of this application. As an example, program instructions can be deployed and executed on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network. These multiple computing devices distributed across multiple locations and interconnected via a communication network can constitute a blockchain system.

[0183] Furthermore, it should be noted that this application also provides a computer program product or computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, causing the computer device to perform the aforementioned actions. Figure 3 The description of the data processing method in the corresponding embodiments is already provided and will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer program products or computer program embodiments related to this application, please refer to the description of the method embodiments of this application.

[0184] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0185] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.

[0186] The modules in the device of this application embodiment can be merged, divided, and deleted according to actual needs.

[0187] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0188] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. A data processing method, characterized in that, include: Obtain the local model parameters corresponding to N local recognition models in the r-th synchronization period; the N local recognition models are independently trained by different clients, and each client includes multimedia sample data for training the associated local recognition model. The multimedia sample data contains objects with the target object type. N and r are both positive integers greater than 1, and N is the number of clients. The parameters of the local models corresponding to the N local recognition models are fused to obtain the target global model corresponding to the r-th synchronization cycle. Obtain the historical global model of the N local recognition models in the (r-1)th synchronization period, obtain the training learning rate of the N local recognition models in the r-th synchronization period, and obtain the model parameter difference between the target global model and the historical global model; the historical global model is generated based on the local model parameters uploaded by the N clients in the (r-1)th synchronization period respectively; The ratio between the model parameter difference and the training learning rate is determined as the global federated momentum corresponding to the r-th synchronization cycle; The global federated momentum is used to indicate the training direction of the N local recognition models; The global federated momentum is sent to the N clients, so that the N clients update the parameters of the associated local recognition model according to the global federated momentum to obtain an object recognition model; the object recognition model is used to identify objects with the target object type contained in the multimedia data.

2. The method according to claim 1, characterized in that, The step of fusing the parameters of the local models corresponding to the N local recognition models to obtain the target global model corresponding to the r-th synchronization cycle includes: M local model parameters are obtained from the local model parameters corresponding to the N local recognition models respectively; M is a positive integer less than N; Obtain the training influence weights corresponding to the M local model parameters respectively, and perform a weighted summation of the training influence weights and the M local model parameters to obtain the fusion model parameters. Then, determine the recognition model carrying the fusion model parameters as the target global model.

3. A data processing method, characterized in that, include: When the training iterations of the target local recognition model satisfy the r-th synchronization cycle, the local model parameters corresponding to the target local recognition model are uploaded to the service device. The service device is used to perform parameter fusion on the local model parameters uploaded by N clients in the r-th synchronization cycle to obtain the target global model corresponding to the r-th synchronization cycle. The service device is also used to obtain the historical global model of the N local recognition models in the (r-1)-th synchronization cycle, obtain the training learning rate of the N local recognition models in the r-th synchronization cycle, and obtain the model parameter difference between the target global model and the historical global model. The service device is also used to determine the ratio between the model parameter difference and the training learning rate as the global federated momentum corresponding to the r-th synchronization cycle. The local model parameters uploaded by the N clients include the local model parameters corresponding to the target local recognition model. The historical global model is generated based on the local model parameters uploaded by the N clients in the (r-1)-th synchronization cycle. The global federated momentum is used to indicate the training direction of the N local recognition models. N and r are both positive integers greater than 1. The system receives the global federated momentum returned by the service device, updates the parameters of the target local identification model based on the global federated momentum, and determines the target local identification model after parameter update as the object identification model; the object identification model is used to identify objects with target object type contained in multimedia data.

4. The method according to claim 3, characterized in that, The method shown also includes: Acquire multimedia sample data, input the multimedia sample data into the target local recognition model, and output the object space features corresponding to the multimedia sample data through the target local recognition model; Based on the object space features and the label information corresponding to the multimedia sample data, the training loss function corresponding to the target local recognition model is determined; The training gradient of the target local recognition model is determined according to the training loss function. The parameters of the target local recognition model are updated according to the training gradient and the training learning rate corresponding to the target local recognition model. The number of training times corresponding to the target local recognition model is counted.

5. The method according to claim 3, characterized in that, The step of updating the parameters of the target local recognition model based on the global federated momentum, and determining the updated local recognition model as the object recognition model, includes: Obtain the training gradient and training learning rate of the target local recognition model corresponding to the r-th synchronization cycle; The number of cyclic training cycles of the target local recognition model in the r-th synchronization cycle is obtained, and the ratio between the global federated momentum and the number of cyclic training cycles is determined as the unit federated momentum. The parameters of the target local recognition model are updated based on the training learning rate, the training gradient, and the unit federated momentum. When the target local recognition model after parameter update meets the training termination condition, the target local recognition model after parameter update is determined as the object recognition model.

6. The method according to claim 3, characterized in that, The multimedia data includes a face image to be identified, and the target object type includes a face type; The method further includes: The face image to be identified is obtained, and the face image to be identified is input into the object recognition model. The face spatial features corresponding to the face image to be identified are obtained in the object recognition model. The face classification result corresponding to the face image to be identified is determined based on the face spatial features; the face classification result is used to characterize the identity verification result of the object with face type contained in the face image to be identified.

7. A data processing apparatus, characterized in that, include: The first acquisition module is used to acquire the local model parameters corresponding to N local recognition models in the r-th synchronization period; the N local recognition models are independently trained by different clients, and each client includes multimedia sample data for training the associated local recognition model. The multimedia sample data contains objects with the target object type, N and r are both positive integers greater than 1, and N is the number of clients. The parameter fusion module is used to fuse the parameters of the local models corresponding to the N local recognition models respectively to obtain the target global model corresponding to the r-th synchronization cycle. The generation module is used to obtain the historical global model of the N local recognition models in the (r-1)th synchronization period, obtain the training learning rate of the N local recognition models in the r-th synchronization period, and obtain the model parameter difference between the target global model and the historical global model; the historical global model is generated based on the local model parameters uploaded by the N clients in the (r-1)th synchronization period respectively; The generation module is further configured to determine the ratio between the model parameter difference and the training learning rate as the global federated momentum corresponding to the r-th synchronization cycle; The global federated momentum is used to indicate the training direction of the N local recognition models; The sending module is used to send the global federated momentum to the N clients, so that the N clients update the parameters of the associated local recognition model according to the global federated momentum to obtain the object recognition model; the object recognition model is used to identify objects with the target object type contained in the multimedia data.

8. A computer device, characterized in that, Including memory and processor; The memory is connected to the processor. The memory is used to store computer programs, and the processor is used to invoke the computer programs so that the computer device performs the method of any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program adapted to be loaded and executed by a processor so that a computer device having a processor performs the method of any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a processor, implement the method described in any one of claims 1-6.

Citation Information

Patent Citations

  • Transverse federated learning optimization method and device based on semi-supervision and storage medium

    CN111310938A

  • Multi-terminal model compression method and device based on knowledge federation, task prediction method and device and electronic equipment

    CN112052938A