CN117592581A - Model training method and device, storage medium and electronic equipment - Google Patents

Model training method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN117592581A
CN117592581A CN202311568281.6A CN202311568281A CN117592581A CN 117592581 A CN117592581 A CN 117592581A CN 202311568281 A CN202311568281 A CN 202311568281A CN 117592581 A CN117592581 A CN 117592581A
Authority
CN
China
Prior art keywords
dimension
sample data
data
supplementary
target
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.)
Pending
Application number
CN202311568281.6A
Other languages
Chinese (zh)
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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202311568281.6A priority Critical patent/CN117592581A/en
Publication of CN117592581A publication Critical patent/CN117592581A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • 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/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4016Transaction verification involving fraud or risk level assessment in transaction processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Medical Informatics (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The specification discloses a model training method, a device, a storage medium and electronic equipment, which can generate supplementary sample data based on the determined influence degree of the change of the characteristics of different dimensions input to a target model on the output result of the target model, so that the target model can be trained based on the supplementary sample data, and the robustness of the trained target model can be improved.

Description

Model training method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a model training method, a device, a storage medium, and an electronic apparatus.
Background
With the development of internet technology and artificial intelligence technology, security of personal privacy data of users by various enterprises is also increasingly emphasized.
Under normal conditions, each service platform can perform wind control on each service of a user through a pre-trained wind control model so as to ensure the safety of personal privacy data of the user. In the actual application process, the format and the variety of the data input into the wind control model are complicated, so that the robustness of the wind control model is required to be high.
Therefore, how to improve the robustness of the wind control model is a problem to be solved.
Disclosure of Invention
The specification provides a model training method, a device, a storage medium and electronic equipment, so as to partially solve the problem of low robustness of a wind control model in the prior art.
The technical scheme adopted in the specification is as follows:
the specification provides a model training method, comprising:
acquiring sample data;
determining, as a degree of correlation corresponding to a dimension, a degree of correlation between a feature value of the dimension and a deviation obtained by a target model for the sample data in a pre-training process, for each dimension feature value contained in the sample data, wherein the deviation is a deviation between an output result of the target model for the sample data in the pre-training process and an actual result corresponding to the sample data, and if the degree of correlation is greater, a degree of influence of a change of the feature value of the dimension on the output result of the target model is greater;
according to the corresponding association degree of each dimension, characteristic values of at least part of the dimensions contained in the sample data are adjusted to obtain supplementary sample data;
And training the target model through the supplementary sample data to obtain a trained target model so as to execute target business through the trained target model.
Optionally, for each feature value of each dimension included in the sample data, determining a degree of association between the feature value of the dimension and a deviation obtained by the target model for the sample data in the pre-training process specifically includes:
judging whether the type of the characteristic value of each dimension is a continuous characteristic or not according to the characteristic value of each dimension contained in the sample data;
if so, determining the association degree between the characteristic value of the dimension and the deviation according to the partial derivative result of the deviation of the target model, which is obtained for the sample data in the pre-training process, on the characteristic value of the dimension.
Optionally, for each feature value of each dimension included in the sample data, determining a degree of association between the feature value of the dimension and a deviation obtained by the target model for the sample data in the pre-training process specifically includes:
judging whether the type of the characteristic value of each dimension is a discrete characteristic or not according to the characteristic value of each dimension contained in the sample data;
If so, determining the association degree between the characteristic value of the dimension and the deviation according to the difference result of the deviation of the sample data, which is obtained by the target model in the pre-training process, under the characteristic value of the dimension.
Optionally, according to the association degree corresponding to each dimension, the characteristic value of at least part of the dimensions contained in the sample data is adjusted to obtain the supplementary sample data, which specifically includes:
determining a change step length corresponding to the characteristic value of the dimension according to the association degree corresponding to the characteristic value of the dimension aiming at the characteristic value of each dimension contained in the sample data, wherein the change step length corresponding to the characteristic value of the dimension is smaller if the association degree corresponding to the characteristic value of the dimension is larger;
and selecting at least part of dimensions from the dimensions contained in the sample data as target dimensions, and adjusting the characteristic value of each target dimension according to the change step length corresponding to each target dimension to obtain the supplementary sample data.
Optionally, adjusting the feature value of each target dimension according to the change step length corresponding to each target dimension to obtain the supplementary sample data, which specifically includes:
According to the change step length corresponding to each target dimension, adjusting the characteristic value of each target dimension to obtain basic supplementary data;
according to the change step length corresponding to each target dimension, determining the probability of changing the actual result corresponding to the basic supplementary data compared with the actual result corresponding to the sample data;
determining whether an actual result corresponding to the basic supplementary data is changed compared with an actual result corresponding to the sample data according to the probability;
and if so, re-determining an actual result corresponding to the basic supplementary data as a supplementary actual result, constructing supplementary sample data according to the basic supplementary data and the supplementary actual result, and otherwise, constructing the supplementary sample data according to the basic supplementary data and the actual result corresponding to the sample data.
Optionally, the sample data includes: service data used in a wind control service, the service data comprising: at least one of user attribute data, user behavior data, user account status data, and user history data, wherein the target service comprises: and wind control service.
The present specification provides a model training apparatus comprising:
The acquisition module is used for acquiring sample data;
the determining module is used for determining the association degree between the characteristic value of each dimension contained in the sample data and the deviation obtained by the target model for the sample data in the pre-training process, wherein the deviation is the deviation between the output result of the target model for the sample data in the pre-training process and the actual result corresponding to the sample data, and if the association degree is larger, the influence degree of the change of the characteristic value of the dimension on the output result of the target model is larger;
the adjustment module is used for adjusting the characteristic values of at least part of the dimensions contained in the sample data according to the corresponding association degree of each dimension to obtain the supplementary sample data;
and the training module is used for training the target model through the supplementary sample data to obtain a trained target model so as to execute target business through the trained target model.
Optionally, the determining module is specifically configured to determine, for each feature value of the dimension included in the sample data, whether a type of the feature value of the dimension is a continuous feature; if so, determining the association degree between the characteristic value of the dimension and the deviation according to the partial derivative result of the deviation of the target model, which is obtained for the sample data in the pre-training process, on the characteristic value of the dimension.
Optionally, the determining module is specifically configured to determine, for each feature value of the dimension included in the sample data, whether a type of the feature value of the dimension is a discrete feature; if so, determining the association degree between the characteristic value of the dimension and the deviation according to the difference result of the deviation of the sample data, which is obtained by the target model in the pre-training process, under the characteristic value of the dimension.
Optionally, the adjusting module is specifically configured to determine, for each feature value of each dimension included in the sample data, a change step corresponding to the feature value of the dimension according to a degree of association corresponding to the feature value of the dimension, as the change step corresponding to the dimension, where if the degree of association corresponding to the feature value of the dimension is greater, the change step corresponding to the feature value of the dimension is smaller; and selecting at least part of dimensions from the dimensions contained in the sample data as target dimensions, and adjusting the characteristic value of each target dimension according to the change step length corresponding to each target dimension to obtain the supplementary sample data.
Optionally, the adjusting module is specifically configured to adjust the feature value of each target dimension according to the change step length corresponding to each target dimension, so as to obtain basic supplementary data; according to the change step length corresponding to each target dimension, determining the probability of changing the actual result corresponding to the basic supplementary data compared with the actual result corresponding to the sample data; determining whether an actual result corresponding to the basic supplementary data is changed compared with an actual result corresponding to the sample data according to the probability; and if so, re-determining an actual result corresponding to the basic supplementary data as a supplementary actual result, constructing supplementary sample data according to the basic supplementary data and the supplementary actual result, and otherwise, constructing the supplementary sample data according to the basic supplementary data and the actual result corresponding to the sample data.
Optionally, the sample data includes: service data used in a wind control service, the service data comprising: at least one of user attribute data, user behavior data, user account status data, and user history data, wherein the target service comprises: and wind control service.
The present specification provides a computer readable storage medium storing a computer program which when executed by a processor implements the model training method described above.
The present specification provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above model training method when executing the program.
The above-mentioned at least one technical scheme that this specification adopted can reach following beneficial effect:
according to the model training method provided by the specification, firstly, a target model and sample data for training the target model are obtained, the association degree of deviation between the characteristic value of each dimension and an actual result corresponding to the sample data is determined for the characteristic value of each dimension contained in the sample data, wherein if the association degree is larger, the influence degree of the change of the characteristic value of the dimension on the deviation between the output result of the target model and the actual result corresponding to the sample data is larger, and further, the characteristic value of at least part of dimensions contained in the sample data is adjusted according to the association degree to obtain supplementary sample data, the target model is trained through the supplementary sample data, and the trained target model is obtained.
According to the method, the complementary sample data can be generated based on the determined influence degree of the change of the characteristics of different dimensions input into the target model on the output result of the target model, so that the target model can be trained based on the complementary sample data, and the robustness of the trained target model can be improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification, illustrate and explain the exemplary embodiments of the present specification and their description, are not intended to limit the specification unduly. Attached at
In the figure:
FIG. 1 is a schematic flow chart of a model training method provided in the present specification;
FIG. 2 is a process schematic of the method of generating supplemental sample data provided in the present specification;
FIG. 3 is a schematic diagram of a model training apparatus provided in the present specification;
fig. 4 is a schematic diagram of an electronic device corresponding to fig. 1 provided in the present specification.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present specification more apparent, the technical solutions of the present specification will be clearly and completely described below with reference to specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present specification. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
The following describes in detail the technical solutions provided by the embodiments of the present specification with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a model training method provided in the present specification, including the following steps:
s100: sample data is acquired.
In the specification, the service platform may acquire a basic model and sample data for training the basic model, and further may input the acquired sample data into the basic model to obtain an output result of the basic model for the sample data, and may train the basic model with a deviation between the output result of the minimized basic model for the sample data and an actual result corresponding to the sample data as an optimization target to obtain a target model, where the basic model may be determined according to an actual requirement.
For example: the basic model may be an air control model, and the sample data may be service data used in a historical air control service responded by the service platform, the service data acquired by the service platform may be input into the air control model, so that whether the input service data is an output result of a risk service or not is obtained by aiming at the input service data through the air control model, and further, deviation between whether the service data output by aiming at the input service data by the air control model is an output result of the risk service and whether the input service data is an actual result of the risk service or not is minimized as an optimization target, and the air control model is trained. Wherein, the service data includes: at least one of user attribute data (such as user name, user gender and the like), user behavior data (such as click frequency of clicking behavior of a user in an operation interface provided by a service platform, dragging distance of dragging behavior, input time of text input behavior and the like), user account status data (such as user account credit evaluation value, network environment data where the user is located and the like), user history data (such as the number of times of including risk service in service initiated by user history and the like) and the like.
For another example: the basic model may be a search recommendation model, and the sample data may be recommendation request data of a user (where the recommendation request data may include search keywords input by a user in a history, user information of the user, and the like), the service platform may input the recommendation request data into the search recommendation model, so as to obtain a recommendation result matched with the recommendation request data by using the search recommendation model for the input recommendation request data, and further, may train the search recommendation model with an optimization objective of minimizing a deviation between a recommendation result matched with the recommendation request data and a recommendation result actually clicked by the user and output by the search recommendation model for the input recommendation request data.
Further, after the above target model and the sample data are obtained, the service platform may generate each piece of supplementary sample data based on the sample data, and may train the target model again based on each piece of generated supplementary sample data, so as to improve the robustness of the target model, and a method for generating each piece of supplementary sample data based on the sample data by the service platform will be described in detail below.
In the present specification, the execution body for implementing the model training method may refer to a designated device such as a server provided on a service platform, or may refer to a terminal device such as a desktop computer or a notebook computer, and for convenience of description, the model training method provided in the present specification will be described below by taking the server as an example of the execution body.
S102: and determining the degree of association between the characteristic value of each dimension contained in the sample data and the deviation obtained by the target model for the sample data in the pre-training process, wherein the deviation is the degree of association corresponding to the dimension, and the degree of influence of the change of the characteristic value of the dimension on the output result of the target model is greater if the degree of association is greater for the deviation between the output result of the target model for the sample data in the pre-training process and the actual result corresponding to the sample data.
Further, after the server obtains the sample data, a degree of association between the feature value of each dimension and a deviation between an output result of the sample data and an actual result corresponding to the sample data in the pre-training process of the target model can be determined for each dimension feature value included in the sample data, where, if the determined degree of association between the feature value of the dimension and the deviation between the output result of the target model and the actual result corresponding to the sample data in the pre-training process is greater, the degree of influence of the change of the feature value of the dimension on the output result of the target model is greater, and the deviation between the output result of the target model in the pre-training process and the actual result corresponding to the sample data is also greater, as shown in fig. 2.
Fig. 2 is a process schematic diagram of a method of generating supplemental sample data provided in the present specification.
As can be seen in connection with fig. 2, the server may determine, for each feature value of each dimension included in the sample data, whether the type of the feature value of the dimension is a continuous feature, if so, determine, according to a partial derivative result of a deviation between an output result of the target model for the sample data and an actual result corresponding to the sample data in the pre-training process, a correlation between the feature value of the dimension and a deviation between the output result of the target model for the sample data and an actual result corresponding to the sample data in the pre-training process, and specifically may refer to the following formula.
In the above formula, s ij Sensitivity of features representing the jth dimension of the ith sample, i representing the sample index, j representing the dimension index, x ij Represents the j-th feature, y, of the i-th sample i Representing the actual result of the ith sample, f (x i W) represents the output result of the target model for the sample data in the pre-training process.
In addition, the server may further determine, for each feature value of the dimension included in the sample data, whether the type of the feature value of the dimension is a discrete feature, if yes, determine, according to a differential result of a deviation obtained for the sample data in the pre-training process of the target model under the feature value of the dimension, a degree of association between the feature value of the dimension and the deviation, and specifically refer to the following formula.
In the above formula, S ij Sensitivity of features representing the jth dimension of the ith sample, i representing the sample index, j representing the index of the dimension, f (x) i W) represents the output result of the target model for the sample data in the pre-training process, f (x) i \x ij W) represents the output of the target model during the pre-training for the ith sample that does not contain features of the jth dimension.
S104: and adjusting the characteristic values of at least part of the dimensions contained in the sample data according to the corresponding association degree of each dimension to obtain the supplementary sample data.
S106: and training the target model through the supplementary sample data to obtain a trained target model so as to execute target business through the trained target model.
Further, the server may determine, for each feature value of each dimension included in the sample data, a change step length corresponding to the feature value of the dimension according to a degree of association corresponding to the feature value of the dimension, as the change step length corresponding to the dimension, and further may select at least a portion of the dimensions included in the sample data as target dimensions, and adjust, according to the change step length corresponding to each target dimension, the feature value of each target dimension to obtain the supplementary sample data, where if the degree of association corresponding to the feature value of the dimension is greater, the change step length corresponding to the feature value of the dimension is smaller.
In an actual application scene, the degree of association between a characteristic value of a part of dimensions and the deviation of the target model obtained for sample data in the pre-training process is larger, namely the degree of influence on the output result of the target model is larger, so that when the characteristics of the part of dimensions are adjusted, the obtained actual result corresponding to the supplementary sample data is possibly changed compared with the actual result corresponding to the sample data, in other words, when the degree of association between the characteristic value of one dimension and the deviation of the target model obtained for the sample data in the pre-training process is larger, the influence on the output result of the target model is larger when the characteristic value of the dimension is changed, and at the moment, the probability that the obtained actual result corresponding to the supplementary sample data is changed compared with the actual result corresponding to the sample data is also larger when the characteristic value of the dimension is adjusted.
For example: in the wind control service, after the value of the user account status data contained in the sample data with the actual result of no risk is adjusted, the obtained actual result of the supplementary sample data may be changed to be at risk.
Based on the above, the server may adjust the feature value of each target dimension according to the change step length corresponding to each target dimension to obtain basic supplementary data, determine the probability that the actual result corresponding to the basic supplementary data changes compared with the actual result corresponding to the sample data according to the change step length corresponding to each target dimension, determine whether the actual result corresponding to the basic supplementary data changes compared with the actual result corresponding to the sample data according to the probability that the actual result corresponding to the basic supplementary data changes compared with the actual result corresponding to the sample data, if yes, re-determine the actual result corresponding to the basic supplementary data as a supplementary actual result, and construct supplementary sample data according to the basic supplementary data and the supplementary actual result, if not, construct the supplementary sample data according to the basic supplementary data and the actual result corresponding to the sample data.
In the above, the change step corresponding to one dimension may be understood as the magnitude of each adjustment when the value of this dimension included in the sample data is adjusted to obtain the supplementary sample data.
It should be noted that, the server determines whether the actual result corresponding to the basic supplementary data is changed compared with the actual result corresponding to the sample data according to the probability that the actual result corresponding to the basic supplementary data is changed compared with the actual result corresponding to the sample data, which can be understood that if the probability corresponding to one dimension is that The obtained basic number of supplements after the characteristic value of the dimension is adjustedAccording to the corresponding actual result there is +.>Is altered. If the probability of correspondence of one dimension is +.>The probability of the other dimension correspondence is +.>When the characteristic value of the dimension is adjusted, the obtained actual result corresponding to the basic supplementary data is +.>(i.e.)>) Is altered.
It should be noted that, the method of determining, by the server, the probability that the actual result corresponding to the basic supplemental data changes compared with the actual result corresponding to the sample data according to the change step length corresponding to each target dimension may be determined by a neural network model or the like.
In addition, the server may determine, for the sample data, a specified probability corresponding to the sample data, that is, a probability that an actual result corresponding to the obtained supplementary sample data is changed compared with an actual result corresponding to the sample data after the feature value of any one dimension in the sample data is adjusted.
Further, the feature value of each dimension included in the sample data may be determined based on the specified probability, and the change step length corresponding to the feature value of the dimension may be determined as the change step length corresponding to the dimension according to the association degree corresponding to the feature value of the dimension.
Further, the server may adjust the feature value of each target dimension according to the change step length corresponding to each target dimension to obtain basic supplementary data, determine, according to the above specified probability, whether an actual result corresponding to the basic supplementary data is changed compared with an actual result corresponding to the sample data, if so, determine, as a supplementary actual result, an actual result corresponding to the basic supplementary data again, and construct supplementary sample data according to the basic supplementary data and the supplementary actual result, if not, construct supplementary sample data according to the basic supplementary data and the actual result corresponding to the sample data.
It can be understood that the probability that the actual result corresponding to the basic supplementary data is changed compared with the actual result corresponding to the sample data is set as the designated probability in advance when the characteristic value of each dimension is changed, so that the change step length corresponding to the characteristic value of each dimension can be determined according to the association degree corresponding to the characteristic value of each dimension under the condition that the designated probability is kept unchanged, and whether the actual result corresponding to the basic supplementary data is changed compared with the actual result corresponding to the sample data can be determined according to the designated probability.
Further, after the server obtains each piece of supplementary sample data, the server can train the target model through the supplementary sample data to obtain a trained target model, and execute target service through the trained target model.
The target service may be determined according to actual requirements, for example: wind control business, search recommendation business, etc.
From the above, it can be seen that the server may generate the supplementary sample data based on the determined degree of influence of the change of the features of different dimensions input to the target model on the output result of the target model, so that the target model may be trained based on the supplementary sample data, and further the robustness of the trained target model may be improved.
The above model training method provided for one or more embodiments of the present disclosure further provides a corresponding model training apparatus based on the same concept, as shown in fig. 3.
Fig. 3 is a schematic diagram of a model training device provided in the present specification, including:
an acquisition module 301, configured to acquire sample data;
a determining module 302, configured to determine, for each feature value of each dimension included in the sample data, a degree of association between the feature value of the dimension and a deviation obtained by the target model for the sample data in a pre-training process, as a degree of association corresponding to the dimension, where the deviation is a deviation between an output result of the target model for the sample data in the pre-training process and an actual result corresponding to the sample data, and if the degree of association is greater, a degree of influence of a change of the feature value of the dimension on the output result of the target model is greater;
The adjusting module 303 is configured to adjust, according to the association degree corresponding to each dimension, a feature value of at least a part of the dimensions included in the sample data, so as to obtain supplementary sample data;
the training module 304 is configured to train the target model according to the supplementary sample data, so as to obtain a trained target model, so as to execute the target service according to the trained target model.
Optionally, the determining module 302 is specifically configured to determine, for each feature value of the dimension included in the sample data, whether the type of the feature value of the dimension is a continuous feature; if so, determining the association degree between the characteristic value of the dimension and the deviation according to the partial derivative result of the deviation of the target model, which is obtained for the sample data in the pre-training process, on the characteristic value of the dimension.
Optionally, the determining module 302 is specifically configured to determine, for each feature value of the dimension included in the sample data, whether the type of the feature value of the dimension is a discrete feature; if so, determining the association degree between the characteristic value of the dimension and the deviation according to the difference result of the deviation of the sample data, which is obtained by the target model in the pre-training process, under the characteristic value of the dimension.
Optionally, the adjusting module 303 is specifically configured to determine, for each feature value of the dimension included in the sample data, a change step corresponding to the feature value of the dimension according to a degree of association corresponding to the feature value of the dimension, as the change step corresponding to the dimension, where if the degree of association corresponding to the feature value of the dimension is greater, the change step corresponding to the feature value of the dimension is smaller; and selecting at least part of dimensions from the dimensions contained in the sample data as target dimensions, and adjusting the characteristic value of each target dimension according to the change step length corresponding to each target dimension to obtain the supplementary sample data.
Optionally, the adjusting module 303 is specifically configured to adjust the feature value of each target dimension according to the change step size corresponding to each target dimension, so as to obtain basic supplementary data; according to the change step length corresponding to each target dimension, determining the probability of changing the actual result corresponding to the basic supplementary data compared with the actual result corresponding to the sample data; determining whether an actual result corresponding to the basic supplementary data is changed compared with an actual result corresponding to the sample data according to the probability; and if so, re-determining an actual result corresponding to the basic supplementary data as a supplementary actual result, constructing supplementary sample data according to the basic supplementary data and the supplementary actual result, and otherwise, constructing the supplementary sample data according to the basic supplementary data and the actual result corresponding to the sample data.
Optionally, the sample data includes: service data used in a wind control service, the service data comprising: at least one of user attribute data, user behavior data, user account status data, and user history data, wherein the target service comprises: and wind control service.
The present specification also provides a computer readable storage medium having stored thereon a computer program operable to perform a model training method as provided in fig. 1 above.
The present specification also provides a schematic structural diagram of an electronic device corresponding to fig. 1 shown in fig. 4. At the hardware level, as in fig. 4, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile storage, although it may include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs to implement the model training method of fig. 1 described above. Of course, other implementations, such as logic devices or combinations of hardware and software, are not excluded from the present description, that is, the execution subject of the following processing flows is not limited to each logic unit, but may be hardware or logic devices.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (HardwareDescription Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (AdvancedBoolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware DescriptionLanguage), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware DescriptionLanguage) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present description is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. 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 one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that 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 an element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The description 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 specification 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.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely an example of the present specification and is not intended to limit the present specification. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present description.

Claims (14)

1. A model training method, comprising:
acquiring sample data;
determining, as a degree of correlation corresponding to a dimension, a degree of correlation between a feature value of the dimension and a deviation obtained by a target model for the sample data in a pre-training process, for each dimension feature value contained in the sample data, wherein the deviation is a deviation between an output result of the target model for the sample data in the pre-training process and an actual result corresponding to the sample data, and if the degree of correlation is greater, a degree of influence of a change of the feature value of the dimension on the output result of the target model is greater;
According to the corresponding association degree of each dimension, characteristic values of at least part of the dimensions contained in the sample data are adjusted to obtain supplementary sample data;
and training the target model through the supplementary sample data to obtain a trained target model so as to execute target business through the trained target model.
2. The method according to claim 1, for each dimension feature value contained in the sample data, determining a degree of association between the dimension feature value and a deviation of a target model obtained for the sample data in a pre-training process, specifically comprising:
judging whether the type of the characteristic value of each dimension is a continuous characteristic or not according to the characteristic value of each dimension contained in the sample data;
if so, determining the association degree between the characteristic value of the dimension and the deviation according to the partial derivative result of the deviation of the target model, which is obtained for the sample data in the pre-training process, on the characteristic value of the dimension.
3. The method according to claim 1, for each dimension feature value contained in the sample data, determining a degree of association between the dimension feature value and a deviation of a target model obtained for the sample data in a pre-training process, specifically comprising:
Judging whether the type of the characteristic value of each dimension is a discrete characteristic or not according to the characteristic value of each dimension contained in the sample data;
if so, determining the association degree between the characteristic value of the dimension and the deviation according to the difference result of the deviation of the sample data, which is obtained by the target model in the pre-training process, under the characteristic value of the dimension.
4. The method of claim 1, wherein the adjusting the feature value of at least part of the dimensions included in the sample data according to the association degree corresponding to each dimension to obtain the supplementary sample data specifically includes:
determining a change step length corresponding to the characteristic value of the dimension according to the association degree corresponding to the characteristic value of the dimension aiming at the characteristic value of each dimension contained in the sample data, wherein the change step length corresponding to the characteristic value of the dimension is smaller if the association degree corresponding to the characteristic value of the dimension is larger;
and selecting at least part of dimensions from the dimensions contained in the sample data as target dimensions, and adjusting the characteristic value of each target dimension according to the change step length corresponding to each target dimension to obtain the supplementary sample data.
5. The method of claim 4, wherein the adjusting the feature value of each target dimension according to the change step length corresponding to each target dimension to obtain the supplementary sample data specifically comprises:
according to the change step length corresponding to each target dimension, adjusting the characteristic value of each target dimension to obtain basic supplementary data;
according to the change step length corresponding to each target dimension, determining the probability of changing the actual result corresponding to the basic supplementary data compared with the actual result corresponding to the sample data;
determining whether an actual result corresponding to the basic supplementary data is changed compared with an actual result corresponding to the sample data according to the probability;
and if so, re-determining an actual result corresponding to the basic supplementary data as a supplementary actual result, constructing supplementary sample data according to the basic supplementary data and the supplementary actual result, and otherwise, constructing the supplementary sample data according to the basic supplementary data and the actual result corresponding to the sample data.
6. The method of any one of claims 1-5, the sample data comprising: service data used in a wind control service, the service data comprising: at least one of user attribute data, user behavior data, user account status data, and user history data, wherein the target service comprises: and wind control service.
7. A model training apparatus comprising:
the acquisition module is used for acquiring sample data;
the determining module is used for determining the association degree between the characteristic value of each dimension contained in the sample data and the deviation obtained by the target model for the sample data in the pre-training process, wherein the deviation is the deviation between the output result of the target model for the sample data in the pre-training process and the actual result corresponding to the sample data, and if the association degree is larger, the influence degree of the change of the characteristic value of the dimension on the output result of the target model is larger;
the adjustment module is used for adjusting the characteristic values of at least part of the dimensions contained in the sample data according to the corresponding association degree of each dimension to obtain the supplementary sample data;
and the training module is used for training the target model through the supplementary sample data to obtain a trained target model so as to execute target business through the trained target model.
8. The apparatus of claim 7, wherein the determining module is specifically configured to, for each feature value of the dimension included in the sample data, determine whether a type of the feature value of the dimension is a continuous feature; if so, determining the association degree between the characteristic value of the dimension and the deviation according to the partial derivative result of the deviation of the target model, which is obtained for the sample data in the pre-training process, on the characteristic value of the dimension.
9. The apparatus of claim 7, wherein the determining module is specifically configured to, for each feature value of the dimension included in the sample data, determine whether a type of the feature value of the dimension is a discrete feature; if so, determining the association degree between the characteristic value of the dimension and the deviation according to the difference result of the deviation of the sample data, which is obtained by the target model in the pre-training process, under the characteristic value of the dimension.
10. The apparatus of claim 7, wherein the adjustment module is specifically configured to determine, for each feature value of the dimension included in the sample data, a change step corresponding to the feature value of the dimension according to a degree of association corresponding to the feature value of the dimension, as the change step corresponding to the dimension, where if the degree of association corresponding to the feature value of the dimension is greater, the change step corresponding to the feature value of the dimension is smaller; and selecting at least part of dimensions from the dimensions contained in the sample data as target dimensions, and adjusting the characteristic value of each target dimension according to the change step length corresponding to each target dimension to obtain the supplementary sample data.
11. The device of claim 10, wherein the adjustment module is specifically configured to adjust the feature value of each target dimension according to the change step size corresponding to each target dimension to obtain basic supplementary data; according to the change step length corresponding to each target dimension, determining the probability of changing the actual result corresponding to the basic supplementary data compared with the actual result corresponding to the sample data; determining whether an actual result corresponding to the basic supplementary data is changed compared with an actual result corresponding to the sample data according to the probability; and if so, re-determining an actual result corresponding to the basic supplementary data as a supplementary actual result, constructing supplementary sample data according to the basic supplementary data and the supplementary actual result, and otherwise, constructing the supplementary sample data according to the basic supplementary data and the actual result corresponding to the sample data.
12. The apparatus of any of claims 7-11, the sample data comprising: service data used in a wind control service, the service data comprising: at least one of user attribute data, user behavior data, user account status data, and user history data, wherein the target service comprises: and wind control service.
13. A computer readable storage medium storing a computer program which, when executed by a processor, implements the method of any of the preceding claims 1-6.
14. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of the preceding claims 1-6 when the program is executed.
CN202311568281.6A 2023-11-21 2023-11-21 Model training method and device, storage medium and electronic equipment Pending CN117592581A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311568281.6A CN117592581A (en) 2023-11-21 2023-11-21 Model training method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311568281.6A CN117592581A (en) 2023-11-21 2023-11-21 Model training method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117592581A true CN117592581A (en) 2024-02-23

Family

ID=89922553

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311568281.6A Pending CN117592581A (en) 2023-11-21 2023-11-21 Model training method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117592581A (en)

Similar Documents

Publication Publication Date Title
CN110008991B (en) Risk event identification method, risk identification model generation method, risk event identification device, risk identification equipment and risk identification medium
CN115828162B (en) Classification model training method and device, storage medium and electronic equipment
CN117369783B (en) Training method and device for security code generation model
CN117555644B (en) Front-end page construction method and device based on natural language interaction
CN117409466B (en) Three-dimensional dynamic expression generation method and device based on multi-label control
CN117194992B (en) Model training and task execution method and device, storage medium and equipment
CN116824331A (en) Model training and image recognition method, device, equipment and storage medium
CN116228180A (en) User information recommendation method, device and storage medium
CN117592581A (en) Model training method and device, storage medium and electronic equipment
CN116109008B (en) Method and device for executing service, storage medium and electronic equipment
CN115017915B (en) Model training and task execution method and device
CN117494068B (en) Network public opinion analysis method and device combining deep learning and causal inference
CN116340852B (en) Model training and business wind control method and device
CN115827880B (en) Business execution method and device based on emotion classification
CN115862675B (en) Emotion recognition method, device, equipment and storage medium
CN115952271B (en) Method and device for generating dialogue information, storage medium and electronic equipment
CN117009729B (en) Data processing method and device based on softmax
CN116501852B (en) Controllable dialogue model training method and device, storage medium and electronic equipment
CN116434787B (en) Voice emotion recognition method and device, storage medium and electronic equipment
CN117743824A (en) Model training and service execution method and device, storage medium and equipment
CN117591217A (en) Information display method, device, equipment and storage medium
CN118229294A (en) Wind control method and device, storage medium and electronic equipment
CN117171346A (en) Entity linking method and device, storage medium and electronic equipment
CN116401541A (en) Model training method and device, storage medium and electronic equipment
CN116843466A (en) Risk identification model training method and device, storage medium and electronic equipment

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