Data derivation method, model training method, model derivation device and electronic equipment

文档序号:1953932 发布日期:2021-12-10 浏览:22次 中文

阅读说明:本技术 数据衍生方法、模型训练方法、装置及电子设备 (Data derivation method, model training method, model derivation device and electronic equipment ) 是由 张发恩 陈斌斌 潘昊 于 2021-09-22 设计创作,主要内容包括:本申请提供一种数据衍生方法、模型训练方法、装置及电子设备。方法包括:获取与项目任务对应的M个个体的第1代特征作为初始群体;通过遗传算法确定第t代群体中每个特征的适应度,以及对第t代群体中适应度大于预设阈值的特征进行交叉变异的迭代,得到第t+1代群体;当t+1的值为指定的T时,得到第T代群体,第T代群体中的特征用于对基于深度学习的神经网络模型进行训练,神经网络模型用于内容推荐或预估。如此,可以自动衍生出新的群体,以替代人工的方式衍生数据,能够提高数据衍生的效率,降低人力资源的开销。(The application provides a data derivation method, a model training device and electronic equipment. The method comprises the following steps: acquiring the 1 st generation characteristics of M individuals corresponding to the project task as an initial group; determining the fitness of each feature in the t-th generation population through a genetic algorithm, and performing cross variation iteration on the features of which the fitness is greater than a preset threshold value in the t-th generation population to obtain a t + 1-th generation population; and when the value of T +1 is the designated T, obtaining a T generation group, wherein the characteristics in the T generation group are used for training a neural network model based on deep learning, and the neural network model is used for content recommendation or estimation. Therefore, a new group can be derived automatically to substitute a manual method for deriving data, so that the data derivation efficiency can be improved, and the expenditure of human resources can be reduced.)

1. A method of data derivation, the method comprising:

acquiring the 1 st generation characteristics of M individuals corresponding to project tasks as an initial group, wherein M is an integer greater than or equal to 1, and the project tasks comprise tasks for content recommendation or estimation;

determining the fitness of each feature in the T-th generation population through a genetic algorithm, and carrying out cross variation iteration on the features of which the fitness is greater than a preset threshold value in the T-th generation population to obtain a T + 1-th generation population, wherein T is from 1 to T-1 in sequence, and T and T are integers; when the value of t is 1, the tth generation population is the initial population, and when the value of t is more than 1, the tth generation population is a population obtained by the t-1 th cross variation;

when the value of T +1 is T, the features in the T +1 th generation population are used for training a neural network model based on deep learning, and the neural network model is used for content recommendation or prediction.

2. The method of claim 1, wherein the genetic algorithm comprises a crossover operator and a mutation operator, and the iteration of crossover mutation is performed on the features with fitness greater than a preset threshold in the t-th generation population to obtain a t + 1-th generation population, and comprises:

performing cross combination on the obtained features with the fitness larger than a preset threshold in the tth generation population through the cross operator to obtain an intermediate population, wherein the intermediate population comprises the features obtained after cross;

carrying out mutation on partial features in the intermediate population through the mutation operator to obtain a t +1 generation population;

and performing iterative operation on the T +1 generation population based on the crossover operator and the mutation operator, and stopping performing iterative operation on the obtained population when the value of T +1 is a specified T.

3. The method according to claim 2, wherein the cross-combining the obtained features with fitness greater than a preset threshold in the tth generation population through the cross operator to obtain an intermediate population comprises:

dividing the features with the fitness larger than a preset threshold in the tth generation population into a plurality of large groups through the crossover operator, wherein each large group in the plurality of large groups comprises two small groups, and each small group comprises a feature set of an individual;

and aiming at two subgroups in each large group, performing cross interchange on partial features in feature sets of individuals in the two subgroups to obtain the intermediate population.

4. The method of any one of claims 1-3, wherein the initial population includes user information for a plurality of users, the user information including age, gender, historical purchase records corresponding to each user, the method further comprising:

and training the neural network model by using the obtained Tth generation group so as to enable the trained neural network model to recommend commodities to the target user based on the user information of the target user.

5. The method of any one of claims 1-3, wherein the initial population includes user information for a plurality of users, the user information including age, gender, and browsing history corresponding to each user, the method further comprising:

and training the neural network model by using the obtained Tth generation group so as to enable the trained neural network model to recommend webpage content for the target user based on the user information of the target user.

6. The method of any one of claims 1-3, wherein the initial population includes operational data for a plurality of devices, the operational data including a load and a temperature corresponding to each device, the method further comprising:

and training the neural network model by using the obtained T-th generation group so as to enable the trained neural network model to estimate the operation risk for the target equipment based on the operation data of the target equipment.

7. A method of model training, the method comprising:

obtaining a population of generations T, wherein said population of generations T is obtained by the method of any one of claims 1-6;

and training the neural network model by using the Tth generation group to obtain a trained neural network model, wherein the trained neural network model is used for content recommendation or estimation.

8. A data derivation apparatus, the apparatus comprising:

the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring the 1 st generation characteristics of M individuals corresponding to project tasks as an initial group, M is an integer greater than or equal to 1, and the project tasks comprise tasks for content recommendation or prediction;

the iterative operation unit is used for determining the fitness of each feature in the T-th generation population through a genetic algorithm and carrying out cross variation iteration on the features of which the fitness is greater than a preset threshold value in the T-th generation population to obtain a T + 1-th generation population, wherein T is from 1 to T-1 in sequence, and both T and T are integers; when the value of t is 1, the tth generation population is the initial population, and when the value of t is more than 1, the tth generation population is a population obtained by the t-1 th cross variation;

and the result output unit is used for training a neural network model based on deep learning when the value of T +1 is the T and the characteristics in the T +1 generation group are used for content recommendation or prediction.

9. A model training apparatus, the apparatus comprising:

a second obtaining unit, configured to obtain a population of generation T, wherein the population of generation T is obtained by the method according to any one of claims 1 to 6;

and the training unit is used for training the neural network model by utilizing the Tth generation group to obtain a trained neural network model, wherein the trained neural network model is used for content recommendation or estimation.

10. An electronic device, characterized in that the electronic device comprises a processor and a memory coupled to each other, in which a computer program is stored which, when executed by the processor, causes the electronic device to perform the method of any of claims 1-6 or to perform the method of claim 7.

11. A computer-readable storage medium, in which a computer program is stored which, when run on a computer, causes the computer to perform the method of any one of claims 1-6, or to perform the method of claim 7.

Technical Field

The application relates to the field of artificial intelligence, in particular to a data derivation method, a model training device and electronic equipment.

Background

In the field of artificial intelligence, training of neural network models is required. In some scenarios, the data samples or data types used for model training are insufficient, and it is necessary to manually collect or analyze forged new sample data for training, and the manual processing mode has high requirements on the experience of operators and has low processing efficiency.

Disclosure of Invention

The embodiment of the application aims to provide a data derivation method, a model training device and electronic equipment, which can replace a manual processing mode to perform data derivation and can solve the problem of low data derivation efficiency.

In order to achieve the above object, embodiments of the present application are implemented as follows:

in a first aspect, an embodiment of the present application provides a data derivation method, where the method includes: acquiring the 1 st generation characteristics of M individuals corresponding to project tasks as an initial group, wherein M is an integer greater than or equal to 1, and the project tasks comprise tasks for content recommendation or estimation; determining the fitness of each feature in the T-th generation population through a genetic algorithm, and carrying out cross variation iteration on the features of which the fitness is greater than a preset threshold value in the T-th generation population to obtain a T + 1-th generation population, wherein T is from 1 to T-1 in sequence, and T and T are integers; when the value of t is 1, the tth generation population is the initial population, and when the value of t is more than 1, the tth generation population is a population obtained by the t-1 th cross variation; when the value of T +1 is T, the features in the T +1 th generation population are used for training a neural network model based on deep learning, and the neural network model is used for content recommendation or prediction.

In the above embodiment, the genetic algorithm is used to perform the iteration of cross variation on the initial population of the project task, so that a new population can be automatically derived to substitute the manual data derivation, the data derivation efficiency can be improved, and the expenditure of human resources can be reduced.

With reference to the first aspect, in some optional embodiments, the genetic algorithm includes a crossover operator and a mutation operator, and performs an iteration of crossover mutation on the features with fitness greater than a preset threshold in the t-th generation population to obtain a t + 1-th generation population, including:

performing cross combination on the obtained features with the fitness larger than a preset threshold in the tth generation population through the cross operator to obtain an intermediate population, wherein the intermediate population comprises the features obtained after cross;

carrying out mutation on partial features in the intermediate population through the mutation operator to obtain a t +1 generation population;

and performing iterative operation on the T +1 generation population based on the crossover operator and the mutation operator, and stopping performing iterative operation on the obtained population when the value of T +1 is a specified T.

In the above embodiment, the features in the population are respectively cross-combined and mutated by using a cross operator and a mutation operator, so that the new type of features can be obtained, and the feature types in the population are enriched.

With reference to the first aspect, in some optional embodiments, the cross-combining, by the cross operator, the obtained features of which the fitness is greater than a preset threshold in the tth generation population to obtain an intermediate population includes:

dividing the features with the fitness larger than a preset threshold in the tth generation population into a plurality of large groups through the crossover operator, wherein each large group in the plurality of large groups comprises two small groups, and each small group comprises a feature set of an individual;

and aiming at two subgroups in each large group, performing cross interchange on partial features in feature sets of individuals in the two subgroups to obtain the intermediate population.

In the above embodiment, by cross-combining the features between individuals, it is beneficial to quickly obtain a feature set with differentiated individuals.

With reference to the first aspect, in some optional embodiments, the initial population includes user information of a plurality of users, the user information including age, gender, and historical purchase records corresponding to each user, and the method further includes:

and training the neural network model by using the obtained Tth generation group so as to enable the trained neural network model to recommend commodities to the target user based on the user information of the target user.

With reference to the first aspect, in some optional embodiments, the initial population includes user information of a plurality of users, the user information includes age, gender, and browsing history corresponding to each user, and the method further includes:

and training the neural network model by using the obtained Tth generation group so as to enable the trained neural network model to recommend webpage content for the target user based on the user information of the target user.

With reference to the first aspect, in some optional embodiments, the initial population includes operation data of a plurality of devices, the operation data including a load and a temperature corresponding to each device, and the method further includes:

and training the neural network model by using the obtained T-th generation group so as to enable the trained neural network model to estimate the operation risk for the target equipment based on the operation data of the target equipment.

In a second aspect, an embodiment of the present application further provides a model training method, where the method includes:

obtaining a generation T population, wherein the generation T population is obtained by the data derivation method;

and training the neural network model by using the Tth generation group to obtain a trained neural network model, wherein the trained neural network model is used for content recommendation or estimation.

In a third aspect, an embodiment of the present application further provides a data derivation apparatus, where the apparatus includes:

the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring the 1 st generation characteristics of M individuals corresponding to project tasks as an initial group, M is an integer greater than or equal to 1, and the project tasks comprise tasks for content recommendation or prediction;

the iterative operation unit is used for determining the fitness of each feature in the T-th generation population through a genetic algorithm and carrying out cross variation iteration on the features of which the fitness is greater than a preset threshold value in the T-th generation population to obtain a T + 1-th generation population, wherein T is from 1 to T-1 in sequence, and both T and T are integers; when the value of t is 1, the tth generation population is the initial population, and when the value of t is more than 1, the tth generation population is a population obtained by the t-1 th cross variation;

and the result output unit is used for training a neural network model based on deep learning when the value of T +1 is the T and the characteristics in the T +1 generation group are used for content recommendation or prediction.

In a fourth aspect, an embodiment of the present application further provides a model training apparatus, where the apparatus includes:

a second obtaining unit, configured to obtain a T-th generation population, where the T-th generation population is obtained by the data derivation method;

and the training unit is used for training the neural network model by utilizing the Tth generation group to obtain a trained neural network model, wherein the trained neural network model is used for content recommendation or estimation.

In a fifth aspect, an embodiment of the present application further provides an electronic device, where the electronic device includes a processor and a memory coupled to each other, and the memory stores a computer program, and when the computer program is executed by the processor, the electronic device is caused to perform the above-mentioned data derivation method or the above-mentioned modeling method.

In a sixth aspect, embodiments of the present application further provide a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the above data derivation method or the above model method.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.

Fig. 1 is a schematic flow chart of a data derivation method according to an embodiment of the present application.

Fig. 2 is a schematic flow chart of a model training method according to an embodiment of the present application.

Fig. 3 is a block diagram of a data derivation apparatus according to an embodiment of the present application.

Fig. 4 is a block diagram of a model training apparatus according to an embodiment of the present application.

Icon: 300-a data derivation device; 310-a first obtaining unit; 320-an iterative operation unit; 330-result output unit; 400-a model training device; 410-a second obtaining unit; 420-training unit.

Detailed Description

The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. It should be noted that the terms "first," "second," and the like are used merely to distinguish one description from another, and are not intended to indicate or imply relative importance. The embodiments described below and the features of the embodiments can be combined with each other without conflict.

The application provides an electronic device which can replace a manual mode to derive data used for model training. The electronic device may include a processing module and a memory module. The storage module stores a computer program that, when executed by the processing module, enables the electronic device to perform the steps of the data derivation method or the model training method described below.

The electronic device may be, but is not limited to, a personal computer, a server, and the like. The electronic device executing the data derivation method and the electronic device executing the model training method may be the same electronic device or different electronic devices, and may be flexibly set according to actual conditions.

Referring to fig. 1, the present application provides a data derivation method, which can be applied to the electronic device described above, and is executed by the electronic device or used for implementing each step in the method. The method may comprise the steps of:

step S110, acquiring 1 st generation characteristics of M individuals corresponding to project tasks as an initial group, wherein M is an integer greater than or equal to 1, and the project tasks comprise tasks for content recommendation or estimation;

step S120, determining the fitness of each feature in the T-th generation population through a genetic algorithm, and performing cross variation iteration on the features of which the fitness is greater than a preset threshold value in the T-th generation population to obtain a T + 1-th generation population, wherein T is 1 to T-1 in sequence, and both T and T are integers; when the value of t is 1, the tth generation population is the initial population, and when the value of t is more than 1, the tth generation population is a population obtained by the t-1 th cross variation;

and S130, when the value of T +1 is T, the features in the population of the T +1 th generation are used for training a neural network model based on deep learning, and the neural network model is used for content recommendation or prediction.

In the above embodiment, the genetic algorithm is used to perform the iteration of cross variation on the initial population of the project task, so that a new population can be automatically derived to substitute the manual data derivation, the data derivation efficiency can be improved, and the expenditure of human resources can be reduced.

The individual steps in the process are explained in detail below, as follows:

in step S110, the project task can be flexibly determined according to actual situations. For example, the project task may refer to a task for recommending a commodity according to the purchasing habit of the user, or a task for pushing web news according to the reading habit of the user, or a task for estimating the operation risk of the device according to the operation state of the device.

M individuals can be flexibly determined according to actual conditions, and generally, the larger the value of M is, the more diverse and effective data features can be generated.

In the initial population, a plurality of individuals is included. Each individual includes a feature set corresponding to the individual. For example, when a project task is used for merchandise recommendation, individual may be a collection of user information for one user. The user information includes, but is not limited to, the user's age, gender, historical purchase records, and the like.

The initial population may be formed by a user collecting data corresponding to the project task in advance as the initial population, or by the electronic device randomly generating data features based on the project task, resulting in data sets corresponding to the plurality of individuals.

Understandably, the initial population may be pre-stored in other devices (e.g., servers) or stored locally on the electronic device. As long as the electronic device can acquire the initial group of the project task, the manner of acquiring the initial group is not particularly limited.

In step S120, a genetic algorithm may be used to calculate the fitness of each feature in each generation of population. For example, the electronic device may calculate an IV (Information Value) Value and a KS (Kolmogorov-Smirnov) Value of the feature as the fitness of the feature using an evaluation function in a genetic algorithm. Wherein the greater the fitness, the greater the effectiveness or importance of the representation of the feature.

In addition, the features in each generation of population can be understood as attribute data for individual individuals. For example, a characteristic may be, but is not limited to, a user's age, or gender, or a single purchase record, etc.

Before calculating the fitness of a feature, each feature needs to be genetically encoded, a process for which is well known to those skilled in the art. For example, an individual feature set is represented by a {0, 1} binary string, where 0 indicates that no corresponding feature is selected and 1 indicates that a corresponding feature is selected. And when the characteristic cross and variation are carried out subsequently, the gene codes are subjected to cross variation.

In this embodiment, the preset threshold may be flexibly determined according to actual situations. The characteristic that the fitness is greater than the preset threshold value can be understood as: there is a need for a valid feature to be retained among all features of a population.

The electronic device may select, from each generation of population, a feature having a fitness greater than a preset threshold based on the preset threshold. Then, the genetic algorithm is utilized, and the features in the feature set of the individual are subjected to cross variation aiming at the individual corresponding to the selected features, so that a varied population is obtained.

And performing feature selection again (namely selecting the features with the fitness greater than the preset threshold) on the obtained cross-mutated population every time, and performing cross mutation again on the selected features to perform iterative operation. The iterative operation times can be flexibly determined according to the actual situation. For example, when the T +1 generation population obtained by iteration is the specified T-th generation population, the iteration operation is stopped. The designated T is an integer and can be flexibly determined according to actual conditions, and for example, T can be 10.

In step S130, when the value of T +1 is the designated T, the obtained T-th generation group (or referred to as T + 1-th generation group) is output. In the population of the T generation, the characteristic set of the individuals obtained through multiple iterations of selection, intersection and variation is included. The generation T population has a richer feature type and a greater amount of feature data than the initial population.

In this embodiment, the genetic algorithm may further include a crossover operator and a mutation operator. Step S120 may include:

performing cross combination on the obtained features with the fitness larger than a preset threshold in the tth generation population through the cross operator to obtain an intermediate population, wherein the intermediate population comprises the features obtained after cross;

carrying out mutation on partial features in the intermediate population through the mutation operator to obtain a t +1 generation population;

and performing iterative operation on the T +1 generation population based on the crossover operator and the mutation operator, and stopping performing iterative operation on the obtained population when the value of T +1 is a specified T.

Wherein, the cross-combining the obtained features of which the fitness is greater than the preset threshold in the tth generation population through the cross operator to obtain an intermediate population may include:

dividing the features with the fitness larger than a preset threshold in the tth generation population into a plurality of large groups through the crossover operator, wherein each large group in the plurality of large groups comprises two small groups, and each small group comprises a feature set of an individual;

and aiming at two subgroups in each large group, performing cross interchange on partial features in feature sets of individuals in the two subgroups to obtain the intermediate population.

Understandably, when performing cross variation, two individuals can be regarded as a large group, and then partial features in feature sets of the two individuals are cross-combined. The M individuals can be divided into a plurality of large groups, the obtained group is an intermediate group after the individuals in each large group are subjected to cross combination, and at the moment, the feature set of each individual is different from the feature set of the individual before the cross combination, so that the derivation of new individuals is facilitated.

In this embodiment, the mutation operator can perform an inverse mutation operation on the gene codes of the features. The turnover variation mode can be flexibly determined according to the actual situation. For example, the genetic code corresponding to the feature set for a single individual is composed of a {0, 1} binary string, and in this case, the mutation operator may flip and change the 1-gene bit in the binary string. For example, changing a "1" of a locus to a "0" indicates that the number of features in the feature set is reduced by one; for another example, changing a "0" to a "1" in a locus indicates that the number of features in the feature set is increased by one. Where 0 indicates that the corresponding feature is not selected, and 1 indicates that the corresponding feature is selected.

In the above embodiment, the electronic device scores the features of the individuals by using the evaluation function, and then breeds out the feature set of the next generation by operations such as intersection, mutation, and the like, and the higher the score, the higher the probability that the feature subset is selected to participate in breeding. After repeated iterative breeding and high-quality elimination, a feature set with the highest evaluation function value can be generated in the population, and thus, a new individual or a new effective feature set can be derived. The data derivation is carried out by using a genetic algorithm, so that the search space can be reduced, the calculation cost is reduced, and the global optimum or approximate global optimum characteristic is realized, so that the reliability and the effectiveness of the derived characteristic are improved.

In this embodiment, the iteration of selecting, intersecting and mutating the features may be as follows:

for example, when t is 1, the 1 st generation population is an initial population, then, through an evaluation function in a genetic algorithm, the fitness of each feature is calculated, and the feature with the fitness larger than a preset threshold value is selected; then, carrying out 1 st cross variation on the selected features, namely, carrying out cross combination on 1 st generation features with fitness larger than a preset threshold in the initial population through a cross operator to obtain an intermediate population; and (3) carrying out mutation on partial characteristics in the middle population through a mutation operator to obtain a generation 2 population, thus completing one iteration operation.

When subsequent generation-falling operation is carried out, calculating the fitness of each feature for the 2 nd generation group, and selecting the feature with the fitness larger than a preset threshold value; then, carrying out 2 nd-time cross variation on the selected features in the 2 nd-generation population, namely, carrying out cross combination on the 2 nd-generation features with fitness larger than a preset threshold in the 2 nd-generation population through a cross operator to obtain a 2 nd-generation intermediate population; and (4) carrying out mutation on partial features in the intermediate population of the 2 nd generation through a mutation operator to obtain a 3 rd generation population. And stopping iteration when the T generation population is obtained through multiple iterations.

In this embodiment, the project task and the initial group can be flexibly determined according to the actual situation. The data derivation method can derive the feature set matched with the project task aiming at different project tasks. Then, training the neural network model by using the 1 st generation features of the original M individuals and the features or derivative feature sets of the subsequently derived individuals so as to improve the detection accuracy of the trained neural network model.

As an optional implementation, the initial group includes user information of a plurality of users, the user information includes age, gender and historical purchase records corresponding to each user, and the method may further include:

and training the neural network model by using the obtained Tth generation group so as to enable the trained neural network model to recommend commodities to the target user based on the user information of the target user.

Understandably, when the project task is commodity recommendation, when the data derivation method is utilized to perform data derivation on the age, sex and historical purchase records of each user in the initial group, a new type of characteristics can be obtained, for example, the commodity purchase rate at different age stages and the income corresponding to the age stage quantile can be obtained. The neural network model is then trained using the features or derived feature sets of the initial population and subsequently derived individuals. Therefore, the trained neural network model can recommend the commodity link preferred by the user to the user for display based on the user information such as the age, the sex, the historical purchase record and the like of the current user.

As an optional implementation, the initial population includes user information of a plurality of users, the user information includes age, gender, and browsing history corresponding to each user, and the method may further include:

and training the neural network model by using the obtained Tth generation group so as to enable the trained neural network model to recommend webpage content for the target user based on the user information of the target user.

Understandably, when the project task is content recommendation, when the data derivation method is used to derive the age, sex, and browsing record (e.g., web news browsing record, music playing record, video playing record) of each user in the initial population, a new type of feature can be obtained, for example, the possibility of browsing the same network information at different age stages can be obtained. The neural network model is then trained using the features or derived feature sets of the initial population and subsequently derived individuals. Therefore, the trained neural network model can recommend the content preferred by the user to the user for display based on the user information such as the age, the sex, the historical browsing record and the like of the current user. The recommended content may be, but is not limited to, web news, music, video, and the like.

In this embodiment, the data derivation method can also be applied to other scenarios, for example, risk prediction. As an alternative embodiment, the initial population includes operational data for a plurality of devices, the operational data including a load and a temperature corresponding to each device. The method may further comprise: and training the neural network model by using the obtained T-th generation group so as to enable the trained neural network model to estimate the operation risk for the target equipment based on the operation data of the target equipment.

Understandably, operational risk is understood to be the risk when either the load or the temperature of the equipment exceeds a set value. If the load exceeds the load threshold, or the temperature exceeds the temperature threshold, the device may malfunction. In a scene of estimating the running risk of the equipment, the neural network model can be trained based on tasks, loads and equipment temperatures of different equipment running at different times, so that the running risk of the equipment at a certain future time (the future time can be flexibly determined according to actual conditions) can be estimated based on the tasks running in the near future (for example, a preset time period before the current time, and the preset time period can be flexibly determined according to actual conditions) of the trained neural network model.

If it is predicted that the operation risk exists at a future time, the user can extract and take protective measures (for example, cooling the equipment and reducing the task amount of the equipment processing) to avoid the operation risk.

Referring to fig. 2, an embodiment of the present application further provides a model training method, which can be applied to the electronic device, and is executed or implemented by the electronic device, where the method includes the following steps:

step S210, obtaining a Tth generation population, wherein the Tth generation population is obtained by the data derivation method;

step S220, training the neural network model by using the Tth generation group to obtain a trained neural network model, wherein the trained neural network model is used for content recommendation or estimation.

Understandably, the electronic devices performing the model training method and the data derivation method may be the same device, or different devices. The T generation population can be obtained quickly and efficiently by using the data derivation method, so that the T generation population is favorable for carrying out model training in time, the period of model training is shortened, and the condition that the progress of model training is influenced by the long time for manually collecting training data is avoided.

Referring to fig. 3, an embodiment of the present application further provides a data derivation apparatus 300, which can be applied to the electronic device described above for executing the steps of the method. The data deriving device 300 includes at least one software functional module which can be stored in a memory module in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the electronic device. The processing module is used for executing executable modules stored in the storage module, such as software functional modules and computer programs included in the data derivation apparatus 300.

The data deriving apparatus 300 may include a first obtaining unit 310, an iterative operation unit 320, and a result output unit 330, and may perform the following operation steps:

a first obtaining unit 310, configured to obtain, as an initial group, generation 1 features of M individuals corresponding to a project task, where M is an integer greater than or equal to 1, and the project task includes a task for content recommendation or prediction;

the iterative operation unit 320 is configured to determine fitness of each feature in the T-th generation population through a genetic algorithm, and perform cross variation iteration on features of which fitness is greater than a preset threshold in the T-th generation population to obtain a T + 1-th generation population, where T is from 1 to T-1 in sequence, and T are integers; when the value of t is 1, the tth generation population is the initial population, and when the value of t is more than 1, the tth generation population is a population obtained by the t-1 th cross variation;

and a result output unit 330, configured to, when the value of T +1 is the T, train a neural network model based on deep learning, where the neural network model is used for content recommendation or prediction, and the features in the T +1 th generation group are used for training.

Optionally, the iterative operation unit 320 may be further configured to:

performing cross combination on the obtained features with the fitness larger than a preset threshold in the tth generation population through the cross operator to obtain an intermediate population, wherein the intermediate population comprises the features obtained after cross;

carrying out mutation on partial features in the intermediate population through the mutation operator to obtain a t +1 generation population;

and performing iterative operation on the T +1 generation population based on the crossover operator and the mutation operator, and stopping performing iterative operation on the obtained population when the value of T +1 is a specified T.

Optionally, the iterative operation unit 320 may be further configured to:

performing cross combination on the obtained features with the fitness larger than a preset threshold in the tth generation population through the cross operator to obtain an intermediate population, wherein the cross combination comprises the following steps:

dividing the features with the fitness larger than a preset threshold in the tth generation population into a plurality of large groups through the crossover operator, wherein each large group in the plurality of large groups comprises two small groups, and each small group comprises a feature set of an individual;

and aiming at two subgroups in each large group, performing cross interchange on partial features in feature sets of individuals in the two subgroups to obtain the intermediate population.

Optionally, the data derivation apparatus 300 may further include a training unit. The initial population includes user information for a plurality of users, the user information including age, gender, and historical purchase records corresponding to each user, the training unit is configured to: and training the neural network model by using the obtained Tth generation group so as to enable the trained neural network model to recommend commodities to the target user based on the user information of the target user.

Optionally, the initial population includes user information of a plurality of users, the user information includes age, gender, and browsing history corresponding to each user, and the training unit is configured to: and training the neural network model by using the obtained Tth generation group so as to enable the trained neural network model to recommend webpage content for the target user based on the user information of the target user.

Optionally, the initial population includes operational data for a plurality of devices, the operational data including a load and a temperature corresponding to each device. The training unit is used for: and training the neural network model by using the obtained T-th generation group so as to enable the trained neural network model to estimate the operation risk for the target equipment based on the operation data of the target equipment.

Referring to fig. 4, an embodiment of the present application further provides a model training apparatus 400, which can be applied to the electronic device described above for executing the steps of the method. The data deriving device 300 includes at least one software functional module which can be stored in a memory module in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the electronic device.

The model training apparatus 400 may include a second obtaining unit 410 and a training unit 420, and may perform the following operation steps:

a second obtaining unit 410, configured to obtain a T-th generation population, where the T-th generation population is obtained by the data derivation method;

a training unit 420, configured to train the neural network model by using the tth generation group to obtain a trained neural network model, where the trained neural network model is used for content recommendation or estimation.

It should be noted that, for convenience and brevity of description, it can be clearly understood by those skilled in the art that, for the specific working processes of the electronic device, the data deriving device 300 and the model training device 400 described above, reference may be made to the corresponding processes of the steps in the foregoing method, and redundant description is not repeated here.

In this embodiment, the processing module may be an integrated circuit chip having signal processing capability. The processing module may be a general purpose processor. For example, the Processor may be a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Network Processor (NP), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present application.

The memory module may be, but is not limited to, a random access memory, a read only memory, a programmable read only memory, an erasable programmable read only memory, an electrically erasable programmable read only memory, and the like. In this embodiment, the storage module may be used to store initial populations, genetic algorithms, neural network models, and the like. Of course, the storage module may also be used to store a program, and the processing module executes the program after receiving the execution instruction.

The embodiment of the application also provides a computer readable storage medium. The computer-readable storage medium has stored therein a computer program which, when run on a computer, causes the computer to perform a data derivation method or a model training method as described in the above embodiments.

From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by hardware, or by software plus a necessary general hardware platform, and based on such understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments of the present application.

In summary, in the present solution, a genetic algorithm is used to perform an iteration of cross variation on the initial population of the project task, and when the T-th generation population is obtained by the iteration, the iteration is stopped. Therefore, a new group can be derived automatically to substitute a manual method for deriving data, so that the data derivation efficiency can be improved, and the expenditure of human resources can be reduced.

In the embodiments provided in the present application, it should be understood that the disclosed apparatus, system, and method may be implemented in other ways. The apparatus, system, and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:华软数云财务分析报告模型专家知识库生成器系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!