Data processing method, device, equipment and medium based on state transfer kernel optimization

By dynamically determining the sample data state sampling algorithm and federated training, it solves the problems of poor resource adaptability and privacy security in financial industry model training, and achieves more efficient resource utilization and user privacy protection.

CN113158223BActive Publication Date: 2024-08-27WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110115051.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-27
Publication Date
2024-08-27
Estimated Expiration
2041-01-27

AI Technical Summary

Technical Problem

In the existing technology, the financial industry uses a fixed method to determine the recognition probabilities of different states of sample data during the model training process, resulting in poor resource adaptability and easy infringement of user privacy.

Method used

Using a data processing method based on state transfer kernel optimization, by dynamically determining the state sampling algorithm of the preset local sample data, and determining the identification state information of the sample data based on the resource attribute information, the combined state information of the model parameters is determined, and federated training is performed. Avoid privacy and security risks caused by direct data exchange.

Benefits of technology

It improves the resource adaptability during the model training process, ensures user privacy security, and solves the problems of poor resource adaptability and privacy invasion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113158223B
    Figure CN113158223B
Patent Text Reader

Abstract

The present application discloses a data processing method, device, equipment and medium based on state transition kernel optimization, the method comprising: in each process of training local model parameters of the first participant, dynamically determining 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 recognition state information of the preset local sample data, so as to determine the combined state information of all the preset local model parameters of the first participant; determining the target model parameters to be federated according to the combined state information; based on the target model parameters to be federated, performing federated training with each second participant to obtain the preset prediction model of the first participant. The present application aims to solve the technical problem that the recognition probability of different states of sample data is determined in a fixed manner in the prior art, resulting in poor resource adaptability of the model training process and easy infringement of user privacy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology in financial technology (Fintech), and in particular to a data processing method, device, equipment and medium based on state transfer kernel optimization. Background Art

[0002] 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 on technology. For example, the financial industry also has higher requirements for data processing based on state transfer kernel optimization.

[0003] At present, in the process of participants training models through machine learning, they usually directly exchange data with other participants. Directly exchanging data with other participants will infringe on the privacy of users and cause security risks. In addition, when participants train models, sample data often has different recognition states. For example, in the speech recognition process (the speech recognition process is to recognize data frames as states, combine states into factors, and combine factors into words), data frames can be recognized as A state, B state, C state, etc., among which A state, B state, C state and other types have different recognition probabilities. In the process of determining the recognition probability of different states of sample data, the existing technology often determines it in a fixed way. The fixed way of determining the recognition probability of different states of sample data leads to the problem of poor resource adaptability in the model training process. Summary of the invention

[0004] The main purpose of this application is to provide a data processing method, device, equipment and medium based on state transition kernel optimization, aiming to solve the technical problems in the prior art of determining the recognition probability of different states of sample data in a fixed manner, resulting in poor resource adaptability of the model training process and easy infringement of user privacy.

[0005] To achieve the above-mentioned purpose, the present application provides a data processing method based on state transfer core optimization, which is applied to a first participant, and the first participant is connected to a second participant in a federated communication. The data processing method based on state transfer core optimization includes:

[0006] In each process of training the local model parameters of the first participant, dynamically determining the state sampling algorithm of the preset local sample data according to the resource attribute information of the first participant to obtain the recognition state information of the preset local sample data, so as to determine the combined state information of all the preset local model parameters of the first participant;

[0007] Determining target model parameters to be federated according to the combined state information;

[0008] Based on the target model parameters to be federated, federal training is performed with each second participant to obtain a preset prediction model of the first participant.

[0009] Optionally, in the process of each training of the local model parameters by the first participant, dynamically determining the state sampling algorithm of the preset local sample data according to the resource attribute information of the first participant to obtain the recognition state information of the preset local sample data, so as to determine the combined state information of all the preset local model parameters of the first participant, includes:

[0010] During each training of 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;

[0011] According to the memory consumption upper limit and the preset sampling consumption calculation rules, the state sampling algorithm of the preset local sample data is dynamically determined to obtain the identification state information of the preset local sample data, so as to determine the state information of each preset local model parameter of the first participant, so as to determine the combined state information of all preset local model parameters of the first participant.

[0012] Optionally, the step of dynamically determining a state sampling algorithm of preset local sample data according to the memory consumption upper limit and the preset sampling consumption calculation rule to obtain identification state information of the preset local sample data, to determine state information of each preset local model parameter of the first participant, and to determine combined state information of all preset local model parameters of the first participant includes:

[0013] Determine the sub-memory consumption upper limit of each preset local model parameter respectively;

[0014] 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;

[0015] Determine a minimum state transition path for each preset local model parameter under the corresponding state sampling algorithm;

[0016] According to the state sampling algorithm and the minimum state transfer route, the recognition state of the preset local sample data is obtained to determine the combined state information of all preset local model parameters of the first participant.

[0017] Optionally, the step of respectively determining the upper limit of sub-memory consumption of each preset local model parameter includes:

[0018] Determine the degree of influence of each preset local model parameter on the model training results;

[0019] According to the degree of influence, the upper limit of sub-memory consumption of each preset local model parameter is determined.

[0020] Optionally, in the process of dynamically determining the state sampling algorithm of the preset local sample data, the sampling intermediate parameters that need to be saved are also determined according to the memory consumption upper limit and the preset sampling consumption calculation rule.

[0021] Optionally, the step of performing federated training with each second participant based on the first model parameter to be federated to obtain a preset prediction model of the first participant includes:

[0022] Based on the first model parameter to be federated, aggregating with the second model parameters to be federated of each second participant by executing a preset federation process to obtain an aggregated parameter, and replacing and updating the first model parameter to be federated based on the aggregated parameter to obtain the replaced and updated model parameter of the first participant;

[0023] 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 conditions are met to obtain the preset prediction model.

[0024] Optionally, the first party is connected to the second party through a third party for federated communication;

[0025] The step of aggregating the first model parameters to be federated with the second model parameters to be federated of each second participant by executing a preset federation process to obtain an aggregated parameter, and replacing and updating the first model parameters to be federated based on the aggregated parameter to obtain the replaced and updated model parameters of the first participant includes:

[0026] Encrypting the first model parameter to be federated and sending it to a third party, so that the third party can aggregate the first model parameter to be federated and the second model parameters to be federated of each second participant to obtain an aggregated parameter;

[0027] 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.

[0028] The present application also provides a data processing device based on state transfer core optimization, which is applied to a first participant, and the first participant is connected to a second participant in a federated communication. The data processing device based on state transfer core optimization includes:

[0029] A first determination module is used to dynamically determine the state sampling algorithm of the preset local sample data according to the resource attribute information of the first participant during each training of the local model parameters by the first participant, so as to obtain the recognition state information of the preset local sample data, so as to determine the combined state information of all the preset local model parameters of the first participant;

[0030] A second determination module, used for determining the target model parameters to be federated according to the combined state information;

[0031] A federation module is used to perform federation training with each second participant based on the target model parameters to be federated to obtain a preset prediction model of the first participant.

[0032] Optionally, the first determining module includes:

[0033] A first determining unit, configured to determine a memory consumption upper limit according to resource attribute information of the first participant during each training of local model parameters by the first participant;

[0034] The second determination unit is used to dynamically determine the state sampling algorithm of the preset local sample data according to the memory consumption upper limit and the preset sampling consumption calculation rules, so as to obtain the identification state information of the preset local sample data, so as to determine the state information of each preset local model parameter of the first participant, so as to determine the combined state information of all preset local model parameters of the first participant.

[0035] Optionally, the second determining unit includes:

[0036] A first determination subunit is used to respectively determine the sub-memory consumption upper limit of each preset local model parameter;

[0037] A second determination subunit is used to 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;

[0038] A third determination subunit is used to determine the minimum state transition path of each preset local model parameter under the corresponding state sampling algorithm;

[0039] The fourth determination subunit is used to obtain the recognition state of the preset local sample data according to the state sampling algorithm and the minimum state transfer route to determine the combined state information of all preset local model parameters of the first participant.

[0040] Optionally, the first determining subunit is used to implement:

[0041] Determine the degree of influence of each preset local model parameter on the model training results;

[0042] According to the degree of influence, the upper limit of sub-memory consumption of each preset local model parameter is determined.

[0043] Optionally, in the process of dynamically determining the state sampling algorithm of the preset local sample data, the sampling intermediate parameters that need to be saved are also determined according to the memory consumption upper limit and the preset sampling consumption calculation rule.

[0044] Optionally, the federation module includes:

[0045] an aggregation unit, configured to aggregate the first model parameter to be federated with the second model parameter to be federated of each second participant by executing a preset federation process based on the first model parameter to be federated, so as to obtain an aggregated parameter, and to replace and update the first model parameter to be federated based on the aggregated parameter, so as to obtain the replaced and updated model parameter of the first participant;

[0046] The third determination unit is used to continue to dynamically determine the state sampling algorithm of the model parameters after the replacement update, so as to continue to determine other model parameters of the first participant to be federated, and continuously perform iterative training until the preset training completion conditions are met to obtain the preset prediction model.

[0047] Optionally, the first party is connected to the second party through a third party for federated communication;

[0048] The third determining unit includes:

[0049] A sending unit, configured to encrypt and send the first model parameter to be federated to a third party, so that the third party can aggregate the first model parameter to be federated and the second model parameters to be federated of each second participant to obtain an aggregated parameter;

[0050] A receiving unit is used to receive the aggregation parameters encrypted and sent by the third party, and 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.

[0051] The present application also provides a data processing device based on state transfer core optimization, which is a physical device. The data processing device based on state transfer core optimization includes: a memory, a processor, and a program of the data processing method based on state transfer core optimization stored in the memory and executable on the processor. When the program of the data processing method based on state transfer core optimization is executed by the processor, the steps of the data processing method based on state transfer core optimization as described above can be implemented.

[0052] The present application also provides a medium, on which is stored a program for implementing the above-mentioned data processing method based on state transfer core optimization. When the program for the data processing method based on state transfer core optimization is executed by a processor, the steps of the data processing method based on state transfer core optimization are implemented.

[0053] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data processing method based on state transfer core optimization when executed by a processor.

[0054] The present application provides a data processing method, apparatus, device and medium based on state transfer kernel optimization. Compared with the prior art, in which different participants directly exchange data and determine the recognition probability of different states of sample data in a fixed manner, resulting in poor resource applicability and infringement of user privacy during model training, the present application dynamically determines the state sampling algorithm of preset local sample data according to the resource attribute information of the first participant during each training of local model parameters by the first participant, so as to obtain the recognition state information of the preset local sample data, so as to determine the combined state information of all preset local model parameters of the first participant; determines the target model parameters to be federated according to the combined state information; and performs federated training with each second participant based on the target model parameters to be federated, so as to obtain the preset prediction model of the first participant. In the present application, since the first participant conducts federal training with each second participant, direct data interaction between different participants is avoided to avoid potential privacy and security risks to users. In addition, in the present application, each time the first participant trains local model parameters, the state sampling algorithm of the preset local sample data is dynamically determined according to the resource attribute information of the first participant to obtain the recognition state information of the preset local sample data, so as to determine the combined state information of all preset local model parameters of the first participant, that is, the recognition state information of the recognition state of the local sample data is dynamically determined based on the resource attribute information to determine the combined state information of all preset local model parameters of the first participant, rather than determining the recognition state information of different states of the sample data in a fixed manner, such as the recognition probability. Therefore, the resource adaptability in the model training process is improved, and the technical problem that the recognition probability of different states of the sample data is determined in a fixed manner in the prior art is solved, resulting in poor resource adaptability in the model training process and easy infringement of user privacy. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0056] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0057] Figure 1 This is a flow chart of the first embodiment of the data processing method based on state transfer core optimization of the present application;

[0058] Figure 2 A flowchart diagram of the detailed steps of the step of dynamically determining the state sampling algorithm of the preset local sample data according to the resource attribute information of the first participant in the data processing method based on the state transfer kernel optimization of the present application during each training of the local model parameters by the first participant to obtain the identification state information of the preset local sample data, so as to determine the combined state information of all the preset local model parameters of the first participant;

[0059] Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0060] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0061] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0062] The present application embodiment provides a data processing method based on state transfer core optimization. In the first embodiment of the data processing method based on state transfer core optimization of the present application, refer to Figure 1 , applied to a first participant, the first participant and the second participant are connected to a federated communication, the data processing method based on state transfer core optimization includes:

[0063] Step S10, in each process of training the local model parameters of the first participant, dynamically determining 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 recognition state information of the preset local sample data, so as to determine the combined state information of all the preset local model parameters of the first participant;

[0064] Step S20, determining the target model parameters to be federated according to the combined state information;

[0065] Step S30, based on the target model parameters to be federated, conduct federated training with each second participant to obtain a preset prediction model of the first participant.

[0066] The specific steps are as follows:

[0067] Step S10, in each process of training the local model parameters of the first participant, dynamically determining 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 recognition state information of the preset local sample data, so as to determine the combined state information of all the preset local model parameters of the first participant;

[0068] In this embodiment, it should be noted that the data processing method based on state transfer core optimization can be applied to a data processing system based on state transfer core optimization (especially, to a first participant in a data processing system based on state transfer core optimization), and the data processing system based on state transfer core optimization is subordinate to a data processing device based on state transfer core optimization. For the data processing system based on state transfer core optimization, a second participant can also be built-in, or a communication connection can be established with the second participant. It should be noted that the first participant and the second participant (both of which can belong to the data processing system based on state transfer core optimization) can directly establish a federal communication connection. In addition, the first participant and the second participant can also indirectly establish a federal communication connection through a third participant.

[0069] It should be noted that before the first participant and the second participant are federated, the first participant needs to first train its own model parameters locally. Specifically, for example, after the first participant has iteratively trained 500 times locally (training model parameters), it conducts federated communication with the second participant to obtain aggregated parameters, and then replaces the local model parameters with the aggregated parameters as replacement updated model parameters, and continues the next round of iterative training based on the replaced updated model parameters until the required model is finally obtained.

[0070] In this embodiment, the data processing method based on state transfer kernel optimization is applied in the process of the first participant training its own model parameters. In this process, it is necessary to dynamically determine the state sampling algorithm of the preset local sample data according to the resource attribute information of the first participant, and then obtain the recognition 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 state sampling algorithm of the preset local sample data includes sampling algorithms such as sampling with replacement, sampling without replacement, federal Montepulciano-Hattings sampling, and optimized federal Montepulciano-Hattings sampling, wherein each state sampling algorithm may be pre-existing in the local of the first participant, or each state sampling algorithm is temporarily called or generated, and the recognition state information of the preset local sample data is obtained according to the state sampling algorithm. Specifically, according to the state sampling algorithm, the recognition probability of each recognition state of the preset local sample data is obtained, and then according to the state sampling algorithm, the recognition state information of the preset local sample data is obtained. State sampling algorithm is used to obtain the values ​​of model parameters corresponding to each recognition state of the preset local sample data. 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 have different resource consumption and sampling rates. Specifically, for example, in the process of the first participant training the local model parameters locally, a certain sample data exists in state A-state B-state C. Through different sampling algorithms, the A state may account for 70%, the B state may account for 20%, and the C state may account for 10%. However, through the federal Montepros-Hattings sampling algorithm, it may be obtained that the resources accounting for 70% of the A state are M1 memory consumption. Through the optimized federal Montepros-Hattings sampling algorithm, it may be obtained that the resources accounting for 70% of the A state are M2 memory consumption. Through sampling with replacement, it may be obtained that the resources accounting for 70% of the A state are M3 memory consumption, among which M2 memory consumption is the least.

[0071] It should be noted that the sample data is data composed of multiple sample features. The state sampling algorithm for preset local sample data is dynamically determined according to the resource attribute information of the first participant, including: dynamically determining the state sampling algorithms for different sample features in the preset local sample data according to the resource attribute information of the first participant, that is, for the corresponding sample features, the corresponding targeted pre-stored state sampling algorithms are different, and then the recognition probabilities of different states of the corresponding sample features are obtained. Since there are multiple sample features, the probability of the overall sample data corresponding to the output data can be obtained by multiplying the recognition probabilities of different sample data. In order to obtain the resource consumption of the probability of the output data, the computing power resources consumed by the recognition probability of different states of each sample feature can be first obtained, and then the corresponding computing power resources can be added to obtain the required overall resources. In the prior art, the recognition probability of the state of the sample feature in the corresponding sample data is determined by a fixed-state sampling algorithm. It is difficult to take into account the resource allocation during model training. Specifically, for example, if the first participant has less resource allocation, the fixed-state sampling algorithm consumes more and causes the server to crash, making it difficult to meet the resource restriction requirements during model training. If the first participant has more resource allocation, the fixed-state sampling algorithm consumes less and causes a waste of resources, making it difficult to meet the speed requirements during model training. In this embodiment, the resource consumption attributes and the rate can be balanced or adapted during model training.

[0072] It should be noted that, since there are different sample features in the preset local sample data, each sample feature corresponds to a different state sampling algorithm. After the recognition state information of different sample features of the preset local sample data is obtained through each sample feature corresponding to a different state sampling algorithm, the recognition state information of the preset local sample data is obtained, and then, the combination state information of all preset local model parameters of the first participant is determined, that is, the recognition state information of the preset local sample data implies the combination state information of the corresponding preset local model parameters, and then, the combination state information of all preset local model parameters of the first participant can be obtained. Specifically, for example, assuming that the sample feature has three states, namely, state A, state B, and state C, and the recognition probabilities corresponding to the three states, namely, state A, state B, and state C, are 70%, 20%, and 10%, respectively, then when the sample feature is identified as state A, the corresponding recognition model parameter such as the weight can be 0.7.

[0073] Among them, refer to Figure 2 The step of dynamically determining the state sampling algorithm of the preset local sample data according to the resource attribute information of the first participant during each training of the local model parameters by the first participant to obtain the recognition state information of the preset local sample data to determine the combined state information of all the preset local model parameters of the first participant includes:

[0074] Step S11, during each training process of 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;

[0075] In this embodiment, during each training of the local model parameters by the first participant, the upper limit of memory consumption is determined according to the resource attribute information of the first participant, that is, the upper limit of memory consumption is determined according to the memory capacity of the server of the first participant.

[0076] Step S12, dynamically determine the state sampling algorithm of the preset local sample data according to the memory consumption upper limit and the preset sampling consumption calculation rules, so as to obtain the identification state information of the preset local sample data, so as to determine the state information of each preset local model parameter of the first participant, so as to determine the combined state information of all preset local model parameters of the first participant.

[0077] According to the memory consumption upper limit such as 500G, and the preset sampling consumption calculation rules such as the consumption calculation rules for each sampling and the consumption calculation rules for different state types, the state sampling algorithm of the preset local sample data is dynamically determined to obtain the identification state information of the preset 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 preset local model parameters of the first participant. It should be noted that the resource consumption of different state sampling algorithms for obtaining the identification state information of the preset local sample data is different, and there is a first preset association relationship between different state sampling algorithms and resource consumption, or there is a preset second association relationship between different state sampling algorithms, state types, etc. and resource consumption.

[0078] The step of dynamically determining the state sampling algorithm of the preset local sample data according to the memory consumption upper limit and the preset sampling consumption calculation rule to obtain the identification state information of the preset local sample data, to determine the state information of each preset local model parameter of the first participant, and to determine the combined state information of all preset local model parameters of the first participant includes:

[0079] Step a1, respectively determining the upper limit of sub-memory consumption of each preset local model parameter;

[0080] The sub-memory consumption upper limit of each preset local model parameter is determined respectively. The method of determining the sub-memory consumption upper limit of each preset local model parameter includes:

[0081] Method 1: Determine the corresponding sub-memory consumption upper limit according to the type of each preset local model parameter;

[0082] Method 2: Determine the corresponding sub-memory consumption upper limit according to the weight of each preset local model parameter.

[0083] Step a2, determining the type and quantity of each preset local model parameter, and determining 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;

[0084] After determining the upper limit of sub-memory consumption, the state sampling algorithm of the preset local sample data is determined by traversal according to the upper limit of sub-memory consumption, the preset sampling consumption calculation rules, and the state type and quantity. That is, the state sampling algorithm of the preset local sample data is determined from the various state sampling algorithms pre-existing in the local area of ​​the first participant.

[0085] Specifically, for example, if the sub-memory consumption upper limit is 100 consumption meter values, according to the preset sampling consumption calculation rules, the state type and quantity, traverse each state sampling algorithm (in order to save resources, the traversal process only calculates but does not perform actual sampling operations), and the memory consumption upper limits of each state sampling algorithm corresponding to the specific adopted process are 200 consumption meter values, 300 consumption meter values, 150 consumption meter values, and 90 consumption meter values, respectively, then the state sampling algorithm with a consumption meter value of 90 is selected for sampling.

[0086] Step a3, determining the minimum state transition path of each preset local model parameter under the corresponding state sampling algorithm;

[0087] Determine the minimum state transition route for each preset local model parameter under the state sampling algorithm corresponding to the state. Specifically, the minimum state transition route may refer to: determine the route for adopting the minimum number of state combinations. Specifically, for example, there are state A, state B and state D. During the sampling process, state A and state B may be taken as a group, and state D may be taken as a group. Then the minimum number of state combinations is 2 groups. If state A, state B and state D exist, during the sampling process, state A, state B and state D may be taken as different groups respectively. Then the minimum number of state combinations is 3 groups. It should be noted that different groupings result in different consumption during the sampling process. Therefore, it is necessary to determine the minimum state transition route for each preset local model parameter under the state sampling algorithm corresponding to the state sampling algorithm while satisfying resource consumption constraints.

[0088] Step a4, obtaining the recognition state of the preset local sample data according to the state sampling algorithm and the minimum state transfer route, so as to determine the combined state information of all preset local model parameters of the first participant.

[0089] According to the state sampling algorithm and each minimum state transfer route, the recognition 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.

[0090] Step S20, determining the target model parameters to be federated according to the combined state information;

[0091] Step S30, based on the target model parameters to be federated, conduct federated training with each second participant to obtain a preset prediction model of the first participant.

[0092] In this embodiment, the target model parameters to be federated are determined according to the combined state information. For example, assuming that the sample feature has three states, namely, state A, state B, and state C, and the recognition probabilities corresponding to the three states are 70%, 20%, and 10%, respectively, when the sample feature is identified as state A, the corresponding recognition model parameters such as weights may be 0.7. After obtaining the target model parameters, based on the target model parameters to be federated, federation training is performed with each second participant to obtain the preset prediction model of the first participant.

[0093] The present application provides a data processing method, apparatus, device and medium based on state transfer kernel optimization. Compared with the prior art, in which different participants directly exchange data and determine the recognition probability of different states of sample data in a fixed manner, resulting in poor resource applicability and infringement of user privacy during model training, the present application dynamically determines the state sampling algorithm of preset local sample data according to the resource attribute information of the first participant during each training of local model parameters by the first participant, so as to obtain the recognition state information of the preset local sample data, so as to determine the combined state information of all preset local model parameters of the first participant; determines the target model parameters to be federated according to the combined state information; and performs federated training with each second participant based on the target model parameters to be federated, so as to obtain the preset prediction model of the first participant. In the present application, since the first participant conducts federal training with each second participant, direct data interaction between different participants is avoided to avoid potential privacy and security risks to users. In addition, in the present application, each time the first participant trains local model parameters, the state sampling algorithm of the preset local sample data is dynamically determined according to the resource attribute information of the first participant to obtain the recognition state information of the preset local sample data, so as to determine the combined state information of all preset local model parameters of the first participant. That is, the recognition state of the local sample data is dynamically determined based on the resource attribute information to determine the combined state information of all preset local model parameters of the first participant, rather than determining the recognition probability of different states of the sample data in a fixed manner. Therefore, the resource adaptability in the model training process is improved, and the technical problem that the recognition probability of different states of the sample data is determined in a fixed manner in the prior art is solved, resulting in poor resource adaptability in the model training process and easy infringement of user privacy.

[0094] Further, based on the first embodiment of the present application, another embodiment is provided. In this embodiment, the step of respectively determining the upper limit of sub-memory consumption of each preset local model parameter includes:

[0095] Step A1, determining the influence of each preset local model parameter on the model training result;

[0096] Determining the influence of each preset local model parameter on the model training result, the method of determining the influence of each preset local model parameter on the model training result includes:

[0097] 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.

[0098] Step A2: determining the upper limit of sub-memory consumption of each preset local model parameter according to the impact degree.

[0099] According to the influence degree, the upper limit of sub-memory consumption of each preset local model parameter is determined, wherein the greater the influence degree is, the higher the upper limit of sub-memory consumption of each preset local model parameter is determined, wherein the influence degree can be determined by the size of the influence factor.

[0100] In this embodiment, the influence degree of each preset local model parameter on the model training result is determined; and 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.

[0101] Furthermore, based on the first embodiment of the present 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 sampling intermediate parameters that need to be saved are also determined based on the memory consumption upper limit and the preset sampling consumption calculation rules.

[0102] In this embodiment, when memory resources are abundant, memory resources can be used in exchange 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 rules. For example, since the sample data includes each sample feature Q1 feature, Q2 feature, Q3 feature, and each sample feature has different states such as Q1 feature state A, B state, C state, Q2 feature state D, E state, Q3 feature state F, 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 Q3 feature F state combination, etc., in the prior art, are randomly combined, and in this embodiment, in order to improve the combination efficiency, orderly combination is performed. Specifically, in the process of combination, Q1 feature-A state can be saved (occupying a certain memory, whether it can be determined according to the memory consumption upper limit and the preset sampling consumption calculation rules), and then, first combine Q1 feature-A state and each state of Q2 feature, and each state of Q3 feature, and then combine Q1 feature-B state and each state of Q2 feature, and each state of Q3 feature, and then improve the efficiency of obtaining output data. Specifically, in this embodiment, an alias table (AliasTable) can also be set for different features, and then the state combination is performed based on each alias table to improve efficiency.

[0103] Further, based on the first embodiment and the second embodiment of the present application, the step of performing federation training with each second participant based on the first model parameter to be federated to obtain the preset prediction model of the first participant includes:

[0104] Step B1, based on the first model parameter to be federated, by executing a preset federation process, aggregating the second model parameters to be federated of each second participant to obtain an aggregated parameter, and replacing and updating the first model parameter to be federated based on the aggregated parameter to obtain the replaced and updated model parameter of the first participant;

[0105] In this embodiment, based on the first model parameters to be federated, by executing a preset federation process, the second model parameters to be federated of each second participant are directly aggregated to obtain aggregated parameters, and the first model parameters to be federated are replaced and updated based on the aggregated parameters to obtain the replaced and updated model parameters of the first participant.

[0106] Step B2, 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 conditions are met to obtain the preset prediction model.

[0107] Similar to the state sampling algorithm for determining the model parameters mentioned above, the state sampling algorithm for dynamically determining the model parameters after the replacement and update is continued to determine other model parameters of the first participant to be federated, such as the model parameters replaced and updated in the next round, and iterative training is continuously performed until the preset training completion conditions are met, such as the convergence of the preset loss function, to obtain the preset prediction model.

[0108] The first party is connected to the second party through a third party for federated communication;

[0109] The step of aggregating the first model parameters to be federated with the second model parameters to be federated of each second participant by executing a preset federation process to obtain an aggregated parameter, and replacing and updating the first model parameters to be federated based on the aggregated parameter to obtain the replaced and updated model parameters of the first participant includes:

[0110] Step C1, encrypting the first model parameter to be federated and sending it to a third party, so that the third party can aggregate the first model parameter to be federated and the second model parameters to be federated of each second participant to obtain an aggregated parameter;

[0111] The first model parameter to be federated is encrypted and sent to a third party to avoid leakage of model parameters, so that the third party can aggregate the first model parameter to be federated and the second model parameter to be federated received from each second participant to obtain an aggregated parameter. The first model parameter to be federated is encrypted and sent to a third party to avoid leakage of model parameters, so that the third party can aggregate the first model parameter to be federated and the second model parameter to be federated received from each second participant to obtain an aggregated parameter.

[0112] Step C2, receiving the aggregated parameters encrypted and sent by the third party, and replacing and updating the first model parameters of the federation based on the aggregated parameters to obtain the replaced and updated model parameters of the first participant.

[0113] 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.

[0114] In this embodiment, the preset prediction model is accurately obtained through the federated model.

[0115] Reference Figure 3 , Figure 3 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0116] like Figure 3As shown, 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. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0117] Optionally, the data processing device based on state transition core optimization may also include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, etc. The rectangular user interface may include a display screen (Display), an input submodule such as a keyboard (Keyboard), and the optional rectangular user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

[0118] Those skilled in the art will understand that Figure 3 The structure of the data processing device based on state transfer core optimization shown in the figure does not constitute a limitation of the data processing device based on state transfer core optimization, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0119] like Figure 3 As shown, the memory 1005 as a medium may include an operating system, a network communication module, and a data processing program based on state transfer core optimization. The operating system is a program that manages and controls the hardware and software resources of the data processing device based on state transfer core optimization, and supports the operation of the data processing program based on state transfer core optimization and other software and / or programs. The network communication module is used to realize the communication between the components inside the memory 1005, and the communication with other hardware and software in the data processing system based on state transfer core optimization.

[0120] exist Figure 3 In the data processing device based on state transfer core optimization shown, the processor 1001 is used to execute the data processing program based on state transfer core optimization stored in the memory 1005 to implement the steps of any of the above-mentioned data processing methods based on state transfer core optimization.

[0121] The specific implementation of the data processing device based on state transfer core optimization of the present application is basically the same as the above-mentioned embodiments of the data processing method based on state transfer core optimization, and will not be repeated here.

[0122] The present application also provides a data processing device based on state transfer core optimization, which is applied to a first participant, and the first participant is connected to a second participant in a federated communication. The data processing device based on state transfer core optimization includes:

[0123] A first determination module is used to dynamically determine the state sampling algorithm of the preset local sample data according to the resource attribute information of the first participant during each training of the local model parameters by the first participant, so as to obtain the recognition state information of the preset local sample data, so as to determine the combined state information of all the preset local model parameters of the first participant;

[0124] A second determination module, used for determining the target model parameters to be federated according to the combined state information;

[0125] A federation module is used to perform federation training with each second participant based on the target model parameters to be federated to obtain a preset prediction model of the first participant.

[0126] Optionally, the first determining module includes:

[0127] A first determining unit, configured to determine a memory consumption upper limit according to resource attribute information of the first participant during each training of local model parameters by the first participant;

[0128] The second determination unit is used to dynamically determine the state sampling algorithm of the preset local sample data according to the memory consumption upper limit and the preset sampling consumption calculation rules, so as to obtain the identification state information of the preset local sample data, so as to determine the state information of each preset local model parameter of the first participant, so as to determine the combined state information of all preset local model parameters of the first participant.

[0129] Optionally, the second determining unit includes:

[0130] A first determination subunit is used to respectively determine the sub-memory consumption upper limit of each preset local model parameter;

[0131] A second determination subunit is used to 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;

[0132] A third determination subunit is used to determine the minimum state transition path of each preset local model parameter under the corresponding state sampling algorithm;

[0133] The fourth determination subunit is used to obtain the recognition state of the preset local sample data according to the state sampling algorithm and the minimum state transfer route to determine the combined state information of all preset local model parameters of the first participant.

[0134] Optionally, the first determining subunit is used to implement:

[0135] Determine the degree of influence of each preset local model parameter on the model training results;

[0136] According to the degree of influence, the upper limit of sub-memory consumption of each preset local model parameter is determined.

[0137] Optionally, in the process of dynamically determining the state sampling algorithm of the preset local sample data, the sampling intermediate parameters that need to be saved are also determined according to the memory consumption upper limit and the preset sampling consumption calculation rule.

[0138] Optionally, the federation module includes:

[0139] an aggregation unit, configured to aggregate the first model parameter to be federated with the second model parameter to be federated of each second participant by executing a preset federation process based on the first model parameter to be federated, so as to obtain an aggregated parameter, and to replace and update the first model parameter to be federated based on the aggregated parameter, so as to obtain the replaced and updated model parameter of the first participant;

[0140] The third determination unit is used to continue to dynamically determine the state sampling algorithm of the model parameters after the replacement update, so as to continue to determine other model parameters of the first participant to be federated, and continuously perform iterative training until the preset training completion conditions are met to obtain the preset prediction model.

[0141] Optionally, the first party is connected to the second party through a third party for federated communication;

[0142] The third determining unit includes:

[0143] A sending unit, configured to encrypt and send the first model parameter to be federated to a third party, so that the third party can aggregate the first model parameter to be federated and the second model parameters to be federated of each second participant to obtain an aggregated parameter;

[0144] A receiving unit is used to receive the aggregation parameters encrypted and sent by the third party, and 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.

[0145] The specific implementation of the data processing device based on state transfer core optimization of the present application is basically the same as the above-mentioned embodiments of the data processing method based on state transfer core optimization, and will not be repeated here.

[0146] 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 the steps of any of the above-mentioned data processing methods based on state transfer core optimization.

[0147] The specific implementation methods of the medium of the present application are basically the same as the above-mentioned embodiments of the data processing method based on state transfer core optimization, and will not be repeated here.

[0148] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data processing method based on state transfer core optimization when executed by a processor.

[0149] The specific implementation 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 state transition core optimization, and will not be repeated here.

[0150] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0151] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0152] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0153] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A data processing method based on state transition kernel optimization, characterized in that: Applied to a first participant, the first participant is connected to a second participant in a federated communication, the data processing method based on state transfer core optimization includes: In each process of training the local model parameters of the first participant, dynamically determining the state sampling algorithm of the preset local sample data according to the resource attribute information of the first participant to obtain the recognition state information of the preset local sample data, so as to determine the combined state information of all the preset local model parameters of the first participant; The step of dynamically determining the state sampling algorithm of the preset local sample data according to the resource attribute information of the first participant during each training of the local model parameters by the first participant to obtain the recognition state information of the preset local sample data to determine the combined state information of all the preset local model parameters of the first participant includes: During each training of 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 memory consumption upper limit and the preset sampling consumption calculation rule, dynamically determine the state sampling algorithm of the preset local sample data to obtain the identification state information of the preset local sample data, so as to determine the state information of each preset local model parameter of the first participant, so as to determine the combined state information of all preset local model parameters of the first participant; Determining a first model parameter to be federated according to the combined state information; Based on the first model parameters to be federated, federal training is performed with each second participant to obtain a preset prediction model of the first participant.

2. The data processing method based on state transition kernel optimization according to claim 1, characterized in that: The step of dynamically determining the state sampling algorithm of the preset local sample data according to the memory consumption upper limit and the preset sampling consumption calculation rule to obtain the identification state information of the preset local sample data, to determine the state information of each preset local model parameter of the first participant, and to determine the combined state information of all preset local model parameters of the first participant includes: Determine the sub-memory consumption upper limit of each preset local model parameter respectively; 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 a minimum state transition path for each preset local model parameter under the corresponding state sampling algorithm; According to the state sampling algorithm and the minimum state transfer route, the recognition state of the preset local sample data is obtained to determine the combined state information of all preset local model parameters of the first participant.

3. The data processing method based on state transition kernel optimization according to claim 2, characterized in that: The step of respectively determining the upper limit of sub-memory consumption of each preset local model parameter includes: Determine the degree of influence of each preset local model parameter on the model training results; According to the degree of influence, the upper limit of sub-memory consumption of each preset local model parameter is determined.

4. The data processing method based on state transition kernel optimization according to claim 1, characterized in that: In the process of dynamically determining the state sampling algorithm of the preset local sample data, the sampling intermediate parameters that need to be saved are also determined according to the memory consumption upper limit and the preset sampling consumption calculation rules.

5. The data processing method based on state transition kernel optimization according to claim 1, characterized in that: The step of performing federation training with each second participant based on the first model parameter to be federated to obtain the preset prediction model of the first participant includes: Based on the first model parameter to be federated, aggregating with the second model parameters to be federated of each second participant by executing a preset federation process to obtain an aggregated parameter, and replacing and updating the first model parameter to be federated based on the aggregated parameter 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 conditions are met to obtain the preset prediction model.

6. The data processing method based on state transition kernel optimization according to claim 5, characterized in that: The first party is connected to the second party through a third party for federated communication; The step of aggregating the first model parameters to be federated with the second model parameters to be federated of each second participant by executing a preset federation process to obtain an aggregated parameter, and replacing and updating the first model parameters to be federated based on the aggregated parameter to obtain the replaced and updated model parameters of the first participant includes: Encrypting the first model parameter to be federated and sending it to a third party, so that the third party can aggregate the first model parameter to be federated and the second model parameters to be federated of each second participant to obtain an aggregated parameter; 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.

7. A data processing device based on state transition kernel optimization, characterized in that: Applied to a first participant, the first participant is connected to a second participant in a federated communication, the data processing device based on state transfer core optimization comprises: A first determining unit, configured to determine a memory consumption upper limit according to resource attribute information of the first participant during each training of local model parameters by the first participant; A second determination unit is used to dynamically determine a state sampling algorithm of the preset local sample data according to the memory consumption upper limit and the preset sampling consumption calculation rule, so as to obtain identification state information of the preset local sample data, so as to determine the state information of each preset local model parameter of the first participant, so as to determine the combined state information of all preset local model parameters of the first participant; A second determination module is used to determine the target model parameters to be federated according to the combined state information; The federation module is used to perform federation training with each second participant based on the first model parameters to be federated to obtain the preset prediction model of the first participant.

8. A data processing device based on state transition core optimization, characterized in that: The data processing device based on state transition core optimization includes: a memory, a processor, and a program stored in the memory for implementing the data processing method based on state transition core optimization. The memory is used to store a program for implementing a data processing method based on state transition core optimization; The processor is used to execute a program for implementing the data processing method based on state transfer core optimization, so as to implement the steps of the data processing method based on state transfer core optimization as claimed in any one of claims 1 to 6.

9. A medium, characterized in that The medium stores a program for implementing a data processing method based on state transfer core optimization, and the program for implementing a data processing method based on state transfer core optimization is executed by a processor to implement the steps of the data processing method based on state transfer core optimization as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.