WO2022160578A1 - State transition core optimization-based data processing method, apparatus and device, and medium - Google Patents

State transition core optimization-based data processing method, apparatus and device, and medium Download PDF

Info

Publication number
WO2022160578A1
WO2022160578A1 PCT/CN2021/101998 CN2021101998W WO2022160578A1 WO 2022160578 A1 WO2022160578 A1 WO 2022160578A1 CN 2021101998 W CN2021101998 W CN 2021101998W WO 2022160578 A1 WO2022160578 A1 WO 2022160578A1
Authority
WO
WIPO (PCT)
Prior art keywords
participant
preset
state
model parameters
federated
Prior art date
Application number
PCT/CN2021/101998
Other languages
French (fr)
Chinese (zh)
Inventor
姜迪
Original Assignee
深圳前海微众银行股份有限公司
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 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2022160578A1 publication Critical patent/WO2022160578A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes

Abstract

The present application discloses a state transition core optimization-based data processing method, apparatus and device, and a medium. Said method comprises: in the process of a first participant training local model parameters each time, dynamically determining a state sampling algorithm of preset local sample data according to resource attribute information of the first participant, to obtain identification state information of the preset local sample data, so as to determine combined state information of all preset local model parameters of the first participant; determining, according to the combined state information, target model parameters to be federalized; and performing federation training with each second participant on the basis of said target model parameters, so as to obtain a preset prediction model of the first participant.

Description

基于状态转移核优化的数据处理方法、装置、设备及介质Data processing method, device, device and medium based on state transition kernel optimization
本申请要求2021年1月27日申请的,申请号为202110115051.9,名称为“基于状态转移核优化的数据处理方法、装置、设备及介质”的中国专利申请的优先权,在此将其全文引入作为参考。This application claims the priority of the Chinese patent application filed on January 27, 2021, the application number is 202110115051.9, and the title is "Data Processing Method, Apparatus, Equipment and Medium Based on State Transfer Kernel Optimization", which is hereby incorporated in its entirety. Reference.
技术领域technical field
本申请涉及金融科技(Fintech)的人工智能技术领域,尤其涉及一种基于状态转移核优化的数据处理方法、装置、设备及介质。The present application relates to the field of artificial intelligence technology of financial technology (Fintech), and in particular, to a data processing method, apparatus, device and medium based on state transition kernel optimization.
背景技术Background technique
随着金融科技,尤其是互联网科技金融的不断发展,越来越多的技术应用在金融领域,但金融业也对技术提出了更高的要求,如金融业对基于状态转移核优化的数据处理也有更高的要求。With the continuous development of financial technology, especially Internet technology finance, more and more technologies are applied in the financial field, but the financial industry also puts forward higher requirements for technology, such as the financial industry's data processing based on state transfer kernel optimization There are also higher requirements.
目前,在参与方通过机器学习训练模型的过程中,通常是直接与其他参与方进行数据交换,而直接与其他参与方进行数据交换会侵犯用户的隐私,造成安全隐患,另外,在参与方训练模型时,样本数据常常是存在不同的识别状态的,如在语音识别过程(语音识别过程是把数据帧识别为状态,把状态组合为因素,把因素组合为单词)中,数据帧可以被识别为A状态,B状态,C状态等,其中,A状态,B状态,C状态等类型是存在不同识别概率的,相关技术在确定样本数据不同状态的识别概率的过程中,往往通过固定的方式进行确定,通过固定的方式确定样本数据不同状态的识别概率,导致模型训练过程中资源适配性差的问题。At present, in the process of training models through machine learning, participants usually directly exchange data with other participants, and direct data exchange with other participants will violate the privacy of users and cause security risks. When modeling, the sample data often have different recognition states. For example, in the speech recognition process (speech recognition process is to recognize data frames as states, combine states as factors, and combine factors into words), data frames can be recognized. It is A state, B state, C state, etc. Among them, A state, B state, C state and other types have different recognition probabilities. In the process of determining the recognition probabilities of different states of sample data, related technologies often use a fixed method. The identification probability of different states of the sample data is determined in a fixed way, which leads to the problem of poor resource adaptation in the model training process.
技术问题technical problem
本申请的主要目的在于提供一种基于状态转移核优化的数据处理方法、装置、设备和介质,旨在解决相关技术中通过固定的方式确定样本数据不同状态的识别概率,致使模型训练过程资源适配性差,且易侵犯用户隐私的技术问题。The main purpose of this application is to provide a data processing method, device, equipment and medium based on state transition kernel optimization, which aims to solve the problem of determining the identification probability of different states of sample data in a fixed manner in the related art, so that the resources in the model training process are suitable. The technical problems of poor compatibility and easy violation of user privacy.
技术解决方案technical solutions
为实现上述目的,本申请提供一种基于状态转移核优化的数据处理方法,应用于第一参与方,所述第一参与方与第二参与方进行联邦通信连接,所述基于状态转移核优化的数据处理方法包括:In order to achieve the above object, the present application provides a data processing method based on state transition core optimization, which is applied to a first participant, and the first participant and the second participant are connected by federated communication, and the state transition core optimization is based on the state transition core. The data processing methods include:
在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息;In the process of each training of local model parameters by the first participant, the state sampling algorithm of the preset local sample data is dynamically determined according to the resource attribute information of the first participant, so as to obtain the identification state information of the preset local sample data, to determine the combined state information of all preset local model parameters of the first participant;
根据所述组合状态信息,确定待联邦的目标模型参数;According to the combined state information, determine the target model parameters to be federated;
基于所述待联邦的目标模型参数,与各个第二参与方进行联邦训练,得到所述第一参与方的预设预测模型。Based on the target model parameters to be federated, federation training is performed with each second participant to obtain a preset prediction model of the first participant.
本申请还提供一种基于状态转移核优化的数据处理装置,应用于第一参与方,所述第一参与方与第二参与方进行联邦通信连接,所述基于状态转移核优化的数据处理装置包括:The present application also provides a data processing apparatus based on state transition core optimization, which is applied to a first participant, and the first participant and the second participant are connected by federated communication, and the data processing apparatus based on state transition core optimization include:
第一确定模块,用于在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息;The first determination module is configured to dynamically determine the state sampling algorithm of the preset local sample data according to the resource attribute information of the first participant in each process of training the local model parameters by the first participant, so as to obtain the preset local model. Identification status information of the sample data to determine the combined status information of all preset local model parameters of the first participant;
第二确定模块,用于根据所述组合状态信息,确定待联邦的目标模型参数;a second determination module, configured to determine the target model parameters to be federated according to the combined state information;
联邦模块,用于基于所述待联邦的目标模型参数,与各个第二参与方进行联邦训练,得到所述第一参与方的预设预测模型。The federation module is configured to perform federated training with each second participant based on the target model parameters to be federated to obtain a preset prediction model of the first participant.
本申请还提供一种基于状态转移核优化的数据处理设备,所述基于状态转移核优化的数据处理设备为实体设备,所述基于状态转移核优化的数据处理设备包括:存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的所述基于状态转移核优化的数据处理方法的程序,所述基于状态转移核优化的数据处理方法的程序被处理器执行时可实现如上述的基于状态转移核优化的数据处理方法的步骤。The present application also provides a data processing device optimized based on a state transition core, the data processing device optimized based on the state transition core is an entity device, and the data processing device optimized based on the state transition core includes: a memory, a processor, and a storage device. The program of the state transition core-optimized data processing method on the memory and executable on the processor, when the program of the state transition core-optimized data processing method is executed by the processor, can realize the following The steps of the above-mentioned data processing method based on state transition kernel optimization.
本申请还提供一种介质,所述介质上存储有实现上述基于状态转移核优化的数据处理方法的程序,所述基于状态转移核优化的数据处理方法的程序被处理器执行时实现如上述的基于状态转移核优化的数据处理方法的步骤。The present application also provides a medium on which a program for implementing the above-mentioned data processing method based on state transition kernel optimization is stored, and when the program of the data processing method based on state transition kernel optimization is executed by a processor, the above-mentioned program is implemented Steps of a data processing method based on state transition kernel optimization.
本申请还提供一种计算机程序产品、包括计算机程序,该计算机程序被处理器执行时实现上述的基于状态转移核优化的数据处理方法的步骤。The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned data processing method based on state transition kernel optimization.
有益效果beneficial effect
本申请提供一种基于状态转移核优化的数据处理方法、装置、设备及介质,与相关技术中,不同参与方直接进行数据交换,且通过固定的方式确定样本数据不同状态的识别概率,致使模型训练过程中资源适用性差,侵犯用户隐私相比,本申请在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息;根据所述组合状态信息,确定待联邦的目标模型参数;基于所述待联邦的目标模型参数,与各个第二参与方进行联邦训练,得到所述第一参与方的预设预测模型。在本申请中,由于第一参与方与各个第二参与方进行联邦训练,因而,避免不同参与方直接进行数据的交互造成用户的隐私安全隐患,另外,在本申请中,在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息,即是基于资源属性信息以动态方式确定本地样本数据的识别状态的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息,而不是通过固定的方式确定样本数据不同状态的识别状态信息如识别概率,因而,提升了模型训练过程中资源适配性,解决了相关技术中通过固定的方式确定样本数据不同状态的识别概率,致使模型训练过程资源适配性差,且易侵犯用户隐私的技术问题。The present application provides a data processing method, device, equipment and medium based on state transition kernel optimization. In the related art, different participants directly exchange data, and determine the identification probabilities of different states of sample data in a fixed manner, so that the model Compared with the poor applicability of resources and violation of user privacy in the training process, the present application dynamically determines the state of the preset local sample data according to the resource attribute information of the first participant in the process of training the local model parameters by the first participant. a sampling algorithm to obtain identification state information of preset local sample data to determine combined state information of all preset local model parameters of the first participant; according to the combined state information, determine the target model parameters to be federated; based on the The target model parameters to be federated are federated with each second participant to obtain a preset prediction model of the first participant. In this application, since the first participant performs federated training with each of the second participants, the direct data interaction between different participants is avoided to cause user privacy and security risks. In addition, in this application, in the first participant In the process of training local model parameters each time, the state sampling algorithm of the preset local sample data is dynamically determined according to the resource attribute information of the first participant, so as to obtain the identification state information of the preset local sample data, so as to determine the first participant. The combined state information of all the preset local model parameters of the party, that is, the identification state information of dynamically determining the identification state of the local sample data based on the resource attribute information, so as to determine the combined state information of all the preset local model parameters of the first party, Instead of determining the identification state information of different states of the sample data, such as the identification probability, in a fixed way, it improves the resource adaptability in the model training process, and solves the problem of determining the identification probability of different states of the sample data in a fixed way in the related art. The technical problem of poor adaptability of resources in the model training process and easy violation of user privacy.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description serve to explain the principles of the application.
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the accompanying drawings required for describing the embodiments or related technologies will be briefly introduced below. Obviously, for those skilled in the art, On the premise of no creative labor, other drawings can also be obtained from these drawings.
图1为本申请基于状态转移核优化的数据处理方法第一实施例的流程示意图;1 is a schematic flowchart of a first embodiment of a data processing method based on state transition kernel optimization of the present application;
图2为本申请基于状态转移核优化的数据处理方法中在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息的步骤的细化步骤流程示意图;2 is a data processing method based on state transition kernel optimization of the present application, in the process of each training of local model parameters by a first participant, dynamically determining the state of preset local sample data according to resource attribute information of the first participant A sampling algorithm to obtain the identification state information of the preset local sample data, and a schematic flow chart of the refinement steps of the steps of determining the combined state information of all preset local model parameters of the first participant;
图3为本申请实施例方案涉及的硬件运行环境的设备结构示意图。FIG. 3 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application.
本申请目的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional features and advantages of the present application will be further described with reference to the accompanying drawings in conjunction with the embodiments.
本发明的实施方式Embodiments of the present invention
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
本申请实施例提供一种基于状态转移核优化的数据处理方法,在本申请基于状态转移核优化的数据处理方法的第一实施例中,参照图1,应用于第一参与方,所述第一参与方与第二参与方进行联邦通信连接,所述基于状态转移核优化的数据处理方法包括:An embodiment of the present application provides a data processing method based on state transition core optimization. In the first embodiment of the data processing method based on state transition core optimization of the present application, referring to FIG. 1 , it is applied to a first participant, and the first A participant is connected to the second participant for federated communication, and the data processing method based on state transition kernel optimization includes:
步骤S10,在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息;Step S10, in the process of training the local model parameters by the first participant each time, dynamically determine the state sampling algorithm of the preset local sample data according to the resource attribute information of the first participant, so as to obtain the identification of the preset local sample data state information to determine the combined state information of all preset local model parameters of the first participant;
步骤S20,根据所述组合状态信息,确定待联邦的目标模型参数;Step S20, determining the target model parameters to be federated according to the combined state information;
步骤S30,基于所述待联邦的目标模型参数,与各个第二参与方进行联邦训练,得到所述第一参与方的预设预测模型。Step S30, based on the target model parameters to be federated, perform federation training with each second participant to obtain a preset prediction model of the first participant.
具体步骤如下:Specific steps are as follows:
步骤S10,在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息;Step S10, in the process of training the local model parameters by the first participant each time, dynamically determine the state sampling algorithm of the preset local sample data according to the resource attribute information of the first participant, so as to obtain the identification of the preset local sample data state information to determine the combined state information of all preset local model parameters of the first participant;
在本实施例中,需要说明的是,基于状态转移核优化的数据处理方法可以应用于基于状态转移核优化的数据处理系统(特别地,应用于基于状态转移核优化的数据处理系统中的第一参与方),该基于状态转移核优化的数据处理系统从属于基于状态转移核优化的数据处理设备,对于基于状态转移核优化的数据处理系统而言,还可以内置有第二参与方,或者与第二参与方进行通信连接,需要说明的是,该第一参与方与第二参与方之间(可以都属于基于状态转移核优化的数据处理系统)可以直接进行联邦通信连接,另外,该第一参与方与第二参与方之间还可以通过第三参与方间接进行联邦通信连接。In this embodiment, it should be noted that the data processing method based on state transition core optimization can be applied to a data processing system based on state transition core optimization (especially, applied to the No. a participant), the data processing system based on state transition core optimization is subordinate to the data processing device based on state transition core optimization, and for the data processing system based on state transition core optimization, a second participant may also be built in, or To communicate with the second participant, it should be noted that the first participant and the second participant (which may both belong to the data processing system optimized based on the state transfer core) can directly perform a federated communication connection. In addition, the A federated communication connection may also be indirectly performed between the first participant and the second participant through a third participant.
需要说明的是,在第一参与方与第二参与方进行联邦之前,第一参与方是需要先在本地训练自身的模型参数的,具体地,例如,第一参与方在本地迭代训练500次(训练模型参数)之后,与第二参与方进行联邦通信,得到聚合参数,然后将聚合参数作为替换更新模型参数替换掉本地的模型参数,并基于替换更新模型参数继续进行下一轮的迭代训练,直至最后得到需要的模型。It should be noted that before the first participant and the second participant are federated, the first participant needs to train its own model parameters locally. Specifically, for example, the first participant iteratively trains 500 times locally. After (training model parameters), conduct federated communication with the second party to obtain the aggregation parameters, then replace the local model parameters with the aggregation parameters as replacement update model parameters, and continue the next round of iterative training based on the replacement update model parameters , until the desired model is finally obtained.
在本实施例中,基于状态转移核优化的数据处理方法是应用在第一参与方训练自身的模型参数的过程中,在该过程中,需要根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,进而根据状态采样算法,得到预设本地样本数据的识别状态信息,其中,资源属性信息包括算力资源,存储资源以及传输资源等信息,预设本地样本数据的状态采样算法包括有放回采样,无放回采样,联邦蒙特普洛斯-黑廷斯采样,优化的联邦蒙特普洛斯-黑廷斯采样等采样算法,其中,各状态采样算法可以是预存在第一参与方本地的,或者各状态采样算法是临时调用或者生成的,根据状态采样算法,得到预设本地样本数据的识别状态信息,具体地,根据状态采样算法,得到预设本地样本数据的各识别状态的识别概率,进而根据状态采样算法,得到预设本地样本数据的各识别状态对应模型参数的数值,需要说明的是,不管采用何种采样算法,各识别状态的识别概率是一致的,或者在预设误差范围内的,但是不同采样算法,资源消耗以及采样的速率是不同的,具体地,例如,在第一参与方本地训练本地模型参数的过程中,某一样本数据存在A状态-B状态-C状态,通过不同采样算法,可能A状态都是占比70%,B状态都是占比20%,C状态都是占比10%,但是通过联邦蒙特普洛斯-黑廷斯采样算法,可能得到A状态占比70%的资源是M1内存消耗,通过优化的联邦蒙特普洛斯-黑廷斯采样算法,可能得到A状态占比70%的的资源是M2内存消耗,而通过有放回采样,可能得到A状态占比70%的的资源是M3内存消耗,其中,M2内存消耗最少。In this embodiment, the data processing method based on state transition kernel optimization is applied in the process of the first participant training its own model parameters. In this process, it needs to be dynamically determined according to the resource attribute information of the first participant. Preset the state sampling algorithm of the local sample data, and then obtain the identification state information of the preset local sample data according to the state sampling algorithm, wherein the resource attribute information includes information such as computing resources, storage resources and transmission resources, and the preset local sample data The state sampling algorithms include sampling algorithms with replacement, sampling without replacement, federated Montepross-Hattings sampling, and optimized federated Montepross-Hattings sampling, among which, each state sampling algorithm can be pre-existing The first participant is local, or each state sampling algorithm is temporarily invoked or generated. According to the state sampling algorithm, the identification state information of the preset local sample data is obtained. Specifically, according to the state sampling algorithm, the preset local sample data is obtained. The recognition probability of each recognition state, and then according to the state sampling algorithm, the values of the model parameters corresponding to each recognition state of the preset local sample data are obtained. It should be noted that no matter what sampling algorithm is used, the recognition probability of each recognition state is consistent. , or within the preset error range, but different sampling algorithms, resource consumption and sampling rates are different, specifically, for example, in the process of locally training local model parameters by the first participant, a certain sample data exists State-B state-C state, through different sampling algorithms, it is possible that state A accounts for 70%, state B accounts for 20%, and state C accounts for 10%, but through the federal Montepros-Haiting Sampling algorithm, it is possible to obtain 70% of the resources in A state is M1 memory consumption, and through the optimized federated Montepros-Hattings sampling algorithm, it is possible to obtain 70% of the resources in A state is M2 memory consumption, while Through the sampling with replacement, it is possible to obtain the resource that the A state accounts for 70% of the M3 memory consumption, of which the M2 memory consumption is the least.
需要说明的是,样本数据是由多个样本特征构成的数据,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法包括:根据所述第一参与方的资源属性信息动态确定预设本地样本数据中不同样本特征的状态采样算法,即是对于相应样本特征,对应针对性预存的状态采样算法不同,进而获取对应样本特征的不同状态的识别概率,由于样本特征存在多个,因而,可以通过不同样本数据识别概率的相乘得到整体样本数据对应输出数据的概率,而为了得到输出数据的概率的资源消耗,则可以首先得到每个样本特征不同状态的识别概率所消耗的算力资源等,进而将对应算力资源等相加得到需要的整体资源。在相关技术中,是通过固定状态采样算法,确定对应样本数据中样本特征的状态的识别概率,通过固定状态采样算法确定对应样本数据中样本特征的状态的识别概率,难以兼顾模型训练时的资源配置,具体地,例如,若第一参与方资源配置少时,固定状态采样算法消耗多则会造成服务器的崩溃,致使难以满足模型训练时对资源限制的需求,若第一参与方资源配置多时,固定状态采样算法消耗少则会造成资源的浪费,致使难以满足模型训练时对速度的需求,在本实施例中,可以实现模型训练时资源消耗属性与速率的均衡或者适配。It should be noted that the sample data is data composed of multiple sample features, and the state sampling algorithm for dynamically determining the preset local sample data according to the resource attribute information of the first participant includes: according to the resource attribute information of the first participant The attribute information dynamically determines the state sampling algorithm of different sample features in the preset local sample data, that is, for the corresponding sample features, the corresponding pre-stored state sampling algorithms are different, and then the recognition probability of different states corresponding to the sample features is obtained. Therefore, the probability of the overall sample data corresponding to the output data can be obtained by multiplying the recognition probabilities of different sample data, and in order to obtain the resource consumption of the probability of the output data, the recognition probability of the different states of each sample feature can be obtained first. Calculate the consumed computing power resources, etc., and then add the corresponding computing power resources to obtain the required overall resources. In the related art, the fixed state sampling algorithm is used to determine the identification probability of the state of the sample feature in the corresponding sample data, and the fixed state sampling algorithm is used to determine the identification probability of the state of the sample feature in the corresponding sample data, which is difficult to take into account the resources during model training. Configuration, specifically, for example, if the resource configuration of the first participant is small, the fixed state sampling algorithm consumes a lot, which will cause the server to crash, making it difficult to meet the resource limitation requirements during model training. If the resource configuration of the first participant is long, The fixed state sampling algorithm consumes less resources, which makes it difficult to meet the speed requirement during model training. In this embodiment, the balance or adaptation of resource consumption attributes and speed during model training can be achieved.
需要说明的是,由于预设本地样本数据中存在不同样本特征,每个样本特征对应不同的状态采样算法,在通过每个样本特征对应不同的状态采样算法,得到预设本地样本数据不同样本特征的识别状态信息后,得到预设本地样本数据的识别状态信息,进而,确定第一参与方所有预设本地模型参数的组合状态信息,也即,预设本地样本数据的识别状态信息隐含了对应预设本地模型参数的组合状态信息,进而,可以得到第一参与方所有预设本地模型参数的组合状态信息,具体地,例如,假设样本特征存在A状态,B状态,C状态三种状态,A状态,B状态,C状态三种状态分别对应的识别概率为70%,20%,10%,则样本特征被识别为A状态时,对应的识别模型参数如权重可以是0.7。It should be noted that, due to the existence of different sample features in the preset local sample data, each sample feature corresponds to a different state sampling algorithm, and different sample features of the preset local sample data are obtained through each sample feature corresponding to a different state sampling algorithm. After the identification state information of the preset local sample data is obtained, the identification state information of the preset local sample data is obtained, and further, the combined state information of all preset local model parameters of the first participant is determined, that is, the identification state information of the preset local sample data implicitly Corresponding to the combined state information of the preset local model parameters, and further, the combined state information of all the preset local model parameters of the first participant can be obtained. Specifically, for example, it is assumed that the sample features have three states: A state, B state, and C state , A state, B state, and C state, the recognition probabilities corresponding to the three states are 70%, 20%, and 10% respectively. When the sample feature is recognized as A state, the corresponding recognition model parameters such as weight can be 0.7.
其中,参照图2,所述在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息的步骤,包括:Wherein, referring to FIG. 2 , in the process of training the local model parameters by the first participant each time, the state sampling algorithm of the preset local sample data is dynamically determined according to the resource attribute information of the first participant, so as to obtain the preset state sampling algorithm. The steps of identifying state information of local sample data to determine the combined state information of all preset local model parameters of the first participant include:
步骤S11,在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息确定内存消耗上限;Step S11, in each process of training the local model parameters by the first participant, determining the upper limit of memory consumption according to the resource attribute information of the first participant;
在本实施例中,在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息确定内存消耗上限,即是根据读取第一参与方服务器的内存容量确定内存消耗上限。In this embodiment, each time the first participant trains local model parameters, the upper limit of memory consumption is determined according to the resource attribute information of the first participant, that is, the memory capacity of the server of the first participant is read. Determine the memory consumption limit.
步骤S12,根据所述内存消耗上限以及预设采样消耗计算规则,动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方每个预设本地模型参数的状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息。Step S12, dynamically determine the state sampling algorithm of the preset local sample data according to the upper limit of memory consumption and the preset sampling consumption calculation rule, so as to obtain the identification state information of the preset local sample data, so as to determine each preset sample data of the first participant. The state information of the local model parameters is set to determine the combined state information of all preset local model parameters of the first participant.
根据所述内存消耗上限如500G,以及预设采样消耗计算规则如每采样一次的消耗计算规则以及不同状态类型的消耗计算规则,动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方每个预设本地模型参数的状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息,需要说明的是,不同状态采样算法得到预设本地样本数据的识别状态信息的资源消耗是不同的,不同状态采样算法与资源消耗存在第一预设关联关系,或者不同状态采样算法,状态类型等与资源消耗存在预设第二关联关系。According to the upper limit of memory consumption, such as 500G, and the preset sampling consumption calculation rules, such as the consumption calculation rules of each sampling time and the consumption calculation rules of different state types, the state sampling algorithm of the preset local sample data is dynamically determined, so as to obtain the preset local sample data. The identification state information of the sample data to determine the state information of each preset local model parameter of the first participant to determine the combined state information of all preset local model parameters of the first participant. It should be noted that different state sampling algorithms The resource consumption of obtaining the identification state information of the preset local sample data is different. There is a first preset association relationship between different state sampling algorithms and resource consumption, or there is a preset second association between different state sampling algorithms, state types, etc. and resource consumption. relation.
其中,所述根据所述内存消耗上限以及预设采样消耗计算规则,动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方每个预设本地模型参数的状态信息,以确定第一参与方所有预设本地模型参数的组合状态吗信息的步骤,包括:Wherein, the state sampling algorithm of the preset local sample data is dynamically determined according to the upper limit of memory consumption and the preset sampling consumption calculation rule, so as to obtain the identification state information of the preset local sample data, so as to determine each The steps of presetting state information of local model parameters to determine the combined state information of all preset local model parameters of the first participant include:
步骤a1,分别确定各个预设本地模型参数的子内存消耗上限;Step a1, respectively determining the sub-memory consumption upper limit of each preset local model parameter;
分别确定各个预设本地模型参数的子内存消耗上限,确定各个预设本地模型参数的子内存消耗上限的方式包括:The sub-memory consumption upper limit of each preset local model parameter is determined respectively, and the method for determining the sub-memory consumption upper limit of each preset local model parameter includes:
方式一:根据各个预设本地模型参数的类型,确定对应子内存消耗上限;Method 1: Determine the upper limit of the corresponding sub-memory consumption according to the type of each preset local model parameter;
方式二:根据各个预设本地模型参数的权重,确定对应子内存消耗上限。Method 2: Determine the upper limit of the corresponding sub-memory consumption according to the weight of each preset local model parameter.
步骤a2,确定每个预设本地模型参数的类型与数量,根据所述子内存消耗上限,所述预设采样消耗计算规则以及所述状态类型与数量,通过遍历方式确定预设本地样本数据的状态采样算法;Step a2, determine the type and quantity of each preset local model parameter, according to the sub-memory consumption upper limit, the preset sampling consumption calculation rule and the state type and quantity, determine the preset local sample data by traversal. State sampling algorithm;
确定子内存消耗上限后,根据所述子内存消耗上限,所述预设采样消耗计算规则以及所述状态类型与数量,通过遍历方式确定预设本地样本数据的状态采样算法,即是从预存在第一参与方本地的各状态采样算法中对应确定预设本地样本数据的状态采样算法。After determining the upper limit of sub-memory consumption, according to the upper limit of sub-memory consumption, the preset sampling consumption calculation rule and the state type and quantity, the state sampling algorithm of the preset local sample data is determined by traversal method, that is, from the pre-existing state sampling algorithm. The state sampling algorithms of the preset local sample data are correspondingly determined among the state sampling algorithms locally of the first participant.
具体地,例如,若所述子内存消耗上限为100消耗计量值,根据所述预设采样消耗计算规则,所述状态类型与数量,遍历各状态采样算法(为了节约资源,遍历过程只计算而不执行实际的采样操作),得到各状态采样算法对应具体采用过程的内存消耗上限分别为200消耗计量值,300消耗计量值,150消耗计量值,90消耗计量值,则选择90消耗计量值的状态采样算法进行采样。Specifically, for example, if the sub-memory consumption upper limit is 100 consumption metering values, according to the preset sampling consumption calculation rule, the state type and quantity, traverse each state sampling algorithm (in order to save resources, the traversal process only calculates The actual sampling operation is not performed), and the upper limit of memory consumption corresponding to the specific process of each state sampling algorithm is obtained: 200 consumption metering value, 300 consumption metering value, 150 consumption metering value, 90 consumption metering value, then select 90 consumption metering value. State sampling algorithm for sampling.
步骤a3,确定每个预设本地模型参数在对应所述状态采样算法下的最小状态转移路线;Step a3, determine the minimum state transition route of each preset local model parameter corresponding to the state sampling algorithm;
确定每个预设本地模型参数在对应所述状态采样算法下的最小状态转移路线,具体地,最小状态转移路线可以指的是:确定最小状态组合数的采用路线,具体地,例如,存在A状态,B状态以及D状态,则采样过程中,可以将A状态和B状态作为一组,D状态作为一组,则最小状态组合数为2组,若存在A状态,B状态以及D状态,则采样过程中,可以将A状态,B状态以及D状态分别都作为不同的组,则最小状态组合数为3组,需要说明的是,分组不同,采样过程中的消耗均不同,因而,需要在满足资源消耗限制下,确定每个预设本地模型参数在对应所述状态采样算法下的最小状态转移路线。Determining the minimum state transition route of each preset local model parameter corresponding to the state sampling algorithm, specifically, the minimum state transition route may refer to: determining the adopted route of the minimum number of state combinations, specifically, for example, there is A state, B state and D state, in the sampling process, A state and B state can be used as a group, D state as a group, the minimum number of state combinations is 2 groups, if there are A state, B state and D state, In the sampling process, the A state, the B state and the D state can be regarded as different groups, and the minimum number of state combinations is 3 groups. It should be noted that the consumption in the sampling process is different for different groups. Therefore, it is necessary to Under the condition that the resource consumption limit is satisfied, the minimum state transition route of each preset local model parameter corresponding to the state sampling algorithm is determined.
步骤a4,根据所述状态采样算法以及所述最小状态转移路线,得到预设本地样本数据的识别状态,以确定第一参与方所有预设本地模型参数的组合状态信息。In step a4, according to the state sampling algorithm and the minimum state transition route, the identification state of the preset local sample data is obtained, so as to determine the combined state information of all preset local model parameters of the first participant.
根据所述状态采样算法以及各个最小状态转移路线,组合得到预设本地样本数据的识别状态,以确定第一参与方所有预设本地模型参数的组合状态信息。According to the state sampling algorithm and each minimum state transition route, the identification state of the preset local sample data is combined to determine the combined state information of all preset local model parameters of the first participant.
步骤S20,根据所述组合状态信息,确定待联邦的目标模型参数;Step S20, determining the target model parameters to be federated according to the combined state information;
步骤S30,基于所述待联邦的目标模型参数,与各个第二参与方进行联邦训练,得到所述第一参与方的预设预测模型。Step S30, based on the target model parameters to be federated, perform federation training with each second participant to obtain a preset prediction model of the first participant.
在本实施例中,根据所述组合状态信息,确定待联邦的目标模型参数,例如,假设样本特征存在A状态,B状态,C状态三种状态,A状态,B状态,C状态三种状态分别对应的识别概率为70%,20%,10%,则样本特征被识别为A状态时,对应的识别模型参数如权重可以是0.7。在得到,䯮模型参数后,基于所述待联邦的目标模型参数,与各个第二参与方进行联邦训练,得到所述第一参与方的预设预测模型。In this embodiment, the target model parameters to be federated are determined according to the combined state information. For example, it is assumed that the sample features have three states: A state, B state, and C state, A state, B state, and C state. The corresponding recognition probabilities are 70%, 20%, and 10%, respectively. When the sample feature is recognized as state A, the corresponding recognition model parameters such as weight can be 0.7. After obtaining the model parameters, based on the target model parameters to be federated, perform federation training with each second participant to obtain a preset prediction model of the first participant.
本申请提供一种基于状态转移核优化的数据处理方法、装置、设备及介质,与相关技术中,不同参与方直接进行数据交换,且通过固定的方式确定样本数据不同状态的识别概率,致使模型训练过程中资源适用性差,侵犯用户隐私相比,本申请在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息;根据所述组合状态信息,确定待联邦的目标模型参数;基于所述待联邦的目标模型参数,与各个第二参与方进行联邦训练,得到所述第一参与方的预设预测模型。在本申请中,由于第一参与方与各个第二参与方进行联邦训练,因而,避免不同参与方直接进行数据的交互造成用户的隐私安全隐患,另外,在本申请中,在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息,即是基于资源属性信息以动态方式确定本地样本数据的识别状态,以确定第一参与方所有预设本地模型参数的组合状态信息,而不是通过固定的方式确定样本数据不同状态的识别概率,因而,提升了模型训练过程中资源适配性,解决了相关技术中通过固定的方式确定样本数据不同状态的识别概率,致使模型训练过程资源适配性差,且易侵犯用户隐私的技术问题。The present application provides a data processing method, device, equipment and medium based on state transition kernel optimization. In the related art, different participants directly exchange data, and determine the identification probabilities of different states of sample data in a fixed manner, so that the model Compared with the poor applicability of resources and violation of user privacy in the training process, the present application dynamically determines the state of the preset local sample data according to the resource attribute information of the first participant in the process of training the local model parameters by the first participant. a sampling algorithm to obtain identification state information of preset local sample data to determine combined state information of all preset local model parameters of the first participant; according to the combined state information, determine the target model parameters to be federated; based on the The target model parameters to be federated are federated with each second participant to obtain a preset prediction model of the first participant. In this application, since the first participant performs federated training with each of the second participants, the direct data interaction between different participants is avoided to cause user privacy and security risks. In addition, in this application, in the first participant In the process of training local model parameters each time, the state sampling algorithm of the preset local sample data is dynamically determined according to the resource attribute information of the first participant, so as to obtain the identification state information of the preset local sample data, so as to determine the first participant. The combined state information of all preset local model parameters of the party, that is, the identification state of the local sample data is dynamically determined based on the resource attribute information, so as to determine the combined state information of all the preset local model parameters of the first party, rather than fixed The recognition probability of different states of the sample data is determined by the method, so the adaptability of resources in the model training process is improved, and the recognition probability of different states of the sample data is determined in a fixed way in the related art, resulting in poor resource adaptability in the model training process. , and technical problems that are prone to infringe on user privacy.
进一步地,基于本申请中第一实施例,提供另一实施例,在该实施例中,所述分别确定各个预设本地模型参数的子内存消耗上限的步骤,包括:Further, based on the first embodiment in this application, another embodiment is provided. In this embodiment, the step of respectively determining the sub-memory consumption upper limit of each preset local model parameter includes:
步骤A1,确定各个预设本地模型参数对模型训练结果的影响程度;Step A1, determining the degree of influence of each preset local model parameter on the model training result;
确定各个预设本地模型参数对模型训练结果的影响程度的方式包括:Ways to determine the degree of influence of each preset local model parameter on the model training result include:
确定各个预设本地模型参数的权重大小,以确定对模型训练结果的影响程度,或者确定各个预设本地模型参数的影响因子的大小,以确定对模型训练结果的影响程度。Determine the weight of each preset local model parameter to determine the degree of influence on the model training result, or determine the size of the influence factor of each preset local model parameter to determine the degree of influence on the model training result.
步骤A2,根据所述影响程度,确定各个预设本地模型参数的子内存消耗上限。Step A2: Determine the sub-memory consumption upper limit of each preset local model parameter according to the influence degree.
根据所述影响程度,确定各个预设本地模型参数的子内存消耗上限,其中,影响程度大,则确定各个预设本地模型参数的子内存消耗上限高,其中,影响程度可以通过影响因子大小确定。According to the influence degree, the upper limit of sub-memory consumption of each preset local model parameter is determined, wherein, if the degree of influence is large, it is determined that the upper limit of sub-memory consumption of each preset local model parameter is high, wherein the degree of influence can be determined by the size of the influence factor .
在本实施例中,通过确定各个预设本地模型参数对模型训练结果的影响程度;根据所述影响程度,确定各个预设本地模型参数的子内存消耗上限。在本实施例中,准确确定各个预设本地模型参数的子内存消耗上限。In this embodiment, the influence degree of each preset local model parameter on the model training result is determined; according to the influence degree, the sub-memory consumption upper limit of each preset local model parameter is determined. In this embodiment, the sub-memory consumption upper limit of each preset local model parameter is accurately determined.
进一步地,基于本申请中第一实施例,提供另一实施例,在该实施例中,具体地,在动态确定预设本地样本数据的状态采样算法的过程中,还根据所述内存消耗上限以及预设采样消耗计算规则确定需要保存的采样中间参数。Further, based on the first embodiment in this application, another embodiment is provided. In this embodiment, specifically, in the process of dynamically determining the state sampling algorithm of the preset local sample data, the upper limit of memory consumption is also determined according to the memory consumption limit. And the preset sampling consumption calculation rule determines the intermediate sampling parameters that need to be saved.
在本实施例中,在内存资源丰富时,可以使用内存资源换取效率,具体地,根据所述内存消耗上限以及预设采样消耗计算规则确定需要保存的采样中间参数,例如,由于样本数据包括各个样本特征Q1特征,Q2特征,Q3特征,每个样本特征又有不同的状态如Q1特征的A状态,B状态,C状态,Q2特征的D状态,E状态,Q3特征的F状态,G状态以及H状态,在基于各个样本特征对应各状态得到组合状态信息的过程中,如Q1特征-A状态,Q2特征D状态以及Q3特征F状态组合,或者Q1特征-B状态,Q2特征D状态以及Q3特征F状态组合等等,在相关技术中,是随机组合的,而在本实施例中,为了提升组合效率,进行有序组合,具体地,在组合的过程中,可以保存Q1特征-A状态(占据一定内存,能否根据所述内存消耗上限以及预设采样消耗计算规则确定),进而,先将Q1特征-A状态和Q2特征各个状态,以及Q3特征各个状态进行组合,再将Q1特征-B状态和Q2特征各个状态,以及Q3特征各个状态进行组合,进而,提升得到输出数据的效率。具体地,在本实施例中,还可以针对不同特征设置一个别名表(AliasTable), 然后基于每个别名表进行状态的组合,提升效率。In this embodiment, when memory resources are abundant, memory resources can be used for efficiency. Specifically, the sampling intermediate parameters that need to be saved are determined according to the memory consumption upper limit and the preset sampling consumption calculation rule. For example, since the sample data includes various Sample feature Q1 feature, Q2 feature, Q3 feature, each sample feature has different states such as A state, B state, C state of Q1 feature, D state of Q2 feature, E state, F state of Q3 feature, G state and H state, in the process of obtaining combined state information based on each sample feature corresponding to each state, such as Q1 feature-A state, Q2 feature D state and Q3 feature F state combination, or Q1 feature-B state, Q2 feature D state and The Q3 feature F state combination, etc., in the related art, are randomly combined, but in this embodiment, in order to improve the combination efficiency, an orderly combination is performed. Specifically, during the combination process, the Q1 feature-A can be saved. state (occupying a certain amount of memory, whether it can be determined according to the upper limit of memory consumption and the preset sampling consumption calculation rule), and then, first combine the Q1 feature-A state and each state of the Q2 feature, and each state of the Q3 feature, and then combine the Q1 feature-A state and each state of the Q2 feature. The feature-B state is combined with each state of the Q2 feature and each state of the Q3 feature, thereby improving the efficiency of obtaining the output data. Specifically, in this embodiment, an alias table (AliasTable) may also be set for different features, and then states are combined based on each alias table to improve efficiency.
进一步地,基于本申请中第一实施例和第二实施例,所述基于所述待联邦的第一模型参数,与各个第二参与方进行联邦训练,得到所述第一参与方的预设预测模型的步骤,包括:Further, based on the first embodiment and the second embodiment in the present application, the first model parameter to be federated is used to perform federation training with each second participant to obtain the preset of the first participant. The steps of the predictive model include:
步骤B1,基于所述待联邦的第一模型参数,通过执行预设联邦流程,与各个第二参与方的待联邦的第二模型参数进行聚合,以得到聚合参数,以基于所述聚合参数对待联邦的第一模型参数进行替换更新,得到所述第一参与方的替换更新的模型参数;Step B1, based on the first model parameters to be federated, by executing a preset federation process, aggregate with the second model parameters to be federated of each second participant to obtain aggregated parameters, which are treated based on the aggregated parameters. The first model parameters of the federation are replaced and updated to obtain the replaced and updated model parameters of the first participant;
在本实施例中,基于所述待联邦的第一模型参数,通过执行预设联邦流程,直接与各个第二参与方的待联邦的第二模型参数进行聚合,以得到聚合参数,以基于所述聚合参数对待联邦的第一模型参数进行替换更新,得到所述第一参与方的替换更新的模型参数。In this embodiment, based on the first model parameters to be federated, by executing a preset federation process, it is directly aggregated with the second model parameters to be federated of each second participant, so as to obtain aggregated parameters, which are based on the predetermined federation process. The aggregation parameters are replaced and updated to the first model parameters of the federation to obtain the replaced and updated model parameters of the first participant.
步骤B2,继续动态确定所述替换更新后的所述模型参数的状态采样算法,以继续确定待联邦的第一参与方的其他模型参数,并不断进行迭代训练,直至达到预设训练完成条件,得到预设预测模型。Step B2, continue to dynamically determine the state sampling algorithm of the replaced and updated model parameters, so as to continue to determine other model parameters of the first participant to be federated, and continue to perform iterative training until the preset training completion condition is reached, Get a preset predictive model.
与上述确定模型参数的状态采样算法一样,继续动态确定所述替换更新后的所述模型参数的状态采样算法,以继续确定待联邦的第一参与方的其他模型参数如下一轮替换更新的模型参数,并不断进行迭代训练,直至达到预设训练完成条件如预设损失函数收敛,得到预设预测模型。As with the above-mentioned state sampling algorithm for determining model parameters, continue to dynamically determine the state sampling algorithm for the replaced and updated model parameters, so as to continue to determine other model parameters of the first participant to be federated in the next round to replace the updated model. parameters, and continue to perform iterative training until a preset training completion condition is reached, such as the preset loss function convergence, and a preset prediction model is obtained.
所述第一参与方通过第三方与第二参与方进行联邦通信连接;the first participant is connected to the second participant for federal communication through a third party;
所述基于所述待联邦的第一模型参数,通过执行预设联邦流程,与各个第二参与方的待联邦的第二模型参数进行聚合,以得到聚合参数,以基于所述聚合参数对待联邦的第一模型参数进行替换更新,得到所述第一参与方的替换更新的模型参数的步骤,包括:Based on the first model parameters to be federated, by executing a preset federation process, aggregate with the second model parameters to be federated of each second participant to obtain aggregated parameters, so as to treat federation based on the aggregated parameters The steps of replacing and updating the first model parameters of the first participant, and obtaining the replaced and updated model parameters of the first participant, include:
步骤C1,将所述待联邦的第一模型参数,加密发送给第三方,以供所述第三方基于所述待联邦的第一模型参数,以及接收到的各个第二参与方的待联邦的第二模型参数进行聚合,得到聚合参数;Step C1, encrypting the first model parameters to be federated and sent to a third party for the third party to use based on the first model parameters to be federated and the received data of each second participant to be federated. The second model parameters are aggregated to obtain aggregated parameters;
将所述待联邦的第一模型参数,加密发送给第三方,以避免模型参数泄露,以供所述第三方基于所述待联邦的第一模型参数,以及接收到的各个第二参与方的待联邦的第二模型参数进行聚合,得到聚合参数,将所述待联邦的第一模型参数,加密发送给第三方,以供所述第三方基于所述待联邦的第一模型参数,以及接收到的各个第二参与方的待联邦的第二模型参数进行聚合,得到聚合参数。The first model parameters to be federated are encrypted and sent to a third party to avoid leakage of model parameters for the third party to use based on the first model parameters to be federated and the received data of each second participant. The second model parameters to be federated are aggregated to obtain aggregated parameters, and the first model parameters to be federated are encrypted and sent to a third party for the third party to receive based on the first model parameters to be federated. The obtained second model parameters of each second participant to be federated are aggregated to obtain aggregated parameters.
步骤C2,接收所述第三方加密发送的聚合参数,基于所述聚合参数对待联邦的第一模型参数进行替换更新,得到所述第一参与方的替换更新的模型参数。Step C2: Receive the aggregation parameters encrypted and sent by the third party, replace and update the first model parameters of the federation based on the aggregation parameters, and obtain the replaced and updated model parameters of the first participant.
接收所述第三方加密发送的聚合参数,基于所述聚合参数对待联邦的第一模型参数进行替换更新,得到所述第一参与方的替换更新的模型参数。Receive the aggregation parameter encrypted and sent by the third party, and replace and update the first model parameter of the federation based on the aggregation parameter to obtain the replaced and updated model parameter of the first participant.
本实施例中,通过联邦模型准确得到预设预测模型。In this embodiment, the preset prediction model is accurately obtained through the federated model.
参照图3,图3是本申请实施例方案涉及的硬件运行环境的设备结构示意图。Referring to FIG. 3 , FIG. 3 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application.
如图3所示,该基于状态转移核优化的数据处理设备可以包括:处理器1001,例如CPU,存储器1005,通信总线1002。其中,通信总线1002用于实现处理器1001和存储器1005之间的连接通信。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储设备。As shown in FIG. 3 , the data processing device based on state transition core optimization may include: a processor 1001 , such as a CPU, a memory 1005 , and a communication bus 1002 . Among them, the communication bus 1002 is used to realize the connection communication between the processor 1001 and the memory 1005 . The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory). memory), such as disk storage. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001 .
可选地,该基于状态转移核优化的数据处理设备还可以包括矩形用户接口、网络接口、摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。矩形用户接口可以包括显示屏(Display)、输入子模块比如键盘(Keyboard),可选矩形用户接口还可以包括标准的有线接口、无线接口。网络接口可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。Optionally, the data processing device based on state transition kernel optimization may also include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency, radio frequency) circuits, sensors, audio circuits, WiFi modules, etc. The rectangular user interface may include a display screen (Display) and an input sub-module such as a keyboard (Keyboard), and the optional rectangular user interface may also include a standard wired interface and a wireless interface. Optional network interfaces may include standard wired interfaces and wireless interfaces (such as WI-FI interfaces).
本领域技术人员可以理解,图3中示出的基于状态转移核优化的数据处理设备结构并不构成对基于状态转移核优化的数据处理设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the data processing device optimized based on the state transition core shown in FIG. 3 does not constitute a limitation on the data processing device optimized based on the state transition core, and may include more or less than shown components, or a combination of certain components, or a different arrangement of components.
如图3所示,作为一种介质的存储器1005中可以包括操作系统、网络通信模块以及基于状态转移核优化的数据处理程序。操作系统是管理和控制基于状态转移核优化的数据处理设备硬件和软件资源的程序,支持基于状态转移核优化的数据处理程序以及其它软件和/或程序的运行。网络通信模块用于实现存储器1005内部各组件之间的通信,以及与基于状态转移核优化的数据处理系统中其它硬件和软件之间通信。As shown in FIG. 3 , the memory 1005 as a medium may include an operating system, a network communication module, and a data processing program optimized based on the state transition kernel. The operating system is a program that manages and controls the hardware and software resources of the data processing device optimized based on the state transition core, and supports the operation of the data processing program optimized based on the state transition core and other software and/or programs. The network communication module is used to realize the communication between various components in the memory 1005, as well as the communication with other hardware and software in the data processing system optimized based on the state transition core.
在图3所示的基于状态转移核优化的数据处理设备中,处理器1001用于执行存储器1005中存储的基于状态转移核优化的数据处理程序,实现上述任一项所述的基于状态转移核优化的数据处理方法的步骤。In the data processing device based on state transition core optimization shown in FIG. 3 , the processor 1001 is configured to execute the data processing program based on state transition core optimization stored in the memory 1005 to implement any one of the above state transition core based data processing programs Steps for an optimized data processing method.
本申请基于状态转移核优化的数据处理设备具体实施方式与上述基于状态转移核优化的数据处理方法各实施例基本相同,在此不再赘述。The specific implementation manner of the data processing device optimized based on the state transition core of the present application is basically the same as the above-mentioned embodiments of the data processing method based on the optimization of the state transition core, and will not be repeated here.
本申请还提供一种基于状态转移核优化的数据处理装置,应用于第一参与方,所述第一参与方与第二参与方进行联邦通信连接,所述基于状态转移核优化的数据处理装置包括:The present application also provides a data processing apparatus based on state transition core optimization, which is applied to a first participant, and the first participant is connected to a second participant for federated communication, and the data processing apparatus based on state transition core optimization include:
第一确定模块,用于在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息;The first determination module is configured to dynamically determine the state sampling algorithm of the preset local sample data according to the resource attribute information of the first participant in each process of training the local model parameters by the first participant, so as to obtain the preset local model. Identification status information of the sample data to determine the combined status information of all preset local model parameters of the first participant;
第二确定模块,用于根据所述组合状态信息,确定待联邦的目标模型参数;a second determination module, configured to determine the target model parameters to be federated according to the combined state information;
联邦模块,用于基于所述待联邦的目标模型参数,与各个第二参与方进行联邦训练,得到所述第一参与方的预设预测模型。The federation module is configured to perform federated training with each second participant based on the target model parameters to be federated to obtain a preset prediction model of the first participant.
可选地,所述第一确定模块包括:Optionally, the first determining module includes:
第一确定单元,用于在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息确定内存消耗上限;a first determining unit, configured to determine the upper limit of memory consumption according to the resource attribute information of the first participant during each process of training the local model parameters by the first participant;
第二确定单元,用于根据所述内存消耗上限以及预设采样消耗计算规则,动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方每个预设本地模型参数的状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息。The second determination unit is configured to dynamically determine the state sampling algorithm of the preset local sample data according to the upper limit of memory consumption and the preset sampling consumption calculation rule, so as to obtain the identification state information of the preset local sample data, so as to determine the first participation state information of each preset local model parameter of the first party to determine the combined state information of all preset local model parameters of the first participant.
可选地,所述第二确定单元包括:Optionally, the second determining unit includes:
第一确定子单元,用于分别确定各个预设本地模型参数的子内存消耗上限;a first determining subunit, configured to respectively determine the sub-memory consumption upper limit of each preset local model parameter;
第二确定子单元,用于确定每个预设本地模型参数的类型与数量,根据所述子内存消耗上限,所述预设采样消耗计算规则以及所述状态类型与数量,通过遍历方式确定预设本地样本数据的状态采样算法;The second determination subunit is used to determine the type and quantity of each preset local model parameter, and according to the sub-memory consumption upper limit, the preset sampling consumption calculation rule, and the state type and quantity, determine the preset by traversal. Set the state sampling algorithm of local sample data;
第三确定子单元,用于确定每个预设本地模型参数在对应所述状态采样算法下的最小状态转移路线;a third determination subunit, configured to determine the minimum state transition route of each preset local model parameter corresponding to the state sampling algorithm;
第四确定子单元,用于根据所述状态采样算法以及所述最小状态转移路线,得到预设本地样本数据的识别状态,以确定第一参与方所有预设本地模型参数的组合状态信息。The fourth determination subunit is configured to obtain the identification state of the preset local sample data according to the state sampling algorithm and the minimum state transition route, so as to determine the combined state information of all preset local model parameters of the first participant.
可选地,所述第一确定子单元用于实现:Optionally, the first determination subunit is used to implement:
确定各个预设本地模型参数对模型训练结果的影响程度;Determine the degree of influence of each preset local model parameter on the model training result;
根据所述影响程度,确定各个预设本地模型参数的子内存消耗上限。According to the influence degree, the upper limit of sub-memory consumption of each preset local model parameter is determined.
可选地,在动态确定预设本地样本数据的状态采样算法的过程中,还根据所述内存消耗上限以及预设采样消耗计算规则确定需要保存的采样中间参数。Optionally, in the process of dynamically determining the state sampling algorithm of the preset local sample data, the intermediate sampling parameters that need to be saved are also determined according to the upper limit of memory consumption and the preset sampling consumption calculation rule.
可选地,所述联邦模块包括:Optionally, the federation module includes:
聚合单元,用于基于所述待联邦的第一模型参数,通过执行预设联邦流程,与各个第二参与方的待联邦的第二模型参数进行聚合,以得到聚合参数,以基于所述聚合参数对待联邦的第一模型参数进行替换更新,得到所述第一参与方的替换更新的模型参数;an aggregation unit, configured to perform aggregation with the second model parameters to be federated of each second participant based on the first model parameters to be federated, by executing a preset federation process, so as to obtain aggregation parameters to be based on the aggregation The parameters are replaced and updated by the first model parameters of the federation to obtain the replaced and updated model parameters of the first participant;
第三确定单元,用于继续动态确定所述替换更新后的所述模型参数的状态采样算法,以继续确定待联邦的第一参与方的其他模型参数,并不断进行迭代训练,直至达到预设训练完成条件,得到预设预测模型。The third determination unit is configured to continue to dynamically determine the state sampling algorithm of the replaced and updated model parameters, so as to continue to determine other model parameters of the first participant to be federated, and to continuously perform iterative training until the preset value is reached. After the training is completed, the preset prediction model is obtained.
可选地,所述第一参与方通过第三方与第二参与方进行联邦通信连接;Optionally, the first participant is connected with the second participant through a third party for federal communication;
所述第三确定单元包括:The third determining unit includes:
发送单元,用于将所述待联邦的第一模型参数,加密发送给第三方,以供所述第三方基于所述待联邦的第一模型参数,以及接收到的各个第二参与方的待联邦的第二模型参数进行聚合,得到聚合参数;The sending unit is configured to encrypt and send the first model parameters to be federated to a third party, so that the third party can use the first model parameters to be federated and the received data from each second participant to be sent to a third party. The second model parameters of the federation are aggregated to obtain aggregated parameters;
接收单元,用于接收所述第三方加密发送的聚合参数,基于所述聚合参数对待联邦的第一模型参数进行替换更新,得到所述第一参与方的替换更新的模型参数。A receiving unit, configured to receive the aggregation parameters encrypted and sent by the third party, and to replace and update the first model parameters of the federation based on the aggregation parameters to obtain the replaced and updated model parameters of the first participant.
本申请基于状态转移核优化的数据处理装置的具体实施方式与上述基于状态转移核优化的数据处理方法各实施例基本相同,在此不再赘述。The specific implementations of the data processing apparatus based on state transition kernel optimization of the present application are basically the same as the above-mentioned embodiments of the data processing method based on state transition kernel optimization, and will not be repeated here.
本申请实施例提供了一种介质,且所述介质存储有一个或者一个以上程序,所述一个或者一个以上程序还可被一个或者一个以上的处理器执行以用于实现上述任一项所述的基于状态转移核优化的数据处理方法的步骤。An embodiment of the present application provides a medium, and the medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement any one of the above The steps of a data processing method based on state transition kernel optimization.
本申请介质具体实施方式与上述基于状态转移核优化的数据处理方法各实施例基本相同,在此不再赘述。The specific implementation manner of the medium of the present application is basically the same as the above-mentioned embodiments of the data processing method based on the optimization of the state transition kernel, and details are not repeated here.
本申请还提供一种计算机程序产品、包括计算机程序,该计算机程序被处理器执行时实现上述的基于状态转移核优化的数据处理方法的步骤。The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned data processing method based on state transition kernel optimization.
本申请计算机程序产品的具体实施方式与上述基于状态转移核优化的数据处理方法各实施例基本相同,在此不再赘述。The specific implementation manner of the computer program product of the present application is basically the same as the above-mentioned embodiments of the data processing method based on the optimization of the state transition kernel, and will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages or disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on such understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a medium (such as ROM/RAM, magnetic disk, optical disk) ), including several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in other related technical fields , are similarly included in the scope of patent protection of the present invention.

Claims (20)

  1. 一种基于状态转移核优化的数据处理方法,其中,应用于第一参与方,所述第一参与方与第二参与方进行联邦通信连接,所述基于状态转移核优化的数据处理方法包括:A data processing method based on state transition kernel optimization, wherein, applied to a first participant, the first participant is connected with a second participant for federated communication, and the data processing method based on state transition kernel optimization includes:
    在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息;In the process of each training of local model parameters by the first participant, the state sampling algorithm of the preset local sample data is dynamically determined according to the resource attribute information of the first participant, so as to obtain the identification state information of the preset local sample data, to determine the combined state information of all preset local model parameters of the first participant;
    根据所述组合状态信息,确定待联邦的目标模型参数;According to the combined state information, determine the target model parameters to be federated;
    基于所述待联邦的目标模型参数,与各个第二参与方进行联邦训练,得到所述第一参与方的预设预测模型。Based on the target model parameters to be federated, federation training is performed with each second participant to obtain a preset prediction model of the first participant.
  2. 如权利要求1所述的基于状态转移核优化的数据处理方法,其中,所述在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息的步骤,包括:The data processing method based on state transition kernel optimization according to claim 1, wherein, in the process of each training of local model parameters by the first participant, the predetermined prediction is dynamically determined according to the resource attribute information of the first participant. The steps of setting the state sampling algorithm of the local sample data to obtain the identification state information of the preset local sample data to determine the combined state information of all preset local model parameters of the first participant include:
    在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息确定内存消耗上限;In each process of training the local model parameters by the first participant, determining the upper limit of memory consumption according to the resource attribute information of the first participant;
    根据所述内存消耗上限以及预设采样消耗计算规则,动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方每个预设本地模型参数的状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息。According to the upper limit of memory consumption and the preset sampling consumption calculation rule, the state sampling algorithm of the preset local sample data is dynamically determined, so as to obtain the identification state information of the preset local sample data, so as to determine each preset local model of the first participant The state information of the parameters is used to determine the combined state information of all preset local model parameters of the first participant.
  3. 如权利要求2所述的基于状态转移核优化的数据处理方法,其中,所述根据所述内存消耗上限以及预设采样消耗计算规则,动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方每个预设本地模型参数的状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息的步骤,包括:The data processing method based on state transition core optimization according to claim 2, wherein the state sampling algorithm of the preset local sample data is dynamically determined according to the upper limit of memory consumption and the preset sampling consumption calculation rule, so as to obtain the preset sampling algorithm. The steps of setting the identification state information of the local sample data to determine the state information of each preset local model parameter of the first participant to determine the combined state information of all the preset local model parameters of the first participant include:
    分别确定各个预设本地模型参数的子内存消耗上限;Determine the sub-memory consumption upper limit of each preset local model parameter separately;
    确定每个预设本地模型参数的类型与数量,根据所述子内存消耗上限,所述预设采样消耗计算规则以及所述状态类型与数量,通过遍历方式确定预设本地样本数据的状态采样算法;Determine the type and quantity of each preset local model parameter, and determine the state sampling algorithm of the preset local sample data by traversing according to the sub-memory consumption upper limit, the preset sampling consumption calculation rule, and the state type and quantity ;
    确定每个预设本地模型参数在对应所述状态采样算法下的最小状态转移路线;Determine the minimum state transition route of each preset local model parameter corresponding to the state sampling algorithm;
    根据所述状态采样算法以及所述最小状态转移路线,得到预设本地样本数据的识别状态,以确定第一参与方所有预设本地模型参数的组合状态信息。According to the state sampling algorithm and the minimum state transition route, the identification state of the preset local sample data is obtained, so as to determine the combined state information of all preset local model parameters of the first participant.
  4. 如权利要求3所述的基于状态转移核优化的数据处理方法,其中,所述分别确定各个预设本地模型参数的子内存消耗上限的步骤,包括:The data processing method based on state transition kernel optimization according to claim 3, wherein the step of respectively determining the sub-memory consumption upper limit of each preset local model parameter comprises:
    确定各个预设本地模型参数对模型训练结果的影响程度;Determine the degree of influence of each preset local model parameter on the model training result;
    根据所述影响程度,确定各个预设本地模型参数的子内存消耗上限。According to the influence degree, the upper limit of sub-memory consumption of each preset local model parameter is determined.
  5. 如权利要求4所述的基于状态转移核优化的数据处理方法,其中,所述确定各个预设本地模型参数对模型训练结果的影响程度的方式包括:The data processing method based on state transition kernel optimization according to claim 4, wherein the manner of determining the degree of influence of each preset local model parameter on the model training result comprises:
    确定各个预设本地模型参数的权重大小,以确定对模型训练结果的影响程度,或者确定各个预设本地模型参数的影响因子的大小,以确定对模型训练结果的影响程度。Determine the weight of each preset local model parameter to determine the degree of influence on the model training result, or determine the size of the influence factor of each preset local model parameter to determine the degree of influence on the model training result.
  6. 如权利要求2所述的基于状态转移核优化的数据处理方法,其中,在动态确定预设本地样本数据的状态采样算法的过程中,还根据所述内存消耗上限以及预设采样消耗计算规则确定需要保存的采样中间参数。The data processing method based on state transition kernel optimization according to claim 2, wherein, in the process of dynamically determining the state sampling algorithm of the preset local sample data, it is further determined according to the upper limit of memory consumption and the calculation rule of preset sampling consumption Sample intermediate parameters that need to be saved.
  7. 如权利要求1所述的基于状态转移核优化的数据处理方法,其中,所述基于所述待联邦的第一模型参数,与各个第二参与方进行联邦训练,得到所述第一参与方的预设预测模型的步骤,包括:The data processing method based on state transition kernel optimization according to claim 1, wherein the federation training is performed with each second participant based on the first model parameters to be federated to obtain the data of the first participant. The steps to preset a predictive model include:
    基于所述待联邦的第一模型参数,通过执行预设联邦流程,与各个第二参与方的待联邦的第二模型参数进行聚合,以得到聚合参数,以基于所述聚合参数对待联邦的第一模型参数进行替换更新,得到所述第一参与方的替换更新的模型参数;Based on the first model parameters to be federated, by executing a preset federation process, aggregate with the second model parameters to be federated of each second participant to obtain aggregation parameters, so as to treat the federated first model parameters based on the aggregation parameters A model parameter is replaced and updated to obtain the replaced and updated model parameter of the first participant;
    继续动态确定所述替换更新后的所述模型参数的状态采样算法,以继续确定待联邦的第一参与方的其他模型参数,并不断进行迭代训练,直至达到预设训练完成条件,得到预设预测模型。Continue to dynamically determine the state sampling algorithm of the replaced and updated model parameters to continue to determine other model parameters of the first participant to be federated, and continue to perform iterative training until the preset training completion condition is reached, and a preset prediction model.
  8. 如权利要求7所述的基于状态转移核优化的数据处理方法,其中,所述第一参与方通过第三方与第二参与方进行联邦通信连接;The data processing method based on state transition kernel optimization according to claim 7, wherein the first participant is connected with the second participant through a third party for federated communication;
    所述基于所述待联邦的第一模型参数,通过执行预设联邦流程,与各个第二参与方的待联邦的第二模型参数进行聚合,以得到聚合参数,以基于所述聚合参数对待联邦的第一模型参数进行替换更新,得到所述第一参与方的替换更新的模型参数的步骤,包括:Based on the first model parameters to be federated, by executing a preset federation process, aggregate with the second model parameters to be federated of each second participant to obtain aggregated parameters, so as to treat federation based on the aggregated parameters The steps of replacing and updating the first model parameters of the first participant, and obtaining the replaced and updated model parameters of the first participant, include:
    将所述待联邦的第一模型参数,加密发送给第三方,以供所述第三方基于所述待联邦的第一模型参数,以及接收到的各个第二参与方的待联邦的第二模型参数进行聚合,得到聚合参数;encrypting the first model parameters to be federated and sent to a third party for the third party to use the first model parameters to be federated and the received second models of each second participant to be federated The parameters are aggregated to obtain the aggregated parameters;
    接收所述第三方加密发送的聚合参数,基于所述聚合参数对待联邦的第一模型参数进行替换更新,得到所述第一参与方的替换更新的模型参数。Receive the aggregation parameter encrypted and sent by the third party, and replace and update the first model parameter of the federation based on the aggregation parameter to obtain the replaced and updated model parameter of the first participant.
  9. 如权利要求1-8任一项所述的基于状态转移核优化的数据处理方法,其中,所述资源属性信息包括算力资源、存储资源以及传输资源,所述预设本地样本数据的状态采样算法包括有放回采样算法、无放回采样算法、联邦蒙特普洛斯-黑廷斯采样算法、优化的联邦蒙特普洛斯-黑廷斯采样算法。The data processing method based on state transition core optimization according to any one of claims 1 to 8, wherein the resource attribute information includes computing resources, storage resources and transmission resources, and the state sampling of the preset local sample data The algorithms include replacement sampling algorithm, non-replacement sampling algorithm, federated Montepross-Hattings sampling algorithm, and optimized federated Montepross-Hattings sampling algorithm.
  10. 如权利要求1-8任一项所述的基于状态转移核优化的数据处理方法,其中,所述根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法包括:The data processing method based on state transition kernel optimization according to any one of claims 1 to 8, wherein the state sampling algorithm for dynamically determining preset local sample data according to the resource attribute information of the first participant comprises:
    根据所述第一参与方的资源属性信息动态确定预设本地样本数据中不同样本特征的状态采样算法。The state sampling algorithm for different sample features in the preset local sample data is dynamically determined according to the resource attribute information of the first participant.
  11. 一种基于状态转移核优化的数据处理装置,其中,应用于第一参与方,所述第一参与方与第二参与方进行联邦通信连接,所述基于状态转移核优化的数据处理装置包括:A data processing apparatus based on state transition core optimization, wherein, applied to a first participant, the first participant is connected with a second participant for federated communication, and the data processing apparatus based on state transition core optimization includes:
    第一确定模块,用于在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息;The first determination module is configured to dynamically determine the state sampling algorithm of the preset local sample data according to the resource attribute information of the first participant in each process of training the local model parameters by the first participant, so as to obtain the preset local model. Identification status information of the sample data to determine the combined status information of all preset local model parameters of the first participant;
    第二确定模块,用于根据所述组合状态信息,确定待联邦的目标模型参数;a second determination module, configured to determine the target model parameters to be federated according to the combined state information;
    联邦模块,用于基于所述待联邦的目标模型参数,与各个第二参与方进行联邦训练,得到所述第一参与方的预设预测模型。The federation module is configured to perform federated training with each second participant based on the target model parameters to be federated to obtain a preset prediction model of the first participant.
  12. 一种基于状态转移核优化的数据处理设备,其中,所述基于状态转移核优化的数据处理设备包括:存储器、处理器以及存储在存储器上的用于实现所述基于状态转移核优化的数据处理方法的程序,A data processing device based on state transition core optimization, wherein the data processing device based on state transition core optimization includes: a memory, a processor, and data processing stored on the memory for implementing the state transition core optimization method procedure,
    所述存储器用于存储实现基于状态转移核优化的数据处理方法的程序;The memory is used for storing a program for realizing the data processing method optimized based on the state transition kernel;
    所述处理器用于执行实现所述基于状态转移核优化的数据处理方法的程序,以实现以下步骤:The processor is configured to execute a program for implementing the data processing method optimized based on the state transition core, so as to realize the following steps:
    在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息;In each process of training local model parameters by the first participant, the state sampling algorithm of the preset local sample data is dynamically determined according to the resource attribute information of the first participant, so as to obtain the identification state information of the preset local sample data, to determine the combined state information of all preset local model parameters of the first participant;
    根据所述组合状态信息,确定待联邦的目标模型参数;According to the combined state information, determine the target model parameters to be federated;
    基于所述待联邦的目标模型参数,与各个第二参与方进行联邦训练,得到所述第一参与方的预设预测模型。Based on the target model parameters to be federated, federation training is performed with each second participant to obtain a preset prediction model of the first participant.
  13. 如权利要求12所述的基于状态转移核优化的数据处理设备,其中,所述处理器用于执行实现所述基于状态转移核优化的数据处理方法的程序,以实现以下步骤:The data processing device based on state transition core optimization according to claim 12, wherein the processor is configured to execute a program for implementing the data processing method based on state transition core optimization, so as to realize the following steps:
    在第一参与方每次训练本地模型参数的过程中,根据所述第一参与方的资源属性信息确定内存消耗上限;In each process of training the local model parameters by the first participant, determining the upper limit of memory consumption according to the resource attribute information of the first participant;
    根据所述内存消耗上限以及预设采样消耗计算规则,动态确定预设本地样本数据的状态采样算法,以得到预设本地样本数据的识别状态信息,以确定第一参与方每个预设本地模型参数的状态信息,以确定第一参与方所有预设本地模型参数的组合状态信息。According to the upper limit of memory consumption and the preset sampling consumption calculation rule, the state sampling algorithm of the preset local sample data is dynamically determined, so as to obtain the identification state information of the preset local sample data, so as to determine each preset local model of the first participant The state information of the parameters is used to determine the combined state information of all preset local model parameters of the first participant.
  14. 如权利要求13所述的基于状态转移核优化的数据处理设备,其中,所述处理器用于执行实现所述基于状态转移核优化的数据处理方法的程序,以实现以下步骤:The data processing device based on state transition core optimization according to claim 13, wherein the processor is configured to execute a program for implementing the data processing method based on state transition core optimization, so as to realize the following steps:
    分别确定各个预设本地模型参数的子内存消耗上限;Determine the sub-memory consumption upper limit of each preset local model parameter separately;
    确定每个预设本地模型参数的类型与数量,根据所述子内存消耗上限,所述预设采样消耗计算规则以及所述状态类型与数量,通过遍历方式确定预设本地样本数据的状态采样算法;Determine the type and quantity of each preset local model parameter, and determine the state sampling algorithm of the preset local sample data by traversing according to the sub-memory consumption upper limit, the preset sampling consumption calculation rule, and the state type and quantity ;
    确定每个预设本地模型参数在对应所述状态采样算法下的最小状态转移路线;Determine the minimum state transition route of each preset local model parameter corresponding to the state sampling algorithm;
    根据所述状态采样算法以及所述最小状态转移路线,得到预设本地样本数据的识别状态,以确定第一参与方所有预设本地模型参数的组合状态信息。According to the state sampling algorithm and the minimum state transition route, the identification state of the preset local sample data is obtained, so as to determine the combined state information of all preset local model parameters of the first participant.
  15. 如权利要求14所述的基于状态转移核优化的数据处理设备,其中,所述处理器用于执行实现所述基于状态转移核优化的数据处理方法的程序,以实现以下步骤:The data processing device based on state transition core optimization according to claim 14, wherein the processor is configured to execute a program for implementing the data processing method based on state transition core optimization, so as to realize the following steps:
    确定各个预设本地模型参数对模型训练结果的影响程度;Determine the degree of influence of each preset local model parameter on the model training result;
    根据所述影响程度,确定各个预设本地模型参数的子内存消耗上限。According to the influence degree, the upper limit of sub-memory consumption of each preset local model parameter is determined.
  16. 如权利要求13所述的基于状态转移核优化的数据处理设备,其中,在动态确定预设本地样本数据的状态采样算法的过程中,还根据所述内存消耗上限以及预设采样消耗计算规则确定需要保存的采样中间参数。The data processing device based on state transition core optimization according to claim 13, wherein, in the process of dynamically determining the state sampling algorithm of the preset local sample data, it is further determined according to the upper limit of memory consumption and the calculation rule of preset sampling consumption Sample intermediate parameters that need to be saved.
  17. 如权利要求12所述的基于状态转移核优化的数据处理设备,其中,所述处理器用于执行实现所述基于状态转移核优化的数据处理方法的程序,以实现以下步骤:The data processing device based on state transition core optimization according to claim 12, wherein the processor is configured to execute a program for implementing the data processing method based on state transition core optimization, so as to realize the following steps:
    基于所述待联邦的第一模型参数,通过执行预设联邦流程,与各个第二参与方的待联邦的第二模型参数进行聚合,以得到聚合参数,以基于所述聚合参数对待联邦的第一模型参数进行替换更新,得到所述第一参与方的替换更新的模型参数;Based on the first model parameters to be federated, by executing a preset federation process, aggregate with the second model parameters to be federated of each second participant to obtain aggregation parameters, so as to treat the federated first model parameters based on the aggregation parameters A model parameter is replaced and updated to obtain the replaced and updated model parameter of the first participant;
    继续动态确定所述替换更新后的所述模型参数的状态采样算法,以继续确定待联邦的第一参与方的其他模型参数,并不断进行迭代训练,直至达到预设训练完成条件,得到预设预测模型。Continue to dynamically determine the state sampling algorithm of the replaced and updated model parameters to continue to determine other model parameters of the first participant to be federated, and continue to perform iterative training until the preset training completion condition is reached, and a preset prediction model.
  18. 如权利要求17所述的基于状态转移核优化的数据处理设备,其中,所述第一参与方通过第三方与第二参与方进行联邦通信连接;The data processing device based on state transition core optimization of claim 17, wherein the first participant is connected to the second participant in federated communication through a third party;
    所述基于所述待联邦的第一模型参数,通过执行预设联邦流程,与各个第二参与方的待联邦的第二模型参数进行聚合,以得到聚合参数,以基于所述聚合参数对待联邦的第一模型参数进行替换更新,得到所述第一参与方的替换更新的模型参数的步骤,包括:Based on the first model parameters to be federated, by executing a preset federation process, aggregate with the second model parameters to be federated of each second participant to obtain aggregated parameters, so as to treat federation based on the aggregated parameters The steps of replacing and updating the first model parameters of the first participant, and obtaining the replaced and updated model parameters of the first participant, include:
    将所述待联邦的第一模型参数,加密发送给第三方,以供所述第三方基于所述待联邦的第一模型参数,以及接收到的各个第二参与方的待联邦的第二模型参数进行聚合,得到聚合参数;encrypting the first model parameters to be federated and sent to a third party for the third party to use the first model parameters to be federated and the received second models of each second participant to be federated The parameters are aggregated to obtain the aggregated parameters;
    接收所述第三方加密发送的聚合参数,基于所述聚合参数对待联邦的第一模型参数进行替换更新,得到所述第一参与方的替换更新的模型参数。Receive the aggregation parameter encrypted and sent by the third party, and replace and update the first model parameter of the federation based on the aggregation parameter to obtain the replaced and updated model parameter of the first participant.
  19. 一种介质,其中,所述介质上存储有实现基于状态转移核优化的数据处理方法的程序,所述实现基于状态转移核优化的数据处理方法的程序被处理器执行以实现如权利要求1至10中任一项所述基于状态转移核优化的数据处理方法的步骤。A medium, wherein a program for realizing a data processing method optimized based on a state transition kernel is stored on the medium, and the program for realizing a data processing method optimized based on a state transition kernel is executed by a processor to realize the method as claimed in claim 1 to Steps of the data processing method based on state transition kernel optimization described in any one of 10.
  20. 一种计算机程序产品,包括计算机程序,其中,该计算机程序被处理器执行时实现权利要求1至10中任一项所述的方法。A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method of any one of claims 1 to 10.
PCT/CN2021/101998 2021-01-27 2021-06-24 State transition core optimization-based data processing method, apparatus and device, and medium WO2022160578A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110115051.9A CN113158223A (en) 2021-01-27 2021-01-27 Data processing method, device, equipment and medium based on state transition kernel optimization
CN202110115051.9 2021-01-27

Publications (1)

Publication Number Publication Date
WO2022160578A1 true WO2022160578A1 (en) 2022-08-04

Family

ID=76878905

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/101998 WO2022160578A1 (en) 2021-01-27 2021-06-24 State transition core optimization-based data processing method, apparatus and device, and medium

Country Status (2)

Country Link
CN (1) CN113158223A (en)
WO (1) WO2022160578A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109711529A (en) * 2018-11-13 2019-05-03 中山大学 A kind of cross-cutting federal learning model and method based on value iterative network
CN110263908A (en) * 2019-06-20 2019-09-20 深圳前海微众银行股份有限公司 Federal learning model training method, equipment, system and storage medium
CN110874649A (en) * 2020-01-16 2020-03-10 支付宝(杭州)信息技术有限公司 State machine-based federal learning method, system, client and electronic equipment
CN111882133A (en) * 2020-08-03 2020-11-03 重庆大学 Prediction-based federated learning communication optimization method and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110297848B (en) * 2019-07-09 2024-02-23 深圳前海微众银行股份有限公司 Recommendation model training method, terminal and storage medium based on federal learning
CN110363305B (en) * 2019-07-17 2023-09-26 深圳前海微众银行股份有限公司 Federal learning method, system, terminal device and storage medium
CN111275491B (en) * 2020-01-21 2023-12-26 深圳前海微众银行股份有限公司 Data processing method and device
CN111553470B (en) * 2020-07-10 2020-10-27 成都数联铭品科技有限公司 Information interaction system and method suitable for federal learning
CN111898768A (en) * 2020-08-06 2020-11-06 深圳前海微众银行股份有限公司 Data processing method, device, equipment and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109711529A (en) * 2018-11-13 2019-05-03 中山大学 A kind of cross-cutting federal learning model and method based on value iterative network
CN110263908A (en) * 2019-06-20 2019-09-20 深圳前海微众银行股份有限公司 Federal learning model training method, equipment, system and storage medium
CN110874649A (en) * 2020-01-16 2020-03-10 支付宝(杭州)信息技术有限公司 State machine-based federal learning method, system, client and electronic equipment
CN111882133A (en) * 2020-08-03 2020-11-03 重庆大学 Prediction-based federated learning communication optimization method and system

Also Published As

Publication number Publication date
CN113158223A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
WO2021219053A1 (en) Federated learning modeling method, apparatus and device, and readable storage medium
WO2021208914A1 (en) Network-scheduling-based computing power sharing method, and related product
WO2022048195A1 (en) Longitudinal federation modeling method, apparatus, and device, and computer readable storage medium
CN109741086A (en) A kind of generation method and equipment of computation model
US11483177B2 (en) Dynamic intelligent analytics VPN instantiation and/or aggregation employing secured access to the cloud network device
CN110245029A (en) A kind of data processing method, device, storage medium and server
CN110098942A (en) Message transmitting method, equipment and system
WO2023284387A1 (en) Model training method, apparatus, and system based on federated learning, and device and medium
CN106326062A (en) Method and device for controlling running state of application program
CN111522840B (en) Label configuration method, device, equipment and computer readable storage medium
WO2022160578A1 (en) State transition core optimization-based data processing method, apparatus and device, and medium
CN112559898A (en) Item information sending method, item information sending device, electronic equipment and computer readable medium
WO2022222110A1 (en) Federated learning method and apparatus applied to mobile communication system, and terminal and medium
US8868709B2 (en) Programmatically selecting a service provider based on assured quality of service attributes
CN111290805B (en) Method and system for quickly calling aggregation function
CN110019456A (en) Data lead-in method, device and system
CN111144977B (en) Stock order processing method and device
CN104660403B (en) A kind of device authorization method and server
CN109407995B (en) Cold and hot data management method and device, electronic equipment and computer readable medium
TW202219750A (en) Machine learning model training method, electronic device, controller, and storage medium
WO2020220272A1 (en) Method and system for changing resource state, terminal, and storage medium
WO2016086597A1 (en) Subscription profile repository (spr) data access method and device
Guo et al. Research on Big Data Acquisition Method Based on Mapreduce Algorithm
WO2023206049A1 (en) Ai service execution methods and apparatuses, and network elements, storage medium and chip
WO2023124685A1 (en) Pcc policy control method, pcf, smf, and communication system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21922176

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21922176

Country of ref document: EP

Kind code of ref document: A1