Federated machine learning methods, devices, equipment and media for smart healthcare

By optimizing the LeakyRelu operator and protocol, the computational efficiency of federated learning is improved, the problem of inefficient computing efficiency in federated machine learning is solved, and the training efficiency is improved.

CN117744833BActive Publication Date: 2024-11-08SSC HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311821614.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2024-11-08
Estimated Expiration
2043-12-27

AI Technical Summary

Technical Problem

The multi-party joint training model in federated machine learning has led to a weakening of computing efficiency, which has limited the further improvement of artificial intelligence models.

Method used

By optimizing the LeakyRelu operator, the data is decomposed and added sharding is performed using the optimized Millionaire protocol and the target multiplication protocol to improve the computational efficiency of federated learning.

Benefits of technology

It significantly improves the training efficiency and the computing efficiency of multi-party joint training models, solving the problem of inefficient computing efficiency in federated learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117744833B_ABST
    Figure CN117744833B_ABST
Patent Text Reader

Abstract

The present application discloses a federated machine learning method, apparatus, device and medium applied to smart medical care, which relates to the field of machine learning, including: obtaining first medical-related decomposition data and second medical-related decomposition data; calling the optimized millionaire protocol to obtain first medical-related output data and second medical-related output data based on first target medical-related input data and second target medical-related input data, so as to obtain first calculation results and second calculation results based on medical-related decomposition data and medical-related output data respectively; obtaining target calculation results based on the first calculation result, the second calculation result, the first medical-related input data and the second medical-related input data; determining the addition slices of the first operator function value and the addition slices of the second operator function value respectively based on the target calculation result, so as to perform federated learning based on the addition slices of the operator function values. Therefore, the present application can optimize the operators of federated learning and improve efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine learning, and in particular to a federated machine learning method, apparatus, device and medium applied to smart healthcare. Background Art

[0002] Federated machine learning is a machine learning framework that can effectively help multiple institutions use data and conduct machine learning modeling while meeting the requirements of user privacy protection, data security, and government regulations. Due to data privacy and security constraints such as laws and regulations, policy supervision, commercial secrets, and personal privacy, multiple data sources cannot directly exchange data, forming a "data island" phenomenon, which restricts the further improvement of artificial intelligence model capabilities. The birth of federated learning is to solve this problem. However, the joint training model of multiple parties inevitably leads to the weakening of computing efficiency, so it is very necessary to optimize it to improve efficiency. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a federated machine learning method, device, equipment and medium applied to smart medical care, which can optimize the LeakyRelu operator used in two-party federated learning, so that the training efficiency is greatly improved. The specific scheme is as follows:

[0004] In a first aspect, the present application discloses a federated machine learning method applied to smart healthcare, including:

[0005] Obtaining first medical-related decomposed data after decomposing first medical-related input data corresponding to a first participant and second medical-related decomposed data after decomposing second medical-related input data corresponding to a second participant; the first participant and the second participant are both participants of federated machine learning;

[0006] Calling the optimized millionaire protocol to obtain corresponding first medical-related output data and second medical-related output data based on the first target medical-related input data and the second target medical-related input data, so that the first participant and the second participant can obtain the first calculation result and the second calculation result respectively based on their own medical-related decomposition data and corresponding medical-related output data;

[0007] Calling a target multiplication protocol to obtain a target calculation result based on the first calculation result, the second calculation result, the first medical-related input data, and the second medical-related input data;

[0008] Based on the target calculation result, the addition shards of the first operator function value corresponding to the first participant and the addition shards of the second operator function value corresponding to the second participant are respectively determined to perform federated learning based on the addition shards of the first operator function value and the addition shards of the second operator function value.

[0009] Optionally, the optimized millionaire's protocol is a protocol that compares the numerical values ​​corresponding to the preset target positions when comparing the sizes of functions, and determines the final calculation result based on the corresponding comparison result.

[0010] Optionally, the relationship between the first calculation result and the second calculation result is: the first calculation result XOR the second calculation result = 1{the first target medical-related input data < the second target medical-related input data}, wherein 1{the first target medical-related input data < the second target medical-related input data} means that if the first target medical-related input data is less than the second target medical-related input data, then 1{the first target medical-related input data < the second target medical-related input data} = 1, and if the first target medical-related input data is greater than or equal to the second target medical-related input data, then 1{the first target medical-related input data < the second target medical-related input data} = 0.

[0011] Optionally, before calling the target multiplication protocol to obtain a target calculation result based on the first calculation result, the second calculation result, the first medical-related input data, and the second medical-related input data, the method further includes:

[0012] The first medical-related input data and the second medical-related input data are converted into medical-related input data in a Boolean slice format based on a first target conversion protocol.

[0013] Optionally, the calling of the target multiplication protocol to obtain a target calculation result based on the first calculation result, the second calculation result, the first medical-related input data, and the second medical-related input data includes:

[0014] The target multiplication protocol is called to obtain a target calculation result based on the first calculation result, the second calculation result, and the medical-related input data in the Boolean slice format.

[0015] Optionally, before respectively determining the addition slices of the first operator function value corresponding to the first participant and the addition slices of the second operator function value corresponding to the second participant based on the target calculation result, the method further includes:

[0016] The target calculation result is converted into a calculation result corresponding to the addition slice format in the arithmetic circuit based on the second target conversion protocol.

[0017] Optionally, the determining, based on the target calculation result, respectively the addition slices of the first operator function value corresponding to the first participant and the addition slices of the second operator function value corresponding to the second participant, includes:

[0018] Determine an addition slice of a first operator function value corresponding to the first participant based on a calculation result corresponding to the addition slice format in the arithmetic circuit and the first medical-related input data;

[0019] Determine the addition slice of the second operator function value corresponding to the second participant based on the calculation result corresponding to the addition slice format in the arithmetic circuit and the second medical-related input data.

[0020] In a second aspect, the present application discloses a federated machine learning device applied to smart medical care, comprising:

[0021] A decomposed data acquisition module, used to acquire first medical-related decomposed data after decomposing first medical-related input data corresponding to a first participant and second medical-related decomposed data after decomposing second medical-related input data corresponding to a second participant; the first participant and the second participant are both participants of federated machine learning;

[0022] A calculation result acquisition module, used for calling the optimized millionaire protocol to acquire corresponding first medical-related output data and second medical-related output data based on first target medical-related input data and second target medical-related input data, so that the first participant and the second participant can acquire the first calculation result and the second calculation result respectively based on their own medical-related decomposition data and corresponding medical-related output data;

[0023] a target calculation result acquisition module, configured to call a target multiplication protocol to acquire a target calculation result based on the first calculation result, the second calculation result, the first medical-related input data, and the second medical-related input data;

[0024] An addition shard acquisition module is used to determine the addition shards of the first operator function value corresponding to the first participant and the addition shards of the second operator function value corresponding to the second participant based on the target calculation result, so as to perform federated learning based on the addition shards of the first operator function value and the addition shards of the second operator function value.

[0025] In a third aspect, the present application discloses an electronic device, comprising:

[0026] Memory, used to store computer programs;

[0027] A processor is used to execute the computer program to implement the aforementioned federated machine learning method applied to smart healthcare.

[0028] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the aforementioned federated machine learning method applied to smart healthcare.

[0029] It can be seen that when performing federated machine learning, the present application first obtains the first medical-related decomposition data after decomposing the first medical-related input data corresponding to the first participant and the second medical-related decomposition data after decomposing the second medical-related input data corresponding to the second participant; the first participant and the second participant are both participants in federated machine learning; the optimized millionaire protocol is called to obtain the corresponding first medical-related output data and the second medical-related output data based on the first target medical-related input data and the second target medical-related input data, so that the first participant and the second participant can obtain the first calculation result and the second calculation result respectively based on their own medical-related decomposition data and the corresponding medical-related output data; the target multiplication protocol is called to obtain the target calculation result based on the first calculation result, the second calculation result, the first medical-related input data and the second medical-related input data; based on the target calculation result, the addition slice of the first operator function value corresponding to the first participant and the addition slice of the second operator function value corresponding to the second participant are respectively determined, so as to perform federated learning based on the addition slice of the first operator function value and the addition slice of the second operator function value. In this way, this application optimizes the LeakyRelu operator used in two-party federated learning to a certain extent, thereby realizing the calculation of federated learning, greatly improving the training efficiency, and at the same time improving the calculation efficiency of the multi-party joint training model. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] 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 embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0031] Figure 1 A flowchart of a federated machine learning method applied to smart healthcare disclosed in this application;

[0032] Figure 2 This is a schematic diagram of the structure of a federated machine learning device applied to smart medical care disclosed in this application;

[0033] Figure 3 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] Federated machine learning is a machine learning framework that can effectively help multiple institutions use data and conduct machine learning modeling while meeting the requirements of user privacy protection, data security and government regulations. Due to data privacy and security constraints such as laws and regulations, policy supervision, commercial secrets, and personal privacy, multiple data sources cannot directly exchange data, forming a "data island" phenomenon, which restricts the further improvement of the capabilities of artificial intelligence models. The birth of federated learning is to solve this problem. However, the multi-party joint training model inevitably leads to a weakening of computing efficiency. In order to solve the above technical problems, the present application discloses a federated machine learning method applied to smart healthcare, which can optimize the LeakyRelu operator used in two-party federated learning to a certain extent, thereby realizing the calculation of federated learning, which greatly improves the training efficiency.

[0036] See also Figure 1 As shown, the embodiment of the present invention discloses a federated machine learning method applied to smart medical care, including:

[0037] Step S11, obtaining first medical-related decomposition data after decomposition of first medical-related input data corresponding to the first participant and second medical-related decomposition data after decomposition of second medical-related input data corresponding to the second participant; the first participant and the second participant are both participants of federated machine learning.

[0038] In this embodiment, it should be pointed out that in federated learning, the LeakyRelu operator can be written as LeakyRelu(x)=1{x<0}*x*a+(1-1{x<0})*x=x+(a-1)*1{x<0}*x. The general calculation occurs in a ring Z n In which, n = 2 l , where the input of the first participant P0 is x0; the input of the second participant P1 is x1, x0+x1=xmod n, thus obtaining the output y0, y1∈{0,1}, where, Here Represents bitwise XOR. MSB (Most Significant Bit, refers to the highest bit of the binary representation of x), for example 4=100, 1 is the MSB. At the same time, it should be pointed out that y0, y1∈{0,1} obtained here are used to calculate the function 1{x<0}. After clarifying these, the first medical-related decomposition data after the first medical-related input data corresponding to the first participant is decomposed and the second medical-related decomposition data after the second medical-related input data corresponding to the second participant is decomposed. P0 decomposes x0 into msb0||z0, where msb0∈{0,1}, z0∈{0,1} l-1 , similarly, P1 decomposes x1 into msb1||z1. At the same time, it should be noted that the first participant and the second participant are both participants in federated machine learning, and this application can not only be used for federated machine learning in smart healthcare, but all fields applied to federated machine learning are suitable for the method discussed in this application to optimize the LeakyRelu operator, thereby improving computing efficiency.

[0039] Step S12, calling the optimized Millionaire Protocol to obtain corresponding first medical-related output data and second medical-related output data based on the first target medical-related input data and the second target medical-related input data, so that the first participant and the second participant can obtain the first calculation result and the second calculation result respectively based on their own medical-related decomposition data and corresponding medical-related output data.

[0040] In this embodiment, in traditional calculations, the LeakyRelu operator can be expressed as LeakyRelu(x)=max(0,x)+a*min(0,x). In two-party federated learning calculations, each participant provides an addition slice of x, and finally obtains the addition slice of the above function value. Obviously, an important component of the above calculation is the size comparison function, that is, the millionaire problem. A size comparison formula is Among them, x=x1||x0;y=y1||y0; That is, x and y are split separately and calculated using the above formula. However, the calculation of federated learning is ambiguous and unexplainable, and the above calculation consumes a lot of computing resources on judging whether x1=y1 is true and calculating the AND gate. Therefore, it is necessary to optimize the protocol, where only the first m bits are taken for size comparison and the subsequent calculations are discarded, so as to obtain a generally correct result, and thus obtain the optimized millionaire protocol.

[0041] Call the optimized millionaire protocol to obtain the corresponding first medical-related output data and second medical-related output data based on the first target medical-related input data and the second target medical-related input data. So that the first participant and the second participant can obtain the first calculation result and the second calculation result respectively based on their own medical-related decomposition data and corresponding medical-related output data. It should be clarified that the relationship between the first calculation result and the second calculation result is: the first calculation result XOR the second calculation result = 1{the first target medical-related input data < the second target medical-related input data}, wherein 1{the first target medical-related input data < the second target medical-related input data} represents that if the first target medical-related input data is less than the second target medical-related input data, then 1{the first target medical-related input data < the second target medical-related input data} = 1, if the first target medical-related input data is greater than or equal to the second target medical-related input data, then 1{the first target medical-related input data < the second target medical-related input data} = 0. Specifically, P0 and P1 call The input of P0 is 2 l-1 -1-x0, the input of P1 is x1, then P0 and P1 get c0 and c1 respectively, where After obtaining the output results, P0 calculates P1 calculation in, It is the above optimized millionaire's protocol with a length of l-1 bit integer.

[0042] Step S13, calling a target multiplication protocol to obtain a target calculation result based on the first calculation result, the second calculation result, the first medical-related input data, and the second medical-related input data.

[0043] In this embodiment, based on the previous step, it can be known that the first participant and the second participant have respectively obtained calculation slices, but the slices obtained at this time are Boolean values, and x0 and x1 are addition slices in an arithmetic circuit. Therefore, before calling the target multiplication protocol to obtain the target calculation result based on the first calculation result, the second calculation result, the first medical-related input data, and the second medical-related input data, it is necessary to convert the first medical-related input data and the second medical-related input data into medical-related input data in a Boolean slice format based on the first target conversion protocol. That is, to convert the addition slices in the arithmetic circuit into Boolean slices, this step can use existing mature solutions, such as the A2B (arithmetic sharing to Boolean sharing) conversion protocol in the ABY (a work for efficient Mixed-Protocol secure two-party computation, efficient mixed protocol secure two-party computation framework) framework to obtain and in ABY represents three different sharing methods: arithmetic sharing, Boolean sharing, and Yao sharing (Yao's garbled circuits). Arithmetic sharing is based on additive secret sharing, Boolean sharing is based on the GMW protocol, and Yao sharing is based on garbled circuits. Boolean sharing and arithmetic sharing can be converted to each other.

[0044] Next, the target multiplication protocol is called to obtain the target calculation result based on the first calculation result, the second calculation result and the medical-related input data in the Boolean slice format. Specifically, the two-party multiplication protocol in the Boolean circuit is called Calculate 1{x<0}*x, where the input of P0 is y0 The input of P1 is y1, Finally get

[0045] Step S14: determine the addition shards of the first operator function value corresponding to the first participant and the addition shards of the second operator function value corresponding to the second participant based on the target calculation result, so as to perform federated learning based on the addition shards of the first operator function value and the addition shards of the second operator function value.

[0046] In this embodiment, the above acquisition After mod n, before determining the addition slices of the first operator function value corresponding to the first participant and the addition slices of the second operator function value corresponding to the second participant respectively based on the target calculation result, it is necessary to first Converted to slices in arithmetic circuits, similarly, the B2A (Boolean sharing to arithmetic sharing) conversion protocol in the ABY framework can be called to obtain Then, the addition slice of the first operator function value corresponding to the first participant is determined based on the calculation result corresponding to the addition slice format in the arithmetic circuit and the first medical-related input data; the addition slice of the second operator function value corresponding to the second participant is determined based on the calculation result corresponding to the addition slice format in the arithmetic circuit and the second medical-related input data. Specifically, let P0 calculate P1 calculation Now that the additive slices of the two operator function values ​​are obtained, federated learning can be performed based on the additive slices of the first operator function value and the additive slices of the second operator function value.

[0047] As can be seen from the above, when performing federated machine learning, the present application first obtains the first medical-related decomposition data after decomposition of the first medical-related input data corresponding to the first participant and the second medical-related decomposition data after decomposition of the second medical-related input data corresponding to the second participant; the first participant and the second participant are both participants in federated machine learning; the optimized millionaire protocol is called to obtain the corresponding first medical-related output data and the second medical-related output data based on the first target medical-related input data and the second target medical-related input data, so that the first participant and the second participant can obtain the first calculation result and the second calculation result respectively based on their own medical-related decomposition data and the corresponding medical-related output data; the target multiplication protocol is called to obtain the target calculation result based on the first calculation result, the second calculation result, the first medical-related input data and the second medical-related input data; based on the target calculation result, the addition slice of the first operator function value corresponding to the first participant and the addition slice of the second operator function value corresponding to the second participant are respectively determined, so as to perform federated learning based on the addition slice of the first operator function value and the addition slice of the second operator function value. In this way, this application optimizes the LeakyRelu operator used in two-party federated learning to a certain extent, thereby realizing the calculation of federated learning, greatly improving the training efficiency, and at the same time improving the calculation efficiency of the multi-party joint training model.

[0048] Based on the previous embodiment, it can be seen that the present application can optimize the millionaire's protocol by taking only the first m bits for size comparison and discarding the subsequent calculations, thereby obtaining a generally correct result, to achieve the calculation of the LeakyRelu operator, thereby improving the calculation efficiency. Next, the calculation process of the specific LeakyRelu operator will be described.

[0049] In federated learning, the LeakyRelu operator can be written as LeakyRelu(x)=1{x<0}*x*a+(1-1{x<0})*x=x+(a-1)*1{x<0}*x. --General calculations occur in a ring Z n In which, n = 2 l , first calculate 1{x<0}: where the input of the first participant P0 is x0; the input of the second participant P1 is x1, x0+x1=x mod n, thus obtaining the output y0, y1∈{0,1} where, Afterwards, P0 decomposes x0 into msb0||z0, where msb0∈{0, 1}, z0∈{0, 1} l-1 , similarly, P1 decomposes x1 into msb1||z1.

[0050] P0 and P1 calls The input of P0 is 2 l-1 -1-x0, the input of P1 is x1, then P0 and P1 get c0 and c1 respectively, where After obtaining the output results, P0 calculates P1 calculation in, is the above optimized millionaire protocol with a length of l-1 bit integer. Note that the slices obtained at this time are Boolean values, while x0 and x1 are addition slices in an arithmetic circuit. Therefore, it is necessary to convert the addition slices in the arithmetic circuit into Boolean slices. This step can use existing mature solutions, such as the A2B conversion protocol in the ABY framework, to obtain and in Here Stands for bitwise exclusive OR.

[0051] Next, we call the two-party multiplication protocol in Boolean circuits Calculate 1{x<0}*x, where the input of P0 is y0, The input of P1 is y1, Finally get After that, you need to Converted to the sharding in the arithmetic circuit, similarly, the B2A conversion protocol in the ABY framework can be called to obtain Finally, let P0 calculate P1 calculation Now that the additive slices of the two operator function values ​​are obtained, federated learning can be performed based on the additive slices of the first operator function value and the additive slices of the second operator function value.

[0052] In this way, by optimizing the LeakyRelu operator used in two-party federated learning to a certain extent, the training efficiency and calculation speed are greatly improved.

[0053] See also Figure 2 As shown, the embodiment of the present invention discloses a federated machine learning device applied to smart medical care, including:

[0054] A decomposed data acquisition module 11, used to acquire first medical-related decomposed data after decomposing first medical-related input data corresponding to a first participant and second medical-related decomposed data after decomposing second medical-related input data corresponding to a second participant; the first participant and the second participant are both participants of federated machine learning;

[0055] The calculation result acquisition module 12 is used to call the optimized millionaire protocol to obtain corresponding first medical-related output data and second medical-related output data based on the first target medical-related input data and the second target medical-related input data, so that the first participant and the second participant can obtain the first calculation result and the second calculation result respectively based on their own medical-related decomposition data and corresponding medical-related output data;

[0056] A target calculation result acquisition module 13, configured to call a target multiplication protocol to acquire a target calculation result based on the first calculation result, the second calculation result, the first medical-related input data, and the second medical-related input data;

[0057] The addition shard acquisition module 14 is used to determine the addition shards of the first operator function value corresponding to the first participant and the addition shards of the second operator function value corresponding to the second participant based on the target calculation result, so as to perform federated learning based on the addition shards of the first operator function value and the addition shards of the second operator function value.

[0058] As can be seen from the above, when performing federated machine learning, the present application first obtains the first medical-related decomposition data after decomposition of the first medical-related input data corresponding to the first participant and the second medical-related decomposition data after decomposition of the second medical-related input data corresponding to the second participant; the first participant and the second participant are both participants in federated machine learning; the optimized millionaire protocol is called to obtain the corresponding first medical-related output data and the second medical-related output data based on the first target medical-related input data and the second target medical-related input data, so that the first participant and the second participant can obtain the first calculation result and the second calculation result respectively based on their own medical-related decomposition data and the corresponding medical-related output data; the target multiplication protocol is called to obtain the target calculation result based on the first calculation result, the second calculation result, the first medical-related input data and the second medical-related input data; based on the target calculation result, the addition slice of the first operator function value corresponding to the first participant and the addition slice of the second operator function value corresponding to the second participant are respectively determined, so as to perform federated learning based on the addition slice of the first operator function value and the addition slice of the second operator function value. In this way, this application optimizes the LeakyRelu operator used in two-party federated learning, thereby greatly improving the training efficiency and the computational efficiency of the multi-party joint training model.

[0059] In some specific embodiments, the device may further include:

[0060] The first format conversion unit is used to convert the first medical-related input data and the second medical-related input data into medical-related input data in a Boolean slice format based on a first target conversion protocol.

[0061] In some specific embodiments, the target calculation result acquisition module 13 may specifically include:

[0062] A target calculation result acquisition unit is used to call the target multiplication protocol to acquire the target calculation result based on the first calculation result, the second calculation result and the medical-related input data in the Boolean slice format.

[0063] In some specific embodiments, the device may further include:

[0064] The second format conversion unit is used to convert the target calculation result into a calculation result corresponding to the addition slice format in the arithmetic circuit based on the second target conversion protocol.

[0065] In some specific embodiments, the addition slice acquisition module 14 may specifically include:

[0066] A first addition slice determination unit, configured to determine an addition slice of a first operator function value corresponding to the first participant based on a calculation result corresponding to the addition slice format in the arithmetic circuit and the first medical-related input data;

[0067] The second addition slice determination unit is used to determine the addition slice of the second operator function value corresponding to the second participant based on the calculation result corresponding to the addition slice format in the arithmetic circuit and the second medical-related input data.

[0068] Furthermore, the present application also discloses an electronic device. Figure 3 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0069] Figure 3 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the federated machine learning method for smart medical care disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0070] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output medical-related data to the outside world. The specific interface type can be selected according to the specific application needs and is not specifically limited here.

[0071] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0072] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the federated machine learning method for smart medical treatment executed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0073] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed federated machine learning method for smart medical care is implemented. The specific steps of the method can be referred to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.

[0074] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0075] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0076] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0077] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0078] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A federated machine learning method for smart healthcare, It is characterized in that include: Obtain first medical-related decomposition data after decomposition of first medical-related input data corresponding to a first participant and second medical-related decomposition data after decomposition of second medical-related input data corresponding to a second participant; the first participant and the second participant are both participants of federated machine learning; wherein the first medical-related decomposition data is the first participant decomposing the first medical-related input data into msb 0 ||z 0 The data after; msb 0 is the highest bit of the binary representation of the first medical-related input data; Z 0 is the binary representation of the first medical-related input data except all bits after the most significant bit; the second medical-related decomposition data is the first participant decomposing the first medical-related input data into MSB 1 ||z 1 The data after; msb 1 is the highest bit of the binary representation of the second medical-related input data; Z 1 All bits except the most significant bit of the binary representation of the second medical-related input data; The optimized millionaire protocol is called to obtain corresponding first medical-related output data and second medical-related output data based on the first target medical-related input data and the second target medical-related input data, so that the first participant and the second participant can obtain the first calculation result and the second calculation result respectively based on their own medical-related decomposition data and their own corresponding medical-related output data; wherein the first medical-related output data is data determined based on the first target medical-related input data; and the second medical-related output data is data determined based on the second target medical-related input data; The target multiplication protocol is called to obtain the target calculation result based on the first calculation result, the second calculation result, the first medical-related input data, and the second medical-related input data; wherein the target multiplication protocol is a two-party multiplication protocol in a Boolean circuit; the two-party multiplication protocol is Calculate the result for the target; y 0 inputting data related to the first medical treatment; is the first calculation result; y 1 inputting data related to the second medical treatment; is the second calculation result, mod n is a modulo n operation; Determine, based on the target calculation result, respectively the addition shards of the first operator function value corresponding to the first participant and the addition shards of the second operator function value corresponding to the second participant, so as to perform federated learning based on the addition shards of the first operator function value and the addition shards of the second operator function value; The step of respectively determining the addition slices of the first operator function value corresponding to the first participant and the addition slices of the second operator function value corresponding to the second participant based on the target calculation result includes: Determine an addition slice of a first operator function value corresponding to the first participant based on a calculation result corresponding to an addition slice format in an arithmetic circuit and the first medical-related input data; The addition slice of the second operator function value corresponding to the second participant is determined based on the calculation result corresponding to the addition slice format in the arithmetic circuit and the second medical-related input data.

2. The federated machine learning method for smart healthcare according to claim 1, It is characterized in that The optimized millionaire's protocol is a protocol that compares the numerical values ​​corresponding to the preset target positions when comparing the sizes of functions, and determines the final calculation result based on the corresponding comparison results.

3. The federated machine learning method for smart healthcare according to claim 1, It is characterized in that The relationship between the first calculation result and the second calculation result is: the first calculation result XOR the second calculation result = 1{the first target medical-related input data < the second target medical-related input data}, wherein 1{the first target medical-related input data < the second target medical-related input data} means that if the first target medical-related input data is less than the second target medical-related input data, then 1{the first target medical-related input data < the second target medical-related input data} = 1, and if the first target medical-related input data is greater than or equal to the second target medical-related input data, then 1{the first target medical-related input data < the second target medical-related input data} = 0.

4. The federated machine learning method for smart healthcare according to claim 1, It is characterized in that Before the calling of the target multiplication protocol to obtain the target calculation result based on the first calculation result, the second calculation result, the first medical-related input data, and the second medical-related input data, the method further includes: The first medical-related input data and the second medical-related input data are converted into medical-related input data in a Boolean slice format based on a first target conversion protocol.

5. The federated machine learning method for smart healthcare according to claim 4, It is characterized in that The calling target multiplication protocol obtains a target calculation result based on the first calculation result, the second calculation result, the first medical-related input data, and the second medical-related input data, including: The target multiplication protocol is called to obtain a target calculation result based on the first calculation result, the second calculation result, and the medical-related input data in the Boolean slice format.

6. The federated machine learning method for smart medical care according to any one of claims 1 to 5, It is characterized in that Before respectively determining the addition slices of the first operator function value corresponding to the first participant and the addition slices of the second operator function value corresponding to the second participant based on the target calculation result, the method further includes: The target calculation result is converted into a calculation result corresponding to the addition slice format in the arithmetic circuit based on the second target conversion protocol.

7. A federated machine learning device for smart healthcare, It is characterized in that include: The decomposition data acquisition module is used to obtain the first medical-related decomposition data after the first medical-related input data corresponding to the first participant is decomposed, and the second medical-related decomposition data after the second medical-related input data corresponding to the second participant is decomposed; the first participant and the second participant are both participants of the federated machine learning; wherein the first medical-related decomposition data is the first participant decomposing the first medical-related input data into MSB 0 ||z 0 The data after; msb 0 is the highest bit of the binary representation of the first medical-related input data; Z 0 is the binary representation of the first medical-related input data except all bits after the most significant bit; the second medical-related decomposition data is the first participant decomposing the first medical-related input data into MSB 1 ||z 1 The data after; msb 1 is the highest bit of the binary representation of the second medical-related input data; Z 1 All bits except the most significant bit of the binary representation of the second medical-related input data; A calculation result acquisition module is used to call the optimized millionaire protocol to obtain corresponding first medical-related output data and second medical-related output data based on first target medical-related input data and second target medical-related input data, so that the first participant and the second participant can obtain the first calculation result and the second calculation result respectively based on their own medical-related decomposition data and their own corresponding medical-related output data; wherein, the first medical-related output data is data determined based on the first target medical-related input data; the second medical-related output data is data determined based on the second target medical-related input data; A target calculation result acquisition module is used to call a target multiplication protocol to acquire a target calculation result based on the first calculation result, the second calculation result, the first medical-related input data, and the second medical-related input data; wherein the target multiplication protocol is a two-party multiplication protocol in a Boolean circuit; the two-party multiplication protocol is Calculate the result for the target; y 0 inputting data related to the first medical treatment; is the first calculation result; y 1 inputting data related to the second medical treatment; is the second calculation result, mod n is a modulo n operation; an addition shard acquisition module, used to determine, based on the target calculation result, the addition shard of the first operator function value corresponding to the first participant and the addition shard of the second operator function value corresponding to the second participant, respectively, so as to perform federated learning based on the addition shard of the first operator function value and the addition shard of the second operator function value; The addition fragment acquisition module specifically includes: A first addition slice determination unit, configured to determine an addition slice of a first operator function value corresponding to the first participant based on a calculation result corresponding to an addition slice format in an arithmetic circuit and the first medical-related input data; The second addition slice determination unit is used to determine the addition slice of the second operator function value corresponding to the second participant based on the calculation result corresponding to the addition slice format in the arithmetic circuit and the second medical-related input data.

8. An electronic device, It is characterized in that include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the federated machine learning method applied to smart healthcare as described in any one of claims 1 to 6.

9. A computer-readable storage medium, It is characterized in that Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the federated machine learning method applied to smart medical care as described in any one of claims 1 to 6 are implemented.