[go: up one dir, main page]

CN114927210A - Diagnostic correlation classification model training method, apparatus, device, medium, and program - Google Patents

Diagnostic correlation classification model training method, apparatus, device, medium, and program Download PDF

Info

Publication number
CN114927210A
CN114927210A CN202110146084.XA CN202110146084A CN114927210A CN 114927210 A CN114927210 A CN 114927210A CN 202110146084 A CN202110146084 A CN 202110146084A CN 114927210 A CN114927210 A CN 114927210A
Authority
CN
China
Prior art keywords
training
parameter
classification model
training devices
devices
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110146084.XA
Other languages
Chinese (zh)
Inventor
贺澎旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN202110146084.XA priority Critical patent/CN114927210A/en
Publication of CN114927210A publication Critical patent/CN114927210A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/20ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for computer-aided diagnosis, e.g. based on medical expert systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/70ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for mining of medical data, e.g. analysing previous cases of other patients

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Medical Informatics (AREA)
  • Theoretical Computer Science (AREA)
  • Biomedical Technology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Biology (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Pathology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Epidemiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

A diagnostic correlation classification model training method, apparatus, device, medium, and program, the method comprising: the control equipment sends the first parameters of the classification models to the training equipment, the training equipment trains the classification models respectively based on the first parameters and local training samples to obtain second parameters corresponding to the training equipment, and the classification models are arranged in the training equipment. The control equipment combines the second parameters corresponding to the training equipment to obtain third parameters, and informs the training equipment to update the parameters of the classification model to the third parameters. The classification model is trained in parallel by combining a plurality of training sample providers, and the finally trained classification model learns the characteristic information of the training samples of each training sample provider, so that the performance is improved, and the time cost is low.

Description

诊断相关分类模型训练方法、装置、设备、介质和程序Diagnostic-related classification model training method, apparatus, equipment, medium and program

技术领域technical field

本发明涉及人工智能技术领域,尤其涉及一种诊断相关分类模型训练方法、装置、设备、介质和程序。The invention relates to the technical field of artificial intelligence, and in particular, to a method, device, equipment, medium and program for training a diagnosis-related classification model.

背景技术Background technique

在很多应用场景中,都会遇到分类任务。比如:将图像按照是否包含某种特定的对象进行分类,将文章按照所对应的领域进行分类。再比如诊断相关分类(DiagnosisRelated Groups,简称DRGs)。DRGs是指根据病人的住院天数、临床诊断、手术、病症、疾病严重程度,合并症与并发症等因素把病人分入500-2000个诊断相关组,然后决定应该给医院多少补偿。Classification tasks are encountered in many application scenarios. For example, classify images according to whether they contain a specific object, and classify articles according to their corresponding fields. Another example is DiagnosisRelated Groups (DRGs). DRGs refer to classifying patients into 500-2000 diagnosis-related groups based on factors such as the patient's hospital stay, clinical diagnosis, surgery, symptoms, disease severity, comorbidities and complications, and then deciding how much compensation should be given to the hospital.

随着机器学习、神经网络等技术的不断发展,目前,采用神经网络模型来完成分类识别任务已经成为一种主流趋势。With the continuous development of machine learning, neural network and other technologies, it has become a mainstream trend to use neural network models to complete classification and recognition tasks.

以DRGs预测为例,因为每个医疗机构的医疗数据有限且数据分布不均,医疗数据具有隐私性,不宜在医疗机构间共享。各个医疗机构基于自身的医疗数据进行模型训练的方式,使得训练的模型可能性能不佳,也难以泛化使用。Taking DRGs prediction as an example, because the medical data of each medical institution is limited and the data is unevenly distributed, medical data is private and should not be shared among medical institutions. The way each medical institution conducts model training based on its own medical data may make the trained model perform poorly and be difficult to generalize.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种诊断相关分类模型训练方法、装置、设备、介质和程序,能够获得一种具有良好性能和通用性的模型。Embodiments of the present invention provide a method, apparatus, device, medium and program for training a diagnosis-related classification model, which can obtain a model with good performance and versatility.

第一方面,本发明实施例提供一种模型训练方法,应用于控制设备,该方法包括:In a first aspect, an embodiment of the present invention provides a model training method, which is applied to a control device, and the method includes:

将分类模型的第一参数发送至多个训练设备,以使所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数,所述多个训练设备中均设有所述分类模型;Sending the first parameter of the classification model to a plurality of training devices, so that the plurality of training devices respectively train the classification model based on the first parameter and the local training samples, so as to obtain the corresponding correspondence of the plurality of training devices The second parameter of the plurality of training devices is provided with the classification model;

接收所述多个训练设备各自对应的第二参数;receiving second parameters corresponding to each of the plurality of training devices;

合并所述多个训练设备各自对应的第二参数以得到第三参数;combining the respective second parameters of the plurality of training devices to obtain the third parameter;

通知所述多个训练设备将所述分类模型的参数更新为所述第三参数。Notifying the plurality of training devices to update the parameters of the classification model to the third parameters.

第二方面,本发明实施例提供一种模型训练装置,应用于控制设备,该装置包括:In a second aspect, an embodiment of the present invention provides a model training device, which is applied to a control device, and the device includes:

发送模块,用于将分类模型的第一参数发送至多个训练设备,以使所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数,所述多个训练设备与多个训练样本提供方对应,所述多个训练设备中均设有所述分类模型;The sending module is configured to send the first parameter of the classification model to multiple training devices, so that the multiple training devices respectively train the classification model based on the first parameter and local training samples to obtain the multiple training devices. second parameters corresponding to each of the plurality of training devices, the plurality of training devices correspond to a plurality of training sample providers, and each of the plurality of training devices is provided with the classification model;

接收模块,用于接收所述多个训练设备各自对应的第二参数;a receiving module, configured to receive the respective second parameters corresponding to the multiple training devices;

处理模块,用于合并所述多个训练设备各自对应的第二参数以得到第三参数;a processing module, configured to combine the respective second parameters of the plurality of training devices to obtain the third parameters;

所述发送模块还用于:通知所述多个训练设备将所述分类模型的参数更新为所述第三参数。The sending module is further configured to: notify the plurality of training devices to update the parameters of the classification model to the third parameters.

第三方面,本发明实施例提供一种电子设备,包括:存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器至少可以实现如第一方面所述的模型训练方法。In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory and a processor; wherein, executable code is stored on the memory, and when the executable code is executed by the processor, the The processor may at least implement the model training method described in the first aspect.

第四方面,本发明实施例提供了一种非暂时性机器可读存储介质,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器至少可以实现如第一方面所述的模型训练方法。In a fourth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium, where executable code is stored on the non-transitory machine-readable storage medium, and when the executable code is executed by a processor of an electronic device When executed, the processor can at least implement the model training method described in the first aspect.

第五方面,本发明实施例提供一种应用程序,当所述应用程序被电子设备的处理器执行时,使所述处理器执行如第一方面所述的模型训练方法。In a fifth aspect, an embodiment of the present invention provides an application program, which, when the application program is executed by a processor of an electronic device, causes the processor to execute the model training method according to the first aspect.

第六方面,本发明实施例提供一种模型训练方法,应用于目标训练设备,该方法包括:In a sixth aspect, an embodiment of the present invention provides a model training method, which is applied to a target training device, and the method includes:

接收控制设备发送的分类模型的第一参数,所述控制设备与多个训练设备连接,所述目标训练设备是所述多个训练设备中的任一个;receiving a first parameter of the classification model sent by a control device, the control device is connected to multiple training devices, and the target training device is any one of the multiple training devices;

基于所述第一参数和本地的训练样本对所述分类模型进行训练以得到所述目标训练设备对应的第二参数;training the classification model based on the first parameter and local training samples to obtain the second parameter corresponding to the target training device;

将所述目标训练设备对应的第二参数发送至所述控制设备,以使所述控制设备合并所述多个训练设备各自对应的第二参数以得到第三参数,其中,所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数;sending the second parameter corresponding to the target training device to the control device, so that the control device combines the second parameters corresponding to the multiple training devices to obtain the third parameter, wherein the multiple training devices The device separately trains the classification model based on the first parameter and local training samples to obtain second parameters corresponding to each of the plurality of training devices;

响应于所述控制设备的通知,将所述分类模型的参数更新为所述第三参数。In response to the notification from the control device, the parameter of the classification model is updated to the third parameter.

第七方面,本发明实施例提供一种模型训练装置,应用于目标训练设备,该装置包括:In a seventh aspect, an embodiment of the present invention provides a model training device, which is applied to target training equipment, and the device includes:

接收模块,用于接收控制设备发送的分类模型的第一参数,所述控制设备与多个训练设备连接,所述目标训练设备是所述多个训练设备中的任一个;a receiving module, configured to receive a first parameter of the classification model sent by a control device, the control device is connected to a plurality of training devices, and the target training device is any one of the plurality of training devices;

训练模块,用于基于所述第一参数和本地的训练样本对所述分类模型进行训练以得到所述目标训练设备对应的第二参数;a training module, configured to train the classification model based on the first parameter and local training samples to obtain a second parameter corresponding to the target training device;

发送模块,用于将所述目标训练设备对应的第二参数发送至所述控制设备,以使所述控制设备合并所述多个训练设备各自对应的第二参数以得到第三参数,其中,所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数;a sending module, configured to send the second parameter corresponding to the target training device to the control device, so that the control device combines the second parameters corresponding to the multiple training devices to obtain the third parameter, wherein, The plurality of training devices respectively train the classification model based on the first parameters and local training samples to obtain second parameters corresponding to the plurality of training devices;

更新模块,用于响应于所述控制设备的通知,将所述分类模型的参数更新为所述第三参数。An update module, configured to update the parameter of the classification model to the third parameter in response to the notification from the control device.

第八方面,本发明实施例提供一种电子设备,包括:存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器至少可以实现如第六方面所述的模型训练方法。In an eighth aspect, an embodiment of the present invention provides an electronic device, including: a memory and a processor; wherein, executable code is stored on the memory, and when the executable code is executed by the processor, the The processor may at least implement the model training method described in the sixth aspect.

第九方面,本发明实施例提供了一种非暂时性机器可读存储介质,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器至少可以实现如第六方面所述的模型训练方法。In a ninth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium, where executable code is stored on the non-transitory machine-readable storage medium, and when the executable code is executed by a processor of an electronic device When executed, the processor can at least implement the model training method described in the sixth aspect.

第十方面,本发明实施例提供一种应用程序,当所述应用程序被电子设备的处理器执行时,使所述处理器执行如第六方面所述的模型训练方法。In a tenth aspect, an embodiment of the present invention provides an application program, which, when the application program is executed by a processor of an electronic device, causes the processor to execute the model training method according to the sixth aspect.

第十一方面,本发明实施例提供一种诊断相关分类模型训练方法,应用于控制设备,该方法包括:In an eleventh aspect, an embodiment of the present invention provides a method for training a diagnosis-related classification model, which is applied to a control device. The method includes:

将分类模型的第一参数发送至多个训练设备,以使所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数,所述多个训练设备中均设有所述分类模型,所述多个训练设备与多个医疗机构对应;Sending the first parameter of the classification model to a plurality of training devices, so that the plurality of training devices respectively train the classification model based on the first parameter and the local training samples, so as to obtain the corresponding correspondence of the plurality of training devices The second parameter of , the classification model is provided in the multiple training devices, and the multiple training devices correspond to multiple medical institutions;

接收所述多个训练设备各自对应的第二参数;receiving second parameters corresponding to each of the plurality of training devices;

合并所述多个训练设备各自对应的第二参数以得到第三参数;combining the respective second parameters of the plurality of training devices to obtain the third parameter;

通知所述多个训练设备将所述分类模型的参数更新为所述第三参数。Notifying the plurality of training devices to update the parameters of the classification model to the third parameters.

第十二方面,本发明实施例提供一种诊断相关分类模型训练装置,应用于控制设备,该装置包括:In a twelfth aspect, an embodiment of the present invention provides an apparatus for training a diagnosis-related classification model, which is applied to a control device, and the apparatus includes:

发送模块,用于将分类模型的第一参数发送至多个训练设备,以使所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数,所述多个训练设备中均设有所述分类模型,所述多个训练设备与多个医疗机构对应;The sending module is configured to send the first parameter of the classification model to multiple training devices, so that the multiple training devices respectively train the classification model based on the first parameter and local training samples to obtain the multiple training devices. second parameters corresponding to each of the training devices, the classification models are all provided in the plurality of training devices, and the plurality of training devices correspond to a plurality of medical institutions;

接收模块,用于接收所述多个训练设备各自对应的第二参数;a receiving module, configured to receive the respective second parameters corresponding to the multiple training devices;

合并模块,用于合并所述多个训练设备各自对应的第二参数以得到第三参数;a merging module for merging the respective second parameters of the plurality of training devices to obtain the third parameter;

所述发送模块还用于:通知所述多个训练设备将所述分类模型的参数更新为所述第三参数。The sending module is further configured to: notify the plurality of training devices to update the parameters of the classification model to the third parameters.

第十三方面,本发明实施例提供一种电子设备,包括:存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器至少可以实现如第十一方面所述的诊断相关分类模型训练方法。In a thirteenth aspect, an embodiment of the present invention provides an electronic device, including: a memory and a processor; wherein, executable code is stored on the memory, and when the executable code is executed by the processor, all The processor can at least implement the method for training a diagnosis-related classification model according to the eleventh aspect.

第十四方面,本发明实施例提供了一种非暂时性机器可读存储介质,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器至少可以实现如第十一方面所述的诊断相关分类模型训练方法。In a fourteenth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium, where executable code is stored on the non-transitory machine-readable storage medium, and when the executable code is processed by an electronic device When the processor is executed, the processor can at least implement the method for training a diagnosis-related classification model according to the eleventh aspect.

第十五方面,本发明实施例提供一种应用程序,当所述应用程序被电子设备的处理器执行时,使所述处理器执行如第十一方面所述的诊断相关分类模型训练方法。In a fifteenth aspect, an embodiment of the present invention provides an application program, which, when the application program is executed by a processor of an electronic device, causes the processor to execute the method for training a diagnosis-related classification model as described in the eleventh aspect.

第十六方面,本发明实施例提供一种诊断相关分类模型训练方法,应用于目标训练设备,该方法包括:In a sixteenth aspect, an embodiment of the present invention provides a method for training a diagnosis-related classification model, which is applied to a target training device. The method includes:

接收控制设备发送的分类模型的第一参数,所述控制设备与多个训练设备连接,所述目标训练设备是所述多个训练设备中的任一个,所述多个训练设备与多个医疗机构对应;Receive a first parameter of the classification model sent by a control device, the control device is connected to a plurality of training devices, the target training device is any one of the plurality of training devices, and the plurality of training devices are connected to a plurality of medical devices. institutional correspondence;

基于所述第一参数和本地的训练样本对所述分类模型进行训练以得到所述目标训练设备对应的第二参数;training the classification model based on the first parameter and local training samples to obtain the second parameter corresponding to the target training device;

将所述目标训练设备对应的第二参数发送至所述控制设备,以使所述控制设备合并所述多个训练设备各自对应的第二参数以得到第三参数,其中,所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数;sending the second parameter corresponding to the target training device to the control device, so that the control device combines the second parameters corresponding to the multiple training devices to obtain the third parameter, wherein the multiple training devices The device separately trains the classification model based on the first parameter and local training samples to obtain second parameters corresponding to each of the plurality of training devices;

响应于所述控制设备的通知,将所述分类模型的参数更新为所述第三参数。In response to the notification from the control device, the parameter of the classification model is updated to the third parameter.

第十七方面,本发明实施例提供一种诊断相关分类模型训练装置,应用于目标训练设备,该装置包括:In a seventeenth aspect, an embodiment of the present invention provides an apparatus for training a diagnosis-related classification model, which is applied to target training equipment. The apparatus includes:

接收模块,用于接收控制设备发送的分类模型的第一参数,所述控制设备与多个训练设备连接,所述目标训练设备是所述多个训练设备中的任一个,所述多个训练设备与多个医疗机构对应;a receiving module, configured to receive the first parameter of the classification model sent by a control device, the control device is connected to multiple training devices, the target training device is any one of the multiple training devices, the multiple training devices The equipment corresponds to multiple medical institutions;

训练模块,用于基于所述第一参数和本地的训练样本对所述分类模型进行训练以得到所述目标训练设备对应的第二参数;a training module, configured to train the classification model based on the first parameter and local training samples to obtain a second parameter corresponding to the target training device;

发送模块,用于将所述目标训练设备对应的第二参数发送至所述控制设备,以使所述控制设备合并所述多个训练设备各自对应的第二参数以得到第三参数,其中,所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数;a sending module, configured to send the second parameter corresponding to the target training device to the control device, so that the control device combines the second parameters corresponding to the multiple training devices to obtain the third parameter, wherein, The plurality of training devices respectively train the classification model based on the first parameters and local training samples to obtain second parameters corresponding to the plurality of training devices;

更新模块,用于响应于所述控制设备的通知,将所述分类模型的参数更新为所述第三参数。An update module, configured to update the parameter of the classification model to the third parameter in response to the notification from the control device.

第十八方面,本发明实施例提供一种电子设备,包括:存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器至少可以实现如第十六方面所述的诊断相关分类模型训练方法。In an eighteenth aspect, an embodiment of the present invention provides an electronic device, including: a memory and a processor; wherein, executable code is stored on the memory, and when the executable code is executed by the processor, all The processor can at least implement the method for training a diagnosis-related classification model according to the sixteenth aspect.

第十九方面,本发明实施例提供了一种非暂时性机器可读存储介质,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器至少可以实现如第十六方面所述的诊断相关分类模型训练方法。In a nineteenth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium, where executable code is stored on the non-transitory machine-readable storage medium, and when the executable code is processed by an electronic device When the processor is executed, the processor can at least implement the diagnosis-related classification model training method according to the sixteenth aspect.

第二十方面,本发明实施例提供一种应用程序,当所述应用程序被电子设备的处理器执行时,使所述处理器执行如第十六方面所述的诊断相关分类模型训练方法。In a twentieth aspect, an embodiment of the present invention provides an application program, which, when the application program is executed by a processor of an electronic device, causes the processor to execute the method for training a diagnosis-related classification model as described in the sixteenth aspect.

在上述本发明实施例提供的模型训练方案中,需要使用多个训练样本提供方的训练样本完成分类模型的训练,使得最终训练出的分类模型可以适用于多个训练样本提供方的分类任务需求,即具有通用性。为了保证各个训练样本提供方的信息安全性,各训练样本提供方基于各自对应的训练设备在本地进行分类模型的训练。In the model training scheme provided by the above embodiments of the present invention, the training samples of multiple training sample providers need to be used to complete the training of the classification model, so that the finally trained classification model can be adapted to the classification task requirements of multiple training sample providers , which is universal. In order to ensure the information security of each training sample provider, each training sample provider locally trains the classification model based on its corresponding training device.

具体来说,训练过程是:首先,用于管理多个训练设备的控制设备会设置分类模型的第一参数,之后将第一参数下发给各个训练设备,这样,每个训练设备基于第一参数和本地的训练样本对本地存储的分类模型进行训练,也就是说,多个训练设备并行地基于第一参数和本地的训练样本进行分类模型的训练,训练一段时间后,得到分类模型对应的多个第二参数,一个第二参数对应于一个训练设备。每个训练设备将自己训练得到的第二参数上传给控制设备,控制设备合并多个训练设备各自对应的第二参数以得到第三参数,控制设备告知多个训练设备都将本地的分类模型的参数更新为第三参数。如果最终确定具有第三参数的分类模型收敛则结束该分类模型的训练,后续使用这个具有第三参数的分类模型来执行多个训练样本提供方各自的分类任务。Specifically, the training process is as follows: first, the control device for managing multiple training devices will set the first parameter of the classification model, and then send the first parameter to each training device, so that each training device is based on the first parameter of the training device. The parameters and the local training samples train the locally stored classification model, that is, multiple training devices train the classification model based on the first parameter and the local training samples in parallel, and after training for a period of time, the corresponding classification model is obtained. A plurality of second parameters, one second parameter corresponds to one training device. Each training device uploads the second parameter obtained by its own training to the control device, the control device combines the respective second parameters of the multiple training devices to obtain the third parameter, and the control device informs the multiple training devices to use the local classification model. The parameter is updated to the third parameter. If it is finally determined that the classification model with the third parameter converges, the training of the classification model is ended, and the classification model with the third parameter is subsequently used to perform the respective classification tasks of the multiple training sample providers.

由于第三参数中融合了各个训练设备基于自己的训练样本而学习到的特征信息,使得具有第三参数的分类模型能够普遍适用于多个训练样本提供方的分类任务,且会获得比较准确的分类结果。Since the third parameter incorporates the feature information learned by each training device based on its own training samples, the classification model with the third parameter can be generally applied to the classification tasks of multiple training sample providers, and can obtain more accurate Classification results.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.

图1为本发明实施例提供的一种模型训练系统的组成示意图;1 is a schematic diagram of the composition of a model training system according to an embodiment of the present invention;

图2为本发明实施例提供的一种模型训练方法的流程图;2 is a flowchart of a model training method provided by an embodiment of the present invention;

图3为本发明实施例提供的一种模型测试方法的流程图;3 is a flowchart of a model testing method provided by an embodiment of the present invention;

图4为本发明实施例提供的一种模型训练方法的流程图;4 is a flowchart of a model training method provided by an embodiment of the present invention;

图5为本发明实施例提供的一种模型训练方法的流程图;5 is a flowchart of a model training method provided by an embodiment of the present invention;

图6为本发明实施例提供的一种诊断相关分类模型训练方法的流程图;6 is a flowchart of a method for training a diagnosis-related classification model according to an embodiment of the present invention;

图7为本发明实施例提供的一种诊断相关分类模型训练方法的流程图;7 is a flowchart of a method for training a diagnosis-related classification model according to an embodiment of the present invention;

图8为本发明实施例提供的一种模型训练场景的示意图;8 is a schematic diagram of a model training scenario provided by an embodiment of the present invention;

图9为本发明实施例提供的一种模型训练装置的结构示意图;9 is a schematic structural diagram of a model training apparatus provided by an embodiment of the present invention;

图10为与图9所示实施例提供的模型训练装置对应的电子设备的结构示意图;10 is a schematic structural diagram of an electronic device corresponding to the model training apparatus provided in the embodiment shown in FIG. 9;

图11为本发明实施例提供的一种模型训练装置的结构示意图;FIG. 11 is a schematic structural diagram of a model training apparatus according to an embodiment of the present invention;

图12为与图11所示实施例提供的模型训练装置对应的电子设备的结构示意图;12 is a schematic structural diagram of an electronic device corresponding to the model training apparatus provided in the embodiment shown in FIG. 11;

图13为本发明实施例提供的一种诊断相关分类模型训练装置的结构示意图;13 is a schematic structural diagram of an apparatus for training a diagnosis-related classification model according to an embodiment of the present invention;

图14为与图13所示实施例提供的装置对应的电子设备的结构示意图;FIG. 14 is a schematic structural diagram of an electronic device corresponding to the apparatus provided by the embodiment shown in FIG. 13;

图15为本发明实施例提供的一种诊断相关分类模型训练装置的结构示意图;15 is a schematic structural diagram of an apparatus for training a diagnosis-related classification model according to an embodiment of the present invention;

图16为与图15所示实施例提供的装置对应的电子设备的结构示意图。FIG. 16 is a schematic structural diagram of an electronic device corresponding to the apparatus provided in the embodiment shown in FIG. 15 .

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义,“多种”一般包含至少两种。The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a," "the," and "the" as used in the embodiments of the present invention and the appended claims are intended to include the plural forms as well, unless the context clearly dictates otherwise, "a plurality" Generally at least two are included.

取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。Depending on the context, the words "if", "if" as used herein may be interpreted as "at" or "when" or "in response to determining" or "in response to detecting". Similarly, the phrases "if determined" or "if detected (the stated condition or event)" can be interpreted as "when determined" or "in response to determining" or "when detected (the stated condition or event)," depending on the context )" or "in response to detection (a stated condition or event)".

另外,下述各方法实施例中的步骤时序仅为一种举例,而非严格限定。In addition, the sequence of steps in the following method embodiments is only an example, and is not strictly limited.

实际应用中,会遇到这样的一种情形:需要训练一个分类模型,以完成多分类任务,但是,由于单个训练样本提供方所提供的训练样本有限且数据分布不均(如训练样本种类不全或一些种类的训练样本数量较少),如果仅使用一个训练样本提供方所提供的训练样本来完成分类模型的训练,那么训练得到的分类模型的性能可能不佳,且不具有通用性。In practical applications, there will be such a situation: a classification model needs to be trained to complete multi-classification tasks. However, due to the limited training samples provided by a single training sample provider and the uneven data distribution (such as incomplete types of training samples) Or some types of training samples have a small number), if only the training samples provided by one training sample provider are used to complete the training of the classification model, the performance of the trained classification model may be poor and not universal.

一种联合多个训练样本提供方各自提供的训练样本进行分类模型训练的方式可以是迁移学习方式。由于在一些应用场景中,训练样本提供方所提供的训练样本具有隐私性,不可以直接提供给其他人,基于此,在迁移学习方式下,分类模型的训练过程简单来说是:首先,每个训练样本提供方对自己的训练样本进行监督信息的标注,比如,训练样本提供方1将自己的第一类训练样本标记为01,将第二类训练样本标记为02。而选了样本提供方B将自己的第三类训练样本标记为01,将第四类训练样本标记为02。其中,01、02表示类别标签。之后,训练样本提供方1基于自己的训练样本训练出分类模型1,之后训练样本提供方1基于自己的测试样本对分类模型1进行测试,假设测试结果符合要求,则将分类模型1提供给训练样本提供方2。训练样本提供方2采用自己的训练样本在分类模型1的基础上继而训练出分类模型2,并采用自己的测试样本对分类模型2进行测试,假设测试结果符合要求(注意,分类模型2并不一定对训练样本提供方1而言表现出良好的测试结果),则继而将分类模型3继续提供给下一个训练样本提供方3,由训练样本提供方3在分类模型2的基础上,基于自己的训练样本继续训练,以此类推,假设最终由训练样本提供方N训练出分类模型n。最终,分类模型n被提供给上述n个训练样本提供方,各个训练样本提供方后续会使用分类模型n来完成各自的分类任务。比如,任一训练样本提供方i,在接收到用户触发的分类任务时,使用分类模型n完成该分类任务,以输出针对输入数据的分类预测结果。A method of combining training samples provided by multiple training sample providers to train a classification model may be a transfer learning method. In some application scenarios, the training samples provided by the training sample provider are private and cannot be directly provided to others. Based on this, in the transfer learning mode, the training process of the classification model is simply: first, each Each training sample provider labels its own training samples with supervision information. For example, training sample provider 1 marks its first type of training samples as 01, and the second type of training samples as 02. The sample provider B is selected to mark its third type of training samples as 01 and the fourth type of training samples as 02. Among them, 01 and 02 represent category labels. After that, the training sample provider 1 trains the classification model 1 based on its own training samples, and then the training sample provider 1 tests the classification model 1 based on its own test samples. Assuming that the test results meet the requirements, the classification model 1 is provided for training. Sample provider 2. Training sample provider 2 uses its own training samples to train classification model 2 on the basis of classification model 1, and uses its own test samples to test classification model 2, assuming that the test results meet the requirements (note that classification model 2 does not must show good test results for the training sample provider 1), then continue to provide the classification model 3 to the next training sample provider 3, and the training sample provider 3 will, on the basis of the classification model 2, The training samples continue to be trained, and so on, assuming that the classification model n is finally trained by the training sample provider N. Finally, the classification model n is provided to the above n training sample providers, and each training sample provider will subsequently use the classification model n to complete their respective classification tasks. For example, any training sample provider i, when receiving a classification task triggered by a user, uses a classification model n to complete the classification task, so as to output a classification prediction result for the input data.

在上述迁移学习方式下,采用的是各训练样本提供方以串行的方式依次训练分类模型,当训练样本提供方较多的时候,训练分类模型的时间成本较比较大。In the above transfer learning method, each training sample provider is used to train the classification model sequentially in a serial manner. When there are many training sample providers, the time cost of training the classification model is relatively large.

另外,在上述迁移学习方式下,是在其他训练样本提供方训练出的分类模型的基础上,利用本地的训练样本对分类模型继续加以训练,此时得到的分类模型的性能(或者说质量)取决于本地训练样本数量以及之前训练得到的分类模型所使用的训练样本的数据分布与本地的训练样本的数据分布是否相近,如果不相近或本地训练样本数据量较少,很有可能使得本地训练出的分类模型对本地或其他训练样本提供方而言,性能不佳。从而迁移学习方式下最终得到的分类模型在多个训练样本提供方之间不具有通用性,无法获得全局较优的分类性能。In addition, in the above transfer learning method, on the basis of the classification models trained by other training sample providers, the local training samples are used to continue training the classification models, and the performance (or quality) of the obtained classification models is obtained at this time. It depends on the number of local training samples and whether the data distribution of the training samples used by the previously trained classification model is similar to the data distribution of the local training samples. The resulting classification model does not perform well for local or other training sample providers. Therefore, the classification model finally obtained under the transfer learning method is not universal among multiple training sample providers, and cannot obtain a globally optimal classification performance.

另外,在上述迁移学习方式下,在不同训练样本提供方之间共享分类模型,也会引起数据安全问题。比如训练样本提供方2在得到分类模型1后,基于分类模型1的参数,可以反推出训练分类模型1的训练样本提供方1的数据分布特征,给训练样本提供方1带来数据安全隐患。In addition, in the above-mentioned transfer learning method, sharing the classification model between different training sample providers will also cause data security issues. For example, after the training sample provider 2 obtains the classification model 1, based on the parameters of the classification model 1, the data distribution characteristics of the training sample provider 1 for training the classification model 1 can be reversed, which brings data security risks to the training sample provider 1.

为了避免以上迁移学习方式下存在的一种或多种问题,本发明实施例提供了一种新的训练分类模型的方案。形象地说,相对于迁移学习方式,本发明实施例中是以联邦学习方式来完成分类模型的训练的。所谓联邦学习方式,简单来说就是联合多个训练样本提供方并行地完成分类模型的训练,以节省训练时间成本,并使得最终训练得到的分类模型可以在多个训练样本提供方中具有良好的通用性,实现全局的良好性能(即最终训练得到的分类模型在多个训练样本提供方的分类任务上都获得较佳的准确性)。In order to avoid one or more problems existing in the above transfer learning manner, an embodiment of the present invention provides a new solution for training a classification model. Figuratively speaking, compared with the transfer learning method, the training of the classification model is completed in the federated learning method in the embodiment of the present invention. The so-called federated learning method is simply to combine multiple training sample providers to complete the training of the classification model in parallel, so as to save the training time cost, and make the classification model obtained by the final training have good performance among multiple training sample providers. Universality, to achieve good global performance (that is, the classification model obtained by the final training obtains better accuracy on the classification tasks of multiple training sample providers).

下面结合以下一些实施例介绍上述联邦学习方式下的分类模型训练过程。The following describes the training process of the classification model in the above federated learning manner with reference to the following embodiments.

图1为本发明实施例提供的一种模型训练系统的组成示意图,如图1所示,该模型训练系统包括:控制设备和多个训练设备(比如图1中示意的训练设备A、训练设备B),多个训练设备分别与控制设备通信连接。FIG. 1 is a schematic diagram of the composition of a model training system provided by an embodiment of the present invention. As shown in FIG. 1 , the model training system includes: a control device and a plurality of training devices (such as the training device A shown in FIG. 1 , the training device B), a plurality of training devices are respectively connected in communication with the control device.

这多个训练设备可以与多个训练样本提供方对应。具体地,一个训练样本提供方与一个训练设备对应。The multiple training devices may correspond to multiple training sample providers. Specifically, one training sample provider corresponds to one training device.

可以理解的是,训练样本提供方可以提供训练分类模型所需的训练样本,但是,在分类模型训练完成后,训练样本提供方同样可以是分类模型的使用方,使用分类模型完成本地的分类任务。It is understandable that the training sample provider can provide the training samples required for training the classification model. However, after the training of the classification model is completed, the training sample provider can also be the user of the classification model and use the classification model to complete local classification tasks. .

以训练用于实现DRGs的分类模型(即诊断相关分类模型)为例,上述多个训练样本提供方可以是多个医疗机构。多个医疗机构可以以自身已经存储的历史医疗数据作为训练样本,以便完成分类模型的训练,当分类模型训练完成后,医疗机构可以使用训练好的分类模型完成DRGs预测这种分类任务,即输入一份医疗数据到分类模型,以获得分类模型输出的DRGs预测结果。Taking the training of a classification model for implementing DRGs (ie, a diagnosis-related classification model) as an example, the providers of the above-mentioned multiple training samples may be multiple medical institutions. Multiple medical institutions can use their own stored historical medical data as training samples to complete the training of the classification model. After the training of the classification model is completed, the medical institution can use the trained classification model to complete the classification task of DRGs prediction. A medical data to a classification model to obtain the predicted results of DRGs output by the classification model.

本发明实施例中,控制设备是用于控制多个训练设备进行模型训练的设备。控制设备可以是云端的物理/虚拟的服务器或服务器集群,训练设备可以是位于训练样本提供方本地的终端设备或服务器。每个训练设备中存储有对应的训练样本提供方的训练样本和测试样本,这样,训练样本提供方的训练样本和测试样本不需要离开训练样本提供方本地,以便保证数据安全。In the embodiment of the present invention, the control device is a device for controlling multiple training devices to perform model training. The control device can be a physical/virtual server or server cluster in the cloud, and the training device can be a terminal device or server located locally at the training sample provider. Each training device stores training samples and test samples of the corresponding training sample provider, so that the training samples and test samples of the training sample provider do not need to leave the training sample provider to ensure data security.

可以理解的是,训练样本用于训练分类模型,测试样本用于验证分类模型的准确性。It can be understood that the training samples are used to train the classification model, and the test samples are used to verify the accuracy of the classification model.

另外,本发明实施例中,多个训练设备中均设有分类模型,也就是说,分类模型的训练过程是在多个训练设备本地执行的(每个训练设备基于自身存储的训练样本在本地对分类模型进行训练),控制设备仅对训练过程进行相关控制。In addition, in the embodiment of the present invention, a classification model is provided in multiple training devices, that is, the training process of the classification model is performed locally in multiple training devices (each training device is based on its own stored training samples locally training the classification model), and the control device only controls the training process.

本发明实施例中的分类模型可以是任一种可以实现分类任务的神经网络模型,比如可以实现为诸如循环神经网络(Recurrent Neural Network,简称RNN)模型、长短期记忆网络(Long Short-Term Memory,简称LSTM)模型、双向长短期记忆网络(Bi-directionalLong Short-Term Memory,简称Bi-LSTM)模型,等等。The classification model in this embodiment of the present invention may be any neural network model that can implement a classification task, for example, it may be implemented as a recurrent neural network (Recurrent Neural Network, RNN for short) model, a long short-term memory network (Long Short-Term Memory) , referred to as LSTM) model, bidirectional long short-term memory network (Bi-directional Long Short-Term Memory, referred to as Bi-LSTM) model, and so on.

基于图1所示的系统架构,以控制设备的角度来说,在训练分类模型的过程中,控制设备可以执行如图2所示的各个步骤。Based on the system architecture shown in FIG. 1 , from the perspective of the control device, in the process of training the classification model, the control device can perform the various steps shown in FIG. 2 .

图2为本发明实施例提供的一种模型训练方法的流程图,如图2所示,该方法包括如下步骤:FIG. 2 is a flowchart of a model training method provided by an embodiment of the present invention. As shown in FIG. 2 , the method includes the following steps:

201、控制设备将分类模型的第一参数发送至多个训练设备,以使多个训练设备基于第一参数和本地的训练样本分别对分类模型进行训练以得到多个训练设备各自对应的第二参数。201. The control device sends the first parameter of the classification model to multiple training devices, so that the multiple training devices respectively train the classification model based on the first parameter and the local training samples to obtain second parameters corresponding to each of the multiple training devices .

202、控制设备接收多个训练设备各自对应的第二参数。202. The control device receives second parameters corresponding to each of the multiple training devices.

203、控制设备合并多个训练设备各自对应的第二参数以得到第三参数,通知多个训练设备将分类模型的参数更新为第三参数。203. The control device merges the second parameters corresponding to the multiple training devices to obtain the third parameter, and notifies the multiple training devices to update the parameters of the classification model to the third parameters.

本实施例中,由于要联合多个训练样本提供方来对分类模型进行训练,因此需要对多个训练样本提供方各自提供的训练样本进行统一的监督信息的标注,也就是说,多个训练样本提供方需要基于同一标注标准来完成训练样本的监督信息的标注。另外,实际应用中,不同训练样本提供方记录信息的习惯可能不同,也可能会存在记录错误的情形,为了便于进行分类模型的训练,可以先对各训练样本提供方提供的训练样本进行一些预处理。In this embodiment, since multiple training sample providers are to be combined to train the classification model, it is necessary to label the training samples provided by the multiple training sample providers with unified supervision information, that is, multiple training samples The sample provider needs to complete the annotation of the supervision information of the training samples based on the same annotation standard. In addition, in practical applications, different training sample providers may have different habits of recording information, and there may be errors in recording. deal with.

基于此,控制设备可以预先向多个训练设备发送数据处理信息,以使多个训练设备根据该数据处理信息对本地的训练样本进行数据处理。Based on this, the control device may send data processing information to multiple training devices in advance, so that the multiple training devices perform data processing on local training samples according to the data processing information.

其中,该数据处理信息中包括训练样本对应的标注信息。简单来说,该标注信息中描述了应该把什么类别的训练样本打上什么样的类别标签。比如,告知所有医疗机构将某种眼科疾病标注为01,将某种心脏疾病标注为02,等等。The data processing information includes labeling information corresponding to the training samples. In short, the labeling information describes what kind of class label should be labeled with what class of training samples. For example, tell all medical institutions to label a certain eye disease as 01, a certain heart disease as 02, and so on.

可选地,上述数据处理信息中还包括如下至少一种信息:Optionally, the above-mentioned data processing information also includes at least one of the following information:

数据结构化处理信息,用于对每个训练样本中包含的数据进行设定的结构化处理;Data structuring processing information, which is used to perform set structuring processing on the data contained in each training sample;

数据过滤规则信息,用于对不符合设定要求的训练样本进行过滤处理。Data filtering rule information, which is used to filter training samples that do not meet the set requirements.

针对任一条训练样本来说,这条训练样本中包含的数据信息可以被组织成键值对形式的数据结构,表示为key:value。其中,key表示键,value表示取值。比如,以医疗数据为例,医疗数据中会包括年纪、各种检查指标、病症、诊断结果等数据内容,可以将每一项数据内容按照设定的结构要求进行结构化处理。比如,某条医疗数据中记录有:张三、25。另一条医疗数据中记录有:名字:李四,30。按照数据结构化处理信息中规定的姓名、年纪的记录要求,可以转化为:姓名:张三;年纪:25。以及,姓名:李四;年纪:30。For any training sample, the data information contained in the training sample can be organized into a data structure in the form of key-value pairs, expressed as key:value. Among them, key represents the key, and value represents the value. For example, taking medical data as an example, medical data will include data content such as age, various inspection indicators, symptoms, diagnosis results, etc., and each data content can be structured according to the set structural requirements. For example, a piece of medical data records: Zhang San, 25. Another piece of medical data records: Name: Li Si, 30. According to the record requirements of name and age specified in the data structure processing information, it can be converted into: Name: Zhang San; Age: 25. And, Name: Li Si; Age: 30.

上述数据过滤规则信息中可以描述有训练样本中包含的各种数据内容的过滤规则。比如,如果某条医疗数据中记录的病人年纪为150,则这条医疗数据会被过滤掉,因为这个年纪不合理。The above data filtering rule information may describe filtering rules for various data contents included in the training samples. For example, if the age of a patient recorded in a piece of medical data is 150, this piece of medical data will be filtered because this age is unreasonable.

为便于理解,结合图1所示的系统来示例性说明上述模型训练方法的执行过程。For ease of understanding, the execution process of the above model training method is exemplarily described with reference to the system shown in FIG. 1 .

实际应用中,在需要训练分类模型时,控制设备可以先初始化分类模型的参数,假设初始化为第一参数,表示为W0。可以理解的是,训练分类模型的过程即为不断迭代更新分类模型的参数的过程。In practical applications, when the classification model needs to be trained, the control device may first initialize the parameters of the classification model, assuming that the initialization is the first parameter, which is represented as W0. It can be understood that the process of training the classification model is the process of iteratively updating the parameters of the classification model.

之后,控制设备将第一参数W0发送至多个训练设备,比如图1中示意的训练设备A和训练设备B。多个训练设备本地都存储有具有相同结构的同一分类模型,多个训练设备接收到第一参数W0后,将本地存储的分类模型的参数设置为该第一参数W0。After that, the control device sends the first parameter W0 to a plurality of training devices, such as the training device A and the training device B shown in FIG. 1 . The multiple training devices locally store the same classification model with the same structure, and after receiving the first parameter W0, the multiple training devices set the parameters of the locally stored classification model to the first parameter W0.

之后,每个训练设备使用本地的训练样本对参数设置为第一参数W0的分类模型进行训练,训练一段时间后,每个训练设备得到本地维护的分类模型所对应的第二参数。比如图1中,训练设备A基于本地的训练样本对具有第一参数W0的分类模型进行一段时间的训练后得到第二参数WA,训练设备B基于本地的训练样本对具有第一参数W0的分类模型进行一段时间的训练后得到第二参数WB。之后,训练设备A将第二参数WA发送至控制设备,同样地,训练设备B将第二参数WB发送至控制设备。After that, each training device uses the local training samples to train the classification model whose parameter is set as the first parameter W0, and after training for a period of time, each training device obtains the second parameter corresponding to the locally maintained classification model. For example, in FIG. 1, training device A trains the classification model with the first parameter W0 for a period of time based on local training samples to obtain the second parameter WA, and training device B classifies the classification model with the first parameter W0 based on the local training samples After the model is trained for a period of time, the second parameter WB is obtained. Afterwards, the training device A sends the second parameter WA to the control device, and similarly, the training device B sends the second parameter WB to the control device.

其中,可选地,上述“一段时间”可以是预设的某个时长,此时,该预设时长对于多个训练设备都适用,比如所有的训练设备对具有第一参数W0的分类模型训练30分钟。可选地,“一段时间”也可以根据每个训练设备中存储的训练样本总数来确定每个训练设备各自对应的“一段时间”的长度,比如将各训练设备训练具有第一参数W0的分类模型的一段时间设置为各自对应的训练样本总数的60%。Wherein, optionally, the above-mentioned "a period of time" may be a preset period of time. In this case, the preset period of time is applicable to multiple training devices, for example, all training devices train the classification model with the first parameter W0 30 minutes. Optionally, "a period of time" can also determine the length of the "period of time" corresponding to each training device according to the total number of training samples stored in each training device, such as training each training device to have a classification with the first parameter W0. The period of time for the models is set to be 60% of the total number of training samples corresponding to each.

在控制设备接收到多个训练设备各自对应的第二参数后,合并各第二参数以得到第三参数W1。在图1中,假设控制设备合并第二参数WA和第二参数WB后得到第三参数W1,并通知多个训练设备将本地的分类模型的参数都更新为第三参数W1。After the control device receives the respective second parameters corresponding to the multiple training devices, the second parameters are combined to obtain the third parameter W1. In FIG. 1, it is assumed that the control device obtains the third parameter W1 after combining the second parameter WA and the second parameter WB, and notifies multiple training devices to update the parameters of the local classification model to the third parameter W1.

可选地,控制设备可以对多个训练设备各自对应的第二参数进行加权平均处理,以得到第三参数W1。Optionally, the control device may perform weighted average processing on the second parameters corresponding to each of the plurality of training devices to obtain the third parameter W1.

其中,每个训练设备对应的第二参数的权重可以根据该训练设备中存储的训练样本总数和/或该训练设备所对应的训练样本提供方的等级类别来确定。The weight of the second parameter corresponding to each training device may be determined according to the total number of training samples stored in the training device and/or the level category of the training sample provider corresponding to the training device.

以训练样本提供方为医疗机构为例,可以根据医疗机构对应的预设的等级类别来确定各医疗机构对应的第二参数的权重。举例来说,同一等级类别对应的权重相同,不同等级类别对应的权重不同。Taking the training sample provider as a medical institution as an example, the weight of the second parameter corresponding to each medical institution may be determined according to the preset grade category corresponding to the medical institution. For example, the weights corresponding to the same level category are the same, and the weights corresponding to different level categories are different.

当根据训练样本总数来确定各训练设备对应的第二参数的权重时,可以预先设定不同取值区间的训练样本总数所对应的权重值,据此确定各训练设备对应的第二参数的权重。When the weight of the second parameter corresponding to each training device is determined according to the total number of training samples, the weight value corresponding to the total number of training samples in different value ranges can be preset, and the weight of the second parameter corresponding to each training device can be determined accordingly. .

控制设备在得到第三参数W1后,还可以确定具有第三参数W1的分类模型是否符合设定条件,该设定条件可以是收敛条件。简单来说就是确定具有第三参数W1的分类模型是否可以普遍满足多个训练样本提供方的分类任务需求,获得良好的性能。After obtaining the third parameter W1, the control device may also determine whether the classification model with the third parameter W1 meets a set condition, and the set condition may be a convergence condition. In short, it is to determine whether the classification model with the third parameter W1 can generally meet the classification task requirements of multiple training sample providers and obtain good performance.

概括来说,控制设备可以通过控制多个训练设备对具有第三参数W1的分类模型进行测试,以确定具有第三参数W1的分类模型是否符合设定条件。测试过程可以参考图3所示实施例来执行。In general, the control device can test the classification model with the third parameter W1 by controlling a plurality of training devices to determine whether the classification model with the third parameter W1 meets the set condition. The testing process can be performed with reference to the embodiment shown in FIG. 3 .

图3为本发明实施例提供的一种模型测试方法的流程图,如图3所示,控制设备可以通过如下步骤确定具有第三参数W1的分类模型是否符合设定条件:FIG. 3 is a flowchart of a model testing method provided by an embodiment of the present invention. As shown in FIG. 3 , the control device can determine whether the classification model with the third parameter W1 meets the set conditions through the following steps:

301、控制设备将第三参数W1发送至多个训练设备,以使多个训练设备根据本地的测试样本分别对具有第三参数W1的分类模型进行测试以得到多个训练设备各自对应的测试指标。301. The control device sends the third parameter W1 to multiple training devices, so that the multiple training devices respectively test the classification model with the third parameter W1 according to local test samples to obtain respective test indicators corresponding to the multiple training devices.

302、控制设备接收多个训练设备各自对应的测试指标。302. The control device receives respective test indicators corresponding to the multiple training devices.

303、控制设备根据多个训练设备各自对应的测试指标确定具有第三参数W1的分类模型是否符合设定条件。303. The control device determines whether the classification model with the third parameter W1 meets the set condition according to the respective test indicators corresponding to the multiple training devices.

具体地,控制设备将第三参数W1发送至多个训练设备,此时,各个训练设备(如图1中的训练设备A和训练设备B)将各种存储的分类模型的参数设置为第三参数W1。之后,每个训练设备使用本地的测试样本对参数设置为第三参数W1的分类模型进行测试,以得到测试指标。测试指标可以包括分类准确率。Specifically, the control device sends the third parameter W1 to a plurality of training devices, and at this time, each training device (such as training device A and training device B in FIG. 1 ) sets the parameters of various stored classification models as the third parameter W1. After that, each training device uses the local test samples to test the classification model whose parameter is set as the third parameter W1 to obtain the test index. Test metrics may include classification accuracy.

之后,各训练设备将自身的测试指标发送至控制设备,控制设备根据多个训练设备各自对应的测试指标确定具有第三参数W1的分类模型是否符合设定条件。After that, each training device sends its own test index to the control device, and the control device determines whether the classification model with the third parameter W1 meets the set condition according to the respective test indexes corresponding to the plurality of training devices.

可选地,控制设备可以对多个训练设备各自对应的测试指标进行加权平均处理,若加权平均处理结果大于或等于设定阈值,则确定具有第三参数W1的分类模型达到设定条件。Optionally, the control device may perform weighted average processing on the test indicators corresponding to each of the multiple training devices, and if the weighted average processing result is greater than or equal to the set threshold, it is determined that the classification model with the third parameter W1 meets the set condition.

其中,可选地,控制设备可以根据如下至少一种信息确定多个训练设备各自对应的测试指标的权重:Wherein, optionally, the control device may determine the weights of the respective test indicators corresponding to the multiple training devices according to at least one of the following information:

多个训练样本提供方各自对应的训练样本数量,多个训练样本提供方各自对应的设定等级类别,多个训练设备各自对应的测试指标。The number of training samples corresponding to each of the multiple training sample providers, the set level category corresponding to each of the multiple training sample providers, and the test indicators corresponding to each of the multiple training equipment.

举例来说,针对图1中示意的训练设备A和训练设备B来说,假设训练设备A对具有第三参数W1的分类模型进行测试得到的分类准确率为Pa,训练设备B对具有第三参数W1的分类模型进行测试得到的分类准确率为Pb,且假设Pa大于Pb。假设仅基于多个训练设备各自对应的测试指标来确定多个训练设备各自对应的测试指标的权重,则可以确定Pa对应的权重为e1,Pb对应的权重为e2,其中,e1大于e2。其中,可以预先设置多个分类准确率的取值区间以及与每个取值区间对应的权重,分类准确率越高的取值区间所对应的权重越高。For example, for the training device A and the training device B shown in FIG. 1 , it is assumed that the classification accuracy obtained by the training device A testing the classification model with the third parameter W1 is Pa, and the training device B has the third parameter W1. The classification accuracy of the classification model of parameter W1 is Pb, and it is assumed that Pa is greater than Pb. Assuming that the weights of the respective test indicators corresponding to the multiple training devices are determined only based on the respective test indicators corresponding to the multiple training devices, it can be determined that the weight corresponding to Pa is e1, and the weight corresponding to Pb is e2, where e1 is greater than e2. Wherein, a plurality of value ranges of classification accuracy rates and a weight corresponding to each value range may be preset, and a value range with a higher classification accuracy rate corresponds to a higher weight.

类似地,针对训练样本提供方可能对应的等级类别来说,可以预先设置有不同的等级类别所对应的权重,据此确定多个训练设备各自对应的测试指标的权重。Similarly, for the level categories that the training sample provider may correspond to, weights corresponding to different level categories may be preset, and the weights of the respective test indicators corresponding to the multiple training devices are determined accordingly.

类似地,可以预先设置有不同数量区间的训练样本数量与权重的对应关系,据此确定多个训练设备各自对应的测试指标的权重。Similarly, the corresponding relationship between the number of training samples in different number intervals and the weights may be preset, and the weights of the test indicators corresponding to each of the plurality of training devices are determined accordingly.

控制设备在确定多个训练设备各自对应的测试指标的权重后,对多个训练设备各自对应的测试指标进行加权平均处理(即按权重进行加和后,再与训练设备总数相除),若加权平均处理结果大于或等于设定阈值,则确定具有第三参数W1的分类模型符合设定条件,反之,若小于设定阈值,则确定具有第三参数W1的分类模型不符合设定条件。After determining the weights of the respective test indicators corresponding to the multiple training devices, the control device performs weighted average processing on the respective test indicators corresponding to the multiple training devices (that is, after adding up the weights, and then dividing by the total number of training devices), if If the weighted average processing result is greater than or equal to the set threshold, it is determined that the classification model with the third parameter W1 meets the set condition; otherwise, if it is less than the set threshold, it is determined that the classification model with the third parameter W1 does not meet the set condition.

当控制设备确定具有第三参数W1的分类模型符合设定条件时,意味着具有第三参数W1的分类模型对多个训练样本提供方都表现出较佳的效果,此时,控制设备可以通知多个训练设备停止模型训练,使其使用具有第三参数W1的分类模型进行后续的分类任务处理即可,也就是说,具有第三参数W1的分类模型为最终训练得到的分类模型。When the control device determines that the classification model with the third parameter W1 meets the set conditions, it means that the classification model with the third parameter W1 shows a better effect on multiple training sample providers. At this time, the control device can notify Multiple training devices can stop model training so that they use the classification model with the third parameter W1 to process subsequent classification tasks, that is, the classification model with the third parameter W1 is the classification model obtained by final training.

当控制设备确定具有第三参数W1的分类模型不符合设定条件时,说明还需要对具有第三参数W1的分类模型继续进行训练,以优化分类模型。此时,控制设备向多个训练设备发送通知消息,以使多个训练设备基于本地的训练样本分别继续对具有第三参数的分类模型进行训练。也就是说,每个训练设备在具有第三参数W1的分类模型的基础上,使用本地的训练样本继续对具有第三参数W1的分类模型进行训练。When the control device determines that the classification model with the third parameter W1 does not meet the set condition, it means that the classification model with the third parameter W1 needs to be further trained to optimize the classification model. At this time, the control device sends a notification message to the multiple training devices, so that the multiple training devices respectively continue to train the classification model with the third parameter based on the local training samples. That is, each training device continues to train the classification model with the third parameter W1 by using the local training samples based on the classification model with the third parameter W1.

多个训练设备使用各自的训练样本对具有第三参数W1的分类模型训练一段时间后,多个训练设备会分别得到各自对应的第四参数,之后,将第四参数发送至控制设备,控制设备合并多个训练设备各自对应的第四参数,以得到第五参数。之后,控制设备控制多个训练设备对具有第五参数的分类模型进行测试,以确定具有第五参数的分类模型是否符合设定条件。上述执行过程可以参考上文中的相关说明,在此不赘述。可以理解的是,上述训练、测试过程不断迭代执行,直到训练出符合设定条件的具有某种参数的分类模型为止。After a plurality of training devices use their respective training samples to train the classification model with the third parameter W1 for a period of time, the plurality of training devices will obtain their corresponding fourth parameters respectively, and then send the fourth parameters to the control device, and the control device The fourth parameters corresponding to each of the multiple training devices are combined to obtain the fifth parameter. After that, the control device controls a plurality of training devices to test the classification model with the fifth parameter to determine whether the classification model with the fifth parameter meets the set condition. For the above execution process, reference may be made to the relevant descriptions above, which will not be repeated here. It is understandable that the above training and testing processes are performed iteratively until a classification model with certain parameters that meets the set conditions is trained.

综上,在联邦学习方式下,多个训练设备被控制设备控制以并行的方式对分类模型进行训练,使得训练时间成本不受训练样本提供方的数量的制约。另外,通过调度多个训练设备同时对分类模型在本地进行训练,使得分类模型不在不同训练设备间传递,有助于保护不同训练样本提供方的数据安全。另外,由于分类模型训练过程中,融合了多个训练样本提供方的数据分布特征来确定分类模型的参数,使得最终得到的分类模型在多个训练样本提供方间具有良好的通用性,可以获得较佳的性能。To sum up, in the federated learning mode, multiple training devices are controlled by the control device to train the classification model in parallel, so that the training time cost is not restricted by the number of training sample providers. In addition, by scheduling multiple training devices to train the classification model locally at the same time, the classification model is not transferred between different training devices, which helps to protect the data security of different training sample providers. In addition, during the training process of the classification model, the data distribution characteristics of multiple training sample providers are combined to determine the parameters of the classification model, so that the final classification model has good generality among multiple training sample providers, and can obtain better performance.

图4为本发明实施例提供的一种模型训练方法的流程图,该方法可以由控制设备执行,如图4所示,该方法可以包括如下步骤:FIG. 4 is a flowchart of a model training method provided by an embodiment of the present invention. The method may be executed by a control device. As shown in FIG. 4 , the method may include the following steps:

401、控制设备将分类模型的第一参数发送至多个训练设备,以使多个训练设备基于第一参数和本地的训练样本分别对分类模型进行训练以得到多个训练设备各自对应的第二参数。401. The control device sends the first parameter of the classification model to multiple training devices, so that the multiple training devices respectively train the classification model based on the first parameter and the local training samples to obtain second parameters corresponding to each of the multiple training devices. .

402、控制设备接收多个训练设备各自对应的加密的第二参数。402. The control device receives the encrypted second parameters corresponding to each of the multiple training devices.

403、控制设备将多个训练设备各自对应的加密的第二参数发送至可信执行空间中,以在可信执行空间中解密出多个训练设备各自对应的第二参数并对多个训练设备各自对应的第二参数进行变换处理。403. The control device sends the encrypted second parameters corresponding to the multiple training devices to the trusted execution space, so as to decrypt the second parameters corresponding to the multiple training devices in the trusted execution space, and perform the operation of the multiple training devices. The corresponding second parameters are transformed.

404、控制设备合并多个训练设备各自对应的变换后的第二参数以得到所述第三参数,通知多个训练设备将分类模型的参数更新为第三参数。404. The control device merges the transformed second parameters corresponding to each of the multiple training devices to obtain the third parameter, and notifies the multiple training devices to update the parameters of the classification model to the third parameters.

为了进一步提高多个训练样本提供方的数据安全性,提供了本实施例的解决方案。In order to further improve the data security of multiple training sample providers, the solution of this embodiment is provided.

本实施例中,提高多个训练样本提供方的数据安全性的核心点在于:每个训练样本提供方对应的训练设备在基于本地的训练样本对分类模型进行训练得到分类模型的参数后,后续该参数的传输过程中要保证该参数的安全性,以避免基于该参数反推出训练样本提供方的数据分布特征。In this embodiment, the core point of improving the data security of multiple training sample providers is that after the training device corresponding to each training sample provider trains the classification model based on the local training samples to obtain the parameters of the classification model, the subsequent During the transmission of the parameter, the security of the parameter should be ensured to avoid inferring the data distribution characteristics of the training sample provider based on the parameter.

承接于前述实施例,具体来说,当各训练设备接收到控制设备发送的第一参数,使用本地的训练样本对具有第一参数的分类模型进行一段时间的训练得到对应的第二参数后,将第二参数加密传输至控制设备。Continuing from the previous embodiment, specifically, when each training device receives the first parameter sent by the control device, and uses the local training samples to train the classification model with the first parameter for a period of time to obtain the corresponding second parameter, The second parameter is encrypted and transmitted to the control device.

仍以前述实施例中的举例来说,训练设备A在得到第二参数WA后,对第二参数WA加密,得到加密的第二参数WA’,将加密的第二参数WA’发送至控制设备。同样地,训练设备B在得到第二参数WB后,对第二参数WB加密,得到加密的第二参数WB’,将加密的第二参数WB’发送至控制设备。加密方式可以采用目前已经存在的任一种加密方式,比如非对称加密。Still taking the example in the foregoing embodiment, after obtaining the second parameter WA, the training device A encrypts the second parameter WA, obtains the encrypted second parameter WA', and sends the encrypted second parameter WA' to the control device. . Similarly, after obtaining the second parameter WB, the training device B encrypts the second parameter WB to obtain the encrypted second parameter WB', and sends the encrypted second parameter WB' to the control device. The encryption method can be any existing encryption method, such as asymmetric encryption.

控制设备没有对加密的第二参数WA’和加密的第二参数WB’直接进行解密的权限,因为如果控制设备直接进行解密得到明文的第二参数WA和第二参数WB,将对这两个训练设备对应的训练样本提供方造成数据安全威胁。The control device does not have the right to directly decrypt the encrypted second parameter WA' and the encrypted second parameter WB', because if the control device directly decrypts the second parameter WA and the second parameter WB in plaintext, the two The training sample provider corresponding to the training device poses a data security threat.

具体地,控制设备将加密的第二参数WA’和加密的第二参数WB’发送至一个可信执行空间内,在该可信执行空间内解密出第二参数WA和第二参数WB,由于第二参数WA和第二参数WB位于可信执行空间内,不能被外界访问,所以不会存在泄漏第二参数WA和第二参数WB的问题。另外,在该可信执行空间内进一步对第二参数WA和第二参数WB进行某种设定的变换处理,将变换处理结果反馈给控制设备,假设对第二参数WA进行变换处理后得到变换后的第二参数WAA,对第二参数WB进行变换处理后得到变换后的第二参数WBB。这样,控制设备得到的变换后的变换后的第二参数WAA和变换后的第二参数WBB,不直接得到明文的第二参数WA和第二参数WB。Specifically, the control device sends the encrypted second parameter WA' and the encrypted second parameter WB' to a trusted execution space, and decrypts the second parameter WA and the second parameter WB in the trusted execution space, because The second parameter WA and the second parameter WB are located in the trusted execution space and cannot be accessed by the outside world, so there is no problem of leaking the second parameter WA and the second parameter WB. In addition, the second parameter WA and the second parameter WB are further subjected to a certain set of transformation processing in the trusted execution space, and the transformation processing result is fed back to the control device. It is assumed that the second parameter WA is transformed after transformation processing. After transforming the second parameter WAA, the second parameter WB is transformed to obtain the transformed second parameter WBB. In this way, the transformed second parameter WAA and the transformed second parameter WBB obtained by the control device do not directly obtain the plaintext second parameter WA and the second parameter WB.

之后,控制设备合并变换后的第二参数WAA和变换后的第二参数WBB,以得到第三参数,将第三参数发送至各训练设备。After that, the control device combines the transformed second parameter WAA and the transformed second parameter WBB to obtain a third parameter, and sends the third parameter to each training device.

其中,可选地,上述变换处理可以包括:差分隐私处理。当然,不以此为限,还可以采用其他变换处理方式。但是,值得说明的是,不管采用哪种变换处理方式,其目的有两种:第一,不传递明文的第二参数;第二,变换后的第二参数所反映出的训练样本的数据分布特征与未变换的第二参数所反映出的训练样本的数据分布特征相同或相似。也就是说,满足上述两种条件的变换处理方式都可以被采用。Wherein, optionally, the above transformation processing may include: differential privacy processing. Of course, it is not limited to this, and other transformation processing methods may also be used. However, it is worth noting that no matter which transformation method is adopted, there are two purposes: first, the second parameter of the plaintext is not transmitted; second, the data distribution of the training samples reflected by the transformed second parameter The features are the same as or similar to the data distribution features of the training samples reflected by the untransformed second parameter. That is to say, the transformation processing methods that satisfy the above two conditions can be adopted.

实际应用中,上述可信执行空间可以采用现有的任一种可信计算技术实现,比如SGX(software guard extensions)。In practical applications, the above-mentioned trusted execution space can be implemented by any existing trusted computing technology, such as SGX (software guard extensions).

图5为本发明实施例提供的一种模型训练方法的流程图,该方法可以由目标训练设备执行,如图5所示,该方法可以包括如下步骤:FIG. 5 is a flowchart of a model training method provided by an embodiment of the present invention. The method may be executed by a target training device. As shown in FIG. 5 , the method may include the following steps:

501、目标训练设备接收控制设备发送的分类模型的第一参数,控制设备与多个训练设备连接,目标训练设备是多个训练设备中的任一个。501. The target training device receives the first parameter of the classification model sent by the control device, the control device is connected to multiple training devices, and the target training device is any one of the multiple training devices.

如前文所述,可选地,目标训练设备此前还可以接收控制设备发送的数据处理信息,根据接收的数据处理信息对本地的训练样本进行数据处理。该数据处理信息中包括训练样本对应的标注信息。As described above, optionally, the target training device may also receive data processing information sent by the control device before, and perform data processing on the local training samples according to the received data processing information. The data processing information includes labeling information corresponding to the training samples.

可选地,该数据处理信息中还包括如下至少一种信息:Optionally, the data processing information also includes at least one of the following information:

数据结构化处理信息,用于对每个训练样本中包含的数据进行设定的结构化处理;Data structuring processing information, which is used to perform set structuring processing on the data contained in each training sample;

数据过滤规则信息,用于对不符合设定要求的训练样本进行过滤处理。Data filtering rule information, which is used to filter training samples that do not meet the set requirements.

502、目标训练设备基于第一参数和本地的训练样本对分类模型进行训练以得到目标训练设备对应的第二参数。502. The target training device trains the classification model based on the first parameter and the local training sample to obtain the second parameter corresponding to the target training device.

503、目标训练设备将自身对应的第二参数发送至控制设备,以使控制设备合并多个训练设备各自对应的第二参数以得到第三参数,其中,多个训练设备基于第一参数和本地的训练样本分别对分类模型进行训练以得到多个训练设备各自对应的第二参数。503. The target training device sends the second parameter corresponding to itself to the control device, so that the control device merges the second parameters corresponding to each of the multiple training devices to obtain the third parameter, wherein the multiple training devices are based on the first parameter and the local The training samples of the training samples respectively train the classification model to obtain the second parameters corresponding to each of the multiple training devices.

如前文所述,可选地,目标训练设备可以对自身对应的第二参数进行加密,之后将目标训练设备对应的加密的第二参数发送至控制设备。其他训练设备同理。As described above, optionally, the target training device may encrypt the second parameter corresponding to itself, and then send the encrypted second parameter corresponding to the target training device to the control device. The same goes for other training equipment.

504、目标训练设备响应于控制设备的通知,将分类模型的参数更新为第三参数。504. The target training device updates the parameter of the classification model to the third parameter in response to the notification from the control device.

如前文所述,控制设备还需要确定具有第三参数的分类模型是否符合设定条件,该确定过程是通过控制多个训练设备对具有第三参数的分类模型进行测试来实现的。为完成该测试过程,目标训练设备需执行如下步骤:As mentioned above, the control device also needs to determine whether the classification model with the third parameter meets the set condition, and the determination process is realized by controlling a plurality of training devices to test the classification model with the third parameter. To complete this testing process, the target training device performs the following steps:

根据本地的测试样本对具有第三参数的分类模型进行测试以得到目标训练设备对应的测试指标;Test the classification model with the third parameter according to the local test sample to obtain the test index corresponding to the target training device;

将目标训练设备对应的测试指标发送至控制设备,以使控制设备根据多个训练设备各自对应的测试指标确定具有第三参数的分类模型是否符合设定条件,其中,多个训练设备根据本地的测试样本分别对具有第三参数的分类模型进行测试以得到多个训练设备各自对应的测试指标。The test index corresponding to the target training device is sent to the control device, so that the control device determines whether the classification model with the third parameter meets the set condition according to the test index corresponding to each of the multiple training devices, wherein the multiple training devices are based on the local The test samples respectively test the classification model with the third parameter to obtain respective test indicators corresponding to the plurality of training devices.

如前文所述,如果控制设备确定具有第三参数的分类模型符合设定条件,则通知包括目标训练设备在内的各训练设备,使用该具有第三参数的分类模型进行各种的分类任务。相反地,如果控制设备确定具有第三参数的分类模型不符合设定条件,则将第三参数发送至各训练设备。此时,目标训练设备接收控制设备在确定具有第三参数的分类模型不符合设定条件时发送的第三参数,进而基于该第三参数和本地的训练样本继续对分类模型进行训练。As mentioned above, if the control device determines that the classification model with the third parameter meets the set condition, it notifies each training device including the target training device to use the classification model with the third parameter to perform various classification tasks. Conversely, if the control device determines that the classification model with the third parameter does not meet the set condition, the third parameter is sent to each training device. At this time, the target training device receives the third parameter sent by the control device when it is determined that the classification model with the third parameter does not meet the set condition, and then continues to train the classification model based on the third parameter and the local training samples.

本实施例中,目标训练设备在分类模型训练过程中的详细执行过程可以参考前述实施例中的相关说明,在此不赘述。In this embodiment, for the detailed execution process of the target training device in the classification model training process, reference may be made to the relevant descriptions in the foregoing embodiments, and details are not described herein.

本发明实施例提供的分类模型的训练方案可以适用于任何需要联合多个训练样本提供方各自提供的训练样本完成共用的一个分类模型的训练的应用场景中。比如前文中提到的DGRs应用场景中。The training solution for the classification model provided by the embodiment of the present invention may be applicable to any application scenario that needs to complete the training of a shared classification model by combining the training samples provided by multiple training sample providers. For example, in the DGRs application scenario mentioned above.

在DGRs应用场景中,需要训练一个诊断相关分类模型,为完成该分类模型的训练,如图6所示,控制设备需要执行如下步骤:In the DGRs application scenario, a diagnosis-related classification model needs to be trained. To complete the training of the classification model, as shown in Figure 6, the control device needs to perform the following steps:

601、控制设备将分类模型的第一参数发送至多个训练设备,以使多个训练设备基于第一参数和本地的训练样本分别述分类模型进行训练以得到多个训练设备各自对应的第二参数,多个训练设备中均设有该分类模型,多个训练设备与多个医疗机构对应。601. The control device sends the first parameter of the classification model to multiple training devices, so that the multiple training devices respectively describe the classification model for training based on the first parameter and the local training samples to obtain the respective second parameters of the multiple training devices. , the classification model is provided in multiple training devices, and multiple training devices correspond to multiple medical institutions.

602、控制设备接收多个训练设备各自对应的第二参数。602. The control device receives second parameters corresponding to each of the multiple training devices.

603、控制设备合并多个训练设备各自对应的第二参数以得到第三参数,通知多个训练设备将分类模型的参数更新为第三参数。603. The control device merges the second parameters corresponding to the multiple training devices to obtain the third parameter, and notifies the multiple training devices to update the parameters of the classification model to the third parameters.

对应地,为完成该分类模型的训练,如图7所示,多个训练设备中的目标训练设备需要执行如下步骤:Correspondingly, in order to complete the training of the classification model, as shown in FIG. 7 , the target training device among the multiple training devices needs to perform the following steps:

701、目标训练设备接收控制设备发送的分类模型的第一参数,控制设备与多个训练设备连接,目标训练设备是多个训练设备中的任一个,多个训练设备与多个医疗机构对应。701. The target training device receives the first parameter of the classification model sent by the control device, the control device is connected to multiple training devices, the target training device is any one of the multiple training devices, and the multiple training devices correspond to multiple medical institutions.

702、目标训练设备基于第一参数和本地的训练样本对分类模型进行训练以得到目标训练设备对应的第二参数。702. The target training device trains the classification model based on the first parameters and local training samples to obtain second parameters corresponding to the target training device.

703、目标训练设备将目标训练设备对应的第二参数发送至控制设备,以使控制设备合并多个训练设备各自对应的第二参数以得到第三参数,其中,多个训练设备基于第一参数和本地的训练样本分别对分类模型进行训练以得到多个训练设备各自对应的第二参数。703. The target training device sends the second parameter corresponding to the target training device to the control device, so that the control device merges the second parameters corresponding to each of the multiple training devices to obtain the third parameter, wherein the multiple training devices are based on the first parameter. The classification model is trained separately with the local training samples to obtain second parameters corresponding to each of the multiple training devices.

704、响应于控制设备的通知,目标训练设备将分类模型的参数更新为第三参数。704. In response to the notification from the control device, the target training device updates the parameter of the classification model to the third parameter.

下面结合图8示例性说明在DGRs应用场景中本发明实施例提供的模型训练方法的执行过程。The following exemplarily describes the execution process of the model training method provided by the embodiment of the present invention in the DGRs application scenario with reference to FIG. 8 .

在图8中,假设需要联合医疗机构X和医疗机构Y各自的医疗数据完成用于实现DGRs预测的分类模型。In Figure 8, it is assumed that the respective medical data of medical institution X and medical institution Y need to be combined to complete the classification model for realizing DGRs prediction.

初始阶段,假设已经创建了分类模型,并且控制设备初始化分类模型的参数为第一参数C1,控制设备将第一参数C1发送至医疗机构X和医疗机构Y,医疗机构X和医疗机构Y将本地维护的分类模型的参数设置为第一参数C1,之后医疗机构X和医疗机构Y使用各自本地的医疗数据(训练样本)对具有第一参数C1的分类模型进行训练。训练一段时间后,医疗机构X得到第二参数CA2,医疗机构Y得到第二参数CB2,医疗机构X将第二参数CA2加密传输至控制设备,医疗机构Y将第二参数CB2加密传输至控制设备。In the initial stage, it is assumed that the classification model has been created, and the parameter of the control device to initialize the classification model is the first parameter C1, and the control device sends the first parameter C1 to medical institution X and medical institution Y, and medical institution X and medical institution Y send the local The parameters of the maintained classification model are set as the first parameter C1, and then the medical institution X and the medical institution Y use their respective local medical data (training samples) to train the classification model with the first parameter C1. After a period of training, medical institution X obtains the second parameter CA2, medical institution Y obtains the second parameter CB2, medical institution X encrypts and transmits the second parameter CA2 to the control device, and medical institution Y encrypts and transmits the second parameter CB2 to the control device .

控制设备将得到的加密参数发送至可信执行空间,在可信执行空间内解密出第二参数CA2和第二参数CB2,并通过隐私差分方式分别对这两个第二参数进行处理,得到第二参数CA2’和第二参数CB2’。The control device sends the obtained encryption parameters to the trusted execution space, decrypts the second parameter CA2 and the second parameter CB2 in the trusted execution space, and processes the two second parameters respectively through the privacy differential method to obtain the first parameter. The second parameter CA2' and the second parameter CB2'.

控制设备获得可信执行空间内计算出的第二参数CA2’和第二参数CB2’,合并这两个参数以得到第三参数C2。并将第三参数C2发送至医疗机构X和医疗机构Y,命令医疗机构X和医疗机构Y对具有第三参数C2的分类模型进行测试。The control device obtains the second parameter CA2' and the second parameter CB2' calculated in the trusted execution space, and combines these two parameters to obtain the third parameter C2. The third parameter C2 is sent to the medical institution X and the medical institution Y, and the medical institution X and the medical institution Y are ordered to test the classification model with the third parameter C2.

医疗机构X和医疗机构Y使用各自本地的测试数据对具有第三参数C2的分类模型进行测试,得到分类准确率PA和PB,并将分类准确率发送至控制设备。Medical institution X and medical institution Y use their respective local test data to test the classification model with the third parameter C2, obtain the classification accuracy rates PA and PB, and send the classification accuracy rates to the control device.

控制设备基于分类准确率PA和PB确定具有第三参数C2的分类模型符合条件,则通知医疗机构X和医疗机构Y使用具有第三参数C2的分类模型完成后续的DGRs预测任务。The control device determines that the classification model with the third parameter C2 meets the conditions based on the classification accuracy rates PA and PB, and notifies the medical institution X and the medical institution Y to use the classification model with the third parameter C2 to complete the subsequent DGRs prediction task.

这样,假设医疗机构X后续产生医疗数据,在需要对该医疗数据进行DGRs预测时,将该医疗数据输入具有第三参数C2的分类模型,获得该分类模型的分类输出结果。In this way, assuming that medical institution X generates medical data subsequently, when the medical data needs to be predicted by DGRs, the medical data is input into the classification model with the third parameter C2, and the classification output result of the classification model is obtained.

本发明实施例提供的模型训练方案,不仅可以适用于DRGs的应用场景中,还可以适用于其他应用场景中。比如在金融场景中,出于数据安全原因,不同金融机构的数据也是独立隔离存储的,当需要联合多个金融机构的数据来训练一个可以适用于各金融机构的数据处理(如数据分类)的模型时,同样可以适用于本发明实施例提供的方案。再比如在政务场景中,不同政务系统之间的数据也是相互独立的,再比如在电商场景中,不同商家的数据也是独立的。当需要联合多个政务系统或者多个商家的数据进行某种模型的训练时,都可以采用本发明实施例提供的方案。The model training scheme provided by the embodiments of the present invention can be applied not only to the application scenarios of DRGs, but also to other application scenarios. For example, in financial scenarios, for data security reasons, the data of different financial institutions are also stored independently and in isolation. When it is necessary to combine the data of multiple financial institutions to train a data processing system (such as data classification) that can be applied to each financial institution When the model is used, the solution provided by the embodiment of the present invention can also be applied. For another example, in the government affairs scenario, the data between different government affairs systems are also independent of each other, and in the e-commerce scenario, the data of different businesses are also independent. When it is necessary to combine the data of multiple government affairs systems or multiple merchants to train a certain model, the solution provided by the embodiment of the present invention can be adopted.

以下将详细描述本发明的一个或多个实施例的模型训练装置。本领域技术人员可以理解,这些装置均可使用市售的硬件组件通过本方案所教导的步骤进行配置来构成。The model training apparatus of one or more embodiments of the present invention will be described in detail below. Those skilled in the art can understand that these devices can be configured by using commercially available hardware components through the steps taught in this solution.

图9为本发明实施例提供的一种模型训练装置的结构示意图,该装置应用于控制设备。如图9所示,该装置包括:发送模块11、接收模块12、处理模块13。FIG. 9 is a schematic structural diagram of a model training apparatus according to an embodiment of the present invention, where the apparatus is applied to a control device. As shown in FIG. 9 , the apparatus includes: a sending module 11 , a receiving module 12 , and a processing module 13 .

发送模块11,用于将分类模型的第一参数发送至多个训练设备,以使所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数,所述多个训练设备中均设有所述分类模型。The sending module 11 is configured to send the first parameter of the classification model to multiple training devices, so that the multiple training devices respectively train the classification model based on the first parameter and local training samples to obtain the The second parameter corresponding to each of the plurality of training devices, and the classification model is provided in each of the plurality of training devices.

接收模块12,用于接收所述多个训练设备各自对应的第二参数。The receiving module 12 is configured to receive the respective second parameters corresponding to the multiple training devices.

处理模块13,用于合并所述多个训练设备各自对应的第二参数以得到第三参数。The processing module 13 is configured to combine the respective second parameters corresponding to the multiple training devices to obtain the third parameter.

所述发送模块11还用于:通知所述多个训练设备将所述分类模型的参数更新为所述第三参数。The sending module 11 is further configured to: notify the plurality of training devices to update the parameters of the classification model to the third parameters.

可选地,处理模块13具体用于:对所述多个训练设备各自对应的第二参数进行加权平均处理,以得到所述第三参数。Optionally, the processing module 13 is specifically configured to: perform weighted average processing on the second parameters corresponding to the plurality of training devices to obtain the third parameter.

可选地,接收模块12具体用于:接收所述多个训练设备各自对应的加密的第二参数。此时,处理模块13具体用于:将所述多个训练设备各自对应的加密的第二参数发送至可信执行空间中,以在所述可信执行空间中解密出所述多个训练设备各自对应的第二参数并对所述多个训练设备各自对应的第二参数进行变换处理;合并多个训练设备各自对应的变换后的第二参数以得到所述第三参数。Optionally, the receiving module 12 is specifically configured to: receive the encrypted second parameters corresponding to each of the multiple training devices. At this time, the processing module 13 is specifically configured to: send the encrypted second parameters corresponding to the multiple training devices to the trusted execution space, so as to decrypt the multiple training devices in the trusted execution space Transform the second parameters corresponding to each of the multiple training devices, and combine the transformed second parameters corresponding to the multiple training devices to obtain the third parameter.

其中,可选地,所述变换处理包括:差分隐私处理。Wherein, optionally, the transformation processing includes: differential privacy processing.

可选地,所述发送模块11还用于:若确定具有所述第三参数的所述分类模型不符合所述设定条件,则通知所述多个训练设备基于本地的训练样本继续对所述分类模型进行训练。Optionally, the sending module 11 is further configured to: if it is determined that the classification model with the third parameter does not meet the set condition, notify the plurality of training devices to continue the training of all training samples based on the local training samples. The classification model is trained.

可选地,所述发送模块11还用于:若确定具有所述第三参数的所述分类模型符合设定条件,则通知所述多个训练设备停止所述分类模型的训练。Optionally, the sending module 11 is further configured to: if it is determined that the classification model with the third parameter meets the set condition, notify the plurality of training devices to stop the training of the classification model.

可选地,所述接收模块12还用于:接收所述多个训练设备各自对应的测试指标,其中,所述多个训练设备根据本地的测试样本分别对具有所述第三参数的所述分类模型进行测试以得到所述多个训练设备各自对应的测试指标。所述处理模块13还用于:根据所述多个训练设备各自对应的测试指标确定具有所述第三参数的所述分类模型是否符合所述设定条件。Optionally, the receiving module 12 is further configured to: receive respective test indicators corresponding to the plurality of training devices, wherein the plurality of training devices respectively measure the parameters having the third parameter according to local test samples. The classification model is tested to obtain respective test indicators corresponding to the plurality of training devices. The processing module 13 is further configured to: determine whether the classification model with the third parameter meets the set condition according to the respective test indicators corresponding to the multiple training devices.

其中,可选地,所述处理模块13具体用于:对所述多个训练设备各自对应的测试指标进行加权平均处理;若所述加权平均处理结果大于或等于设定阈值,则确定具有所述第三参数的所述分类模型达到所述设定条件。Wherein, optionally, the processing module 13 is specifically configured to: perform weighted average processing on the respective corresponding test indicators of the multiple training devices; if the weighted average processing result is greater than or equal to a set threshold, determine that the The classification model of the third parameter reaches the set condition.

可选地,所述处理模块13具体用于:根据如下至少一种信息确定所述多个训练设备各自对应的测试指标的权重:Optionally, the processing module 13 is specifically configured to: determine the weights of the respective test indicators corresponding to the multiple training devices according to at least one of the following information:

所述多个训练样本提供方各自对应的训练样本数量,所述多个训练样本提供方各自对应的设定等级类别,所述多个训练设备各自对应的测试指标。The number of training samples corresponding to each of the plurality of training sample providers, the set level category corresponding to each of the plurality of training sample providers, and the test indicators corresponding to each of the plurality of training devices.

可选地,所述发送模块11还用于:向所述多个训练设备发送数据处理信息,以使所述多个训练设备根据所述数据处理信息对本地的训练样本进行数据处理,所述数据处理信息中包括训练样本对应的标注信息。Optionally, the sending module 11 is further configured to: send data processing information to the multiple training devices, so that the multiple training devices perform data processing on local training samples according to the data processing information, the The data processing information includes labeling information corresponding to the training samples.

可选地,所述数据处理信息中还包括如下至少一种信息:Optionally, the data processing information also includes at least one of the following information:

数据结构化处理信息,用于对每个训练样本中包含的数据进行设定的结构化处理;Data structuring processing information, which is used to perform set structuring processing on the data contained in each training sample;

数据过滤规则信息,用于对不符合设定要求的训练样本进行过滤处理。Data filtering rule information, which is used to filter training samples that do not meet the set requirements.

可选地,所述多个训练设备与多个训练样本提供方对应。其中,可选地,所述多个训练样本提供方包括多个医疗机构,所述分类模型用于完成诊断相关分类。Optionally, the multiple training devices correspond to multiple training sample providers. Wherein, optionally, the multiple training sample providers include multiple medical institutions, and the classification model is used to complete diagnosis-related classification.

图9所示装置可以执行前述图2至图4所示实施例中提供的模型训练方法,详细的执行过程和技术效果参见前述实施例中的描述,在此不再赘述。The apparatus shown in FIG. 9 may execute the model training method provided in the embodiments shown in FIG. 2 to FIG. 4 . For the detailed execution process and technical effects, refer to the descriptions in the foregoing embodiments, which will not be repeated here.

在一个可能的设计中,上述图9所示模型训练装置的结构可实现为一电子设备,如图10所示,该电子设备可以包括:第一处理器21、第一存储器22。其中,第一存储器22上存储有可执行代码,当所述可执行代码被第一处理器21执行时,使第一处理器21至少可以实现如前述图2至图4所示实施例中提供的模型训练方法。In a possible design, the structure of the model training apparatus shown in FIG. 9 may be implemented as an electronic device. As shown in FIG. 10 , the electronic device may include: a first processor 21 and a first memory 22 . The first memory 22 stores executable codes, and when the executable codes are executed by the first processor 21, the first processor 21 can at least implement the above-mentioned provision in the embodiments shown in FIG. 2 to FIG. 4 . model training method.

可选地,该电子设备中还可以包括第一通信接口23,用于与其他设备进行通信。Optionally, the electronic device may further include a first communication interface 23 for communicating with other devices.

另外,本发明实施例提供了一种非暂时性机器可读存储介质,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器至少可以实现如前述图2至图4所示实施例中提供的模型训练方法。In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium, where executable codes are stored on the non-transitory machine-readable storage medium, and when the executable codes are executed by a processor of an electronic device , so that the processor can at least implement the model training method provided in the foregoing embodiments shown in FIG. 2 to FIG. 4 .

另外,本发明实施例提供了一种应用程序,当所述应用程序被电子设备的处理器执行时,使所述处理器执行如前述图2至图4所示实施例中提供的模型训练方法。In addition, an embodiment of the present invention provides an application program. When the application program is executed by a processor of an electronic device, the processor is caused to execute the model training method provided in the embodiments shown in the foregoing FIG. 2 to FIG. 4 . .

图11为本发明实施例提供的一种模型训练装置的结构示意图,该装置应用于目标训练设备。如图11所示,该装置包括:接收模块31、训练模块32、发送模块33、更新模块34。FIG. 11 is a schematic structural diagram of a model training apparatus according to an embodiment of the present invention, where the apparatus is applied to a target training device. As shown in FIG. 11 , the apparatus includes: a receiving module 31 , a training module 32 , a sending module 33 , and an updating module 34 .

接收模块31,用于接收控制设备发送的分类模型的第一参数,所述控制设备与多个训练设备连接,所述目标训练设备是所述多个训练设备中的任一个。The receiving module 31 is configured to receive the first parameter of the classification model sent by the control device, the control device is connected to multiple training devices, and the target training device is any one of the multiple training devices.

训练模块32,用于基于所述第一参数和本地的训练样本对所述分类模型进行训练以得到所述目标训练设备对应的第二参数。A training module 32, configured to train the classification model based on the first parameters and local training samples to obtain second parameters corresponding to the target training device.

发送模块33,用于将所述目标训练设备对应的第二参数发送至所述控制设备,以使所述控制设备合并所述多个训练设备各自对应的第二参数以得到第三参数,其中,所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数。A sending module 33, configured to send the second parameter corresponding to the target training device to the control device, so that the control device combines the second parameters corresponding to the multiple training devices to obtain the third parameter, wherein , the multiple training devices respectively train the classification model based on the first parameters and local training samples to obtain second parameters corresponding to the multiple training devices.

更新模块34,用于响应于所述控制设备的通知,将所述分类模型的参数更新为所述第三参数。The updating module 34 is configured to update the parameter of the classification model to the third parameter in response to the notification from the control device.

可选地,所述装置还包括:加密模块,用于对所述目标训练设备对应的第二参数进行加密。此时,所述发送模块33具体用于:将所述目标训练设备对应的加密的第二参数发送至所述控制设备。Optionally, the apparatus further includes: an encryption module configured to encrypt the second parameter corresponding to the target training device. At this time, the sending module 33 is specifically configured to: send the encrypted second parameter corresponding to the target training device to the control device.

可选地,所述训练模块32还用于:根据本地的测试样本对具有所述第三参数的所述分类模型进行测试以得到所述目标训练设备对应的测试指标。所述发送模块33还用于:将所述目标训练设备对应的测试指标发送至所述控制设备,以使所述控制设备根据所述多个训练设备各自对应的测试指标确定具有所述第三参数的所述分类模型是否符合设定条件,其中,所述多个训练设备根据本地的测试样本分别对具有所述第三参数的所述分类模型进行测试以得到所述多个训练设备各自对应的测试指标。Optionally, the training module 32 is further configured to: test the classification model with the third parameter according to a local test sample to obtain a test index corresponding to the target training device. The sending module 33 is further configured to: send the test index corresponding to the target training device to the control device, so that the control device determines, according to the test index corresponding to each of the plurality of training devices, that the third device has the third parameter. Whether the classification model of the parameter meets the set condition, wherein the plurality of training devices respectively test the classification model with the third parameter according to local test samples to obtain the corresponding corresponding test indicators.

可选地,所述接收模块31还用于:接收所述控制设备发送的数据处理信息。所述装置还包括:数据处理模块,用于根据所述数据处理信息对本地的训练样本进行数据处理,所述数据处理信息中包括训练样本对应的标注信息。Optionally, the receiving module 31 is further configured to: receive the data processing information sent by the control device. The device further includes: a data processing module configured to perform data processing on the local training samples according to the data processing information, where the data processing information includes label information corresponding to the training samples.

可选地,所述数据处理信息中还包括如下至少一种信息:Optionally, the data processing information also includes at least one of the following information:

数据结构化处理信息,用于对每个训练样本中包含的数据进行设定的结构化处理;Data structuring processing information, which is used to perform set structuring processing on the data contained in each training sample;

数据过滤规则信息,用于对不符合设定要求的训练样本进行过滤处理。Data filtering rule information, which is used to filter training samples that do not meet the set requirements.

图11所示装置可以执行前述图5所示实施例中提供的模型训练方法,详细的执行过程和技术效果参见前述实施例中的描述,在此不再赘述。The apparatus shown in FIG. 11 can execute the model training method provided in the embodiment shown in FIG. 5. For the detailed execution process and technical effect, refer to the description in the foregoing embodiment, and details are not repeated here.

在一个可能的设计中,上述图11所示模型训练装置的结构可实现为一电子设备,如图12所示,该电子设备可以包括:第二处理器41、第二存储器42。其中,第二存储器42上存储有可执行代码,当所述可执行代码被第二处理器41执行时,使第二处理器41至少可以实现如前述图5实施例中提供的模型训练方法。In a possible design, the structure of the model training apparatus shown in FIG. 11 may be implemented as an electronic device. As shown in FIG. 12 , the electronic device may include: a second processor 41 and a second memory 42 . The second memory 42 stores executable codes, and when the executable codes are executed by the second processor 41 , the second processor 41 can at least implement the model training method provided in the foregoing embodiment in FIG. 5 .

可选地,该电子设备中还可以包括第二通信接口43,用于与其他设备进行通信。Optionally, the electronic device may further include a second communication interface 43 for communicating with other devices.

另外,本发明实施例提供了一种非暂时性机器可读存储介质,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器至少可以实现如前述图5实施例中提供的模型训练方法。In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium, where executable codes are stored on the non-transitory machine-readable storage medium, and when the executable codes are executed by a processor of an electronic device , so that the processor can at least implement the model training method provided in the foregoing embodiment in FIG. 5 .

另外,本发明实施例提供了一种应用程序,当所述应用程序被电子设备的处理器执行时,使所述处理器执行如前述图5所示实施例中提供的模型训练方法。In addition, an embodiment of the present invention provides an application program, and when the application program is executed by a processor of an electronic device, the processor is caused to execute the model training method provided in the embodiment shown in the foregoing FIG. 5 .

图13为本发明实施例提供的一种诊断相关分类模型训练装置的结构示意图,该装置应用于控制设备。如图13所示,该装置包括:发送模块51、接收模块52、合并模块53。FIG. 13 is a schematic structural diagram of an apparatus for training a diagnosis-related classification model according to an embodiment of the present invention, where the apparatus is applied to a control device. As shown in FIG. 13 , the apparatus includes: a sending module 51 , a receiving module 52 , and a combining module 53 .

发送模块51,用于将分类模型的第一参数发送至多个训练设备,以使所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数,所述多个训练设备中均设有所述分类模型,所述多个训练设备与多个医疗机构对应。The sending module 51 is configured to send the first parameter of the classification model to multiple training devices, so that the multiple training devices respectively train the classification model based on the first parameter and local training samples to obtain the The second parameter corresponding to each of the plurality of training devices, where the classification model is set in each of the plurality of training devices, and the plurality of training devices correspond to a plurality of medical institutions.

接收模块52,用于接收所述多个训练设备各自对应的第二参数。The receiving module 52 is configured to receive the respective second parameters corresponding to the multiple training devices.

合并模块53,用于合并所述多个训练设备各自对应的第二参数以得到第三参数。The combining module 53 is configured to combine the respective second parameters corresponding to the multiple training devices to obtain the third parameters.

所述发送模块51还用于:通知所述多个训练设备将所述分类模型的参数更新为所述第三参数。The sending module 51 is further configured to: notify the plurality of training devices to update the parameters of the classification model to the third parameters.

图13所示装置可以执行前述图6所示实施例中提供的诊断相关分类模型训练方法,详细的执行过程和技术效果参见前述实施例中的描述,在此不再赘述。The apparatus shown in FIG. 13 can execute the diagnosis-related classification model training method provided in the embodiment shown in FIG. 6 . For the detailed execution process and technical effects, refer to the description in the foregoing embodiment, which will not be repeated here.

在一个可能的设计中,上述图13所示诊断相关分类模型训练装置的结构可实现为一电子设备,如图14所示,该电子设备可以包括:第三处理器61、第三存储器62。其中,第三存储器62上存储有可执行代码,当所述可执行代码被第三处理器61执行时,使第三处理器61至少可以实现如前述图6实施例中提供的诊断相关分类模型训练方法。In a possible design, the structure of the diagnostic-related classification model training apparatus shown in FIG. 13 may be implemented as an electronic device. As shown in FIG. 14 , the electronic device may include: a third processor 61 and a third memory 62 . The third memory 62 stores executable codes, and when the executable codes are executed by the third processor 61, the third processor 61 can at least implement the diagnosis-related classification model provided in the foregoing embodiment of FIG. 6 . training method.

可选地,该电子设备中还可以包括第三通信接口63,用于与其他设备进行通信。Optionally, the electronic device may further include a third communication interface 63 for communicating with other devices.

另外,本发明实施例提供了一种非暂时性机器可读存储介质,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器至少可以实现如前述图6实施例中提供的诊断相关分类模型训练方法。In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium, where executable codes are stored on the non-transitory machine-readable storage medium, and when the executable codes are executed by a processor of an electronic device , so that the processor can at least implement the diagnosis-related classification model training method provided in the embodiment of FIG. 6 above.

另外,本发明实施例提供了一种应用程序,当所述应用程序被电子设备的处理器执行时,使所述处理器执行如前述图6所示实施例中提供的诊断相关分类模型训练方法。In addition, an embodiment of the present invention provides an application program. When the application program is executed by a processor of an electronic device, the processor is caused to execute the method for training a diagnosis-related classification model provided in the embodiment shown in FIG. 6 above. .

图15为本发明实施例提供的一种诊断相关分类模型训练装置的结构示意图,该装置应用于目标训练设备。如图15所示,该装置包括:接收模块71、训练模块72、发送模块73、更新模块74。FIG. 15 is a schematic structural diagram of an apparatus for training a diagnosis-related classification model according to an embodiment of the present invention, where the apparatus is applied to a target training device. As shown in FIG. 15 , the apparatus includes: a receiving module 71 , a training module 72 , a sending module 73 , and an updating module 74 .

接收模块71,用于接收控制设备发送的分类模型的第一参数,所述控制设备与多个训练设备连接,所述目标训练设备是所述多个训练设备中的任一个,所述多个训练设备与多个医疗机构对应。A receiving module 71, configured to receive the first parameter of the classification model sent by the control device, the control device is connected to multiple training devices, the target training device is any one of the multiple training devices, the multiple training devices The training equipment corresponds to a plurality of medical institutions.

训练模块72,用于基于所述第一参数和本地的训练样本对所述分类模型进行训练以得到所述目标训练设备对应的第二参数。A training module 72, configured to train the classification model based on the first parameters and local training samples to obtain second parameters corresponding to the target training device.

发送模块73,用于将所述目标训练设备对应的第二参数发送至所述控制设备,以使所述控制设备合并所述多个训练设备各自对应的第二参数以得到第三参数,其中,所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数。A sending module 73, configured to send the second parameter corresponding to the target training device to the control device, so that the control device combines the second parameters corresponding to the multiple training devices to obtain the third parameter, wherein , the multiple training devices respectively train the classification model based on the first parameters and local training samples to obtain second parameters corresponding to the multiple training devices.

更新模块74,用于响应于所述控制设备的通知,将所述分类模型的参数更新为所述第三参数。The updating module 74 is configured to update the parameter of the classification model to the third parameter in response to the notification from the control device.

图15所示装置可以执行前述图7所示实施例中提供的诊断相关分类模型训练方法,详细的执行过程和技术效果参见前述实施例中的描述,在此不再赘述。The apparatus shown in FIG. 15 can execute the diagnosis-related classification model training method provided in the embodiment shown in FIG. 7 . For the detailed execution process and technical effects, refer to the descriptions in the foregoing embodiments, which will not be repeated here.

在一个可能的设计中,上述图15所示诊断相关分类模型训练装置的结构可实现为一电子设备,如图16所示,该电子设备可以包括:第四处理器81、第四存储器82。其中,第四存储器82上存储有可执行代码,当所述可执行代码被第四处理器81执行时,使第四处理器81至少可以实现如前述图7实施例中提供的诊断相关分类模型训练方法。In a possible design, the structure of the diagnostic-related classification model training apparatus shown in FIG. 15 may be implemented as an electronic device. As shown in FIG. 16 , the electronic device may include: a fourth processor 81 and a fourth memory 82 . The fourth memory 82 stores executable codes, and when the executable codes are executed by the fourth processor 81, the fourth processor 81 can at least implement the diagnosis-related classification model provided in the foregoing embodiment of FIG. 7 . training method.

可选地,该电子设备中还可以包括第四通信接口83,用于与其他设备进行通信。Optionally, the electronic device may further include a fourth communication interface 83 for communicating with other devices.

另外,本发明实施例提供了一种非暂时性机器可读存储介质,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器至少可以实现如前述图7实施例中提供的诊断相关分类模型训练方法。In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium, where executable codes are stored on the non-transitory machine-readable storage medium, and when the executable codes are executed by a processor of an electronic device , so that the processor can at least implement the diagnosis-related classification model training method provided in the embodiment of FIG. 7 .

另外,本发明实施例提供了一种应用程序,当所述应用程序被电子设备的处理器执行时,使所述处理器执行如前述图7所示实施例中提供的诊断相关分类模型训练方法。In addition, an embodiment of the present invention provides an application program. When the application program is executed by a processor of an electronic device, the processor is caused to execute the method for training a diagnosis-related classification model provided in the embodiment shown in FIG. 7 above. .

以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The apparatus embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助加必需的通用硬件平台的方式来实现,当然也可以通过硬件和软件结合的方式来实现。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以计算机产品的形式体现出来,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。From the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and certainly can also be implemented by combining hardware and software. Based on this understanding, the above-mentioned technical solutions can be embodied in the form of computer products in essence or that contribute to the prior art. In the form of a computer program product embodied on a medium (including but not limited to disk storage, CD-ROM, optical storage, etc.).

最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still be The technical solutions described in the foregoing embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (36)

1.一种模型训练方法,其特征在于,包括:1. a model training method, is characterized in that, comprises: 将分类模型的第一参数发送至多个训练设备,以使所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数,所述多个训练设备中均设有所述分类模型;Sending the first parameter of the classification model to a plurality of training devices, so that the plurality of training devices respectively train the classification model based on the first parameter and the local training samples, so as to obtain the corresponding correspondence of the plurality of training devices The second parameter of the plurality of training devices is provided with the classification model; 接收所述多个训练设备各自对应的第二参数;receiving second parameters corresponding to each of the plurality of training devices; 合并所述多个训练设备各自对应的第二参数以得到第三参数;combining the respective second parameters of the plurality of training devices to obtain the third parameter; 通知所述多个训练设备将所述分类模型的参数更新为所述第三参数。Notifying the plurality of training devices to update the parameters of the classification model to the third parameters. 2.根据权利要求1所述的方法,其特征在于,所述合并所述多个训练设备各自对应的第二参数以得到第三参数,包括:2. The method according to claim 1, wherein the combining the respective second parameters of the plurality of training devices to obtain the third parameter comprises: 对所述多个训练设备各自对应的第二参数进行加权平均处理,以得到所述第三参数。Perform a weighted average process on the second parameters corresponding to each of the plurality of training devices to obtain the third parameter. 3.根据权利要求1所述的方法,其特征在于,所述接收所述多个训练设备各自对应的第二参数,包括:3. The method according to claim 1, wherein the receiving second parameters corresponding to the multiple training devices comprises: 接收所述多个训练设备各自对应的加密的第二参数;receiving encrypted second parameters corresponding to each of the plurality of training devices; 所述合并所述多个训练设备各自对应的第二参数以得到第三参数,包括:The combining the respective second parameters of the multiple training devices to obtain the third parameters, including: 将所述多个训练设备各自对应的加密的第二参数发送至可信执行空间中,以在所述可信执行空间中解密出所述多个训练设备各自对应的第二参数并对所述多个训练设备各自对应的第二参数进行变换处理;Send the encrypted second parameters corresponding to the plurality of training devices to the trusted execution space, so as to decrypt the second parameters corresponding to the plurality of training devices in the trusted execution space and perform the operation on the trusted execution space. The second parameters corresponding to each of the plurality of training devices are transformed; 合并多个训练设备各自对应的变换后的第二参数以得到所述第三参数。The transformed second parameters corresponding to each of the plurality of training devices are combined to obtain the third parameter. 4.根据权利要求3所述的方法,其特征在于,所述变换处理包括:差分隐私处理。4. The method according to claim 3, wherein the transformation processing comprises: differential privacy processing. 5.根据权利要求1所述的方法,其特征在于,所述方法还包括:5. The method according to claim 1, wherein the method further comprises: 若确定具有所述第三参数的所述分类模型符合设定条件,则通知所述多个训练设备停止所述分类模型的训练。If it is determined that the classification model with the third parameter meets the set condition, the plurality of training devices are notified to stop the training of the classification model. 6.根据权利要求1所述的方法,其特征在于,所述方法还包括:6. The method of claim 1, wherein the method further comprises: 若确定具有所述第三参数的所述分类模型不符合所述设定条件,则通知所述多个训练设备基于本地的训练样本继续对所述分类模型进行训练。If it is determined that the classification model with the third parameter does not meet the set condition, the plurality of training devices are notified to continue training the classification model based on local training samples. 7.根据权利要求5或6所述的方法,其特征在于,所述方法还包括:7. The method according to claim 5 or 6, wherein the method further comprises: 接收所述多个训练设备各自对应的测试指标,其中,所述多个训练设备根据本地的测试样本分别对具有所述第三参数的所述分类模型进行测试以得到所述多个训练设备各自对应的测试指标;Receive test indicators corresponding to each of the plurality of training devices, wherein the plurality of training devices respectively test the classification model with the third parameter according to local test samples to obtain the respective test indicators of the plurality of training devices. Corresponding test indicators; 根据所述多个训练设备各自对应的测试指标确定具有所述第三参数的所述分类模型是否符合所述设定条件。Whether the classification model with the third parameter meets the set condition is determined according to the respective test indicators corresponding to the plurality of training devices. 8.根据权利要求7所述的方法,其特征在于,所述根据所述多个训练设备各自对应的测试指标确定具有所述第三参数的所述分类模型是否符合所述设定条件,包括:8 . The method according to claim 7 , wherein the determining whether the classification model with the third parameter meets the set condition according to the test indicators corresponding to each of the plurality of training devices comprises: 9 . : 对所述多个训练设备各自对应的测试指标进行加权平均处理;Perform weighted average processing on the respective corresponding test indicators of the multiple training devices; 若所述加权平均处理结果大于或等于设定阈值,则确定具有所述第三参数的所述分类模型达到所述设定条件。If the weighted average processing result is greater than or equal to a set threshold, it is determined that the classification model with the third parameter meets the set condition. 9.根据权利要求8所述的方法,其特征在于,所述方法还包括:9. The method according to claim 8, wherein the method further comprises: 根据如下至少一种信息确定所述多个训练设备各自对应的测试指标的权重:The weights of the respective test indicators corresponding to the multiple training devices are determined according to at least one of the following information: 所述多个训练样本提供方各自对应的训练样本数量,所述多个训练样本提供方各自对应的设定等级类别,所述多个训练设备各自对应的测试指标。The number of training samples corresponding to each of the plurality of training sample providers, the set level category corresponding to each of the plurality of training sample providers, and the test indicators corresponding to each of the plurality of training devices. 10.根据权利要求1所述的方法,其特征在于,所述方法还包括:10. The method of claim 1, wherein the method further comprises: 向所述多个训练设备发送数据处理信息,以使所述多个训练设备根据所述数据处理信息对本地的训练样本进行数据处理,所述数据处理信息中包括训练样本对应的标注信息。Sending data processing information to the multiple training devices, so that the multiple training devices perform data processing on local training samples according to the data processing information, where the data processing information includes label information corresponding to the training samples. 11.根据权利要求10所述的方法,其特征在于,所述数据处理信息中还包括如下至少一种信息:11. The method according to claim 10, wherein the data processing information further comprises at least one of the following information: 数据结构化处理信息,用于对每个训练样本中包含的数据进行设定的结构化处理;Data structuring processing information, which is used to perform set structuring processing on the data contained in each training sample; 数据过滤规则信息,用于对不符合设定要求的训练样本进行过滤处理。Data filtering rule information, which is used to filter training samples that do not meet the set requirements. 12.根据权利要求1所述的方法,其特征在于,所述多个训练设备与多个训练样本提供方对应。12. The method of claim 1, wherein the plurality of training devices correspond to a plurality of training sample providers. 13.根据权利要求11所述的方法,其特征在于,所述多个训练样本提供方包括多个医疗机构,所述分类模型用于完成诊断相关分类。13. The method according to claim 11, wherein the plurality of training sample providers comprises a plurality of medical institutions, and the classification model is used to complete diagnosis-related classification. 14.一种模型训练方法,其特征在于,应用于目标训练设备,所述方法包括:14. A model training method, characterized in that, applied to a target training device, the method comprising: 接收控制设备发送的分类模型的第一参数,所述控制设备与多个训练设备连接,所述目标训练设备是所述多个训练设备中的任一个;receiving a first parameter of the classification model sent by a control device, the control device is connected to multiple training devices, and the target training device is any one of the multiple training devices; 基于所述第一参数和本地的训练样本对所述分类模型进行训练以得到所述目标训练设备对应的第二参数;training the classification model based on the first parameter and local training samples to obtain the second parameter corresponding to the target training device; 将所述目标训练设备对应的第二参数发送至所述控制设备,以使所述控制设备合并所述多个训练设备各自对应的第二参数以得到第三参数,其中,所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数;sending the second parameter corresponding to the target training device to the control device, so that the control device combines the second parameters corresponding to the multiple training devices to obtain the third parameter, wherein the multiple training devices The device separately trains the classification model based on the first parameter and local training samples to obtain second parameters corresponding to each of the plurality of training devices; 响应于所述控制设备的通知,将所述分类模型的参数更新为所述第三参数。In response to the notification from the control device, the parameter of the classification model is updated to the third parameter. 15.根据权利要求14所述的方法,其特征在于,所述将所述目标训练设备对应的第二参数发送至所述控制设备,包括:15. The method according to claim 14, wherein the sending the second parameter corresponding to the target training device to the control device comprises: 对所述目标训练设备对应的第二参数进行加密;encrypting the second parameter corresponding to the target training device; 将所述目标训练设备对应的加密的第二参数发送至所述控制设备。Send the encrypted second parameter corresponding to the target training device to the control device. 16.根据权利要求14所述的方法,其特征在于,所述方法还包括:16. The method of claim 14, wherein the method further comprises: 根据本地的测试样本对具有所述第三参数的所述分类模型进行测试以得到所述目标训练设备对应的测试指标;Test the classification model with the third parameter according to the local test sample to obtain the test index corresponding to the target training device; 将所述目标训练设备对应的测试指标发送至所述控制设备,以使所述控制设备根据所述多个训练设备各自对应的测试指标确定具有所述第三参数的所述分类模型是否符合设定条件,其中,所述多个训练设备根据本地的测试样本分别对具有所述第三参数的所述分类模型进行测试以得到所述多个训练设备各自对应的测试指标。Send the test index corresponding to the target training device to the control device, so that the control device determines whether the classification model with the third parameter conforms to the design according to the test index corresponding to each of the multiple training devices. set conditions, wherein the plurality of training devices respectively test the classification model with the third parameter according to local test samples to obtain respective test indicators corresponding to the plurality of training devices. 17.根据权利要求14所述的方法,其特征在于,所述方法还包括:17. The method of claim 14, wherein the method further comprises: 接收所述控制设备发送的数据处理信息;Receive data processing information sent by the control device; 根据所述数据处理信息对本地的训练样本进行数据处理,所述数据处理信息中包括训练样本对应的标注信息。Data processing is performed on the local training samples according to the data processing information, where the data processing information includes label information corresponding to the training samples. 18.根据权利要求17所述的方法,其特征在于,所述数据处理信息中还包括如下至少一种信息:18. The method according to claim 17, wherein the data processing information further comprises at least one of the following information: 数据结构化处理信息,用于对每个训练样本中包含的数据进行设定的结构化处理;Data structuring processing information, which is used to perform set structuring processing on the data contained in each training sample; 数据过滤规则信息,用于对不符合设定要求的训练样本进行过滤处理。Data filtering rule information, which is used to filter training samples that do not meet the set requirements. 19.一种诊断相关分类模型训练方法,其特征在于,包括:19. A method for training a diagnosis-related classification model, comprising: 将分类模型的第一参数发送至多个训练设备,以使所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数,所述多个训练设备中均设有所述分类模型,所述多个训练设备与多个医疗机构对应;Sending the first parameter of the classification model to a plurality of training devices, so that the plurality of training devices respectively train the classification model based on the first parameter and the local training samples, so as to obtain the corresponding correspondence of the plurality of training devices The second parameter of , the classification model is provided in the multiple training devices, and the multiple training devices correspond to multiple medical institutions; 接收所述多个训练设备各自对应的第二参数;receiving second parameters corresponding to each of the plurality of training devices; 合并所述多个训练设备各自对应的第二参数以得到第三参数;combining the respective second parameters of the plurality of training devices to obtain the third parameter; 通知所述多个训练设备将所述分类模型的参数更新为所述第三参数。Notifying the plurality of training devices to update the parameters of the classification model to the third parameters. 20.一种诊断相关分类模型训练方法,其特征在于,应用于目标训练设备,所述方法包括:20. A method for training a diagnosis-related classification model, characterized in that, applied to target training equipment, the method comprising: 接收控制设备发送的分类模型的第一参数,所述控制设备与多个训练设备连接,所述目标训练设备是所述多个训练设备中的任一个,所述多个训练设备与多个医疗机构对应;Receive a first parameter of the classification model sent by a control device, the control device is connected to a plurality of training devices, the target training device is any one of the plurality of training devices, and the plurality of training devices are connected to a plurality of medical devices. institutional correspondence; 基于所述第一参数和本地的训练样本对所述分类模型进行训练以得到所述目标训练设备对应的第二参数;training the classification model based on the first parameter and local training samples to obtain the second parameter corresponding to the target training device; 将所述目标训练设备对应的第二参数发送至所述控制设备,以使所述控制设备合并所述多个训练设备各自对应的第二参数以得到第三参数,其中,所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数;sending the second parameter corresponding to the target training device to the control device, so that the control device combines the second parameters corresponding to the multiple training devices to obtain the third parameter, wherein the multiple training devices The device separately trains the classification model based on the first parameter and local training samples to obtain second parameters corresponding to each of the plurality of training devices; 响应于所述控制设备的通知,将所述分类模型的参数更新为所述第三参数。In response to the notification from the control device, the parameter of the classification model is updated to the third parameter. 21.一种模型训练装置,其特征在于,所述装置包括:21. A model training device, wherein the device comprises: 发送模块,用于将分类模型的第一参数发送至多个训练设备,以使所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数,所述多个训练设备中均设有所述分类模型;The sending module is configured to send the first parameter of the classification model to multiple training devices, so that the multiple training devices respectively train the classification model based on the first parameter and local training samples to obtain the multiple training devices. second parameters corresponding to each of the training devices, the classification models are all provided in the plurality of training devices; 接收模块,用于接收所述多个训练设备各自对应的第二参数;a receiving module, configured to receive the respective second parameters corresponding to the multiple training devices; 处理模块,用于合并所述多个训练设备各自对应的第二参数以得到第三参数;a processing module, configured to combine the respective second parameters of the plurality of training devices to obtain the third parameters; 所述发送模块还用于:通知所述多个训练设备将所述分类模型的参数更新为所述第三参数。The sending module is further configured to: notify the plurality of training devices to update the parameters of the classification model to the third parameters. 22.一种电子设备,其特征在于,包括:存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器执行如权利要求1至13中任一项所述的模型训练方法。22. An electronic device, comprising: a memory and a processor; wherein, executable code is stored on the memory, and when the executable code is executed by the processor, the processor is executed The model training method according to any one of claims 1 to 13. 23.一种非暂时性机器可读存储介质,其特征在于,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器执行如权利要求1至13中任一项所述的模型训练方法。23. A non-transitory machine-readable storage medium, wherein executable codes are stored on the non-transitory machine-readable storage medium, and when the executable codes are executed by a processor of an electronic device, The processor performs the model training method of any one of claims 1 to 13. 24.一种应用程序,其特征在于,当所述应用程序被电子设备的处理器执行时,使所述处理器执行如权利要求1至13中任一项所述的模型训练方法。24. An application program, characterized in that, when the application program is executed by a processor of an electronic device, the processor is caused to execute the model training method according to any one of claims 1 to 13. 25.一种模型训练装置,其特征在于,应用于目标训练设备,所述装置包括:25. A model training device, characterized in that, applied to target training equipment, the device comprising: 接收模块,用于接收控制设备发送的分类模型的第一参数,所述控制设备与多个训练设备连接,所述目标训练设备是所述多个训练设备中的任一个;a receiving module, configured to receive a first parameter of the classification model sent by a control device, the control device is connected to a plurality of training devices, and the target training device is any one of the plurality of training devices; 训练模块,用于基于所述第一参数和本地的训练样本对所述分类模型进行训练以得到所述目标训练设备对应的第二参数;a training module, configured to train the classification model based on the first parameter and local training samples to obtain a second parameter corresponding to the target training device; 发送模块,用于将所述目标训练设备对应的第二参数发送至所述控制设备,以使所述控制设备合并所述多个训练设备各自对应的第二参数以得到第三参数,其中,所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数;a sending module, configured to send the second parameter corresponding to the target training device to the control device, so that the control device combines the second parameters corresponding to the multiple training devices to obtain the third parameter, wherein, The plurality of training devices respectively train the classification model based on the first parameters and local training samples to obtain second parameters corresponding to the plurality of training devices; 更新模块,用于响应于所述控制设备的通知,将所述分类模型的参数更新为所述第三参数。An update module, configured to update the parameter of the classification model to the third parameter in response to the notification from the control device. 26.一种电子设备,其特征在于,包括:存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器执行如权利要求14至18中任一项所述的模型训练方法。26. An electronic device, comprising: a memory and a processor; wherein, executable code is stored on the memory, and when the executable code is executed by the processor, the processor is caused to execute The model training method according to any one of claims 14 to 18. 27.一种非暂时性机器可读存储介质,其特征在于,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器执行如权利要求14至187中任一项所述的模型训练方法。27. A non-transitory machine-readable storage medium, wherein executable codes are stored on the non-transitory machine-readable storage medium, and when the executable codes are executed by a processor of an electronic device, The processor performs the model training method of any one of claims 14 to 187. 28.一种应用程序,其特征在于,当所述应用程序被电子设备的处理器执行时,使所述处理器执行如权利要求14至18中任一项所述的模型训练方法。28. An application program, characterized in that, when the application program is executed by a processor of an electronic device, the processor is caused to execute the model training method according to any one of claims 14 to 18. 29.一种诊断相关分类模型训练装置,其特征在于,所述装置包括:29. An apparatus for training a diagnosis-related classification model, wherein the apparatus comprises: 发送模块,用于将分类模型的第一参数发送至多个训练设备,以使所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数,所述多个训练设备中均设有所述分类模型,所述多个训练设备与多个医疗机构对应;The sending module is configured to send the first parameter of the classification model to multiple training devices, so that the multiple training devices respectively train the classification model based on the first parameter and local training samples to obtain the multiple training devices. second parameters corresponding to each of the training devices, the classification models are all provided in the plurality of training devices, and the plurality of training devices correspond to a plurality of medical institutions; 接收模块,用于接收所述多个训练设备各自对应的第二参数;a receiving module, configured to receive the respective second parameters corresponding to the multiple training devices; 合并模块,用于合并所述多个训练设备各自对应的第二参数以得到第三参数;a merging module for merging the respective second parameters of the plurality of training devices to obtain the third parameter; 所述发送模块还用于:通知所述多个训练设备将所述分类模型的参数更新为所述第三参数。The sending module is further configured to: notify the plurality of training devices to update the parameters of the classification model to the third parameters. 30.一种电子设备,其特征在于,包括:存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器执行如权利要求19所述的诊断相关分类模型训练方法。30. An electronic device, comprising: a memory and a processor; wherein executable code is stored on the memory, and when the executable code is executed by the processor, the processor is made to execute The diagnostic-related classification model training method according to claim 19 . 31.一种非暂时性机器可读存储介质,其特征在于,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器执行如权利要求19所述的诊断相关分类模型训练方法。31. A non-transitory machine-readable storage medium, wherein executable codes are stored on the non-transitory machine-readable storage medium, and when the executable codes are executed by a processor of an electronic device, The processor executes the diagnostic-related classification model training method of claim 19 . 32.一种应用程序,其特征在于,当所述应用程序被电子设备的处理器执行时,使所述处理器执行如权利要求19所述的诊断相关分类模型训练方法。32. An application program, wherein when the application program is executed by a processor of an electronic device, the processor is caused to execute the method for training a diagnosis-related classification model according to claim 19. 33.一种诊断相关分类模型训练装置,其特征在于,应用于目标训练设备,所述装置包括:33. A diagnostic-related classification model training device, characterized in that, when applied to target training equipment, the device comprises: 接收模块,用于接收控制设备发送的分类模型的第一参数,所述控制设备与多个训练设备连接,所述目标训练设备是所述多个训练设备中的任一个,所述多个训练设备与多个医疗机构对应;a receiving module, configured to receive the first parameter of the classification model sent by a control device, the control device is connected to multiple training devices, the target training device is any one of the multiple training devices, the multiple training devices The equipment corresponds to multiple medical institutions; 训练模块,用于基于所述第一参数和本地的训练样本对所述分类模型进行训练以得到所述目标训练设备对应的第二参数;a training module, configured to train the classification model based on the first parameter and local training samples to obtain a second parameter corresponding to the target training device; 发送模块,用于将所述目标训练设备对应的第二参数发送至所述控制设备,以使所述控制设备合并所述多个训练设备各自对应的第二参数以得到第三参数,其中,所述多个训练设备基于所述第一参数和本地的训练样本分别对所述分类模型进行训练以得到所述多个训练设备各自对应的第二参数;a sending module, configured to send the second parameter corresponding to the target training device to the control device, so that the control device combines the second parameters corresponding to the multiple training devices to obtain the third parameter, wherein, The plurality of training devices respectively train the classification model based on the first parameters and local training samples to obtain second parameters corresponding to the plurality of training devices; 更新模块,用于响应于所述控制设备的通知,将所述分类模型的参数更新为所述第三参数。An update module, configured to update the parameter of the classification model to the third parameter in response to the notification from the control device. 34.一种电子设备,其特征在于,包括:存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器执行如权利要求20所述的诊断相关分类模型训练方法。34. An electronic device, comprising: a memory and a processor; wherein, executable code is stored on the memory, and when the executable code is executed by the processor, the processor is executed The diagnosis-related classification model training method according to claim 20. 35.一种非暂时性机器可读存储介质,其特征在于,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器执行如权利要求20所述的诊断相关分类模型训练方法。35. A non-transitory machine-readable storage medium, wherein executable codes are stored on the non-transitory machine-readable storage medium, and when the executable codes are executed by a processor of an electronic device, The processor executes the diagnostic-related classification model training method of claim 20 . 36.一种应用程序,其特征在于,当所述应用程序被电子设备的处理器执行时,使所述处理器执行如权利要求20所述的诊断相关分类模型训练方法。36. An application program, wherein when the application program is executed by a processor of an electronic device, the processor is caused to execute the method for training a diagnosis-related classification model according to claim 20.
CN202110146084.XA 2021-02-02 2021-02-02 Diagnostic correlation classification model training method, apparatus, device, medium, and program Pending CN114927210A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110146084.XA CN114927210A (en) 2021-02-02 2021-02-02 Diagnostic correlation classification model training method, apparatus, device, medium, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110146084.XA CN114927210A (en) 2021-02-02 2021-02-02 Diagnostic correlation classification model training method, apparatus, device, medium, and program

Publications (1)

Publication Number Publication Date
CN114927210A true CN114927210A (en) 2022-08-19

Family

ID=82804087

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110146084.XA Pending CN114927210A (en) 2021-02-02 2021-02-02 Diagnostic correlation classification model training method, apparatus, device, medium, and program

Country Status (1)

Country Link
CN (1) CN114927210A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108304876A (en) * 2018-01-31 2018-07-20 国信优易数据有限公司 Disaggregated model training method, device and sorting technique and device
CN109214421A (en) * 2018-07-27 2019-01-15 阿里巴巴集团控股有限公司 A kind of model training method, device and computer equipment
CN109598348A (en) * 2017-09-28 2019-04-09 北京猎户星空科技有限公司 A kind of image pattern obtains, model training method and system
CN110189385A (en) * 2019-06-05 2019-08-30 京东方科技集团股份有限公司 Model training and picture compression, decompression method, device, medium and electronic equipment
WO2019228122A1 (en) * 2018-05-29 2019-12-05 腾讯科技(深圳)有限公司 Training method for model, storage medium and computer device
CN111062495A (en) * 2019-11-28 2020-04-24 深圳市华尊科技股份有限公司 Machine learning method and related device
CN111784001A (en) * 2020-09-07 2020-10-16 腾讯科技(深圳)有限公司 Model training method and device and computer readable storage medium
CN112257873A (en) * 2020-11-11 2021-01-22 深圳前海微众银行股份有限公司 Training method, device, system, equipment and storage medium of machine learning model
CN112256874A (en) * 2020-10-21 2021-01-22 平安科技(深圳)有限公司 Model training method, text classification method, device, computer equipment and medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109598348A (en) * 2017-09-28 2019-04-09 北京猎户星空科技有限公司 A kind of image pattern obtains, model training method and system
CN108304876A (en) * 2018-01-31 2018-07-20 国信优易数据有限公司 Disaggregated model training method, device and sorting technique and device
WO2019228122A1 (en) * 2018-05-29 2019-12-05 腾讯科技(深圳)有限公司 Training method for model, storage medium and computer device
CN109214421A (en) * 2018-07-27 2019-01-15 阿里巴巴集团控股有限公司 A kind of model training method, device and computer equipment
CN110189385A (en) * 2019-06-05 2019-08-30 京东方科技集团股份有限公司 Model training and picture compression, decompression method, device, medium and electronic equipment
CN111062495A (en) * 2019-11-28 2020-04-24 深圳市华尊科技股份有限公司 Machine learning method and related device
CN111784001A (en) * 2020-09-07 2020-10-16 腾讯科技(深圳)有限公司 Model training method and device and computer readable storage medium
CN112256874A (en) * 2020-10-21 2021-01-22 平安科技(深圳)有限公司 Model training method, text classification method, device, computer equipment and medium
CN112257873A (en) * 2020-11-11 2021-01-22 深圳前海微众银行股份有限公司 Training method, device, system, equipment and storage medium of machine learning model

Similar Documents

Publication Publication Date Title
US20240386290A1 (en) Distributed privacy-preserving computing on protected data
US12147879B2 (en) Federated learning with dataset sketch commitment based malicious participant identification
US11693634B2 (en) Building segment-specific executable program code for modeling outputs
US20200097951A1 (en) Cryptocurrency system using body activity data
US20240195677A1 (en) Techniques for prediction models using time series data
CN114462532A (en) Model training method, method, device, equipment and medium for predicting transaction risk
WO2017053347A1 (en) Updating attribute data structures to indicate trends in attribute data provided to automated modeling systems
WO2021148926A1 (en) Neural flow attestation
US20230214677A1 (en) Techniques for evaluating an effect of changes to machine learning models
US20210089835A1 (en) Systems and methods for maintaining data privacy in a shared detection model system
EP4413495A1 (en) Data compression techniques for machine learning models
Li et al. Artificial intelligence in pediatrics
Ramachandramurthy et al. Distilling big data: Refining quality information in the era of yottabytes
US20230307136A1 (en) Risk assessment systems and methods for predicting and reducing negative health outcomes associated with social determinants of health
US20210089292A1 (en) Systems and methods for updating detection models and maintaining data privacy
US20230088588A1 (en) Security as a service for machine learning
Laiq et al. Industrial adoption of machine learning techniques for early identification of invalid bug reports
US11588873B2 (en) Selective encryption of streaming data
US11080352B2 (en) Systems and methods for maintaining data privacy in a shared detection model system
CN114927210A (en) Diagnostic correlation classification model training method, apparatus, device, medium, and program
US11380429B1 (en) Elastic data privacy-compliant healthcare analytics
US20220028543A1 (en) Device safety based on conflicts in patient medical records
Sankaran et al. Semiparametric regression analysis of window-observation recurrent event data with multiple causes of failure
US20250088542A1 (en) Data set and algorithm validation, bias characterization, and valuation
US20250148541A1 (en) System and method for operational workflow transparency and end-to-end events tracking

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination