Data selection method in federal learning scene

By setting up a terminal processor and using a client selection algorithm in the federated learning scenario, the problem of inconvenient data selection in federated learning is solved, efficient and accurate data selection is achieved, and the convenience and accuracy of the method is improved.

CN119397230APending Publication Date: 2025-02-07BEIJING BIG DATA CENT
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411596787.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

In the federated learning scenario, the prior art is not convenient to select data, resulting in inefficient data selection.

Method used

By setting up a terminal processor, including data transmission module, data conversion module, data analysis module, etc., the client selection algorithm and a fixed number of client sets are used, and the terminal processor issues the model to the selected client for optimization processing. Until the model reaches the target accuracy.

Benefits of technology

It realizes accurate judgment and selection of data, improves the convenience and accuracy of data selection, avoids the cumbersome selection and screening process, and improves the convenience and qualification rate of the method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397230A_ABST
    Figure CN119397230A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of federated learning, in particular to a data selection method in a federated learning scene, which comprises an adopted terminal processor, a data transmission module is arranged at one end of the terminal processor, a data conversion module is arranged at one end of the data transmission module, and a data analysis module is arranged at one end of the data conversion module. A data comparison module is arranged at one end of the data analysis module, a data selection module is arranged at one end of the data comparison module, a data calculation module is arranged at one end of the data selection module, and a data distribution module is arranged at one end of the data calculation module. Through the set selection method, the data can be accurately judged and selected in the use process, the situation that the data is inconvenient to select in the use process of a federal learning scene is avoided, use of workers is facilitated, meanwhile, the use convenience of data selection is improved, selection and screening do not need to be conducted in a tedious mode, and the use efficiency is improved. And the use convenience of the method is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of federated learning, and in particular to a data selection method in a federated learning scenario. Background Art

[0002] In "Federated Learning", we will describe how federated learning (also known as federated machine learning) combines distributed machine learning, cryptography, incentive mechanisms based on financial rules, and game theory to solve the problem of using decentralized data. Traditional machine learning methods require all data to be concentrated in one place (for example, a data center) and then train the machine learning model. Federated learning, as a distributed machine learning paradigm, can effectively solve the problem of data silos, allowing participants to jointly model without sharing data, which can technically break data silos and achieve AI collaboration.

[0003] The existing patent, with publication number CN112464269A, discloses a data selection method in a federated learning scenario, which includes filtering out users and data related to the task, user selection before training, user and data selection during training, and model training. The present invention adopts vector sketches and random response mechanisms, and the user selection strategy is efficient and has privacy protection. At the same time, due to the use of server-side log information to dynamically select users, data is selected based on the upper limit of the gradient, and the impact of erroneous data on the gradient is taken into account, the data selection strategy is efficient and accurate.

[0004] In view of this, the present invention proposes a data selection method in a federated learning scenario to solve the above problems. Summary of the invention

[0005] In view of the shortcomings of the prior art, the purpose of the present invention is to propose a data selection method in a federated learning scenario, which has the advantages of judging and selecting data in a federated learning scenario, and solves the problem that it is inconvenient to select data when using a federated learning scenario.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A data selection method in a federated learning scenario includes a terminal processor, wherein one end of the terminal processor is provided with a data transmission module, one end of the data transmission module is provided with a data conversion module, one end of the data conversion module is provided with a data analysis module, one end of the data analysis module is provided with a data comparison module, one end of the data comparison module is provided with a data selection module, one end of the data selection module is provided with a data calculation module, one end of the data calculation module is provided with a data distribution module, one end of the data distribution module is provided with a time calculation module, one end of the time calculation module is provided with a period judgment module, one end of the period judgment module is provided with a model distribution module, and one end of the model distribution module is connected to a client.

[0008] The specific method is as follows:

[0009] a1. At the beginning, each client performs local test training to obtain key information required for client selection and model aggregation, and then uploads it to the terminal processor;

[0010] a2. In the terminal processor, a client selection algorithm and a fixed number of client sets are used;

[0011] a3. The terminal processor sends the model to the selected client;

[0012] a4. The client optimizes the received information model locally;

[0013] a5. The processed information model is uploaded to the terminal processor;

[0014] a6. Generate a new global model at the terminal processor end;

[0015] a7. Determine whether the model has achieved the target accuracy;

[0016] a8. If the model reaches the target accuracy, data selection ends.

[0017] a9. If the model does not reach the target accuracy, the data is transmitted to the terminal processor, and the model is sent to the selected clients again for optimization using the client selection algorithm and a fixed number of client sets, and then a new global model is generated.

[0018] As a preferred technical solution, the output end of the terminal processor is connected to a storage module, and the storage module is bidirectionally connected to the terminal processor. The storage module is a dual-port memory. The dual-port memory is a memory with two independent ports at the same time, and each port can perform read and write operations independently. This memory is mainly used to realize simultaneous memory access by CPU and DMA to improve data transmission efficiency.

[0019] As a preferred technical solution, the output end of the terminal processor is signal-connected to the input end of the data transmission module, the output end of the data transmission module is signal-connected to the input end of the data conversion module, and the output end of the data conversion module is signal-connected to the input end of the data analysis module. The temperature range is 0-60°C, in accordance with DIN 40040 standard, grade KTF, storage and transportation environment requirements: -40-85°C, allowable relative humidity: 0%~90%, no condensation, allowable vibration: refer to IEC68-2 standard, Part 6, allowable impact: refer to IEC68-2 standard, Part 29, acceleration peak: 98m / s2, rated impact duration: 16ms.

[0020] As a preferred technical solution, the output end of the data analysis module is signal-connected to the input end of the data comparison module, the output end of the data comparison module is signal-connected to the input end of the data selection module, and the output end of the data selection module is signal-connected to the input end of the data calculation module.

[0021] As a preferred technical solution, the output end of the data calculation module is connected to the input end signal of the data distribution module, the output end of the data distribution module is connected to the input end signal of the time calculation module, and the output end of the time calculation module is connected to the input end signal of the period judgment module.

[0022] As a preferred technical solution, the cycle judgment module transmits the judged signal to the model distribution module, the model distribution module distributes the model data to the client, the output end of the cycle judgment module is connected to the input end signal of the model distribution module, and the output end of the model distribution module is connected to the input end signal of the client.

[0023] As a preferred technical solution, the time calculation module adopts the time module, time.localtime([secs]): converts a timestamp into the struct_time of the current time zone, secs, then the current time shall prevail.

[0024] Compared with the prior art, the present invention has the following beneficial effects:

[0025] 1. The present invention can accurately judge and select data during use by setting up a selection method, avoiding the inconvenience of selecting data when using the federated learning scenario, facilitating the use of staff, and also improving the convenience of data selection. There is no need to select and screen it in a cumbersome manner, thereby improving the convenience of using the method.

[0026] 2. The present invention sets up the method so that the model that does not reach the target accuracy can be reprocessed during use. By selecting an algorithm and a fixed number of client sets, the terminal re-sends the model to the selected client for optimization again to generate a new global model, thereby improving the pass rate of the method and the accuracy of data selection. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0028] Figure 1 It is a schematic diagram of the system principle structure of the present invention;

[0029] Figure 2 The figure is a schematic flow chart of the selection method of the present invention. DETAILED DESCRIPTION

[0030] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention. In the description of the present invention, it should be understood that the orientation or position relationship indicated by the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", etc. is based on the orientation or position relationship shown in the accompanying drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" can explicitly or implicitly include one or more of the features. In the description of the present invention, “multiple” means two or more than two, and “several” means one or more than one, unless otherwise clearly and specifically defined.

[0031] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or mutual communication; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0032] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may include that the first and second features are in direct contact, or may include that the first and second features are not in direct contact but are in contact through another feature between them. Moreover, a first feature being "above", "above" and "above" a second feature includes that the first feature is directly above and obliquely above the second feature, or simply indicates that the first feature is higher in level than the second feature. A first feature being "below", "below" and "below" a second feature includes that the first feature is directly below and obliquely below the second feature, or simply indicates that the first feature is lower in level than the second feature.

[0033] The disclosure below provides many different embodiments or examples to realize different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or reference letters in different examples, and this repetition is for the purpose of simplicity and clarity, which itself does not indicate the relationship between the various embodiments and / or settings discussed. In addition, the present invention provides various specific examples of processes and materials, but those of ordinary skill in the art can be aware of the application of other processes and / or the use of other materials.

[0034] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0035] According to the attached Figure 1-2As shown, an embodiment of the present invention provides a data selection method in a federated learning scenario, including a terminal processor, wherein a data transmission module is provided at one end of the terminal processor, a data conversion module is provided at one end of the data transmission module, a data analysis module is provided at one end of the data conversion module, a data comparison module is provided at one end of the data analysis module, a data selection module is provided at one end of the data comparison module, a data calculation module is provided at one end of the data selection module, a data distribution module is provided at one end of the data calculation module, a time calculation module is provided at one end of the time calculation module, a period judgment module is provided at one end of the period judgment module, a model distribution module is provided at one end of the model distribution module, and one end of the model distribution module is connected to the client.

[0036] The selection method that is set can make accurate judgments and selections on the data during use, avoiding the inconvenience of selecting data when using the federated learning scenario, making it convenient for staff to use. It also improves the convenience of data selection, eliminating the need to select and screen it in a cumbersome manner, thereby improving the convenience of using this method.

[0037] The specific method is as follows:

[0038] a1. At the beginning, each client performs local test training to obtain key information required for client selection and model aggregation, and then uploads it to the terminal processor;

[0039] a2. In the terminal processor, a client selection algorithm and a fixed number of client sets are used;

[0040] a3. The terminal processor sends the model to the selected client;

[0041] a4. The client optimizes the received information model locally;

[0042] a5. The processed information model is uploaded to the terminal processor;

[0043] a6. Generate a new global model at the terminal processor end;

[0044] a7. Determine whether the model has achieved the target accuracy;

[0045] a8. If the model reaches the target accuracy, data selection ends.

[0046] a9. If the model does not reach the target accuracy, the data is transmitted to the terminal processor, and the client selection algorithm and a fixed number of client sets are used to send the model to the selected client again for optimization processing, and then a new global model is generated. Through the set method, the model that does not reach the target accuracy can be reprocessed during use. By selecting the algorithm and a fixed number of client sets, the terminal re-sends the model to the selected client for optimization processing again to generate a new global model, thereby improving the pass rate of the method and the accuracy of data selection.

[0047] As a preferred embodiment of this embodiment, the output end of the terminal processor is connected to a storage module, and the storage module is bidirectionally connected to the terminal processor. The storage module is a dual-port memory. The dual-port memory is a memory with two independent ports at the same time, and each port can perform read and write operations independently. This memory is mainly used to realize simultaneous memory access by CPU and DMA to improve data transmission efficiency.

[0048] As a preferred embodiment of this embodiment, the output end of the terminal processor is signal-connected to the input end of the data transmission module, the output end of the data transmission module is signal-connected to the input end of the data conversion module, and the output end of the data conversion module is signal-connected to the input end of the data analysis module.

[0049] As a preferred embodiment of this embodiment, the output end of the data analysis module is signal-connected to the input end of the data comparison module, the output end of the data comparison module is signal-connected to the input end of the data selection module, and the output end of the data selection module is signal-connected to the input end of the data calculation module.

[0050] As a preferred embodiment of this embodiment, the output end of the data calculation module is signal-connected to the input end of the data distribution module, the output end of the data distribution module is signal-connected to the input end of the time calculation module, and the output end of the time calculation module is signal-connected to the input end of the period judgment module.

[0051] As a preferred embodiment of this embodiment, the period judgment module transmits the judged signal to the model distribution module, the model distribution module distributes the model data to the client, the output end of the period judgment module is connected to the input end signal of the model distribution module, and the output end of the model distribution module is connected to the input end signal of the client.

[0052] As a preferred embodiment of the present invention, the time calculation module adopts the time module, time.localtime([secs]): converts a timestamp into the struct_time of the current time zone, secs, and the current time shall prevail.

[0053] It is worth mentioning that in Python, there are usually several ways to represent time: timestamp, formatted time string, tuple (struct_time has nine elements). Since Python's time module is mainly implemented by calling the C library, it may be different on different platforms.

[0054] Timestamp method: Timestamp represents the offset in seconds from 00:00:00 on January 1, 1970 to the present. Check the return value type of type(time.time), you can see that it is a float type. The functions that return timestamps mainly include time, clock, etc.

[0055] In a data selection method in a federated learning scenario of the present invention, when in use, each client performs local test training to obtain key information required for client selection and model aggregation, and then uploads it to the terminal processor. At the terminal processor, the client's selection algorithm and a fixed number of client sets are used, and then the terminal processor sends the model to the selected client. After sending, the client optimizes the received information model locally, and the optimized information model is uploaded to the terminal processor. Then, at the terminal processor end, a new global model is generated, and then it is determined whether the model reaches the target accuracy. If the model reaches the target accuracy, the data selection ends. Then, if the model does not reach the target accuracy, the data is transmitted to the terminal processor, and the client's selection algorithm and a fixed number of client sets are used. The client set sends the model to the selected client again for optimization processing, and then generates a new global model. Through the set selection method, the data can be accurately judged and selected during use, avoiding the inconvenience of data selection in the federated learning scenario, facilitating the use of staff, and also improving the convenience of data selection. There is no need to select and screen it in a cumbersome way, which improves the convenience of use of the method. Through the set method, the model that does not reach the target accuracy can be reprocessed during use. By selecting the algorithm and a fixed number of client sets, the terminal re-sends the model to the selected client for optimization processing again to generate a new global model, thereby improving the pass rate of the method and improving the accuracy of data selection.

[0056] In the description of this specification, the description with reference to the terms "embodiment", "one embodiment", "certain embodiments", "illustrative embodiment", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0057] The basic principles, main features and advantages of the present invention are described above in conjunction with specific embodiments. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A data selection method in a federated learning scenario, including a terminal processor, characterized in that: One end of the terminal processor is provided with a data transmission module, one end of the data transmission module is provided with a data conversion module, one end of the data conversion module is provided with a data analysis module, one end of the data analysis module is provided with a data comparison module, one end of the data comparison module is provided with a data selection module, one end of the data selection module is provided with a data calculation module, one end of the data calculation module is provided with a data distribution module, one end of the data distribution module is provided with a time calculation module, one end of the time calculation module is provided with a period judgment module, one end of the period judgment module is provided with a model distribution module, and one end of the model distribution module is connected to the client; The specific method is as follows: a1. At the beginning, each client performs local test training to obtain key information required for client selection and model aggregation, and then uploads it to the terminal processor; a2. In the terminal processor, a client selection algorithm and a fixed number of client sets are used; a3. The terminal processor sends the model to the selected client; a4. The client optimizes the received information model locally; a5. The processed information model is uploaded to the terminal processor; a6. Generate a new global model at the terminal processor end; a7. Determine whether the model has achieved the target accuracy; a8. If the model reaches the target accuracy, data selection ends; a9. If the model does not reach the target accuracy, the data is transmitted to the terminal processor, and the model is sent to the selected clients again for optimization using the client selection algorithm and a fixed number of client sets, and then a new global model is generated.

2. The data selection method in a federated learning scenario according to claim 1, characterized in that: The output end of the terminal processor is connected to a storage module, and the storage module is bidirectionally connected to the terminal processor. The storage module is a dual-port memory. The dual-port memory is a memory with two independent ports at the same time, and each port can perform read and write operations independently. This memory is mainly used to realize simultaneous memory access by CPU and DMA to improve data transmission efficiency.

3. The data selection method in a federated learning scenario according to claim 1, characterized in that: The output end of the terminal processor is signal-connected to the input end of the data transmission module, the output end of the data transmission module is signal-connected to the input end of the data conversion module, and the output end of the data conversion module is signal-connected to the input end of the data analysis module.

4. The data selection method in a federated learning scenario according to claim 1, characterized in that: The output end of the data analysis module is signal-connected to the input end of the data comparison module, the output end of the data comparison module is signal-connected to the input end of the data selection module, and the output end of the data selection module is signal-connected to the input end of the data calculation module.

5. The data selection method in a federated learning scenario according to claim 1, characterized in that: The output end of the data calculation module is signal-connected to the input end of the data distribution module, the output end of the data distribution module is signal-connected to the input end of the time calculation module, and the output end of the time calculation module is signal-connected to the input end of the period judgment module.

6. The data selection method in a federated learning scenario according to claim 1, characterized in that: The cycle judgment module transmits the judged signal to the model distribution module, and the model distribution module distributes the model data to the client. The output end of the cycle judgment module is connected to the input end signal of the model distribution module, and the output end of the model distribution module is connected to the input end signal of the client.

7. The data selection method in a federated learning scenario according to claim 1, characterized in that: The time calculation module uses the time module, time.localtime([secs]): converts a timestamp into the struct_time of the current time zone, secs, then the current time shall prevail.

Citation Information

Patent Citations

  • Data selection method in federated learning scene

    CN112464269A