Collaborative modeling method and device
By using population information for collaborative modeling in joint data modeling among enterprises, the problems of data security and model training complexity are solved, and the dual goals of data security and modeling accuracy are achieved.
Patent Information
- Application Number
- CN202411376492.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-31
AI Technical Summary
In the prior art, joint data modeling between enterprises has security problems, which cannot effectively ensure data security, resulting in the risk of data leakage and the complexity of model training.
By obtaining the original data and the population information generated by the generator for fusion, inputting the learning model for iterative processing, determining the surviving population and updating the target model, using the population information to achieve collaborative modeling, avoiding direct transmission of sensitive data, and reducing the need for encryption processing.
It ensures data security, avoids the risk of data leakage, and reduces the complexity of model training, ensuring the accuracy of modeling results.
Smart Images

Figure CN119227837A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a collaborative modeling method and device. Background Art
[0002] At present, with the rapid development of technology in the field of e-commerce, the businesses developed by various enterprises are becoming more and more diverse, covering retail, logistics, insurance, industry, smart cloud, etc. When developing various businesses, it is often necessary to conduct risk assessments, assess business development risks based on enterprise data, and ensure the long-term development of the business. Since risk assessments based solely on the company's own data will result in small amounts of data and thin data dimensions, which is not conducive to effective risk control, companies often choose to cooperate with other companies to achieve the adoption of multi-dimensional data and achieve the final risk assessment through joint modeling.
[0003] However, in the prior art, joint modeling is often performed through data between enterprises. Communication data between enterprises is relatively sensitive and cannot be guaranteed to be secure, which is not conducive to the implementation of joint modeling. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a collaborative modeling method that can ensure data security, avoid the risk of data leakage, and reduce the complexity of model training.
[0005] To achieve the above object, according to a first aspect of an embodiment of the present invention, a collaborative modeling method is provided, which is applied to a collaborator and includes:
[0006] Get information about the original data and the population generated by the generator;
[0007] Fusing the original data with information of the population generated by the generator to obtain fused data;
[0008] Inputting the fused data into a learning model for iterative processing, and outputting the fitness function value of the individuals in the population generated by the generator, wherein the learning model is a model established based on the fused data;
[0009] When the learning model satisfies a preset iteration condition, determining a surviving population among the population generated by the generator based on the fitness function value;
[0010] The target population is updated based on the surviving population, and the individuals of the target elite population are the target models.
[0011] Optionally, the method further comprises:
[0012] The information of the surviving population is sent to the target generator, so that the target generator updates the population based on the surviving population.
[0013] Optionally, the fusing the original data with the information of the population generated by the generator to obtain fused data includes:
[0014] Get the target parameter ID;
[0015] The original data and the information of the population generated by the generator are fused according to the target parameter ID to obtain fused data.
[0016] Optionally, the information of the population generated by the generator is information of the population generated by at least two generators; the fused data is fused data based on information of the population generated by at least two generators; and the step of inputting the fused data into a learning model for iterative processing and outputting the fitness function value of an individual in the population generated by the generator comprises:
[0017] Inputting the fused data corresponding to the first generator into the learning model, and outputting a first fitness function value;
[0018] When the learning model does not meet the preset iteration condition, fused data other than the fused data corresponding to the first generator is input into the learning model for iterative processing until the preset iteration condition is met.
[0019] Optionally, when the model satisfies a preset iteration condition, determining a surviving population in the population generated by the generator based on the fitness function value includes:
[0020] Sorting the population according to the fitness function values from large to small to obtain a sorting result;
[0021] The surviving population is determined according to a preset quantity threshold and the sorting result.
[0022] Optionally, when the model satisfies a preset iteration condition, determining the surviving population in the population generated by the generator based on the fitness function value further includes:
[0023] Calculating the survival probability of the population based on the fitness function value;
[0024] A surviving population in the population is determined based on the survival probability.
[0025] According to a second aspect of an embodiment of the present invention, a collaborative modeling method is provided, which is applied to a generator and includes:
[0026] Get local data and population data;
[0027] Updating the population to obtain an updated population;
[0028] Inputting the local data into individuals in the updated population to obtain an output result;
[0029] Determining that the output result is information of a population;
[0030] The information of the population is sent to the collaborator, so that the collaborator determines a target model based on the information of the population.
[0031] Optionally, the acquiring of local data and population data includes:
[0032] Get local data;
[0033] Determine whether the information of the surviving population sent by the coordinator is obtained;
[0034] When the judgment result is that the information of the surviving population sent by the coordinator is received, it is determined that the information of the surviving population sent by the coordinator is the data of the population.
[0035] Optionally, the method further comprises:
[0036] When the judgment result is that the information of the surviving population sent by the coordinator is not received, determining the model type and encoding method based on the local data;
[0037] Modeling is performed based on the model type and the encoding method to obtain information of an initialization population, wherein the individuals in the initialization population are the established model;
[0038] The information of the initialization population is determined to be the data of the population.
[0039] Optionally, updating the surviving population corresponding to the information of the surviving population to obtain an updated surviving population includes:
[0040] A preset updating method is used to update the surviving population corresponding to the information of the surviving population to obtain an updated surviving population, wherein the preset updating method includes at least one of replication, crossover, and mutation.
[0041] Optionally, after determining that the output result is information about a population, the method further includes:
[0042] Determining individuals of a target surviving population based on information of the population;
[0043] The individuals of the target surviving population are sent to the target generator, so that the target generator updates the data of the population acquired by the target generator based on the individuals of the target surviving population.
[0044] According to a third aspect of an embodiment of the present invention, there is provided a collaborative modeling apparatus, comprising:
[0045] The acquisition module is used to obtain the original data and the information of the population generated by the generator;
[0046] A fusion module, used for fusing the original data with the information of the population generated by the generator to obtain fused data;
[0047] An input module, used for inputting the fused data into a learning model for iterative processing, and outputting the fitness function value of the individuals in the population generated by the generator, wherein the learning model is a model established based on the fused data;
[0048] A determination module, used for determining a surviving population among the population generated by the generator based on the fitness function value when the learning model satisfies a preset iteration condition;
[0049] An updating module is used to update a target population based on the surviving population, wherein the individuals of the target population are target models.
[0050] According to a fourth aspect of an embodiment of the present invention, there is provided a collaborative modeling apparatus, comprising:
[0051] The acquisition module is used to obtain local data and population data;
[0052] An updating module, used for updating the population to obtain an updated population;
[0053] An input module, used for inputting the local data into individuals in the updated population to obtain an output result;
[0054] A determination module, used to determine that the output result is population information;
[0055] A sending module is used to send the information of the population to the collaborator, so that the collaborator determines the target model based on the information of the population.
[0056] According to a fifth aspect of an embodiment of the present invention, there is provided an electronic device, including:
[0057] One or more processors; a storage device for storing one or more programs,
[0058] When the one or more programs are executed by the one or more processors, the one or more processors implement the methods provided in the first aspect and the second aspect of the embodiments of the present invention.
[0059] According to a sixth aspect of an embodiment of the present invention, there is provided a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method provided by the first aspect and the second aspect of the embodiment of the present invention is implemented.
[0060] An embodiment of the above invention has the following advantages or beneficial effects: obtaining the population information and original data sent by the generator, inputting the fused data obtained based on the two data into the learning model for iterative processing, and obtaining the output result of the model. Determine the surviving population based on the model output result, and update the target elite population to obtain the target model. The collaborative modeling process of the two parties can be realized through the information of the population interacted between the generator and the collaborator. Since the data interacted between the two parties is the population information rather than the original data, it can greatly ensure the security of the data and avoid the risk of data leakage. At the same time, since the transmitted information does not involve sensitive data, there is no need for encryption processing, which reduces the complexity of model training while ensuring the accuracy of the modeling results.
[0061] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 is a schematic diagram of the main process of the collaborative modeling method according to an embodiment of the present invention;
[0063] Figure 2 It is a schematic diagram of fused data;
[0064] Figure 3 It is the workflow diagram of the collaborator;
[0065] Figure 4 is a schematic diagram of the main process of another collaborative modeling method according to an embodiment of the present invention;
[0066] Figure 5 This is a schematic diagram of the generator's workflow;
[0067] Figure 6 A flow chart for collaborative modeling based on generators and collaborators;
[0068] Figure 7 It is a schematic diagram of main modules of a collaborative modeling device provided by an embodiment of the present invention;
[0069] Figure 8 It is a schematic diagram of main modules of another collaborative modeling device provided by an embodiment of the present invention;
[0070] Fig. 9 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0071] Fig.10 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0072] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0073] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.
[0074] Figure 1 Schematic diagram of the main process of the collaborative modeling method according to an embodiment of the present invention, which is applied to the collaborator, including:
[0075] Step S101, obtaining the original data and the information of the population generated by the generator.
[0076] The original data stored locally in the collaborator and the information of the population generated by the received generator are obtained. The information generated by the received generator may be information sent by at least one generator; the information of the population The output result obtained by inputting a specific model into the original data of the generator. The generator is located on the corresponding host and is responsible for generating and updating the population; the original data is the local data of the guest (where the collaborator is located); the collaborator is located on the guest and is responsible for population screening; the original data can specifically be the user data of the guest, for example, on the merchant platform, it can be the user's consumption data, on the risk control platform, it can be the user's risk score, and on the credit platform, it can be credit report and other data, without restriction. In addition, the population information can be generated by the generator and sent to the collaborator.
[0077] Step S102, fusing the original data and the information of the population generated by the generator to obtain fused data.
[0078] The received original data and the information of the population generated by the generator are fused to obtain the fused data Specifically, during data fusion, data splicing is performed in the vertical dimension based on the aligned sample IDs of the two data (the common ID of the two data), and aligned fused data of the aligned sample ID-population information-original data is obtained.
[0079] Optionally, by determining the intersection data of the original data and the information of the generated population, a primary key ID shared by the two data is determined as the alignment sample ID; the alignment sample ID may also be a pre-set ID.
[0080] Step S103, input the fused data into the learning model for iterative processing, and output the fitness function value of the individuals in the population generated by the generator. The learning model is a model established based on the fused data.
[0081] The fused data is input into the pre-established learning model to obtain the output of the model. The learning model can be an XGBoost model, etc. The model outputs the fitness function value of each individual (each feature) in the population based on the input population data. . Specifically, the feature selection function of the learning algorithm can be used, such as the L1 regularized logistic regression algorithm to output the weight value of each feature, and the weight value can be used as the feature importance indicator, that is, the fitness function value, or the feature importance value output by the XGBoost model as the fitness function value. According to the feature importance value, the order is sorted from large to small, and the top i features are retained (i is a custom parameter). Feature selection is an important part of feature engineering. The goal is to find the optimal feature subset and eliminate irrelevant, redundant or low-importance features, so as to reduce the number of features, improve model accuracy, and reduce model complexity.
[0082] When the learning model is an XGBoost model, the following model is established:
[0083]
[0084] in, is the input fusion data; y is the label information of the collaborator; To establish a learning model, is the predicted value of the output.
[0085] Optionally, the iterative operation based on the fused data and the learning model includes: it can be seen that the fused data can be data generated based on at least one generator, and the data is input into the learning model in sequence according to the generator numbering order or the data sending order, that is, in the first iteration, the input is the fused data corresponding to the data of the population sent by the first generator, and in the second iteration, the input is the fused data corresponding to the data of the population sent by the first generator and the second generator, and so on. The iterative operation is performed, and whether to stop the iterative operation is determined according to the set iteration conditions to obtain the final output result.
[0086] Step S104, when the learning model meets the preset iteration conditions, the surviving population in the population generated by the generator is determined based on the fitness function value.
[0087] The data output by the learning model is used to determine whether the preset iteration conditions are met to determine whether to stop the iteration. The iteration conditions may be preset iteration number thresholds, performance indicator thresholds, prediction value thresholds, etc. The performance indicators may be loss in machine learning tasks, AUC (a commonly used indicator for evaluating the performance of binary classifiers), precision, etc. The prediction value threshold is the difference threshold between the predicted value and the actual value y.
[0088] When the learning model satisfies the conditions according to the above iteration conditions, the current fitness function value is determined, and the surviving population in the population sent by the generator is selected based on the fitness function value. Specifically, the individuals in the population corresponding to the fitness function value greater than the threshold can be determined according to the set threshold, and the individuals that do not meet the threshold are deleted from each population, and the remaining individuals constitute the surviving population. When selecting the surviving individuals, the selection methods include roulette selection, random competition selection, best retention selection and linear ranking selection.
[0089] Step S105, updating the target population based on the surviving population, and the individuals of the target population are the target models.
[0090] After determining the surviving population, determine whether the target population is stored in the collaborator. If the target population does not exist, determine the surviving population as the target population; if the target population exists, store the surviving population into the target population to form an updated target population, where each individual in the target population is the final model.
[0091] Optionally, when retaining the population, the best individuals in each population are saved by selecting the operator (the number d is in the range of ), only the best individuals in the surviving population are retained to update the target population. In the early stage of the model evolution process (i.e., the number of iterations To improve the diversity of the population, d can be slightly larger, for example . In the later stages of the evolutionary process (i.e., the number of iterations When the value of d is relatively large, since evolution tends to be stable, d can be slightly smaller, for example .
[0092] Optionally, the immigration operator is selected by preferentially sorting the fitness function values after calculating the fitness values, and selecting the top o surviving individuals (the value of o is generally 1, 2, 3) as immigration operators to achieve co-evolution between the populations of each generator.
[0093] According to the collaborative modeling method provided by the embodiment of the present invention, it is possible to obtain the population information and original data sent by the generator, input the fused data obtained based on the two data into the learning model for iterative processing, and obtain the output result of the model. The surviving population is determined based on the model output result, and the target population is updated to obtain the target model. The collaborative modeling process of the two parties can be realized through the information of the population interacted between the generator and the collaborator. Since the data interacted between the two parties is the population information rather than the original data, the security of the data can be greatly guaranteed and the risk of data leakage can be avoided. At the same time, since the transmitted information does not involve sensitive data, there is no need for encryption processing, which reduces the complexity of model training while ensuring the accuracy of the modeling results.
[0094] Optionally, the method further includes: sending information of the surviving population to the target generator, so that the target generator updates the population based on the surviving population. The target generator is the next sequential generator of the above generator, and the information of the surviving population is sent to the target generator, so that the target generator updates the surviving population and generates the population information of the target generator.
[0095] Optionally, the information of the original data and the population generated by the generator is fused to obtain fused data, including: obtaining a target parameter ID; fusing the information of the original data and the population generated by the generator according to the target parameter ID to obtain fused data. The step of fusing the original data and the information of the population sent by the generator includes: obtaining the intersection data of the original data and the information of the population sent by the generator through the private set intersection technology (PSI), and then determining the alignment sample ID, that is, the target parameter ID, based on which the association relationship between the two data can be determined, thereby realizing data fusion. Among them, PSI is a cryptographic technology in secure multi-party computing (MPC), which allows all parties involved in the calculation to calculate the intersection of data without obtaining additional information (other information except the intersection) from other parties. The basic protocols used for privacy-preserving sample alignment include the Garbled Circuit (GC), Oblivious transfer (OT), Secret Sharing (SS), Homomorphic Encryption (HE), etc. in secure multi-party computing. Figure 2 The resulting fused data is shown: aligned sample ID - population information - original data.
[0096] Optionally, the population information sent by the generator is the information of the population generated by at least two generators; the fused data is the fused data based on the information of the population generated by at least two generators; the fused data is input into the learning model for iterative processing, and the fitness function value of the individual in the population generated by the generator is output, including: inputting the fused data corresponding to the first generator into the learning model, and outputting the first fitness function value; when the learning model does not meet the preset iteration conditions, inputting the fused data other than the fused data corresponding to the first generator into the learning model for iterative processing until the preset iteration conditions are met.
[0097] When the information of the population sent by the acquired generator is the information of the population generated by at least two generators, the corresponding fusion data is also the fusion data of at least two generators, and the fusion data is sequentially input into the learning model in the order of the generators for iterative operation. The iterative process includes inputting the fusion data corresponding to the first generator into the model to obtain the first fitness function value, judging whether the preset iteration condition is met at this time, that is, judging whether the preset iteration number threshold is reached, or whether the model output prediction value meets the threshold, when the preset iteration condition is not met, inputting the fusion data corresponding to other generators into the model to obtain the output result, and judging whether the preset iteration condition is met again, and so on, iterative processing of the model is performed until the preset iteration condition is met and the output result of the model is obtained.
[0098] Optionally, iteration conditions can be set according to actual business needs to ensure the accuracy of model output results.
[0099] According to the collaborative modeling method provided by the embodiment of the present invention, it is possible to obtain the information and original data of the population sent by the generator, input the fused data obtained based on the two data into the learning model for iterative processing, and obtain the output result of the model. The surviving population is determined based on the output result of the model, and the target elite population is updated to obtain the target model. When determining the surviving population, the concept of individual fitness function value is introduced to judge the survival probability, so as to realize the iterative update of the model. Compared with the existing modeling method, the constraints on the differentiability of the objective function during the training process can be removed, and the scope of application of the training framework is expanded, which can be applied to more scenarios.
[0100] Optionally, when the model meets preset iteration conditions, the surviving population in the population generated by the generator is determined based on the fitness function value, including: sorting the population in order from large to small according to the fitness function value to obtain a sorting result; determining the surviving population based on a preset quantity threshold and the sorting result.
[0101] When determining the surviving population, it is first necessary to determine the surviving individuals, sort the individuals in the population according to the fitness function values of each individual output by the model, select individuals with a preset number threshold in descending order of fitness function values as surviving individuals, and further, the population composed of surviving individuals is used as the surviving population. The preset number threshold can be a preset individual number value or a ratio value of the individual number, such as 10% of the largest fitness function value.
[0102] Optionally, a specific strategy can be set when determining the surviving population to ensure that there are a sufficient number of surviving individuals in the surviving population, wherein the specific strategy can be set to retain at least a certain number of individuals in the population. of individuals, It can be set according to the actual situation. When applied, if the number of individuals surviving in the population determined by the preset number threshold does not meet , then in the sorted results, select in descending order of fitness function values of surviving individuals.
[0103] Optionally, when the model meets preset iteration conditions, determining the surviving population in the population generated by the generator based on the fitness function value also includes: calculating the survival probability of the population based on the fitness function value; and determining the surviving population in the population based on the survival probability.
[0104] When determining the surviving individuals, the concept of survival probability can also be introduced. Specifically, if the number of individuals in the population is , then the fitness function values are numbered from small to large as , the maximum probability of being selected by the fitness function value is , the minimum probability of selection is , so the sorting is The survival probability of an individual can be obtained according to the following formula:
[0105]
[0106] in and The size can be customized, the value range is And meet . Individuals are selected based on the survival probability. The specific method can be referred to the genetic algorithm related scheme, which will not be described here.
[0107] If A population of generators No. In the second selection, individuals are selected to form the surviving population of the next generation. , and synchronize it to the +1 generator.
[0108] If A population of generators No. In the iteration selection, no individual is selected, and the fitness function values of the individuals within the population can be sorted to screen out the top individuals, forming the next generation of surviving populations , and synchronize it to the +1 generator.
[0109] Optionally, it can be seen from the above steps that when the collaborator is performing model training, if a generator in the generator fails and cannot be iterated, it will not affect the overall model update process.
[0110] like Figure 3 The following is the workflow diagram of the collaborator. The collaborator obtains the population information sent by the generator and y (guest data) is fused to obtain fused data, which is input into the learning model to obtain the fitness function value of each individual (model) in the population, and the surviving individuals are selected based on the fitness function value to obtain the final surviving population. Based on the surviving population, the elite population is selected and stored. The information of the surviving population is sent to the target generator so that the target generator can update the surviving population.
[0111] According to the collaborative modeling method provided by the embodiment of the present invention, it is possible to obtain the population information and original data sent by each generator, input the fused data obtained based on the two data into the learning model for iterative processing, and obtain the output result of the model. The surviving population is determined based on the output result of the model, and the target elite population is updated to obtain the target model. The collaborative modeling process of the two parties can be realized through the information of the population interacting between the generator and the collaborator. Since the data interacted between the two parties is the information of the population rather than the original data, the security of the data can be greatly guaranteed and data leakage can be avoided. At the same time, since the transmitted information does not involve sensitive data, there is no need for encryption processing, which reduces the complexity of model training while ensuring the accuracy of the modeling results. Among them, the populations of each generator remain independent of each other, and are connected through the immigration operator to achieve collaborative evolution between different populations and ensure the effect of collaborative modeling.
[0112] Figure 4 Schematic diagram of the main process of the collaborative modeling method according to an embodiment of the present invention, which is applied to a generator and includes:
[0113] Step S401, obtaining local data and population data.
[0114] The local data and the population data are obtained, wherein the population data is data generated by initialization based on the local data, or the population data sent by the received collaborator.
[0115] Step S402, updating the population to obtain an updated population.
[0116] After determining a surviving population of the generator, the population is updated using a preset update method to ensure the diversity of the population.
[0117] Optionally, a preset update method is used to update the surviving population corresponding to the information of the surviving population to obtain an updated surviving population, and the preset update method includes at least one of replication, crossover, and mutation.
[0118] Specifically, the copy operation is:
[0119] To ensure the population size during training Keep consistent and use replication. Randomly select the surviving population middle( ) individuals to replicate, increasing the size of the surviving population to , forming a new population ;
[0120] The crossover operation is:
[0121] Commonly used crossover methods include single-point crossover, double-point crossover, uniform crossover, and arithmetic crossover. Taking uniform crossover as an example, given the crossover probability (value ranges from 0 to 1), randomly selected Any two individuals in and , For each bit of the individual code, a random number between 0 and 1 is generated. ,when When, exchange and Otherwise, no exchange is performed, and the updated population is obtained. ;
[0122] The mutation operation is:
[0123] Common mutation methods include basic position mutation, uniform mutation, boundary mutation, non-uniform mutation and Gaussian approximate mutation. Taking uniform mutation as an example, given the mutation probability , for the population Every individual in , generate a random number for each bit ,when , mutate the position information, otherwise do not mutate, and then obtain the final updated population , and output to the collaborator.
[0124] Step S403, inputting the local data into the individuals in the updated population to obtain an output result.
[0125] For the current population Each individual in the model is actually a model. By inputting the local data of the generator into each individual model, the output result of the model can be obtained. .
[0126] Step S404, determining that the output result is population information.
[0127] Determine the output of the model Information about the population of the generator.
[0128] Step S405: Send the population information to the collaborator, so that the collaborator can determine the target model based on the population information.
[0129] The information of the generated population is sent to the collaborator, so that the collaborator can determine the surviving population based on the population information and the learning model, and then determine the target model.
[0130] According to the collaborative modeling method provided by the embodiment of the present invention, the population can be updated according to the local data and the population data, the local data is input into the population model, and the output population information is obtained, that is, the parameter information of the generator local data is obtained, which is used to send the information to the collaborator, so that the collaborator can determine the surviving population, and then determine the target model to achieve collaborative modeling. Since the data sent to the collaborator is insensitive parameter information, the security of the data is guaranteed and the risk of data leakage is avoided.
[0131] Optionally, obtaining local data and population data includes: obtaining local data; determining whether information about surviving populations sent by the collaborator is obtained; when the judgment result is that information about surviving populations sent by the collaborator is received, determining that the information about surviving populations sent by the collaborator is population data.
[0132] Determine whether the current generator has received the information of the surviving population sent by the collaborator. If the current generator is the first generator, it will not receive the information of the surviving population sent by the collaborator. If the current generator is not the first generator, it will receive the information of the surviving population determined by the collaborator based on the population information of the previous generator. When the judgment result is that the information of the surviving population sent by the collaborator is received, it is determined that the received information of the surviving population is the population data.
[0133] Optionally, the method also includes: when the judgment result is that the information of the surviving population sent by the collaborator is not received, determining the model type and encoding method based on local data; modeling based on the model type and encoding method to obtain the information of the initialized population, and the individuals in the initialized population are the established model; determining the information of the initialized population as the data of the population.
[0134] When the judgment result is that the information of the surviving population sent by the coordinator is not received, the generator needs to initialize based on the local data to obtain the information of the initialized population as the population data. , determine the model type, including but not limited to linear regression, logistic regression, decision tree, neural network and other models, and specify the encoding method (note, the encoding of each generator must be consistent), such as binary encoding, floating point encoding, symbol encoding, etc., to encode the model parameters and form an initialization population , whose population size is The information of the initialization population is determined to be the population data.
[0135] Optionally, after determining that the output result is information about the population, the method further includes: determining individuals of the target surviving population based on the information about the population; sending individuals of the target surviving population to the target generator, so that the target generator updates the data of the population acquired by the target generator based on the individuals of the target surviving population. Based on the information of the population, an immigration operator, i.e., a target surviving individual, is selected. The immigration operator is a better individual in the population and can be selected based on the fitness function value corresponding to the surviving population returned by the collaborator. The determined individuals of the target surviving population are sent to the target generator for the target generator to update the surviving population, wherein the immigration operator does not perform operations such as replication, crossover, and mutation, and can realize information exchange between different generators, thereby realizing collaborative evolution.
[0136] like Figure 5 The figure shows the workflow diagram of the generator. If generator i is the first generator, the initialization population is obtained as the surviving population of the previous generation (the data of the population) by initializing the local data. If generator i is not the first generator, the population information sent by the collaborator is received as the surviving population of the previous generation. The population is updated based on the immigration operator sent by the received generator j and the surviving population of the previous generation, including operations such as replication, crossover, and mutation, to obtain the current population. The local data i is input into the individuals in the current population to obtain the output information of the current population, which is sent to the collaborator. At the same time, the immigration operator is selected and sent to the next generator.
[0137] According to the collaborative modeling method provided by the embodiment of the present invention, it is possible to update the population according to the local data and the population data, input the local data into the model of the population, obtain the output population information, that is, obtain the parameter information of the local data of the generator, and send the information to the collaborator, so that the collaborator can determine the surviving population, and then determine the target model to achieve collaborative modeling. Since the data sent to the collaborator is insensitive parameter information, the security of the data is guaranteed and the risk of data leakage is avoided. In addition, each generator is relatively independent, and information exchange is achieved through the immigration operator to achieve collaborative evolution between generators, improve the accuracy of the elite population, and at the same time, since each generator is relatively independent, when a failure occurs in one party (a certain generator), it will not affect the overall modeling process, thereby improving the fault tolerance of model training.
[0138] like Figure 6 The figure shows a flow chart of collaborative modeling based on generators and collaborators, including N generators and 1 collaborator. Among them, host1, host2, ..., hostN correspond to data 1, data 2, ..., data N and generator 1, generator 2, ..., generator N respectively. Generator 1 is initialized based on data 1 to obtain the initialization population, inputs data 1 into the initialization population to obtain the corresponding current population information, sends the current population information of generator 1 to the collaborator, obtains the information of the surviving population returned by the collaborator, and generator 1 determines the immigration operator based on the returned surviving population information and sends it to generator 2. Generator 2 determines the current population based on the immigration operator and the information of the surviving population sent by the collaborator, inputs the local data into the current population, obtains the current population information of generator 2, and sends it to the collaborator to obtain the corresponding surviving population information returned. And so on, the population information of the generator is sent to the collaborator in sequence. The collaborator determines the surviving population based on the fitness function value obtained by inputting the fusion data corresponding to the original data into the learning model, and further determines the elite population, which is used to update the target elite population and obtain the target model.
[0139] Among them, when the collaborator performs iterative operations based on N generators, based on The difference between the label information y held by the collaborator determines whether to stop the iteration, for example, the prediction value obtained by the collaborator based on the population information sent by generator 1, the original data and the learning model is 0.8, the label information y value is 1, and the difference threshold is set to 0.1. At this time, 1-0.8=0.2 does not meet the difference threshold, so continue to iterate, obtain the population information of generator 2 and calculate, and get the predicted value is 0.9, and 1-0.9=0.1 satisfies the difference threshold. Then the iteration is stopped and the population information of generator 3 is no longer obtained. At this time, the target essence population stored in the collaborator is the final target model.
[0140] As can be seen from the figure, when a generator When a fault occurs or communication with the collaborator fails, such as not returning within a certain preset time, the collaborator can ignore the generator when generating fusion data. , and integrate the current population information. This will not affect the overall training of the model and improve the fault tolerance of the model training framework.
[0141] Figure 7 700 is a schematic diagram of main modules of a collaborative modeling apparatus 700 provided in an embodiment of the present invention, including:
[0142] An acquisition module 701 is used to acquire original data and information of the population generated by the generator;
[0143] A fusion module 702 is used to fuse the original data and the information of the population generated by the generator to obtain fused data;
[0144] An input module 703 is used to input the fused data into the learning model for iterative processing, and output the fitness function value of the individuals in the population generated by the generator. The learning model is a model established based on the fused data;
[0145] A determination module 704 is used to determine the surviving population in the population generated by the generator based on the fitness function value when the learning model meets the preset iteration condition;
[0146] The updating module 705 is used to update the target population based on the surviving population, and the individuals of the target population are the target models.
[0147] The collaborative modeling device 700 provided in accordance with an embodiment of the present invention can obtain the population information and original data sent by the generator, and input the fused data obtained based on the two data into the learning model for iterative processing to obtain the output result of the model. The surviving population is determined based on the output result of the model, and the target population is updated to obtain the target model. The collaborative modeling process of the two parties can be realized through the information of the population interacted between the generator and the collaborator. Since the data interacted between the two parties is the information of the population rather than the original data, the security of the data can be greatly guaranteed and the risk of data leakage can be avoided. At the same time, since the transmitted information does not involve sensitive data, there is no need for encryption processing, which reduces the complexity of model training while ensuring the accuracy of the modeling results.
[0148] Optionally, the device further includes: a sending module 706, configured to send information of the surviving population to the target generator, so that the target generator updates the population based on the surviving population.
[0149] Optionally, a fusion module 702 is used to fuse the original data and the information of the population generated by the generator to obtain fused data, including: an acquisition module 701, used to obtain a target parameter ID; a fusion module 702, used to fuse the original data and the information of the population generated by the generator according to the target parameter ID to obtain fused data.
[0150] Optionally, the information of the population generated by the generator is the information of the population generated by at least two generators; the fused data is the fused data based on the information of the population generated by at least two generators; the input module 703 is used to input the fused data into the learning model for iterative processing, and output the fitness function value of the individual in the population generated by the generator, including: the input module 703 is used to input the fused data corresponding to the first generator into the learning model, and output the first fitness function value; when the learning model does not meet the preset iteration condition, the fused data other than the fused data corresponding to the first generator is input into the learning model for iterative processing until the preset iteration condition is met.
[0151] Optionally, the determination module 704 is used to determine the surviving population in the population generated by the generator based on the fitness function value when the model meets the preset iteration conditions, including: a sorting module 707, used to sort the population in order from large to small according to the fitness function value to obtain a sorting result; the determination module 704 is used to determine the surviving population according to a preset quantity threshold and the sorting result.
[0152] Optionally, the determination module 704 is used to determine the surviving population in the population generated by the generator based on the fitness function value when the model meets the preset iteration conditions, and also includes: a calculation module 708, which is used to calculate the survival probability of the population based on the fitness function value; the determination module 704 is used to determine the surviving population in the population based on the survival probability.
[0153] According to the collaborative modeling device provided by the embodiment of the present invention, it is possible to obtain the population information and original data sent by each generator, input the fused data obtained based on the two data into the learning model for iterative processing, and obtain the output result of the model. The surviving population is determined based on the output result of the model, and the target population is updated to obtain the target model. The collaborative modeling process of the two parties can be realized through the information of the population interacting between the generator and the collaborator. Since the data interacted between the two parties is the information of the population rather than the original data, the security of the data can be greatly guaranteed and data leakage can be avoided. At the same time, since the transmitted information does not involve sensitive data, there is no need for encryption processing, which reduces the complexity of model training while ensuring the accuracy of the modeling results. Among them, the populations of each generator remain independent of each other, and are connected through the immigration operator, so that the collaborative evolution between different populations is realized, and the effect of collaborative modeling is guaranteed.
[0154] Figure 8 8 is a schematic diagram of main modules of a collaborative modeling apparatus 800 provided in an embodiment of the present invention, including:
[0155] An acquisition module 801 is used to acquire local data and population data;
[0156] An updating module 802 is used to update the population to obtain an updated population;
[0157] An input module 803 is used to input local data into individuals in the updated population to obtain output results;
[0158] A determination module 804 is used to determine that the output result is information of a population;
[0159] The sending module 805 is used to send the population information to the collaborator, so that the collaborator can determine the target model based on the population information.
[0160] The collaborative modeling device 800 provided by the embodiment of the present invention can update the population according to the local data and the population data, input the local data into the population model, obtain the output population information, that is, obtain the parameter information of the generator local data, and send the information to the collaborator so that the collaborator can determine the surviving population, and then determine the target model to achieve collaborative modeling. Since the data sent to the collaborator is insensitive parameter information, the security of the data is guaranteed and the risk of data leakage is avoided.
[0161] Optionally, an acquisition module 801 is used to acquire local data and population data, including: an acquisition module for acquiring local data; a judgment module 806 for judging whether the information of the surviving population sent by the collaborator is acquired; and a determination module 804 for determining that the information of the surviving population sent by the collaborator is population data when the judgment result is that the information of the surviving population sent by the collaborator is received.
[0162] Optionally, the device also includes: a determination module 804, which is used to determine the model type and encoding method based on local data when the judgment result is that the information of the surviving population sent by the collaborator is not received; a modeling module 807, which is used to perform modeling based on the model type and encoding method to obtain the information of the initialized population, and the individuals in the initialized population are the established model; the determination module 804 is used to determine that the information of the initialized population is the data of the population.
[0163] Optionally, the update module 802 is used to update the population to obtain an updated population, including: the update module 802 is used to update the surviving population corresponding to the information of the surviving population using a preset update method to obtain an updated surviving population, and the preset update method includes at least one of replication, crossover, and mutation.
[0164] Optionally, the device also includes: a determination module 804, used to determine the individuals of the target surviving population based on the information of the population; a sending module 805, used to send the individuals of the target surviving population to the target generator, so that the target generator can update the data of the population acquired by the target generator based on the individuals of the target surviving population.
[0165] According to the collaborative modeling device provided by the embodiment of the present invention, it is possible to update the population according to the local data and the population data, input the local data into the model of the population, obtain the output population information, that is, obtain the parameter information of the local data of the generator, and send the information to the collaborator, so that the collaborator can determine the surviving population, and then determine the target model to achieve collaborative modeling. Since the data sent to the collaborator is insensitive parameter information, the security of the data is guaranteed and the risk of data leakage is avoided. In addition, each generator is relatively independent, and information exchange is achieved through the immigration operator to achieve collaborative evolution between generators, thereby improving the accuracy of the elite population. At the same time, since each generator is relatively independent, when a failure occurs in one party (a certain generator), it will not affect the overall modeling process, thereby improving the fault tolerance of model training.
[0166] Fig. 9 An exemplary system architecture 900 is shown to which the collaborative modeling method or collaborative modeling apparatus according to an embodiment of the present invention may be applied.
[0167] like Fig. 9 As shown, system architecture 900 may include terminal devices 901, 902, 903, network 904 and server 905. Network 904 is used to provide a medium for communication links between terminal devices 901, 902, 903 and server 905. Network 904 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0168] The user can use the terminal devices 901, 902, 903 to interact with the server 905 through the network 904 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 901, 902, 903, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0169] The terminal devices 901 , 902 , and 903 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0170] The server 905 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 901, 902, and 903. The backend management server may analyze and process the received data such as the modeling request, and feed back the processing result (such as the target model - only an example) to the terminal device.
[0171] It should be noted that the collaborative modeling method provided in the embodiment of the present invention is generally executed by the server 905 , and accordingly, the collaborative modeling device is generally set in the server 905 .
[0172] It should be understood that Fig. 9 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0173] Reference below Fig.10 , which shows a schematic diagram of the structure of a computer system 1000 of a terminal device suitable for implementing an embodiment of the present invention. Fig.10 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0174] like Fig.10 As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the system 1000 are also stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other through a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0175] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0176] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, the above-mentioned functions defined in the system of the present invention are executed.
[0177] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0178] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0179] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes an acquisition module, a fusion module, an input module, a determination module and an update module. The names of these modules do not constitute a limitation on the modules themselves in some cases, for example, the acquisition module may also be described as a "module for acquiring raw data and information about the population sent by the generator".
[0180] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:
[0181] Get the raw data and information about the population sent by the generator;
[0182] Based on the original data and the information of the population sent by the generator, the fused data is obtained;
[0183] The fused data is input into the learning model for iterative processing, and the fitness function value of the individual in the population sent by the generator is output. The learning model is a model established based on the fused data;
[0184] When the learning model meets the preset iteration conditions, the surviving population in the population sent by the generator is determined based on the fitness function value;
[0185] The target elite population is updated based on the surviving population, and the individuals of the target elite population are the target models.
[0186] or
[0187] Get local data and population data;
[0188] The population is updated to obtain an updated population;
[0189] Input local data into individuals in the updated population to obtain output results;
[0190] Determine that the output result is information of the population;
[0191] The population information is sent to the collaborator, so that the collaborator determines the target model based on the population information.
[0192] According to the technical solution of the embodiment of the present invention, the population information and original data sent by the generator are obtained, and the fused data obtained based on the two data are input into the learning model for iterative processing to obtain the output result of the model. The surviving population is determined based on the output result of the model, and the target elite population is updated to obtain the target model. The collaborative modeling process of the two parties can be realized through the information of the population interacted between the generator and the collaborator. Since the data interacted between the two parties is the information of the population rather than the original data, the security of the data can be greatly guaranteed and the risk of data leakage can be avoided. At the same time, since the transmitted information does not involve sensitive data, there is no need for encryption processing, which reduces the complexity of model training while ensuring the accuracy of the modeling results.
[0193] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A collaborative modeling method, characterized in that: Applies to collaborators, including: Get information about the original data and the population generated by the generator; Fusing the original data with information of the population generated by the generator to obtain fused data; Inputting the fused data into a learning model for iterative processing, and outputting the fitness function value of the individuals in the population generated by the generator, wherein the learning model is a model established based on the fused data; When the learning model satisfies a preset iteration condition, determining a surviving population among the population generated by the generator based on the fitness function value; A target population is updated based on the surviving population, and individuals of the target population are target models.
2. The method according to claim 1, characterized in that The method further comprises: The information of the surviving population is sent to the target generator, so that the target generator updates the population based on the surviving population.
3. The method according to claim 1, characterized in that The fusing the original data and the information of the population generated by the generator to obtain fused data includes: Get the target parameter ID; The original data and the information of the population generated by the generator are fused according to the target parameter ID to obtain fused data.
4. The method according to any one of claims 1 to 3, characterized in that: The information of the population generated by the generator is information of the population generated by at least two generators; the fused data is fused data based on information of the population generated by at least two generators; The step of inputting the fused data into a learning model for iterative processing and outputting fitness function values of individuals in the population generated by the generator comprises: Inputting the fused data corresponding to the first generator into the learning model, and outputting a first fitness function value; When the learning model does not meet the preset iteration condition, fused data other than the fused data corresponding to the first generator is input into the learning model for iterative processing until the preset iteration condition is met.
5. The method according to claim 4, characterized in that When the model satisfies a preset iteration condition, determining a surviving population in the population generated by the generator based on the fitness function value includes: Sorting the population according to the fitness function values from large to small to obtain a sorting result; The surviving population is determined according to a preset quantity threshold and the sorting result.
6. The method according to claim 4, characterized in that When the model satisfies a preset iteration condition, determining the surviving population in the population generated by the generator based on the fitness function value further includes: Calculating the survival probability of the population based on the fitness function value; A surviving population in the population is determined based on the survival probability.
7. A collaborative modeling method, characterized in that: Applies to generators, including: Get local data and population data; Updating the population to obtain an updated population; Inputting the local data into individuals in the updated population to obtain an output result; Determining that the output result is information of a population; The information of the population is sent to the collaborator, so that the collaborator determines a target model based on the information of the population.
8. The method according to claim 7, characterized in that The obtaining of local data and population data includes: Get local data; Determine whether the information of the surviving population sent by the coordinator is obtained; When the judgment result is that the information of the surviving population sent by the coordinator is received, it is determined that the information of the surviving population sent by the coordinator is the data of the population.
9. The method according to claim 8, characterized in that The method further comprises: When the judgment result is that the information of the surviving population sent by the coordinator is not received, determining the model type and encoding method based on the local data; Modeling is performed based on the model type and the encoding method to obtain information of an initialization population, wherein the individuals in the initialization population are the established model; The information of the initialization population is determined to be the data of the population.
10. The method according to claim 7, characterized in that The updating of the surviving population corresponding to the information of the surviving population to obtain an updated surviving population includes: A preset updating method is used to update the surviving population corresponding to the information of the surviving population to obtain an updated surviving population, wherein the preset updating method includes at least one of replication, crossover, and mutation.
11. The method according to any one of claims 7 to 10, characterized in that: After determining that the output result is information about a population, the method further includes: Determining individuals of a target surviving population based on information of the population; The individuals of the target surviving population are sent to the target generator, so that the target generator updates the data of the population acquired by the target generator based on the individuals of the target surviving population.
12. A collaborative modeling device, characterized in that: include: The acquisition module is used to obtain the original data and the information of the population generated by the generator; A fusion module, used for fusing the original data with the information of the population generated by the generator to obtain fused data; An input module, used for inputting the fused data into a learning model for iterative processing, and outputting the fitness function value of the individuals in the population generated by the generator, wherein the learning model is a model established based on the fused data; A determination module, used for determining a surviving population among the population generated by the generator based on the fitness function value when the learning model satisfies a preset iteration condition; An updating module is used to update a target population based on the surviving population, wherein the individuals of the target elite population are target models.
13. A collaborative modeling device, characterized in that: include: The acquisition module is used to obtain local data and population data; An updating module, used for updating the population to obtain an updated population; An input module, used for inputting the local data into individuals in the updated population to obtain an output result; A determination module, used to determine that the output result is information of a population; A sending module is used to send the information of the population to the collaborator, so that the collaborator determines the target model based on the information of the population.
14. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 11.
15. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
