Model Training Method, Device, Equipment and Storage Medium for Multiple Data Sources

By setting up fog computing nodes in a multi-data source environment for model training, and using the cloud computing center to screen and distribute model evaluation indicators, the problem of low security in a multi-data source environment is solved, and high security and high accuracy model training is achieved.

CN111753998BActive Publication Date: 2025-06-10WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010606991.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-24
Publication Date
2025-06-10
Estimated Expiration
2040-06-24

AI Technical Summary

Technical Problem

Existing model training technologies are difficult to ensure data security in multi-data source environments, resulting in low security.

Method used

Model training is carried out by setting corresponding fog computing nodes in each channel data source, and the initial training model and model evaluation indicators are sent to the cloud computing center. The cloud computing center conducts calculation and comparison of model evaluation indicators, filters qualified models and distributes them to fog computing nodes for fusion.

Benefits of technology

The security of data in each channel is improved, the common training of model data between different fog computing nodes is realized, and the accuracy of the training model is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111753998B_ABST
    Figure CN111753998B_ABST
Patent Text Reader

Abstract

The present invention discloses a model training method, device, equipment and storage medium for multiple data sources. The method performs model training on the target data source through a target fog computing node and sends it to a cloud computing center; the cloud computing center determines a qualified model based on the models and evaluation indexes sent by each fog computing node corresponding to data sources from different channels, and sends all the qualified models to the target fog computing node; the target fog computing node fuses the qualified training models to generate a target model. By setting corresponding fog computing nodes for each channel data source and performing data training within each fog computing node, the present invention improves the security of each channel data, and screens the model parameters corresponding to each channel data by the cloud computing center to select qualified models, and distributes the qualified models to each fog computing node, realizing the co-training of model data between different fog computing nodes and improving the accuracy of the training model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of financial technology (Fintech), and particularly to a model training method, device, equipment and computer-readable storage medium for multiple data sources. Background Art

[0002] With the development of computer technology, more and more technologies are applied in the financial field. The traditional financial industry is gradually transforming into financial technology (Finteh), and the model training technology is no exception. However, due to the security and real-time requirements of the financial industry, higher requirements are also put forward for the model training technology. In the current machine learning model training, when the training data sources come from multiple channels, generally, the training data sources of multiple channels are uniformly collected to the cloud computing center, and then in the cloud computing center, the training data sources are model-trained based on the machine learning algorithm to obtain the final model, and finally the final model is distributed to each using device for application. However, due to the high data confidentiality requirements of the financial industry, collecting data from different channels to the cloud computing center cannot ensure the security between data of each channel, resulting in low security. Summary of the Invention

[0003] The main object of the present invention is to propose a model training method, device, equipment and computer-readable storage medium for multiple data sources, aiming to solve the technical problem of low security of existing model training data.

[0004] To achieve the above object, the present invention provides a model training method for multiple data sources, and the model training method for multiple data sources includes the following steps:

[0005] Based on a target fog computing node corresponding to a target data source, model-train the target data source with a preset algorithm to generate an initial training model, and send the initial training model and initial model evaluation index to the cloud computing center;

[0006] Based on the cloud computing center, calculate the model evaluation index benchmark for the model evaluation indexes sent by each fog computing node corresponding to data sources of different channels;

[0007] Based on the cloud computing center, compare the initial model evaluation index with the model evaluation index benchmark to determine whether the initial training model is qualified, and send all qualified models in the cloud computing center to the target fog computing node;

[0008] Based on the target fog computing node, fuse the qualified training models to generate a target model corresponding to the target data source.

[0009] Optionally, the steps of training a model for the target data source with a preset algorithm based on the target fog computing node corresponding to the target data source, generating an initial training model, and sending the initial training model and the initial model evaluation metrics to the cloud computing center specifically include:

[0010] Preprocess the target data source based on the target fog computing node, and extract the target feature data set of the target data source;

[0011] Call an algorithm in the algorithm library through the target fog computing node to perform model training on the training set in the target feature data set, and generate the initial training model;

[0012] Calculate the initial model evaluation metrics of the initial training model through the target fog computing node, and send the initial training model and the initial model evaluation metrics to the cloud computing center.

[0013] Optionally, the steps of fusing the qualified training models based on the target fog computing node to generate the target model corresponding to the target data source specifically include:

[0014] Based on the target fog computing node, input the test set in the target feature data set into the qualified training model to verify the qualified training model;

[0015] Based on the target fog computing node, obtain the predicted classification results of the qualified training model for the test set, and calculate the verification model evaluation metrics of the qualified training model according to the standard classification results corresponding to the test set and the predicted classification results;

[0016] Based on the target fog computing node, when it is determined that the verification model evaluation metrics reach the model evaluation metric benchmark, add a qualified flag to the qualified training model, and fuse the qualified training models with the added qualified flag to generate the target model.

[0017] Optionally, the steps of fusing the qualified training models with the added qualified flag to generate the target model specifically include:

[0018] Fuse the qualified training models with the added qualified flag according to the logistic regression algorithm formula to generate the target model, where the logistic regression algorithm formula is:

[0019] where K is the number of qualified training models with the added qualified flag, h t (x) is the formula of the qualified training model, and α t is the weight corresponding to the formula of each qualified training model with the added qualified flag.

[0020] Optionally, the step of calculating the benchmark of the model evaluation index based on the cloud computing center for the model evaluation indexes sent by each fog computing node corresponding to different channel data sources specifically includes:

[0021] Based on the cloud computing center, determine whether the model evaluation indexes sent by each fog computing node conform to the normal distribution;

[0022] If it is determined based on the cloud computing center that the model evaluation indexes sent by each fog computing node conform to the normal distribution, then eliminate the evaluation indexes that do not belong to the preset range;

[0023] Based on the cloud computing center, calculate the mean value corresponding to the model evaluation indexes after elimination as the benchmark of the model evaluation index.

[0024] Optionally, after the step of determining whether the model evaluation indexes sent by each fog computing node conform to the normal distribution based on the cloud computing center, it further includes:

[0025] If it is determined based on the cloud computing center that the model evaluation indexes sent by each fog computing node do not conform to the normal distribution, then sort the model evaluation indexes sent by each fog computing node, and eliminate the model evaluation indexes with a ranking lower than the preset value;

[0026] Based on the cloud computing center, obtain the minimum value in the model evaluation indexes after elimination as the benchmark of the model evaluation index.

[0027] Optionally, the model evaluation index includes at least one of true positive rate, false positive rate, false negative rate, true negative rate, accuracy rate, precision rate, recall rate, F1-Score, F1 score or area under the AUC curve.

[0028] In addition, to achieve the above object, the present invention further provides a model training device for multiple data sources, and the model training device for multiple data sources includes:

[0029] A fog node model generation module, configured to perform model training on the target data source with a preset algorithm based on a target fog computing node corresponding to a target data source, generate an initial training model, and send the initial training model and the initial model evaluation index to the cloud computing center;

[0030] A cloud center benchmark calculation module, configured to calculate the benchmark of the model evaluation index based on the cloud computing center for the model evaluation indexes sent by each fog computing node corresponding to different channel data sources;

[0031] A cloud center model verification module, which is used to compare the initial model evaluation index with the model evaluation index benchmark based on the cloud computing center, so as to judge whether the initial training model is qualified, and send all the qualified models in the cloud computing center to the target fog computing node;

[0032] A fog node model fusion module, which is used to fuse the qualified training models based on the target fog computing node to generate a target model corresponding to the target data source.

[0033] In addition, to achieve the above object, the present invention also provides a model training device for multiple data sources. The model training device for multiple data sources includes: a memory, a processor, and a model training program for multiple data sources stored on the memory and executable on the processor. When the model training program for multiple data sources is executed by the processor, the steps of the model training method for multiple data sources as described above are implemented.

[0034] In addition, to achieve the above object, the present invention also provides a computer-readable storage medium. A model training program for multiple data sources is stored on the computer-readable storage medium. When the model training program for multiple data sources is executed by a processor, the steps of the model training method for multiple data sources as described above are implemented.

[0035] The present invention provides a model training method for multiple data sources. By performing model training on the target data source with a preset algorithm based on a target fog computing node corresponding to a target data source, an initial training model is generated, and the initial training model and the initial model evaluation index are sent to the cloud computing center; based on the cloud computing center, the model evaluation index benchmarks are calculated for the model evaluation indexes sent by each fog computing node corresponding to data sources from different channels; based on the cloud computing center, the initial model evaluation index is compared with the model evaluation index benchmark to judge whether the initial training model is qualified, and all the qualified models in the cloud computing center are sent to the target fog computing node; based on the target fog computing node, the qualified training models are fused to generate a target model corresponding to the target data source. By the above method, the present invention improves the security of data from each channel by setting corresponding fog computing nodes for each channel data source and performing data training within each fog computing node, and screens qualified model parameters for data from each channel through the cloud computing center and distributes the qualified models to each fog computing node, realizing the co-training of model data between different fog computing nodes, improving the accuracy of the training model, and solving the technical problem of low security of existing model training data. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment solution of the present invention;

[0037] Figure 2 It is a schematic flowchart of the first embodiment of the model training method for multiple data sources of the present invention;

[0038] Figure 3 It is a schematic diagram of the model training process of the present invention;

[0039] Figure 4 It is a schematic diagram of the ranking of the model evaluation indexes of the present invention.

[0040] The realization, functional features and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. Specific Embodiments

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

[0042] As Figure 1 shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment solution of the present invention.

[0043] The model training device for multiple data sources in the embodiment of the present invention can be a PC or a server device, on which a Java virtual machine is running.

[0044] As Figure 1 shown, the model training device for multiple data sources may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0045] Those skilled in the art can understand that Figure 1 the device structure shown in

[0046] As Figure 1As shown in the figure, the memory 1005, which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and a model training program for multiple data sources.

[0047] In Figure 1 In the device shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the client (user side) and communicate data with the client; and the processor 1001 can be used to call the model training program for multiple data sources stored in the memory 1005 and perform the operations in the following model training method for multiple data sources.

[0048] Based on the above hardware structure, an embodiment of the model training method for multiple data sources of the present invention is proposed.

[0049] Referring to Figure 2 , Figure 2 is a schematic flowchart of the first embodiment of the model training method for multiple data sources of the present invention. The model training method for multiple data sources includes:

[0050] Step S10: Based on a target fog computing node corresponding to a target data source, perform model training on the target data source with a preset algorithm to generate an initial training model, and send the initial training model and the initial model evaluation index to the cloud computing center;

[0051] In the current field of machine learning model training, if the training data sources come from multiple channels, generally, the training data sources from multiple channels are uniformly collected in the cloud computing center. Then, in the cloud computing center, the training data is preprocessed and feature engineering is performed to obtain a feature data set. Then, the model parameters are iteratively updated through machine learning algorithms to obtain the final model. The cloud computing center distributes the final model to each using device for application. That is to say, the cloud computing center is used for data collection, model training, and model distribution. However, collecting data from different channels in the cloud computing center cannot guarantee the security between the data of each channel. In addition, if there are security restrictions on the data of certain channels, the cloud computing center cannot use this part of the data, reducing the accuracy of model training. To solve the above problems, the present invention performs model training on the data of this channel through fog computing nodes, calculates the corresponding model evaluation metrics, and then sends the trained model parameters and model evaluation metrics to the cloud computing center. The cloud computing center calculates the model evaluation metric benchmark and filters out qualified models, and distributes the qualified models to each fog computing node for application, thereby realizing the sharing of models between different fog computing nodes while protecting the security of the data of each channel and improving the model accuracy. Specifically, the model training method for multiple data provided by the present invention is mainly aimed at the field of machine learning model training. The data sources in different fog computing nodes have application scenarios with the same feature data. The cloud computing center is used as the model training coordinator to coordinate the model training of different fog computing nodes. The model training system mainly includes a cloud computing center and fog computing nodes. The cloud computing center is used to distribute the qualified model group and the model evaluation metric benchmark value. The fog computing node is used for machine learning model training and verification. The fog computing node includes an operating system, a network communication module, a user interface module, a storage module, and a fog computing node machine learning training module. The fog computing node machine learning training module includes: a data processing module, an algorithm library, a model training module, a model evaluation module, and a model verification module. Among them, the data processing module is used to screen and preprocess the original data, perform feature engineering, and obtain the training data of the machine learning model. The algorithm library contains common machine learning algorithms, including but not limited to common machine learning algorithms such as XgBoost, LightGBM, neural networks, and random forests. The model training module is used to perform model training on various algorithms in the algorithm library to obtain a suitable machine learning model. The model evaluation module is used to calculate the evaluation metrics for various machine learning models. The model verification module is used by the fog computing node to verify and filter the models input by the cloud computing center according to the evaluation metric benchmark. Among them, fog computing is a distributed computing model. As an intermediate layer between the cloud data center and Internet of Things devices / sensors, it provides computing, network, and storage devices, enabling cloud-based services to be closer to Internet of Things devices and sensors.Cloud computing is a type of distributed computing that aggregates many computing resources through the network "cloud" and realizes automated management through software. With only a few people involved, resources can be quickly provided. Machine learning is a field that specifically studies how computers simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve their own performance. Reinforcement learning is one of the paradigms and methodologies of machine learning, used to describe and solve the problem of an agent achieving maximum reward or specific goals through learning strategies during the interaction with the environment. XGBoost is an efficient gradient boosting decision tree model algorithm widely used in the field of machine learning. LigthGBM is an efficient gradient boosting decision tree model algorithm. The neural network algorithm is composed of numerous neurons with adjustable connection weights, featuring large-scale parallel processing, distributed information storage, and good self-organizing and self-learning capabilities. The true positive rate is the number of positive samples predicted as positive / the actual number of positive samples. The false positive rate is the number of negative samples predicted as positive / the actual number of negative samples. The false negative rate is the number of positive samples predicted as negative / the actual number of positive samples. The accuracy rate is the percentage of correctly predicted results in the total samples. The precision rate, also known as the precision, refers to the probability of actual positive samples among all samples predicted as positive. The recall rate is the probability of samples predicted as positive among the actual positive samples. The F1-Score is the harmonic mean of the precision rate and the recall rate, with a maximum of 1 and a minimum of 0. The AUC is defined as the area under the ROC curve (the integral of the ROC), usually greater than 0.5 and less than 1. Among them, in the ROC curve, the abscissa is the false positive rate (FPR), and the ordinate is the true positive rate (TPR). The ROC curve should be above the line connecting (0,0) and (1,1). For example. Figure 3As shown in the figure, three fog computing nodes and one cloud computing center are taken as examples, namely fog computing node 1, fog computing node 2, fog computing node 3 and cloud computing center 1. In a specific embodiment, the number of fog computing nodes can be greater than or equal to two, and the number of cloud computing centers can be greater than or equal to one. Obtain one data source from multiple data sources as the target data source (successively obtain each data source from multiple data sources as the target data source). And according to the target fog computing node corresponding to the target data source, that is, fog computing node 1, perform data preprocessing and feature engineering on the target data source. Through a corresponding algorithm in the algorithm library (such as successively obtaining one of the common machine learning algorithms such as XgBoost, LightGBM, neural network, random forest, etc. as the training algorithm), perform model training on the target data source to generate an initial training model, calculate the initial model evaluation index corresponding to the initial training model, and use the initial model parameters and the initial model evaluation index as the output and send them to the cloud computing center. In a specific embodiment, multiple training models can be generated by training the target data source based on at least two algorithms in the algorithm library, such as XgBoost, LightGBM, neural network, random forest, etc. And send the model parameter matrix composed of the model parameters corresponding to the multiple training models and the model evaluation index matrix composed of the model evaluation indexes to the cloud computing center.

[0052] Step S20: Based on the cloud computing center, calculate the model evaluation index benchmark for the model evaluation indexes sent by each fog computing node corresponding to the data sources from different channels;

[0053] In this embodiment, the cloud computing center collects the models, model parameters and model evaluation indexes input by each fog computing node, and calculates the model evaluation index benchmark according to the model data corresponding to multiple data sources, so as to screen out qualified models based on the model evaluation index benchmark, and distribute the qualified models and the model evaluation index benchmark to each fog computing node. In a specific embodiment, the cloud computing center calculates the model evaluation rules for the model parameter matrix and the evaluation index matrix input by each fog computing node, screens out the qualified model group, and distributes the qualified model group and the model evaluation rules to each fog computing node. After the cloud computing center collects the model evaluation indexes sent by each fog computing node, sort the model evaluation indexes, and eliminate the model evaluation indexes with a ranking lower than a preset value (such as 50% or 60%); or when each model evaluation index conforms to a normal distribution, eliminate the model evaluation indexes that do not belong to the preset range, and eliminate the models and model parameters corresponding to the model evaluation indexes with a ranking lower than the preset value or not belonging to the preset range. Then, set the model evaluation index benchmark according to the minimum value (it can also be the average value) of the model evaluation index corresponding to the model after elimination, and complete the calculation of the model evaluation index benchmark.

[0054] Step S30, based on the cloud computing center, the initial model evaluation index is compared with the model evaluation index benchmark to determine whether the initial training model is qualified, and all qualified models in the cloud computing center are sent to the target fog computing node;

[0055] In this embodiment, the cloud computing center compares the initial model evaluation index sent by the target fog computing node with the model evaluation index benchmark to determine whether the initial training model meets the standard of a qualified model. In a specific embodiment, the cloud computing center can sort the model evaluation indicators corresponding to the models sent by each fog computing node according to the evaluation type. If a model has a model evaluation indicator with a low ranking, the model is identified as an unqualified model, and the model and the model evaluation indicator corresponding to the model are eliminated. After eliminating the unqualified model, the cloud computing center sends all qualified models (which can be a single model or a model group consisting of multiple models) to each fog computing node.

[0056] Step S40: Based on the target fog computing node, the qualified training model is integrated to generate a target model corresponding to the target data source.

[0057] In this embodiment, after receiving the qualified model sent by the cloud computing center, if there are multiple qualified models, the target fog computing node fuses each qualified model according to the preset weights according to the logistic regression algorithm or the Bagging algorithm to generate the final target model.

[0058] This embodiment provides a model training method for multiple data sources, which is based on a target fog computing node corresponding to a target data source, performs model training on the target data source with a preset algorithm, generates an initial training model, and sends the initial training model and the initial model evaluation index to the cloud computing center; based on the cloud computing center, the model evaluation index sent by each fog computing node corresponding to different channel data sources is calculated as a model evaluation index benchmark; based on the cloud computing center, the initial model evaluation index is compared with the model evaluation index benchmark to determine whether the initial training model is qualified, and all qualified models in the cloud computing center are sent to the target fog computing node; based on the target fog computing node, the qualified training model is merged to generate a target model corresponding to the target data source. In the above manner, the present invention improves the security of each channel data by setting a corresponding fog computing node in each channel data source and performing data training in each fog computing node, and screens the model parameters corresponding to each channel data through the cloud computing center, and distributes the qualified model to each fog computing node, so as to realize the joint training of model data between different fog computing nodes, improve the accuracy of the training model, and solve the technical problem of low security of existing model training data.

[0059] Furthermore, based on the first embodiment of the model training method for multiple data sources of the present invention, a second embodiment of the model training method for multiple data sources of the present invention is proposed.

[0060] In this embodiment, the step S10 specifically includes:

[0061] Perform data preprocessing on the target data source based on the target fog computing node, and extract the target feature data set of the target data source;

[0062] Call an algorithm in the algorithm library through the target fog computing node to perform model training on the training set in the target feature data set, and generate the initial training model;

[0063] Calculate the initial model evaluation index of the initial training model through the target fog computing node, and send the initial training model and the initial model evaluation index to the cloud computing center.

[0064] In this embodiment, in order to improve the model training accuracy, the data source is preprocessed in advance, that is, the target fog computing node performs preprocessing and data cleaning on the collected training data, performs feature engineering, obtains the target feature data set D1, and divides the target feature data set D1 into a training set D train1 ={X train1 , Y train1} and a test set D test1 ={X test1 , Y test1}, where X train1 is the feature of the training set, Y train1 is the classification result of the training set, X test1 is the feature of the test set, and Y test1 is the classification result of the test set. Through the model training module, based on a corresponding algorithm in the algorithm library, the training set D train1 ={X train1 , Y train1} data is trained to generate the initial training model. Or through the model training model, based on multiple corresponding learning algorithms in the algorithm library, the training set data is trained to generate a set of training models. Then, through the reinforcement learning automatic tuning parameter module, the hyperparameters of the model are trained. Finally, through the trained model, the test set D test1 ={X test1 , Y test1} is predicted to obtain the classification result {Y test_predicate1}. In a specific embodiment, algorithms such as Bayesian optimization, random search, network search method, and evolutionary algorithm can also be used for automatic parameter tuning. The reinforcement learning automatic parameter tuning module will automatically obtain the best hyperparameters of the model under the current dataset. The reinforcement learning automatic parameter tuning module performs data preprocessing and feature preprocessing on the input parameters. For machine learning algorithms, through the negative feedback of the parameter optimizer based on reinforcement learning, the optimal parameters are continuously iterated. Thus, the accuracy of the training model is improved. According to D train ={X train , Y train}, D test1 ={X test1 , Y test1}, {Y test_predicate}, calculate the initial model evaluation index corresponding to the initial training model. In a specific embodiment, in order to further improve the model training efficiency, various model evaluation indexes can also be calculated. The evaluation indexes include but are not limited to true positive rate, false positive rate, false negative rate, true negative rate, accuracy rate, precision rate, recall rate, F1-Score, AUC and other evaluation indexes. Summarize to obtain the model evaluation index matrix eval 1 and the model hyperparameter matrix θ 1 . Among them, the model evaluation index matrix eval 1 contains information such as model number and evaluation index value. Send the model evaluation index matrices (eval 1 , eval 2 , veal 3} and the model hyperparameter matrices {θ 1 , θ 2 , θ 3} on fog computing node 1, fog computing node 2, and fog computing node 3 to the cloud computing center respectively.

[0065] Furthermore, based on the second embodiment of the model training method with multiple data sources of the present invention, a third embodiment of the model training method with multiple data sources of the present invention is proposed.

[0066] In this embodiment, step S30 specifically includes:

[0067] Based on the target fog computing node, input the test set in the target feature dataset into the qualified training model to verify the qualified training model;

[0068] Based on the target fog computing node, obtain the predicted classification result of the qualified training model for the test set, and calculate the verification model evaluation index of the qualified training model according to the standard classification result corresponding to the test set and the predicted classification result;

[0069] When it is determined based on the target fog computing node that the evaluation index of the verification model reaches the benchmark of the model evaluation index, the qualified training model is added with a qualified identifier, and the qualified training models with the added qualified identifier are fused to generate the target model.

[0070] In this embodiment, in order to further improve the model accuracy, after the cloud computing center feeds back the qualified model, each fog computing node can verify the qualified model based on its own data source. The fog computing node 1 calculates the qualification status of each model in the model group according to the model evaluation index and the qualified model group input by the cloud computing center, and filters out the qualified model group that passes the evaluation in the fog computing node 1. The fog computing node 1 obtains the qualified model group M and the model evaluation index benchmark value eval input by the cloud computing center. base Select an appropriate proportion of data from the training dataset as the validation set. Verify the qualified model group M input by the cloud computing center to obtain the prediction result as {Y validate_predicate1}. D validate1 = {X validate1 , Y validate1} is the validation set, X validate1 is the feature of the validation set, and Y validate1 is the classification result of the validation set. Calculate the evaluation index eval validate1 of the model group M according to D validate_predicate1 and {Y validate1}. Compare the calculated evaluation index eval validate1 with the model evaluation index benchmark value eval base to eliminate the unqualified models. The models with the added qualified identifier in the model group are left, denoted as K = {model 1 , model 2 ......, model k}, and the qualified training models with the added qualified identifier are fused to generate the target model.

[0071] Further, the step of fusing the qualified training models with the added qualified identifier to generate the target model specifically includes:

[0072] According to the logistic regression algorithm formula, fuse the qualified training models with the added qualified identifier to generate the target model, where the logistic regression algorithm formula is:

[0073] where K is the number of qualified training models with the added qualified identifier, h t (x) is the qualified training model formula, and α t is the weight corresponding to the formula of each qualified training model with the added qualified identifier.

[0074] In this embodiment, fog computing node 1 uses a logistic regression algorithm Perform model fusion on model group K, use reinforcement learning to adjust hyperparameters, and select appropriate weight α t , so that the model has the minimum exponential loss function In a specific embodiment, the qualified training model with qualified identification can also be fused using the Bagging algorithm.

[0075] Furthermore, the step S20 specifically includes:

[0076] Based on the cloud computing center, determining whether the model evaluation index sent by each fog computing node conforms to a normal distribution;

[0077] If the cloud computing center determines that the model evaluation indicators sent by each fog computing node conform to the normal distribution, the evaluation indicators that do not belong to the preset range are eliminated;

[0078] Based on the cloud computing center, the mean value corresponding to the eliminated model evaluation index is calculated as the model evaluation index benchmark.

[0079] Wherein, after the step of judging whether the model evaluation index sent by each fog computing node conforms to the normal distribution based on the cloud computing center, the method further includes:

[0080] If it is determined based on the cloud computing center that the model evaluation index sent by each fog computing node does not conform to the normal distribution, the model evaluation index sent by each fog computing node is sorted, and the model evaluation index ranked lower than the preset value is eliminated;

[0081] Based on the cloud computing center, the minimum value of the model evaluation index after elimination is obtained as the model evaluation index benchmark.

[0082] In this embodiment, in order to improve the accuracy of model training, the trained models are screened and unqualified models are eliminated. The cloud computing center can eliminate models based on the normal distribution, or determine the model evaluation index benchmark value based on the data segmentation method. If the model evaluation index data conforms to the normal distribution rule, a preset range of evaluation index values ​​is determined based on the center of the normal distribution and the left and right sides, and the evaluation indexes that do not fall within the preset range are eliminated, and the models corresponding to the evaluation indexes that do not fall within the preset range are marked as unqualified models. Calculate the mean or minimum value corresponding to the model evaluation index after elimination as the model evaluation index benchmark. If the model evaluation index data does not conform to the normal distribution rule, such as Figure 4 As shown, according to D train ={X train , Y train}、D test1= {X test1 , Y test1}, {Y test_predicate}, calculate each model evaluation index. The evaluation indexes include but are not limited to true positive rate, false positive rate, false negative rate, true negative rate, accuracy rate, precision rate, recall rate, F1-Score, AUC and other evaluation indexes. Summarize to obtain the model evaluation index matrix of fog computing node 1. Summarize to obtain the model evaluation index matrix eval 1 and the model hyperparameter matrix θ 1 . Among them, the model evaluation index matrix eval 1 contains information such as model number and evaluation index value. The cloud computing center collects the model hyperparameter matrices {θ 1 , θ 2 , θ 3} and the model evaluation index matrices {eval 1 , eval 2 , eval 3} input by each fog computing node, and classifies and summarizes the model evaluation index matrix {eval 1 , eval 2 , eval 3} according to the index type. Sort the model evaluation indexes by evaluation type and calculate the ranking positions. The cloud computing center collects a total of n models. For any of these models, if the evaluation index ranking belongs to the last 30%, then mark this model as an unqualified model and discard it. The remaining m models are recorded as the qualified model group M = {model 1 , model 2 ......, model m}. Take the lowest value of each evaluation index of the qualified model group M as the model evaluation index benchmark value eval base . Among them, the evaluation index ranking value of the last 30% is an empirical value, and the actual value includes but is not limited to 30%.

[0083] The present invention also provides a model training device for multiple data sources. The model training device for multiple data sources includes:

[0084] A fog node model generation module, which is used to perform model training on the target data source with a preset algorithm based on a target fog computing node corresponding to a target data source, generate an initial training model, and send the initial training model and the initial model evaluation index to the cloud computing center;

[0085] A cloud center benchmark calculation module, which is used to calculate the model evaluation index benchmark based on the cloud computing center for the model evaluation indexes sent by each fog computing node corresponding to data sources from different channels;

[0086] The cloud center model verification module is used to compare the initial model evaluation index with the model evaluation index benchmark based on the cloud computing center, so as to judge whether the initial training model is qualified, and send all the qualified models in the cloud computing center to the target fog computing node;

[0087] The fog node model fusion module is used to fuse the qualified training models based on the target fog computing node to generate the target model corresponding to the target data source.

[0088] Furthermore, the fog node model generation module specifically includes:

[0089] The initial feature extraction unit is used to perform data preprocessing on the target data source based on the target fog computing node and extract the target feature data set of the target data source;

[0090] The initial model generation unit is used to call an algorithm in the algorithm library through the target fog computing node to perform model training on the training set in the target feature data set and generate the initial training model;

[0091] The initial index calculation unit is used to calculate the initial model evaluation index of the initial training model through the target fog computing node and send the initial training model and the initial model evaluation index to the cloud computing center.

[0092] Furthermore, the cloud center model verification module specifically includes:

[0093] The qualified model verification unit is used to input the test set in the target feature data set into the qualified training model based on the target fog computing node to verify the qualified training model;

[0094] The verification index calculation unit is used to obtain the predicted classification result of the qualified training model for the test set based on the target fog computing node, and calculate the verification model evaluation index of the qualified training model according to the standard classification result corresponding to the test set and the predicted classification result;

[0095] The target model generation unit is used to, when it is determined that the verification model evaluation index reaches the model evaluation index benchmark based on the target fog computing node, add a qualified label to the qualified training model, and fuse the qualified training model with the added qualified label to generate the target model.

[0096] Furthermore, the target model generation unit is also used to:

[0097] Fuse the qualified training models with the added qualified label according to the logistic regression algorithm formula to generate the target model, where the logistic regression algorithm formula is:

[0098] Among them, K is the number of qualified training models with qualified identification added, and h t (x) is the formula of the qualified training model, and α t is the weight corresponding to the formula of each qualified training model with qualified identification added.

[0099] Furthermore, the cloud center benchmark calculation module specifically includes:

[0100] A normal distribution judgment unit, configured to judge whether the model evaluation indexes sent by each fog computing node conform to the normal distribution based on the cloud computing center;

[0101] An evaluation index elimination unit, configured to eliminate the evaluation indexes that do not belong to the preset range if it is determined based on the cloud computing center that the model evaluation indexes sent by each fog computing node conform to the normal distribution;

[0102] An index benchmark calculation unit, configured to calculate the mean value corresponding to the model evaluation indexes after elimination based on the cloud computing center as the model evaluation index benchmark.

[0103] Furthermore, the evaluation index elimination unit is further configured to:

[0104] If it is determined based on the cloud computing center that the model evaluation indexes sent by each fog computing node do not conform to the normal distribution, then sort the model evaluation indexes sent by each fog computing node, and eliminate the model evaluation indexes with a ranking lower than the preset value;

[0105] Based on the cloud computing center, obtain the minimum value in the model evaluation indexes after elimination as the model evaluation index benchmark.

[0106] The methods executed by the above program modules can refer to the respective embodiments of the model training method for multiple data sources of the present invention, and will not be elaborated here.

[0107] The present invention also provides a computer-readable storage medium.

[0108] The computer-readable storage medium of the present invention stores a model training program for multiple data sources. When the model training program for multiple data sources is executed by a processor, the steps of the model training method for multiple data sources as described above are implemented.

[0109] Among them, the method implemented when the model training program for multiple data sources running on the processor is executed can refer to the respective embodiments of the model training method for multiple data sources of the present invention, and will not be elaborated here.

[0110] It should be noted that in this text, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or system comprising a series of elements not only includes those elements but also other elements not explicitly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, article or system comprising such element.

[0111] The serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.

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

[0113] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A model training method for multiple data sources, It is characterized in that The model training method for multiple data sources comprises the following steps: Based on a target fog computing node corresponding to a target data source, model training is performed on the target data source using a preset algorithm to generate an initial training model, and the initial training model and initial model evaluation indicators are sent to a cloud computing center; Based on the cloud computing center, the model evaluation index sent by each fog computing node corresponding to different channel data sources is used to calculate the model evaluation index benchmark, including: based on the cloud computing center, judging whether the model evaluation index sent by each fog computing node conforms to the normal distribution; if the model evaluation index sent by each fog computing node is judged to conform to the normal distribution based on the cloud computing center, the evaluation index that does not belong to the preset range is eliminated; based on the cloud computing center, the mean value corresponding to the eliminated model evaluation index is calculated as the model evaluation index benchmark; Based on the cloud computing center, the initial model evaluation index is compared with the model evaluation index benchmark to determine whether the initial training model is qualified, and all qualified models in the cloud computing center are sent to the target fog computing node; Based on the target fog computing node, the qualified training models are fused to generate a target model corresponding to the target data source.

2. The model training method for multiple data sources as claimed in claim 1, It is characterized in that The step of performing model training on a target data source using a preset algorithm based on a target fog computing node corresponding to a target data source to generate an initial training model, and sending the initial training model and initial model evaluation index to a cloud computing center specifically includes: Preprocessing the target data source based on the target fog computing node, and extracting a target feature data set of the target data source; Calling an algorithm in an algorithm library through the target fog computing node to perform model training on the training set in the target feature data set to generate the initial training model; The initial model evaluation index of the initial training model is calculated by the target fog computing node, and the initial training model and the initial model evaluation index are sent to the cloud computing center.

3. The model training method for multiple data sources as claimed in claim 2, It is characterized in that The step of fusing the qualified training model based on the target fog computing node to generate a target model corresponding to the target data source specifically includes: Based on the target fog computing node, inputting the test set in the target feature data set into the qualified training model to verify the qualified training model; Obtaining the predicted classification result of the qualified training model for the test set based on the target fog computing node, and calculating the verification model evaluation index of the qualified training model according to the standard classification result corresponding to the test set and the predicted classification result; When it is determined based on the target fog computing node that the evaluation index of the verification model reaches the benchmark of the model evaluation index, the qualified training model is added with a qualified identifier, and the qualified training models with the qualified identifiers added are fused to generate the target model.

4. The model training method for multi-data sources according to claim 3, wherein, the step of fusing the qualified training models with the qualified identifiers added to generate the target model specifically includes: According to the logistic regression algorithm formula, the qualified training models with the qualified identifiers added are fused to generate the target model, where the logistic regression algorithm formula is: where K is the number of qualified training models with qualified labels added, and h t (x) is the formula of the qualified training model, and α t is the weight corresponding to the formula of each qualified training model with a qualified label added.

5. The model training method for multi-data sources according to claim 1, wherein, after the step of judging whether the model evaluation indexes sent by each fog computing node conform to the normal distribution based on the cloud computing center, it further includes: If it is determined based on the cloud computing center that the model evaluation indexes sent by each fog computing node do not conform to the normal distribution, the model evaluation indexes sent by each fog computing node are sorted, and the model evaluation indexes with rankings lower than the preset value are excluded; Based on the cloud computing center, the minimum value in the model evaluation indexes after exclusion is obtained as the benchmark of the model evaluation index.

6. The model training method for multi-data sources according to claim 1, wherein, the model evaluation index includes at least one of true positive rate, false positive rate, false negative rate, true negative rate, accuracy rate, precision rate, recall rate, F1-Score, F1 score or area under the AUC curve.

7. A model training device for multi-data sources, wherein, the model training device for multi-data sources includes: A fog node model generation module, configured to perform model training on the target data source with a preset algorithm based on a target fog computing node corresponding to the target data source, generate an initial training model, and send the initial training model and the initial model evaluation index to the cloud computing center; A cloud center benchmark calculation module, configured to calculate the benchmark of the model evaluation index for the model evaluation indexes sent by each fog computing node corresponding to data sources from different channels based on the cloud computing center; specifically, the cloud center benchmark calculation module is configured to: judge whether the model evaluation indexes sent by each fog computing node conform to the normal distribution based on the cloud computing center; if it is determined based on the cloud computing center that the model evaluation indexes sent by each fog computing node conform to the normal distribution, exclude the evaluation indexes that do not belong to the preset range; calculate the mean value corresponding to the model evaluation indexes after exclusion based on the cloud computing center as the benchmark of the model evaluation index; A cloud center model verification module, configured to compare the initial model evaluation index with the benchmark of the model evaluation index based on the cloud computing center to judge whether the initial training model is qualified, and send all the qualified models in the cloud computing center to the target fog computing node; A fog node model fusion module, configured to fuse the qualified training models based on the target fog computing node to generate a target model corresponding to the target data source.

8. A model training device for multi-data sources, It is characterized in that The model training device for multiple data sources includes: a memory, a processor, and a model training program for multiple data sources stored on the memory and executable on the processor. When the model training program for multiple data sources is executed by the processor, the steps of the model training method for multiple data sources as described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium It is characterized in that The computer-readable storage medium stores a model training program for multiple data sources. When the model training program for multiple data sources is executed by a processor, the steps of the model training method for multiple data sources as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Personalized deep learning method for fog computing environment

    CN107871164A

  • Federated learning system optimization method, device and equipment and storage medium

    CN111222647A