CN116523081B - Data standardization method and device - Google Patents

Data standardization method and device Download PDF

Info

Publication number
CN116523081B
CN116523081B CN202310373153.XA CN202310373153A CN116523081B CN 116523081 B CN116523081 B CN 116523081B CN 202310373153 A CN202310373153 A CN 202310373153A CN 116523081 B CN116523081 B CN 116523081B
Authority
CN
China
Prior art keywords
distribution
user data
fitting model
weight
training
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310373153.XA
Other languages
Chinese (zh)
Other versions
CN116523081A (en
Inventor
王星
施碧忱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Petal Cloud Technology Co Ltd
Original Assignee
Petal Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Petal Cloud Technology Co Ltd filed Critical Petal Cloud Technology Co Ltd
Priority to CN202310373153.XA priority Critical patent/CN116523081B/en
Publication of CN116523081A publication Critical patent/CN116523081A/en
Application granted granted Critical
Publication of CN116523081B publication Critical patent/CN116523081B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/20Ensemble learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/10Pre-processing; Data cleansing
    • G06F18/15Statistical pre-processing, e.g. techniques for normalisation or restoring missing data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Medical Informatics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Information Transfer Between Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present disclosure relates to the field of machine learning, and in particular, to a data normalization method and apparatus. The data standardization method is applied to the terminal equipment and comprises the following steps: acquiring original user data; establishing a distribution fitting model according to the original user data; model training is carried out on the distribution fitting model through the original user data, and a training result is obtained; transmitting the training result to a federal learning server; acquiring the distribution parameters determined by the federal learning server according to the training result; and carrying out standardization processing on the original user data according to the distribution parameters.

Description

Data standardization method and device
[ field of technology ]
The present disclosure relates to the field of machine learning, and in particular, to a data normalization method and apparatus.
[ background Art ]
In the current information pushing process, user portraits are generally determined according to operation data of users through a federal learning technology, and corresponding user portrait tag models are trained, so that interested contents or information are pushed to the users through the user portrait tag models.
When determining a user portrait by using the federal learning technology, firstly, standardized processing needs to be performed on operation information of a user. Since the standardization is performed by a large amount of data, and cannot be performed on single operation data of the current user, it is necessary to acquire operation data of a specific group having a high degree of association with the current user and perform the standardization process by these data.
However, as the privacy awareness of users continues to increase, more and more users begin to limit the collection of relevant operational data on terminal devices. Therefore, the operation data of the specific user group related to the current user cannot be acquired, the operation data of the current user cannot be standardized, the user portrait cannot be accurately acquired, and interested contents or information cannot be accurately put in for the user.
In the related art, in order to solve the above-mentioned problems, other user groups, such as a user group whose privacy awareness is relatively weak, may be collected without restricting the collection of the relevant operation data. And uses the data to normalize the operation data of the current user.
However, since the user group which collects the operation data is not the same group as the specific user group, there is a large deviation between the collected operation data and the actual operation data of the specific user group, and the standardization of the current user data by these data is deviated, which affects the finally determined user portrait and user portrait tag model, so that accurate pushing cannot be realized.
[ invention ]
Aiming at the problem that in the prior art, original user data on target terminal equipment held by a target group is difficult to obtain, so that an inaccurate data standardization result is caused, the application provides a data standardization method and device. The present application also provides a computer-readable storage medium.
In a first aspect, the present application provides a data normalization method, where the method is applied to a terminal device, and the method includes:
acquiring original user data;
establishing a distribution fitting model according to the original user data;
model training is carried out on the distribution fitting model through the original user data, and a training result is obtained;
transmitting training results to a federal learning server;
acquiring distribution parameters determined by a federal learning server according to training results;
and carrying out standardization processing on the original user data according to the distribution parameters.
According to the data standardization method provided by the application, the influence on a downstream federal learning model caused by the fact that original data of a user cannot be effectively obtained, and the obtained sample data are too large in bias, too small in quantity and low in quality in the prior art is overcome, and the model performance is improved.
Further, in order to determine a training result, model training is performed on the distribution fitting model through the original user data to obtain the training result, including:
Training a distribution fitting model through original user data to change the initial weight of the distribution fitting model into a first weight, wherein the weight of the distribution fitting model is a parameter of a distribution type corresponding to the distribution fitting model;
and determining the first weight as a training result.
Further, in order to protect user data privacy when uploading training results to the federal learning server, sending the training results to the federal learning server includes:
based on original user data and a distribution type corresponding to a distribution fitting model, respectively determining a first training loss of an initial weight in a distribution fitting model loss function and a second training loss of the first weight in the distribution fitting model loss function, wherein the distribution fitting model loss function is a negative value of a probability density function PDF of the distribution type corresponding to the distribution fitting model;
determining a first gradient of the training according to the first training loss and the second training loss;
the first gradient is sent to the federal learning server.
Further, obtaining the distribution parameters determined by the federal learning server according to the training result includes:
acquiring a second weight determined by the federal learning server according to the training result;
And when the second weight meets the preset condition, determining the second weight as a distribution parameter.
Further, in order to determine whether the second weight issued by the federal learning server can be determined as the distribution parameter, the second weight satisfies a preset condition, including:
determining a third training loss of the second weight in the loss function of the distribution fitting model based on the original user data and the distribution type corresponding to the distribution fitting model;
determining a second gradient of the federal learning server based on the third training loss and the second training loss;
when the second gradient is smaller than a preset first threshold value, determining that the second weight meets a preset condition; or alternatively, the first and second heat exchangers may be,
and when the difference value between the third training loss and the second training loss is smaller than a preset second threshold value, determining that the second weight meets the preset condition.
Further, in order to determine whether the second weight issued by the federal learning server can be determined as a distribution parameter, after the difference between the third training loss and the second training loss is smaller than a preset second threshold, the method further includes:
determining whether the third training loss is less than a preset third threshold;
when the third training loss is smaller than a preset third threshold value, determining that the second weight meets the preset condition;
And when the third training loss is larger than or equal to a preset third threshold value, establishing a distribution fitting model again according to the original user data.
Further, the training the distribution fitting model through the original user data to change the initial weight of the distribution fitting model to the first weight includes:
and adjusting the initial weight of the distribution fitting model to be a first weight through a preset learning rate.
Further, to protect user data privacy when uploading training results to the federal learning server, sending a first gradient to the federal learning server includes:
differential privacy processing is carried out on the first gradient;
and uploading the first gradient subjected to differential privacy treatment to a federal learning server.
Further, in order to determine whether model training is completed, when the second weight meets a preset condition, the second weight is determined to be a distribution parameter, and the method further includes:
when the second weight does not meet the preset condition, the second weight of the distributed fitting model is adjusted again through the preset learning rate until a third weight meeting the preset condition is determined;
and determining the third weight as a distribution parameter.
Further, establishing a distribution fitting model according to the original user data comprises the following steps:
When at least two types of original user data exist, respectively establishing a distribution fitting model for each different type of original user data;
and determining a distribution fitting model of the original data of each user as a distribution fitting model set.
Further, in order to implement data normalization processing, normalization processing is performed on the original user data according to the distribution parameters, including:
when the established distribution fitting model is a normal distribution model, determining the value of the standardized original user data according to the distribution parameters;
when the established distribution fitting model is not a normal distribution model, determining the value normalized by the original user data according to the distribution parameters and the accumulated distribution function CDF of the distribution fitting model.
In a second aspect, the present application provides a data normalization method for use with a federal learning server, the method comprising:
receiving a first gradient reported by each target terminal device, wherein the target terminal devices are predetermined and comprise a plurality of terminal devices with the same characteristics, and the first gradient is determined by each target terminal device according to original user data, a distribution type corresponding to a distribution fitting model, an initial weight of the distribution fitting model and a first weight obtained by changing the initial weight;
Averaging the first gradients reported by each target terminal device to determine an average gradient;
determining a second weight according to the average gradient;
and sending the second weight to the target terminal equipment.
According to the data standardization method provided by the application, the federal learning server can still acquire the data distribution characteristics recorded on all target terminal devices under the condition that the federal learning server does not acquire the original user data, so that the distribution parameters are determined to realize standardization.
In a third aspect, the present application provides a data normalization apparatus, the apparatus being applied to a terminal device, the apparatus comprising:
the first acquisition module acquires original user data;
the building module is used for building a distribution fitting model according to the original user data;
the training module is used for carrying out model training on the distribution fitting model through the original user data to obtain a training result;
the sending module is used for sending the training result to the federal learning server;
the second acquisition module is used for acquiring the distribution parameters determined by the federal learning server according to the training result;
and the standardization module is used for carrying out standardization processing on the original user data according to the distribution parameters.
In a fourth aspect, the present application provides an electronic device comprising a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the electronic device to perform the method steps as in any of the first aspects.
In a fifth aspect, the present application provides a data normalization apparatus for use with a federal learning server, the apparatus comprising:
the receiving module is used for receiving a first gradient reported by each target terminal device, wherein the target terminal devices are predetermined and comprise a plurality of terminal devices with the same characteristics, and the first gradient is determined by each target terminal device according to original user data, a distribution type corresponding to a distribution fitting model, an initial weight of the distribution fitting model and a first weight obtained by changing the initial weight;
the first determining module is used for taking an average value of the first gradients reported by the target terminal devices so as to determine an average gradient;
the second determining module is used for determining a second weight according to the average gradient;
and the sending module is used for sending the second weight to the target terminal equipment.
In a sixth aspect, the present application provides an electronic device comprising a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the electronic device to perform the method steps of any of the second aspects.
In a seventh aspect, the present application provides a computer readable storage medium having a computer program stored therein, which when run on a computer causes the computer to perform the method of any one of the first or second aspects.
[ description of the drawings ]
FIG. 1 is a flow chart of a data normalization processing method in the related art;
FIG. 2 is a schematic diagram of a data normalization system according to an embodiment of the present application;
fig. 3 is a schematic functional structure diagram of a server and a terminal device according to an embodiment of the present application;
FIG. 4 is a flow chart illustrating a method for data normalization according to one embodiment of the present application;
FIG. 5 is a schematic diagram of a set of distribution fitting models according to an embodiment of the present application;
FIG. 6 is a flow chart illustrating another method of data normalization according to an embodiment of the present application;
FIG. 7 is a flow chart illustrating another method of data normalization according to an embodiment of the present application;
FIG. 8 is a flow chart illustrating another method of data normalization according to an embodiment of the present application;
FIG. 9 is a flow chart illustrating another method of data normalization according to an embodiment of the present application;
FIG. 10 is a flow chart illustrating another method of data normalization according to an embodiment of the present application;
FIG. 11 is a flow chart illustrating another method of data normalization according to an embodiment of the present application;
FIG. 12 is a schematic diagram of a data normalization device according to an embodiment of the present application;
FIG. 13 is a schematic diagram of another data normalization device according to an embodiment of the present application;
fig. 14 is a schematic hardware structure of an electronic device according to an embodiment of the present application.
[ detailed description ] of the invention
Prior to the description of the embodiments of the present application, description will be made first of related arts and technical problems.
In the current information pushing process, the internet server can push some information which is interested by the user automatically besides the information subscribed by the user to the terminal equipment, so that the time for network retrieval of the user is reduced, and the user can conveniently and directly access the interested content. In order to ensure that the information pushed to the terminal equipment held by the user is the type or the material of interest to the user, the network server needs to periodically collect the information of the user, and the portrait of the user is determined by analyzing the information of the user. Thereby training the corresponding user portrait tag model to push interesting content or information for the user.
Specifically, in order to protect the data privacy of the user, federal learning techniques are employed in determining the representation of the user. As with other machine learning techniques, when determining a user representation using federal learning techniques, the user data may be used to determine the user representation after normalization of the raw user data collected.
In order to eliminate the unit, order of magnitude, dimension and other differences among the user data reported by different terminal devices in the federal learning process, the acquired user data needs to be standardized, corresponding distribution parameters are learned, and all the user data are determined to be in a specific interval through the distribution parameters. This not only eliminates errors, but also determines the relative location of each user in a particular user population.
Because the terminal equipment only contains one piece of original user data with the same type, the standardization needs to be determined through a large number of different terminal equipment original user data with the same type, and the single original user data cannot be processed through some common local batch data standardization methods, the federal learning server needs to acquire the original user data of a specific group with a high degree of association with the current user, such as the original data with the same type on the terminal equipment held by the user in the same area or the original data with the same type on the terminal equipment with the same brand, and the standardization processing is realized through the original data.
However, as the privacy awareness of users continues to increase, more and more users begin to limit the collection of raw user data on terminal devices by the federal learning server. Therefore, the federal learning server cannot acquire data of a specific group related to the current user, and further cannot perform standardized processing on operation data of the current user, cannot accurately acquire user portraits, and cannot accurately put interesting content or information for the user.
To solve the above-mentioned problem, in some related technologies, the federal learning server may instead collect original user data of other user groups, such as user groups whose privacy awareness is relatively weak, and not limited to the collection of related operation data. And determining the distribution parameters by using the data, and transmitting the distribution parameters to the current terminal equipment for the standardized processing of the current terminal equipment.
Fig. 1 is a flowchart of a data normalization processing method in the related art. As shown in fig. 1, a user holding a terminal device a belongs to a user group a, in order to perform data standardization processing on original user data on the terminal device a, it is necessary to obtain original user data of other target terminal devices in the user group a by using a federal learning server, determine distribution parameters, issue the distribution parameters to the terminal device a, and finally perform standardization by using the terminal device a according to the distribution parameters, and perform subsequent model training and reasoning steps by using the standardized data.
However, since most users in the user group a limit the ability of the terminal device to report the original user data, the federal learning server cannot acquire the original user data of each user in the user group a on the terminal device, and cannot determine the distribution parameters, so that the subsequent data standardization cannot be performed. The federal learning server in turn collects the original user data of other users at this time. For example, the original user data of each terminal device in the user group B is collected to obtain other user data, and the distribution parameters are determined according to the other user data. And the distribution parameters are issued to the terminal equipment A and used for standardization of the original user data on the terminal equipment A.
In the above scheme, since the user group in which the original user data is collected is not the same group as the specific user group, and is mostly not related to the specific user group, there is a large deviation between the collected original user data and the actual original user data of the specific user group, and there is a deviation in the standardization of the current original user data by these data, that is, there is a large deviation in the standardization of the original user data on the terminal device a in the user group a by the distribution parameters determined by the original user data of the user group B. This affects the final determined user portraits and user portrayal tag models, and accurate pushing cannot be achieved.
In order to solve the problem that the original user data cannot be standardized in the related art, the technical scheme of the embodiment of the application is provided, and the technical scheme of the embodiment of the application is described below.
Fig. 2 is a schematic diagram of a data normalization system according to an embodiment of the present application. As shown in fig. 2, the data normalization system includes a federal learning server and several terminal devices, such as terminal device a, terminal device B, and terminal device C. The plurality of terminal devices are predetermined terminal devices comprising the same characteristics, and are collectively called target terminal devices. And the target terminal equipment establishes communication connection with the federal learning server.
Each terminal device in the target terminal device is provided with a distribution fitting model, the terminal device can locally collect original user data, the original user data is subjected to local model training through the distribution fitting model so as to obtain distribution parameters, and the obtained distribution parameters are uploaded to the federal learning server. The federal learning server establishes a cloud side model set according to training results reported by each target terminal device, and determines final distribution parameters by aggregating the training results reported by each terminal device, and sends the final distribution parameters to each terminal device to realize standardized processing of each terminal device.
Fig. 3 is a schematic functional structure of a server and a terminal device according to an embodiment of the present application. The terminal equipment can process data and run an algorithm model so as to realize the AI capacity of the terminal side; the server is used for running cloud side services. The terminal device is any terminal device among target terminal devices in communication connection with the federal learning server, and a terminal device a is taken as an example for explanation.
As shown in fig. 3, the terminal device includes a data normalization module, and the data normalization module further includes a data processing module, a distribution fitting model and an AI framework.
The data normalization module is used for locally generating distribution parameters and locally normalizing the original user data. Specifically, the data processing module is used for converting the original user data on the terminal equipment into vectors meeting the proper requirements of the distribution fitting model so as to perform model training and reasoning through the data distribution fitting model. The distribution fitting model is used for training and reasoning the original user data on the terminal equipment so as to determine the distribution parameters for standardization. The AI framework is used for running on the terminal equipment, providing the running environment of other functional modules and supporting the federal learning of the model.
The federal learning server is used for aggregating model weights reported by cloud side opposite end sides, updating models and issuing new models to each end side.
Fig. 4 is a flowchart illustrating a data normalization method according to an embodiment of the present application. The terminal device a shown in fig. 2 performs the following flow as shown in fig. 4.
S401, acquiring original user data.
Specifically, according to the federal learning model required to be trained at the downstream, the type of the original user data required to be acquired is determined, and the acquisition is performed. The collected original user data may be digital data, such as execution time of a certain APP, or opening times of a certain APP in a period of time, etc., and may also include qualitative data, such as brand, model, etc. of the terminal device, or unstructured data, such as graphics, audio or video, etc. The present application will be described with reference to the collected user raw data as numerical data.
The data processing module shown in fig. 3 is used for collecting original user data, cleaning the collected original user data, and converting the collected original user data into vectors meeting the requirement of a model input format.
S402, a distribution fitting model is built according to the original user data.
Specifically, a distribution fitting model is established for the collected original user data. The type of the established distribution fitting model can be normal distribution, gamma distribution, exponential distribution and the like.
When the distribution fitting model is established for the original user data, the distribution fitting model which is more in line with the specific distribution fitting model can be selected according to different data characteristics of the original user data. For example, when the original user data does not contain obvious features, the default choice builds a normal distribution model; when the original user data is long tail data, a gamma distribution model can be selectively built.
In the established distribution fitting model, the parameters of the distribution type are taken as the weight of the distribution fitting model, and the negative value of the corresponding probability density function (Probability density function, PDF) is taken as the loss function of the model. For example, when the established distribution fitting model is a normal distribution model, the model weights are variance and mean; when the established distribution fitting model is a gamma distribution model, the model weights are alpha and beta, and the corresponding loss functions are negative values of PDF. Each distribution type comprises a corresponding distribution fitting model loss function, and the distribution type can be directly obtained through inquiry. Each distribution fitting model contains only 2-3 weights that need to be optimized.
When at least two types of original user data exist, namely, when multiple types of original user data are acquired through S401, a distribution fitting model is respectively built for the different types of original user data, and the distribution fitting model of the original user data is determined to be a distribution fitting model set. The distribution fitting model set is independent of each other in local, and can be trained in parallel or in series without influencing the training effect. When the training results of different distribution fitting models are uploaded to the federal learning server in the follow-up, the federal learning server also gathers the training results of the distribution fitting models of the same type, and interference or influence can not be generated among the training results.
For example, the user raw data collected in S401 is classified into two types, one type is the number of times a certain APP is opened, and the other type is the duration of using a certain APP. Then a distribution fitting model is established for the two types of user raw data, respectively. A normal distribution model 1 is established for the times of opening a certain APP, and a normal distribution model 2 is established for the use time of the certain APP. The normal distribution model 1 and the normal distribution model 2 do not interfere with each other during training.
Fig. 5 is a schematic diagram of a set of distribution fitting models according to an embodiment of the present application. In a specific embodiment, as shown in fig. 5, a set of distribution fitting models is provided for the present application. The collected original user data contains three types, namely the number of times of opening the application program A, the duration of using the application program A and the frequency of opening the application program A. Referring to fig. 5, a distribution fitting model is respectively established for three kinds of original user data, specifically, a gamma distribution fitting model 1 is established for the number of times the application program a is opened, a gamma distribution fitting model 2 is established for the duration of using the application program a, and a normal distribution fitting model 3 is established for the frequency of opening the application program a. Taking the established gamma distribution fitting model 1 as an example, the function image is a distribution fitting model loss function, namely an image for representing the loss of the distribution fitting model, and particularly is a gamma distribution function image. The abscissa of the function image is training data, namely original user data, the ordinate of the function image is PDF, namely corresponding value of the loss function, and the specific training data is collected original user data x 1 . The training data in the gamma distribution fitting model 2 is different from the gamma distribution fitting model 1, and is the original user data x 2 . The distribution fitting model type in the normal distribution fitting model 3 is normal distribution, the function image corresponds to the normal distribution image, the optimization parameter is variance and mean of the normal distribution, and the training data is original user data x 3
S403, performing model training on the distribution fitting model through the original user data to obtain a training result.
Specifically, the terminal device trains the distributed fitting model locally to reduce the loss function as much as possible by optimizing the weight, that is, by training the iterative weight to reduce the loss function, and determines the weight after iteration as a training result.
In a specific embodiment, in the distribution fitting model shown in FIG. 5, the raw user data x 1 Under the determined condition, training the distributed fitting model to determine the weight when the PDF value is maximum. And determining the weight determined at the moment as a training result.
S404, sending the training result to the federal learning server.
Specifically, the terminal device sends the training result to the federal learning server. The federal learning server receives training results reported by all target terminal devices, gathers the training results, establishes a corresponding model set on the cloud side, and updates the weight in the model set on the cloud side.
The target terminal equipment is predetermined and comprises a plurality of terminal equipment with the same characteristics. The terminal device a is contained within the target terminal device.
S405, acquiring distribution parameters determined by the federal learning server according to training results.
Specifically, the federal learning server updates the weights in the cloud side model set to obtain a second weight, and sends the updated second weight to each target terminal device.
And receiving a second weight issued by the federal learning server, and determining the second weight as a distribution parameter when the second weight meets a preset condition.
And when the second weight does not meet the preset condition, re-executing S403-S405, and executing the repeated training and the iteration and reporting of the weight until the third weight meeting the preset condition is determined, namely, the model loss is not reduced any more, and determining the third weight as a distribution parameter.
The cloud side model set can be retrained as required or according to fixed frequency and updated in time according to the data condition.
S406, carrying out standardization processing on the original user data according to the distribution parameters.
Specifically, the original user data is standardized according to the distribution parameters finally determined, which are issued by the federal learning server. The distribution parameters received by each target terminal device are the same, and the parameters used for standardization are consistent.
Fig. 6 is a flowchart of a data normalization method according to an embodiment of the present application. Specifically, as shown in fig. 6, each target terminal device receives the distribution parameters determined after multiple rounds of training issued by the federal learning server, and performs standardization processing on the original user data through the received distribution parameters to obtain standardized user data.
Taking terminal equipment A as an example, the user original data collected by the terminal equipment comprises three types which are respectively x 1 、x 2 、x 3 And a set of distribution fitting models comprising three distribution fitting models is established. In the training process of S403-S405, training is performed respectively for three distribution fitting model sets to obtain respective distribution parameters y 1 、y 2 、y 3 . Respectively by the distribution parameter y 1 For x 1 Normalized by y 2 For x 2 Normalized by y 3 For x 3 Performing standardization processing to obtain corresponding standardized user data x 1 ’、x 2 ’、x 3 '. And the standardization of the terminal equipment B and the terminal equipment C is the same as that of the terminal equipment A, and the original user data is standardized through the corresponding distribution parameters.
Specifically, when the established distribution fitting model is a normal distribution model, the numerical value of the standardized original user data is determined according to the distribution parameters. When the established distribution fitting model is not a normal distribution model, determining the value normalized by the original user data according to the distribution parameters and the accumulated distribution function CDF of the distribution fitting model.
When the established distribution fitting model is a normal distribution model, the calculation can be directly performed by the following formula:
x’=(x-mean)/std
where x is the original user data, x' is the normalized user data, mean is the mean, std is the variance, mean and std are the determined distribution parameters.
When the established distribution fitting model is not a normal distribution, it can be determined by specific functional relationships established by the raw user data, the distribution parameters and the cumulative distribution function (Cumulative distribution function, CDF).
x’=CDF(x,parms)
Where x is the original user data, x' is the normalized user data, parms is the learned distribution parameters, and CDF is the cumulative distribution function. The specific functional relationship needs to be determined by the specific type of distribution fitting model.
In a specific embodiment, fig. 7 is a flowchart illustrating a data normalization method according to an embodiment of the present application. Referring to fig. 7, the terminal device a acquires the original user data, which are the original user data 1, the original user data 2, and the original user data 3, respectively, in class 3 by executing S401. The terminal device a establishes a distribution fitting model from the original user data by executing S402. And respectively establishing a distribution fitting model 1 for the original user data 1, establishing a distribution fitting model 2 for the original user data 2, establishing a distribution fitting model 3 for the original user data 3, and respectively determining the weight and the loss function of each distribution fitting model. And the terminal equipment A carries out model training on the distributed fitting model by executing S403 to obtain a training result, and sends the training result to the federal learning server by S404. The federal learning server receives training results reported by all target terminal devices including the terminal device A, gathers the training results reported by all the terminal devices, determines distribution parameters and sends the distribution parameters to all the target terminal devices. The terminal equipment A acquires the distribution parameters determined by the federal learning server according to the training result through S405, and performs standardization processing on the original user data through S406. The original user data 1 is standardized through the received distribution parameters 1 to obtain standardized user data 1, the original user data 2 is standardized through the received distribution parameters 2 to obtain standardized user data 2, and the original user data 3 is standardized through the received distribution parameters 3 to obtain standardized user data 3. The terminal device performs the subsequent model training step using the normalized user data.
The effects of the embodiments of the present application are described below by a comparative example in a specific scene.
For example, when the data normalization processing is performed by the data normalization processing method shown in fig. 1, since the original user data of the target terminal device is not collected, the user data of other terminal devices are collected instead to determine the distribution parameters, resulting in that the related data for determining the distribution parameters are different from the target user data, and thus, there is a problem that there is a large deviation in the distribution parameters. The distribution parameters with larger deviation can cause inaccuracy of the standardized result, and influence the convergence speed and the result problem of the downstream model training. Meanwhile, due to the fact that user behaviors are changeable, the determined distribution parameters need to be updated, and frequent collection of user data is needed to be standardized to obtain the distribution parameters. In the updating process, the amount of data which can be acquired is reduced due to the improvement of the privacy consciousness of the user, and the original data of the user is difficult to acquire.
If the technical scheme of the embodiment of the application is applied in the scene, the distribution fitting model on the terminal equipment is subjected to model training to determine the distribution parameters, and the determined distribution parameters are uploaded to the federal learning server for federal learning so as to finally determine the distribution parameters for executing standardization. The method for collecting the original user data on all target terminal devices to perform data standardization in the traditional method is replaced. The method overcomes the defects that the prior art cannot effectively acquire the original data of the user, and the acquired sample data has overlarge bias, too few quantity and low quality, influences the downstream federal learning model, and improves the model performance. No additional user data is required to be acquired for data standardization, and the adaptability of the federal learning model to the position user group and different markets is improved.
Meanwhile, along with the change of the original user data, the data standardization module can update in time and respond to changeable user behaviors quickly. The influence on the downstream federal learning model caused by untimely updating of the acquired samples is reduced.
Fig. 8 is a flowchart of a data normalization method according to an embodiment of the present application. In a possible implementation manner, as shown in fig. 8, when performing model training on the distribution fitting model through the original user data in S403 to obtain a training result, the terminal device needs to train the weights in the established distribution fitting model, and determines the trained weights as the training result, where the specific training process includes:
s4031, training the distribution fitting model by the original user data to change the initial weight of the distribution fitting model to the first weight.
Specifically, the weight of the distribution fitting model is a parameter of the distribution type corresponding to the distribution fitting model. Training the distribution fitting model through the original user data on the terminal equipment, and optimizing the weight of the distribution fitting model by taking the minimized loss function, namely the maximized PDF value as a target.
In the training process, since training data, that is, original user data, is already determined, the weight in the distribution fitting model needs to be adjusted to determine the weight when the loss function value is minimum. In the training process, the weight of the distributed fitting model needs to be adjusted through a preset learning rate.
Since there is only one original user data on the terminal device, and there is a large difference between the model trained according to one original user data and the model trained by the federal learning server based on the user data of all the target terminal devices in the following S304, and the training results of all the target terminals are summarized into one model set in S304, in order to prevent the cloud-side model set of the federal learning server from being unstable or even failing to converge, the distributed fitting model should be prevented from being locally over-trained. Therefore, in the local training process, a small learning rate is selected, and the local model is trained for a small number of times.
S4032, determining the first weight as a training result.
Specifically, after the training of the present round, the optimized weight is determined as a first weight, and the first weight is determined as a training result of the training of the present round.
Fig. 9 is a flowchart of a data normalization method according to an embodiment of the present application. In one possible implementation, as shown in fig. 9, when the terminal device performs S404 and sends the training result to the federal learning server, it determines a gradient between the training obtained weight and the untrained initial weight, and uploads the gradient as the training result to the federal learning server. The process of uploading the training result specifically comprises the following steps:
s4041, based on the original user data and the distribution type corresponding to the distribution fitting model, respectively determining a first training loss of the initial weight in the distribution fitting model loss function and a second training loss of the first weight in the distribution fitting model loss function.
S4042, determining a first gradient of the training according to the first training loss and the second training loss.
Specifically, after the distribution fitting model is trained, the optimized weight changes towards one direction, and the gradient is used for representing the changed vector, namely, representing the effect of the optimization of the training through the gradient.
S4043, sending the first gradient to the federal learning server.
Specifically, in order to protect the local numerical value of the user from being exposed, the terminal device does not directly upload the weight to the cloud, but uploads the first gradient determined according to the weight to the federal learning server.
In order to further protect the private data of the user, the differential privacy processing on the first gradient can be realized by adding a controllable noise to the first gradient, and the first gradient after the differential privacy processing is uploaded to the federal learning server.
Therefore, in this embodiment, the first gradient is determined by the weight obtained through training, and differential privacy processing is further performed on the first gradient, and the processed first gradient is uploaded to the federal learning server, so that the data privacy and information security of the user are protected as much as possible.
Fig. 10 is a flowchart of a data normalization method according to an embodiment of the present application. In one possible implementation manner, as shown in fig. 10, in S405, the second weight is determined as the distribution parameter when the second weight issued by the federal learning server needs to meet the preset condition in the distribution parameter determined by the federal learning server according to the training result. The step of determining that the second weight satisfies the preset condition includes:
s4051, receiving the second weight issued by the federal learning server.
S4052, determining a third training loss of the second weight in the loss function of the distribution fitting model based on the original user data and the distribution type corresponding to the distribution fitting model.
S4053, determining a second gradient of the federal learning server based on the third training loss and the second training loss.
S4054, when the second gradient is smaller than the preset first threshold, determining that the second weight meets the preset condition, or when the difference between the third training loss and the second training loss is smaller than the preset second threshold, determining that the second weight meets the preset condition, and determining the second weight as a distribution parameter.
Specifically, when the update gradient of the cloud side model set on the federal learning server is extremely small, that is, the second gradient is smaller than a preset first threshold value, it is determined that the loss function of the distribution fitting model is not reduced any more, and the second weight meets a preset condition. Or when the average training loss of the model is not reduced, that is, the difference between the third training loss and the second training loss is smaller than a preset second threshold value, determining that the second weight meets the preset condition.
After determining that the difference between the third training loss and the second training loss is smaller than the preset second threshold, it is further required to determine whether the third training loss is smaller than the preset third threshold, and when the third training loss is smaller than the preset third threshold, it is determined that the second weight meets the preset condition. When the third training loss is greater than or equal to the preset third threshold, although the model has converged, the loss function is still high due to improper model selection or other conditions, but the loss function cannot be reduced by performing model training, step S402 needs to be re-performed to re-select and build the distribution fitting model according to the original user data, and the subsequent steps are performed.
For example, when S402 is performed, the distribution fitting model established for the original user data is a normal distribution model, and by performing the subsequent steps, the distribution parameters of the distribution fitting model are determined when S4053 is performed, but the third training loss at this time is higher than the preset third threshold. At this time, the step S402 is required to be executed again, the distribution fitting model of the gamma distribution is re-established, and the distribution parameters are re-determined after the more suitable distribution fitting model type is re-determined for the original user data.
Therefore, in this embodiment, after determining that the model loss is no longer reduced and the update gradient is extremely small, the model convergence can be determined, and the weight at this time is the optimal weight, so as to complete model training. The weight at this time is issued to each target terminal device as a distribution parameter, so that the accuracy of standardization can be improved. Meanwhile, the distribution type used by the model can be flexibly adjusted according to the actual data, and only the corresponding loss function is required to be modified
Fig. 11 is a flowchart illustrating a data normalization method according to an embodiment of the present application. In one possible implementation manner, when the distribution parameters determined by the federal learning server according to the training result are obtained in S405, the federal learning server receives, in addition to the training result sent by the terminal device a, the training results uploaded by other target terminal devices and gathers the training results, so as to perform federal learning. As shown in fig. 11, the step of the federal learning server performing federal learning to determine the second weight includes:
S1101, receiving a first gradient reported by each target terminal device.
Specifically, the target terminal devices are predetermined and include a plurality of terminal devices with the same characteristics, and the first gradient is determined by each target terminal device according to original user data, a distribution type corresponding to the distribution fitting model, an initial weight of the distribution fitting model, and a first weight obtained by changing the initial weight.
S1102, taking an average value of the first gradients reported by each target terminal device, and obtaining an average gradient.
And S1103, determining a second weight according to the average gradient.
Specifically, the federal learning server may determine the second weight according to the calculated average gradient by using a gradient descent method or the like.
And S1104, sending the second weight to the terminal equipment.
Therefore, the embodiment of the invention can still acquire the data distribution characteristics recorded on all target terminal devices under the condition that the federal learning server does not acquire the original user data, thereby determining the distribution parameters to realize standardization.
Fig. 12 is a schematic diagram of a data normalization apparatus according to an embodiment of the present application, which is provided on a terminal device. As shown in fig. 12, the apparatus 1200 includes:
A first acquisition module 1210 that acquires original user data;
a building module 1220 that builds a distribution fitting model from the raw user data;
the training module 1230 carries out model training on the distribution fitting model through the original user data to obtain a training result;
a transmitting module 1240 for transmitting the training results to the federal learning server;
a second obtaining module 1250 for obtaining the distribution parameters determined by the federal learning server according to the training result;
the normalization module 1260 performs normalization processing on the original user data according to the distribution parameters.
Fig. 13 is a schematic diagram of a data normalization device according to an embodiment of the present application, which is provided on a federal learning server. As shown in fig. 13, the apparatus 1300 includes:
a receiving module 1310, configured to receive a first gradient reported by each target terminal device, where the target terminal devices are predetermined and include a plurality of terminal devices with the same characteristics, and the first gradient is determined by each target terminal device according to original user data, a distribution type corresponding to a distribution fitting model, an initial weight of the distribution fitting model, and a first weight obtained by changing the initial weight;
a first determining module 1320, configured to average the first gradients reported by the target terminal devices, so as to determine an average gradient;
A second determination module 1330 that determines a second weight based on the average gradient;
the sending module 1340 sends the second weight to the target terminal device.
In the description of the embodiments of the present application, for convenience of description, the apparatus is described as being divided into various modules by functions, where the division of each module is merely a division of a logic function, and the functions of each module may be implemented in one or more pieces of software and/or hardware when the embodiments of the present application are implemented.
In particular, the apparatus according to the embodiments of the present application may be fully or partially integrated into one physical entity or may be physically separated when actually implemented. And these modules may all be implemented in software in the form of calls by the processing element; or can be realized in hardware; it is also possible that part of the modules are implemented in the form of software called by the processing element and part of the modules are implemented in the form of hardware. For example, the disconnection module may be a separately established processing element or may be implemented integrated in a certain chip of the electronic device. The implementation of the other modules is similar. In addition, all or part of the modules can be integrated together or can be independently implemented. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in a software form.
Fig. 14 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application, where the electronic device may be implemented as a terminal device or a federal learning server according to an embodiment of the present application. As shown in fig. 14, the electronic device 1400 may include a processor 1401, an internal memory 1402, an antenna 1, an antenna 2, a mobile communication module 1403, a wireless communication module 1404, and the like.
It is to be understood that the illustrated structure of the present embodiment does not constitute a specific limitation on the electronic device 1400. In other embodiments of the present application, electronic device 1400 may include more or less components than those illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. For example, in the federal learning server, there may be no antenna, no mobile communication module, and no wireless communication module. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 1401 of the electronic device 1400 may be a device-on-chip SOC, which may include a central processing unit (Central Processing Unit, CPU) therein, and may further include other types of processors. For example, the processor 1401 may include an application processor (application processor, AP) and/or a neural Network Processor (NPU) or the like.
The processor 1401 may include one or more processing units. Wherein the different processing units may be separate components or may be integrated in one or more processors. In some embodiments, the electronic device 1400 may also include one or more processors 1401. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent cognition of electronic devices can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The internal memory 1402 of the electronic device 1400 may be used to store one or more computer programs, including instructions. The processor 1401 may cause the electronic device 1400 to perform the methods provided in some embodiments of the present application, as well as various applications, data processing, and the like, by executing the above-described instructions stored in the internal memory 1402. Internal memory 1402 may include a code storage area and a data storage area. Wherein the code storage area may store an operating system. The data store may store data and the like created during use of the electronic device 1400. In addition, internal memory 1402 may include high-speed random access memory, and may also include non-volatile memory, such as one or more disk storage units, flash memory units, universal flash memory (universal flash storage, UFS), and the like.
The internal memory 1402 may be a read-only memory (ROM), other type of static storage device that can store static information and instructions, a random access memory (random access memory, RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), a compact disc read-only memory (compact disc read-only memory) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage media, or other magnetic storage devices, or any computer-readable medium that can be utilized to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The processor 1401 and the internal memory 1402 may be combined into one processing device, more commonly being separate components, and the processor 1401 is adapted to execute program code stored in the internal memory 1402 to implement the methods described in the embodiments of the present application. In particular, internal memory 1402 may also be integrated into the processor or separate from the processor.
The wireless communication function of the electronic device 1400 may be implemented by the antenna 1, the antenna 2, the mobile communication module 1403, the wireless communication module 1404, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 1400 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 1403 may provide a solution for wireless communications, including 2G/3G/4G/5G, as applied to the electronic device 1400. The mobile communication module 1403 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 1403 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 1403 may amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate the electromagnetic waves. In some embodiments, at least some of the functional modules of the mobile communication module 1403 may be provided in the processor 1401.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 1403 or other functional modules, independent of the processor 1401.
The wireless communication module 1404 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 1400. The wireless communication module 1404 may be one or more devices that integrate at least one communication processing module. The wireless communication module 1404 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 1401. The wireless communication module 1404 may also receive a signal to be transmitted from the processor 1401, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2. The communication connection between the anchor device and the sub-device in the embodiment of the present application may be a Wi-Fi network provided by the wireless communication module 1404.
In some embodiments, antenna 1 and mobile communication module 1403 of electronic device 1400 are coupled, and antenna 2 and wireless communication module 1404 are coupled, such that electronic device 1400 may communicate with a network and other devices through wireless communication techniques.
Further, the devices, apparatuses, modules illustrated in the embodiments of the present application may be implemented by a computer chip or entity, or by a product having a certain function.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein.
In several embodiments provided herein, any of the functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application.
Specifically, in an embodiment of the present application, there is further provided a computer readable storage medium, where a computer program is stored, when the computer program is executed on a computer, to cause the computer to perform the method provided in the embodiment of the present application.
An embodiment of the present application also provides a computer program product comprising a computer program which, when run on a computer, causes the computer to perform the method provided by the embodiments of the present application.
The description of embodiments herein is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments herein. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the embodiments of the present application, the term "at least one" refers to one or more, and the term "a plurality" refers to two or more. "and/or", describes an association relation of association objects, and indicates that there may be three kinds of relations, for example, a and/or B, and may indicate that a alone exists, a and B together, and B alone exists. Wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of the following" and the like means any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, wherein a, b and c can be single or multiple.
In the present embodiments, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
All embodiments in the application are described in a progressive manner, and identical and similar parts of all embodiments are mutually referred, so that each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as a combination of electronic hardware, computer software, and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus, the apparatus and the units described above may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The foregoing is merely a specific embodiment of the present application, and any person skilled in the art may easily think of changes or substitutions within the technical scope of the present application, and should be covered in the scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

Claims (14)

1. A method for data normalization, the method being applied to a terminal device, the method comprising:
acquiring original user data;
establishing a distribution fitting model according to the original user data;
model training is carried out on the distribution fitting model through the original user data, and a training result is obtained;
transmitting the training result to a federal learning server;
acquiring the distribution parameters determined by the federal learning server according to the training result;
carrying out standardization processing on the original user data according to the distribution parameters;
the raw user data includes: the execution time of the APP, the opening times of the APP in a period of time, and at least one of the brand, model, graph, audio and video of the terminal equipment;
the establishing a distribution fitting model according to the original user data comprises the following steps:
When at least two types of original user data exist, respectively establishing a distribution fitting model for each different type of original user data;
determining a distribution fitting model of original data of each user as a distribution fitting model set;
the normalizing the original user data according to the distribution parameters comprises the following steps:
when the established distribution fitting model is a normal distribution model, determining the value of the original user data after standardization according to the distribution parameters;
and when the established distribution fitting model is not a normal distribution model, determining the numerical value normalized by the original user data according to the distribution parameters and the accumulated distribution function CDF of the distribution fitting model.
2. The method of claim 1, wherein the model training the distribution fitting model with the raw user data to obtain training results comprises:
training the distribution fitting model through the original user data to change the initial weight of the distribution fitting model into a first weight, wherein the weight of the distribution fitting model is a parameter of a distribution type corresponding to the distribution fitting model;
And determining the first weight as the training result.
3. The method of claim 2, wherein the sending the training results to a federal learning server comprises:
based on the original user data and the distribution type corresponding to the distribution fitting model, respectively determining a first training loss of the initial weight in a distribution fitting model loss function and a second training loss of the first weight in the distribution fitting model loss function, wherein the distribution fitting model loss function is a negative value of a probability density function PDF of the distribution type corresponding to the distribution fitting model;
determining a first gradient of the training according to the first training loss and the second training loss;
and sending the first gradient to a federal learning server.
4. The method of claim 1, wherein said obtaining the distribution parameters determined by the federal learning server based on the training results comprises:
acquiring a second weight determined by the federal learning server according to the training result;
and when the second weight meets a preset condition, determining the second weight as the distribution parameter.
5. The method of claim 4, wherein the second weight satisfies a preset condition, comprising:
determining a third training loss of the second weight in a distribution fitting model loss function based on the original user data and a distribution type corresponding to the distribution fitting model;
determining a second gradient of the federal learning server based on the third training loss and a second training loss;
when the second gradient is smaller than a preset first threshold value, determining that the second weight meets the preset condition; or alternatively, the first and second heat exchangers may be,
and when the difference value between the third training loss and the second training loss is smaller than a preset second threshold value, determining that the second weight meets the preset condition.
6. The method of claim 5, wherein after the difference between the third training loss and the second training loss is less than a preset second threshold, the method further comprises:
determining whether the third training loss is less than a preset third threshold;
when the third training loss is smaller than a preset third threshold value, determining that the second weight meets the preset condition;
and when the third training loss is larger than or equal to a preset third threshold value, establishing a distribution fitting model again according to the original user data.
7. The method of claim 2, wherein the training the distribution fitting model with the raw user data to change an initial weight of the distribution fitting model to a first weight comprises:
and adjusting the initial weight of the distribution fitting model to be a first weight through a preset learning rate.
8. The method of claim 3, wherein said sending the first gradient to a federal learning server comprises:
differential privacy processing is carried out on the first gradient;
and uploading the first gradient subjected to differential privacy treatment to the federal learning server.
9. The method of claim 4, wherein the second weight is determined as the distribution parameter when the second weight satisfies a preset condition, the method further comprising:
when the second weight does not meet the preset condition, the second weight of the distribution fitting model is adjusted again through a preset learning rate until a third weight meeting the preset condition is determined;
and determining the third weight as the distribution parameter.
10. A method of data normalization applied to a federal learning server, the method comprising:
Receiving a first gradient reported by each target terminal device, wherein the target terminal device is a predetermined terminal device comprising a plurality of terminal devices with the same characteristics, the first gradient is determined by each target terminal device according to original user data, a distribution type corresponding to a distribution fitting model, initial weight of the distribution fitting model and a first weight obtained by changing the initial weight, and the first gradient of the terminal device is obtained by the method of claim 1;
averaging the first gradients reported by each target terminal device to determine an average gradient;
determining a second weight according to the average gradient;
transmitting the second weight to the target terminal equipment;
the raw user data includes: the execution duration of the APP, the opening times of the APP in a period of time, and at least one of the brand, model, graph, audio and video of the terminal equipment.
11. A data normalization apparatus, the apparatus being applied to a terminal device, the apparatus comprising:
the first acquisition module acquires original user data;
the building module is used for building a distribution fitting model according to the original user data;
the training module is used for carrying out model training on the distribution fitting model through the original user data to obtain a training result;
The sending module is used for sending the training result to the federal learning server;
the second acquisition module acquires the distribution parameters determined by the federal learning server according to the training result;
the normalization module is used for performing normalization processing on the original user data according to the distribution parameters;
the raw user data includes: the execution time of the APP, the opening times of the APP in a period of time, and at least one of the brand, model, graph, audio and video of the terminal equipment;
the establishing a distribution fitting model according to the original user data comprises the following steps:
when at least two types of original user data exist, respectively establishing a distribution fitting model for each different type of original user data;
determining a distribution fitting model of original data of each user as a distribution fitting model set;
the normalizing the original user data according to the distribution parameters comprises the following steps:
when the established distribution fitting model is a normal distribution model, determining the value of the original user data after standardization according to the distribution parameters;
and when the established distribution fitting model is not a normal distribution model, determining the numerical value normalized by the original user data according to the distribution parameters and the accumulated distribution function CDF of the distribution fitting model.
12. An electronic device comprising a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the electronic device to perform the method steps of any of claims 1-10.
13. A data normalization apparatus for use with a federal learning server, the apparatus comprising:
the receiving module is used for receiving a first gradient reported by each target terminal device, wherein the target terminal devices are predetermined and comprise a plurality of terminal devices with the same characteristics, the first gradient is determined by each target terminal device according to original user data, a distribution type corresponding to a distribution fitting model, initial weight of the distribution fitting model and a first weight obtained by changing the initial weight, and the first gradient of the terminal device is obtained by the method of claim 1;
the first determining module is used for taking an average value of the first gradients reported by the target terminal devices so as to determine an average gradient;
the second determining module is used for determining a second weight according to the average gradient;
The sending module is used for sending the second weight to the target terminal equipment;
the raw user data includes: the execution duration of the APP, the opening times of the APP in a period of time, and at least one of the brand, model, graph, audio and video of the terminal equipment.
14. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when run on a computer, causes the computer to perform the method according to any of claims 1-10.
CN202310373153.XA 2023-04-07 2023-04-07 Data standardization method and device Active CN116523081B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310373153.XA CN116523081B (en) 2023-04-07 2023-04-07 Data standardization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310373153.XA CN116523081B (en) 2023-04-07 2023-04-07 Data standardization method and device

Publications (2)

Publication Number Publication Date
CN116523081A CN116523081A (en) 2023-08-01
CN116523081B true CN116523081B (en) 2024-02-13

Family

ID=87391299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310373153.XA Active CN116523081B (en) 2023-04-07 2023-04-07 Data standardization method and device

Country Status (1)

Country Link
CN (1) CN116523081B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026626A (en) * 2019-11-29 2020-04-17 中国建设银行股份有限公司 CPU consumption estimation and estimation model training method and device
CN112257774A (en) * 2020-10-20 2021-01-22 平安科技(深圳)有限公司 Target detection method, device, equipment and storage medium based on federal learning
CN114021732A (en) * 2021-09-30 2022-02-08 医渡云(北京)技术有限公司 Proportional risk regression model training method, device and system and storage medium
CN114419672A (en) * 2022-01-19 2022-04-29 中山大学 Cross-scene continuous learning pedestrian re-identification method and device based on consistency learning
CN114462090A (en) * 2022-02-18 2022-05-10 北京邮电大学 Tightening method for differential privacy budget calculation in federal learning

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026626A (en) * 2019-11-29 2020-04-17 中国建设银行股份有限公司 CPU consumption estimation and estimation model training method and device
CN112257774A (en) * 2020-10-20 2021-01-22 平安科技(深圳)有限公司 Target detection method, device, equipment and storage medium based on federal learning
CN114021732A (en) * 2021-09-30 2022-02-08 医渡云(北京)技术有限公司 Proportional risk regression model training method, device and system and storage medium
CN114419672A (en) * 2022-01-19 2022-04-29 中山大学 Cross-scene continuous learning pedestrian re-identification method and device based on consistency learning
CN114462090A (en) * 2022-02-18 2022-05-10 北京邮电大学 Tightening method for differential privacy budget calculation in federal learning

Also Published As

Publication number Publication date
CN116523081A (en) 2023-08-01

Similar Documents

Publication Publication Date Title
EP4152797A1 (en) Information processing method and related device
WO2021123139A1 (en) Systems and methods for enhanced feedback for cascaded federated machine learning
CN106993048B (en) Determine method and device, information recommendation method and the device of recommendation information
Ma et al. Scheduling policy and power allocation for federated learning in NOMA based MEC
CN107734507A (en) Wireless scene identification device and method and Wireless Telecom Equipment and system
CN115470905B (en) Big data analysis processing method and system
US11234141B2 (en) Parameter selection for network communication links using reinforcement learning
CN113783716A (en) Flow prediction method and device based on cloud edge collaborative framework
CN116321255A (en) Compression and user scheduling method for high-timeliness model in wireless federal learning
CN116523081B (en) Data standardization method and device
Noh et al. Sparse CNN and deep reinforcement learning-based D2D scheduling in UAV-assisted industrial IoT networks
KR20230091093A (en) Data-Based Probabilistic Modeling of Wireless Channels Using Conditional Variational Auto-Encoders
DE102023201776A1 (en) Predictive quality of service via channel aggregation
Bhat et al. Correlating the ambient conditions and performance indicators of the LoRaWAN via surrogate Gaussian process based bidirectional LSTM stacked autoencoder showkat
CN117667227A (en) Parameter adjustment method and related equipment
WO2020108433A1 (en) Network parameter processing method and device
Leng et al. Learning to transmit fresh information in energy harvesting networks using supervised learning
Reddy et al. Experimental Testing of Primary User Detection Using Decision Tree Algorithm With Software Defined Radio Testbed
DE102020129317B4 (en) Operating method for a terminal and terminal
CN115665867B (en) Spectrum management method and system for Internet of Vehicles
CN116886475B (en) Channel estimation method, device and system
CN113285740B (en) Wave beam training method based on reinforcement learning
Xu et al. A Fairness-Aware UAV Trajectory Design with Reinforcement Learning
CN116955996B (en) Cloud edge collaborative intelligent reasoning method and system based on cloud wireless access network
CN117097343B (en) Decoding method of airborne data, electronic equipment and storage medium

Legal Events

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