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

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

Info

Publication number
CN113657535A
CN113657535A CN202110975511.5A CN202110975511A CN113657535A CN 113657535 A CN113657535 A CN 113657535A CN 202110975511 A CN202110975511 A CN 202110975511A CN 113657535 A CN113657535 A CN 113657535A
Authority
CN
China
Prior art keywords
training
training sample
accessed
target
service
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
CN202110975511.5A
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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202110975511.5A priority Critical patent/CN113657535A/en
Publication of CN113657535A publication Critical patent/CN113657535A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • 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/211Selection of the most significant subset of features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a model training method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a first training sample set corresponding to an anti-cheating service to be accessed; inquiring a target accessed anti-cheating service with the largest service characteristic similarity with the target anti-cheating service from the accessed anti-cheating service set, and determining a second training sample and a historical model corresponding to the target accessed anti-cheating service; training the historical model by using the first training sample and the second training sample to obtain a trained historical model; and under the condition that the error rate of the trained historical model is smaller than a preset value, determining the trained historical model as a target model suitable for the anti-cheating service to be accessed. The method disclosed by the application can reduce the time for collecting training samples by a platform side, greatly solves the problem of anti-cheating cold start of wind control, and can also ensure the accuracy of the model.

Description

Model training method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing, and in particular, to a model training method and apparatus, an electronic device, and a storage medium.
Background
Currently, when a platform side promotes a new service, a gift or a coupon is provided for a newly registered user. At this time, a part of the main users which are not the newly added service maliciously and falsely register to obtain a large amount of gifts, and finally resource loss of the platform side is caused.
However, in the prior art, in the process of accessing different new services, the wind control anti-cheating method must understand the accessed new scene services, collect enough available data, perform corresponding analysis, and finally make a wind control scheme for implementation, so that the whole process has the disadvantages of long access period, difficulty in collecting available data, and incapability of deploying anti-cheating services quickly at the initial stage.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the present application provides a model training method, apparatus, electronic device and storage medium.
According to an aspect of an embodiment of the present application, there is provided a training method of a model, including:
acquiring a first training sample set corresponding to an anti-cheating service to be accessed;
inquiring a target accessed anti-cheating service with the maximum similarity with the anti-cheating service to be accessed from an accessed anti-cheating service set, and acquiring a second training sample set and a historical model corresponding to the target accessed anti-cheating service;
training the historical model according to the first training sample set and the second training sample set to obtain a trained historical model;
and determining the trained historical model as a target model suitable for the anti-cheating service to be accessed.
Further, the querying, from the accessed anti-cheating service set, a target accessed anti-cheating service with the greatest similarity to the to-be-accessed anti-cheating service includes:
acquiring a first service characteristic of the anti-cheating service to be accessed;
acquiring a second service characteristic of each accessed anti-cheating service in the accessed anti-cheating service set;
calculating the feature similarity between the first service feature and each second service feature;
and determining the accessed anti-cheating service with the maximum feature similarity as the target accessed anti-cheating service.
Further, training the historical model according to the first training sample set and the second training sample set to obtain a trained historical model, including:
updating initial convolution parameters of a target convolution layer in the historical model to obtain an updated historical model, wherein the target convolution layer is at least two convolution layers which are adjacent to each other in a convolution layer set in the historical model;
determining the first set of training samples and the second set of training samples as an initial set of training samples;
training the updated historical model according to the initial training sample set until an initial training result is obtained;
and under the condition that the initial training result is matched with the label information carried by the target training sample, determining the updated historical model as the trained historical model.
Further, the training the updated historical model according to the initial training sample to obtain an initial training result includes:
acquiring a first training sample in the first training sample set, wherein the first training sample corresponds to a first label;
acquiring a second training sample in the second training sample set and a second label corresponding to the second training sample;
inputting the first training sample and the second training sample into the updated historical model respectively to obtain a first output result and a second output result;
determining the first output result and the second output result as the initial training result.
Further, the method further comprises:
under the condition that the initial training result is not matched with the label information carried by the target training sample, respectively adjusting the corresponding weights of the first training sample set and the second training sample set to obtain a target training sample set;
training the updated historical model by using the target training sample set to obtain the trained historical model;
wherein the step of mismatching the initial training result with the label information carried by the target training sample comprises: the first output result does not match the first tag, and/or the second output result does not match the second tag.
Further, the adjusting the weights of the first training sample and the second training sample respectively to obtain a target training sample includes:
under the condition that the first output result is not matched with the first label, determining a first weight of the current first training sample, and adjusting the first weight according to a preset value to enable the updated first weight to be larger than the first weight before updating;
and/or the presence of a gas in the gas,
and under the condition that the second output result is not matched with the second label, determining a second weight of the current second training sample, and adjusting the second weight according to a preset value to enable the updated second weight to be smaller than the second weight before updating.
Further, the training the updated historical model by using the target training sample set to obtain the trained historical model, and the method further includes:
performing iterative training on the updated historical model according to the updated first weight and the first training sample to obtain a training result set;
determining the training result matched with the first label in the training result set as a target training result;
determining the error rate of the updated historical model according to the ratio of the number of the target training results to the total number of the training results in the training result set;
and obtaining the trained historical model under the condition that the error rate is less than a preset error rate.
According to another aspect of the embodiments of the present application, there is also provided a training apparatus for a model, including:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an anti-cheating service to be accessed and a first training sample set corresponding to the anti-cheating service to be accessed;
the query module is used for acquiring a target accessed anti-cheating service with the maximum similarity with the acquired anti-cheating service to be accessed from an accessed anti-cheating service set, and acquiring a second training sample set and a history model corresponding to the target accessed anti-cheating service;
the training module is used for training the historical model according to the first training sample set and the second training sample set to obtain a trained historical model;
and the determining module is used for determining the trained historical model as a target model suitable for the anti-cheating service to be accessed.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that executes the above steps when the program is executed.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: a memory for storing a computer program; a processor for executing the steps of the method by running the program stored in the memory.
Embodiments of the present application also provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of the above method.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the embodiment of the application, the model is trained by using the first training sample to be accessed into the anti-cheating service and the second training sample of the similar anti-cheating service, so that the time for collecting the training samples by the platform side can be reduced, and the problem of wind control anti-cheating cold start is greatly solved. The access period of the anti-cheating service is shortened, and meanwhile, the model accuracy can be ensured.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a flowchart of a model training method according to an embodiment of the present disclosure;
FIG. 2 is a block diagram of a model training apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments, and the illustrative embodiments and descriptions thereof of the present application are used for explaining the present application and do not constitute a limitation to the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another similar entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the application provides a model training method and device, electronic equipment and a storage medium. The method provided by the embodiment of the invention can be applied to any required electronic equipment, for example, the electronic equipment can be electronic equipment such as a server and a terminal, and the method is not particularly limited herein, and is hereinafter simply referred to as electronic equipment for convenience in description.
At present, when a newly added service needs to be promoted on the network, no matter CPC (Cost Per Click pay), CPA (Cost Per Action pay Per Action) and CPT (Cost Per Time use duration pay) are adopted for settlement, the waste flow caused by poor channels cannot be avoided, and thus the waste of Time and Cost is caused. For example: when the platform side promotes the new service, gifts or shopping coupons and the like are provided for the newly registered user. At this time, a part of the main users which are not the newly added service maliciously and falsely register to obtain a large amount of gifts, and finally resource loss of the platform side is caused.
Based on the above problems, in the prior art, when a service is promoted, users who cheat are often distinguished by adopting an anti-cheating means. When a new service is popularized, on one hand, the cheating means of different service scenes have certain difference, and the historical data cannot be directly used; on the other hand, retrieving data for analysis and model training can consume a significant amount of time cost. Finally, the business cannot provide an accurate wind control scheme when being popularized.
According to an aspect of embodiments of the present application, there is provided a method embodiment of a training method of a model. Fig. 1 is a flowchart of a service processing method provided in an embodiment of the present application, and as shown in fig. 1, the method includes:
step S11, acquiring a first training sample corresponding to the anti-cheating service to be accessed;
in this embodiment of the application, when the platform needs to promote the anti-cheating service to be accessed, a model suitable for the anti-cheating service to be accessed needs to be trained, for example: the model can be used for detecting the user voting data in the video platform to determine whether the user voting data has cheating conditions. And acquiring a first training sample corresponding to the anti-cheating service to be accessed based on the requirement, wherein the first training sample comprises a first training sample and a first label.
Step S12, inquiring a target accessed anti-cheating service with the maximum similarity with the anti-cheating service to be accessed from the accessed anti-cheating service set, and acquiring a second training sample set and a history model corresponding to the target accessed anti-cheating service;
in the embodiment of the application, first service characteristics of an anti-cheating service to be accessed are obtained; acquiring a second service characteristic of each accessed anti-cheating service in the accessed anti-cheating service set; calculating the feature similarity between the first service features and each second service feature; and determining the accessed anti-cheating service with the maximum feature similarity as a target accessed anti-cheating service.
It can be understood that, an accessed anti-cheating service set is obtained first, and the accessed anti-cheating service set includes the accessed anti-cheating service, and a second training sample and a history model corresponding to the accessed anti-cheating service.
Then extracting service characteristics of the anti-cheating service to be accessed, such as: type of business (financial, gaming, e-commerce, etc.), business promotion policies, and so forth. And calculating the feature similarity between the anti-cheating service to be accessed and each accessed anti-cheating service in the accessed anti-cheating service set, and determining the accessed anti-cheating service with the maximum similarity as the target accessed anti-cheating service. And acquiring a second training sample and a historical model corresponding to the accessed anti-cheating service of the target.
And step S13, training the historical model according to the first training sample set and the second training sample set to obtain the trained historical model.
In the embodiment of the present application, the first training sample set is input by the developer in advance. For the anti-cheating service, taking the detection of the number of people votes of the character a in the art program as an example, the first training sample set comprises: portrait data of character A in the art program. The second set of training samples comprises: portrait data of character a in a movie.
In this embodiment of the present application, in step S13, a historical model is trained according to a first training sample set and a second training sample set, so as to obtain a trained historical model, and the method further includes the following steps a1-a 5:
step A1, updating initial convolution parameters of a target convolution layer in the historical model to obtain an updated historical model, wherein the target convolution layer is at least two last adjacent convolution layers in a convolution layer set in the historical model;
in the embodiment of the application, because the extracted features of the first few layers of the convolutional layer are rough, the embodiment of the application only adjusts the initial convolution parameters of the last several adjacent convolutional layers in the convolutional layer set, thereby ensuring the accuracy of the model for extracting the sample features. Wherein the adjustment range of the initial convolution parameters is 0-40%.
As an example, the history model is VGG16, and the target convolutional layers of the VGG16 model are 14 th convolutional layer and 15 th convolutional layer. Then, fixing the convolution parameters of the 1 st to 13 th convolutional layers, and adjusting the convolution parameters of the 14 th and 15 th convolutional layers by using a first preset value, for example: the convolution kernels of the 14 th convolution layer and the 15 th convolution layer are increased in size according to a first preset value.
Step A2, determining a first training sample set and a second training sample set as an initial training sample set;
in the embodiment of the application, the first training sample and the second training sample are integrated to obtain an initial training sample. Since there is a certain difference between the second training sample and the first training sample, the second training sample and the first training sample are integrated according to different weights in the integration process.
Step A3, training the updated historical model according to the initial training sample set until an initial training result is obtained;
in this embodiment of the present application, the step a3 of training the updated historical model according to the initial training sample to obtain an initial training result includes the following steps a201 to a 204:
step a201, a first training sample in a first training sample set is obtained, and the first training sample corresponds to a first label.
Step a202, a second training sample in the second training sample set and a second label corresponding to the second training sample are obtained.
In an embodiment of the present application, the first training sample includes: first user representation data of character a in a movie, a first tag identifying authenticity of the first user representation data, a second training sample comprising: second user representation data of character a in the art program, a second tag identifying the authenticity of the second user representation.
Step A203, inputting the first training sample and the second training sample into the updated historical model respectively to obtain a first output result and a second output result;
step A204, determining the first output result and the second output result as an initial training result.
And step A4, determining the updated historical model as the trained historical model under the condition that the initial training result is matched with the label information carried by the target training sample.
According to the embodiment of the application, the model is trained by using the first training sample to be accessed into the anti-cheating service and the second training sample of the similar anti-cheating service, so that the time for collecting the training samples by the platform side can be reduced, and the problem of wind control anti-cheating cold start is greatly solved.
The method provided by the embodiment of the application further comprises the following steps:
step B1, under the condition that the initial training result is not matched with the label information carried by the target training sample, respectively adjusting the corresponding weights of the first training sample set and the second training sample set to obtain a target training sample set;
step B2, training the updated historical model by using the target training sample set to obtain a trained historical model;
in this embodiment of the present application, the step of the initial training result not matching the label information carried by the target training sample includes: the first output result does not match the first label and/or the second output result does not match the second label.
It should be noted that the weight is used to represent the importance degree of the training sample in the predicted output result, and when the first output result is not matched with the first label, it represents that the model has not learned the relationship between the first training sample and the first label, so the weight of the first training sample needs to be increased, so that the model is subjected to the key training according to the first training sample and the first label.
In addition, in this embodiment of the application, when the second output result does not match the second label, the second weight of the current second training sample is determined, and the difference between the second weight and the third preset value adjusts the second weight.
It should be noted that, when the second output result does not match the second label, it indicates that the model has not learned the relationship between the second training sample and the second label, and therefore the weight of the second training sample needs to be reduced, so that the model is subjected to key training according to the first training sample and the first label.
It should be noted that, regardless of whether the first output result is not matched with the first tag, the second output result is not matched with the second tag, or both, the first weight can only be increased and the second weight can only be decreased to solve the problem of the mismatch between the output result and the tag. Because the first training sample is the real training sample of the anti-cheating service to be accessed, and the second training sample is only the training sample of the similar anti-cheating service (the second training sample is only similar to the first sample, but cannot be completely replaced), the first training sample needs to be always taken as the leading position in the training process to ensure the final accuracy of the model.
As an example, the first weight is βt
Figure BDA0003227480880000121
Wherein ξtIs the error rate of the model. The second weight is a weight of beta and,
Figure BDA0003227480880000122
and step A5, training the updated historical model by using the target training sample set to obtain the trained historical model.
As an example: the weight of the first training sample is set as a first weight, and the weight of the second training sample is set as a second weight. The specific formula is as follows:
Figure BDA0003227480880000131
wherein the content of the first and second substances,
Figure BDA0003227480880000132
is the first weight, n is the sample size of the first training sample.
Figure BDA0003227480880000133
Wherein the content of the first and second substances,
Figure BDA0003227480880000134
m is the sample size of the second training sample, which is the second weight.
In the embodiment of the application, the training samples which are similar to the accessed anti-cheating service are combined with the training data of the anti-cheating service to be accessed by reasonably utilizing the existing training samples in the accessed anti-cheating service to obtain the initial training sample, when a new scene model is trained, partial parameters transferred in a historical scene are fixed, the weight of historical scene data which is not helpful to the new scene is reduced, and the weight of data which is helpful to the new scene is increased, so that the available knowledge in the historical scene is transferred to a new target scene.
And step S14, determining the trained historical model as a target model suitable for the anti-cheating service to be accessed.
In this embodiment of the application, in step S14, before determining the trained historical model as the target model suitable for the anti-cheating service to be accessed, if the error rate of the trained historical model is less than the preset value, the method further includes the following steps C1-C3:
step C1, performing iterative training on the updated historical model by using the updated first weight and the first training sample to obtain a training result set;
step C2, determining the training result matched with the first label in the training result set as a target training result;
and step C3, determining the error rate of the updated historical model according to the number of the target training results.
The embodiment of the application adopts the second training sample and the first training sample to combine the training model, reduces the time for collecting the training sample by the platform side, greatly solves the problem of wind control anti-cheating cold start, shortens the access period of anti-cheating business, and can also ensure the accuracy of the model.
As one example, some talent show or leader board activity of the lead actor of a television show often occurs in video platforms. Some users may adopt cheating ways such as hot-reading and voting in order to obtain a higher number of votes or attention from a target object interested by the users.
Therefore, first flow data of the target object in the first service scene and a history model suitable for detecting cheating in the first service scene are obtained firstly. When the target object appears in a second service scene similar to the first service scene, the model training method can be adopted to retrain the historical model to obtain the target model, and meanwhile, the target model can be used for monitoring second traffic data generated by the target object in the second service scene, so that the model for detecting cheating is quickly accessed in the second service scene, and the deployment efficiency of the anti-cheating service is improved.
Fig. 2 is a block diagram of a service processing apparatus provided in an embodiment of the present application, where the apparatus may be implemented as part of or all of an electronic device through software, hardware, or a combination of the two. As shown in fig. 2, the apparatus includes:
an obtaining module 21, configured to obtain a first training sample set corresponding to an anti-cheating service to be accessed;
the query module 22 is configured to query, from an accessed anti-cheating service set, a target accessed anti-cheating service with the largest similarity to the to-be-accessed anti-cheating service, and obtain a second training sample set and a history model corresponding to the target accessed anti-cheating service;
the training module 23 is configured to train the historical model according to the first training sample set and the second training sample set to obtain a trained historical model;
and the determining module 24 is configured to determine the trained historical model as a target model suitable for the anti-cheating service to be accessed.
In the embodiment of the present application, the query module 22 is configured to obtain a first service characteristic of an anti-cheating service to be accessed; acquiring a second service characteristic of each accessed anti-cheating service in the accessed anti-cheating service set; calculating the feature similarity between the first service features and each second service feature; and determining the accessed anti-cheating service with the maximum feature similarity as a target accessed anti-cheating service.
In the embodiment of the present application, the training module 23 includes:
the updating submodule is used for updating the initial convolution parameters of the target convolution layer in the historical model to obtain an updated historical model, wherein the target convolution layer is at least two last adjacent convolution layers in a convolution layer set in the historical model;
a determining submodule for determining the first training sample set and the second training sample set as an initial training sample set;
the training submodule is used for training the updated historical model according to the initial training sample set until an initial training result is obtained;
the processing submodule is used for respectively adjusting the corresponding weights of the first training sample set and the second training sample set under the condition that the initial training result is not matched with the label information carried by the target training sample to obtain a target training sample set;
and the training submodule is used for training the updated historical model by using the target training sample set to obtain the trained historical model.
In the embodiment of the application, the training submodule is used for obtaining a first training sample in a first training sample set, and the first training sample corresponds to a first label; acquiring a second training sample in a second training sample set and a second label corresponding to the second training sample; respectively inputting the first training sample and the second training sample into the updated historical model to obtain a first output result and a second output result; and determining the first output result and the second output result as initial training results.
In this embodiment of the present application, the step of the initial training result not matching with the label information carried by the target training sample includes: the first output result does not match the first label and/or the second output result does not match the second label.
The processing submodule is used for determining a first weight of the current first training sample under the condition that the first output result is not matched with the first label, and adjusting the first weight according to a preset value to enable the updated first weight to be larger than the first weight before updating;
and/or the presence of a gas in the gas,
and the processing submodule is used for determining the second weight of the current second training sample under the condition that the second output result is not matched with the second label, and adjusting the second weight according to a preset value to ensure that the updated second weight is smaller than the second weight before updating.
In the embodiment of the application, the training submodule is used for performing iterative training on the updated historical model according to the updated first weight and the first training sample to obtain a training result set; determining a training result matched with the first label in the training result set as a target training result; determining the error rate of the updated historical model according to the ratio of the number of the target training results to the total number of the training results in the training result set; and under the condition that the error rate is less than the preset error rate, obtaining the trained historical model.
An embodiment of the present application further provides an electronic device, as shown in fig. 3, the electronic device may include: the system comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 complete communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501 is configured to implement the steps of the above embodiments when executing the computer program stored in the memory 1503.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment provided by the present application, there is also provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to perform the method for training a model as described in any of the above embodiments.
In a further embodiment provided by the present application, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of training a model as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk), among others.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of training a model, comprising:
acquiring a first training sample set corresponding to an anti-cheating service to be accessed;
inquiring a target accessed anti-cheating service with the maximum similarity with the anti-cheating service to be accessed from an accessed anti-cheating service set, and acquiring a second training sample set and a historical model corresponding to the target accessed anti-cheating service;
training the historical model according to the first training sample set and the second training sample set to obtain a trained historical model;
and determining the trained historical model as a target model suitable for the anti-cheating service to be accessed.
2. The method of claim 1, wherein the querying the target accessed anti-cheating service with the greatest similarity to the anti-cheating service to be accessed from the set of accessed anti-cheating services comprises:
acquiring a first service characteristic of the anti-cheating service to be accessed;
acquiring a second service characteristic of each accessed anti-cheating service in the accessed anti-cheating service set;
calculating the feature similarity between the first service feature and each second service feature;
and determining the accessed anti-cheating service with the maximum feature similarity as the target accessed anti-cheating service.
3. The method of claim 1, wherein the training the historical model according to the first training sample set and the second training sample set to obtain a trained historical model comprises:
updating initial convolution parameters of a target convolution layer in the historical model to obtain an updated historical model, wherein the target convolution layer is at least two convolution layers which are adjacent to each other in a convolution layer set in the historical model;
determining the first set of training samples and the second set of training samples as an initial set of training samples;
training the updated historical model according to the initial training sample set until an initial training result is obtained;
and under the condition that the initial training result is matched with the label information carried by the target training sample, determining the updated historical model as the trained historical model.
4. The method of claim 3, wherein the training the updated historical model according to the initial training sample to obtain an initial training result comprises:
acquiring a first training sample in the first training sample set, wherein the first training sample corresponds to a first label;
acquiring a second training sample in the second training sample set and a second label corresponding to the second training sample;
inputting the first training sample and the second training sample into the updated historical model respectively to obtain a first output result and a second output result;
determining the first output result and the second output result as the initial training result.
5. The method of claim 4, further comprising:
under the condition that the initial training result is not matched with the label information carried by the target training sample, respectively adjusting the corresponding weights of the first training sample set and the second training sample set to obtain a target training sample set;
training the updated historical model by using the target training sample set to obtain the trained historical model;
wherein the step of mismatching the initial training result with the label information carried by the target training sample comprises: the first output result does not match the first tag, and/or the second output result does not match the second tag.
6. The method of claim 5, wherein the adjusting the weights of the first training sample and the second training sample to obtain a target training sample comprises:
under the condition that the first output result is not matched with the first label, determining a first weight of the current first training sample, and adjusting the first weight according to a preset value to enable the updated first weight to be larger than the first weight before updating;
and/or the presence of a gas in the gas,
and under the condition that the second output result is not matched with the second label, determining a second weight of the current second training sample, and adjusting the second weight according to a preset value to enable the updated second weight to be smaller than the second weight before updating.
7. The method of claim 6, wherein the training the updated historical model using the set of target training samples results in the trained historical model, the method further comprising:
performing iterative training on the updated historical model according to the updated first weight and the first training sample, and/or according to the updated second weight and the second training sample to obtain a training result set;
determining the training result matched with the first label in the training result set as a target training result;
determining the error rate of the updated historical model according to the ratio of the number of the target training results to the total number of the training results in the training result set;
and obtaining the trained historical model under the condition that the error rate is less than a preset error rate.
8. An apparatus for training a model, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an anti-cheating service to be accessed and a first training sample set corresponding to the anti-cheating service to be accessed;
the query module is used for acquiring a target accessed anti-cheating service with the maximum similarity with the acquired anti-cheating service to be accessed from an accessed anti-cheating service set, and acquiring a second training sample set and a history model corresponding to the target accessed anti-cheating service;
the training module is used for training the historical model according to the first training sample set and the second training sample set to obtain a trained historical model;
and the determining module is used for determining the trained historical model as a target model suitable for the anti-cheating service to be accessed.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program is operative to perform the method steps of any of the preceding claims 1 to 7.
10. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus; wherein:
a memory for storing a computer program;
a processor for performing the method steps of any of claims 1-7 by executing a program stored on a memory.
CN202110975511.5A 2021-08-24 2021-08-24 Model training method and device, electronic equipment and storage medium Pending CN113657535A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110975511.5A CN113657535A (en) 2021-08-24 2021-08-24 Model training method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110975511.5A CN113657535A (en) 2021-08-24 2021-08-24 Model training method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113657535A true CN113657535A (en) 2021-11-16

Family

ID=78481820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110975511.5A Pending CN113657535A (en) 2021-08-24 2021-08-24 Model training method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113657535A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109165691A (en) * 2018-09-05 2019-01-08 北京奇艺世纪科技有限公司 Training method, device and the electronic equipment of the model of cheating user for identification
CN111428874A (en) * 2020-02-29 2020-07-17 平安科技(深圳)有限公司 Wind control method, electronic device and computer readable storage medium
CN112700287A (en) * 2021-01-11 2021-04-23 郑州阿帕斯数云信息科技有限公司 Anti-cheating method and device for application program
CN112734565A (en) * 2021-01-12 2021-04-30 中国工商银行股份有限公司 Method and device for predicting mobile coverage rate
CN112801718A (en) * 2021-02-22 2021-05-14 平安科技(深圳)有限公司 User behavior prediction method, device, equipment and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109165691A (en) * 2018-09-05 2019-01-08 北京奇艺世纪科技有限公司 Training method, device and the electronic equipment of the model of cheating user for identification
CN111428874A (en) * 2020-02-29 2020-07-17 平安科技(深圳)有限公司 Wind control method, electronic device and computer readable storage medium
CN112700287A (en) * 2021-01-11 2021-04-23 郑州阿帕斯数云信息科技有限公司 Anti-cheating method and device for application program
CN112734565A (en) * 2021-01-12 2021-04-30 中国工商银行股份有限公司 Method and device for predicting mobile coverage rate
CN112801718A (en) * 2021-02-22 2021-05-14 平安科技(深圳)有限公司 User behavior prediction method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN108921206B (en) Image classification method and device, electronic equipment and storage medium
WO2020082579A1 (en) Risk review and approval method, device, storage medium, and server
US20210027388A1 (en) System and method for using object recognition to facilitate the collection of insurance information
CN109040329B (en) Method for determining contact person label, terminal device and medium
CN111709603B (en) Service request processing method, device and system based on wind control
WO2023000491A1 (en) Application recommendation method, apparatus and device, and computer-readable storage medium
CN110930218B (en) Method and device for identifying fraudulent clients and electronic equipment
WO2020257991A1 (en) User identification method and related product
CN111324764A (en) Image detection method and device, electronic equipment and storage medium
US20210374886A1 (en) Machine-learning prediction of occupancy status of real property
CN112966102A (en) Classification model construction and text sentence classification method, equipment and storage medium
CN113052676A (en) Intelligent wind control decision method, device, equipment and readable storage medium
CN110866698A (en) Device for assessing service score of service provider
CN111797320A (en) Data processing method, device, equipment and storage medium
US20090083093A1 (en) System, method and apparatus for tracking and rating renters
WO2024060759A1 (en) Supply chain financial asset auditing method and apparatus, and device and medium
CN113657535A (en) Model training method and device, electronic equipment and storage medium
CN115952770B (en) Data standardization processing method and device, electronic equipment and storage medium
CN110070392B (en) User loss early warning method and device
CN113362095A (en) Information delivery method and device
WO2023168222A1 (en) Systems and methods for predictive analysis of electronic transaction representment data using machine learning
US20230281635A1 (en) Systems and methods for predictive analysis of electronic transaction representment data using machine learning
CN116305033A (en) Abnormal account identification method and device and electronic equipment
JPWO2021048902A1 (en) Learning model application system, learning model application method, and program
CN111708988A (en) Infringement video identification method and device, electronic equipment and storage medium

Legal Events

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