CN115994252A - Data processing method, device and equipment - Google Patents

Data processing method, device and equipment Download PDF

Info

Publication number
CN115994252A
CN115994252A CN202310099699.0A CN202310099699A CN115994252A CN 115994252 A CN115994252 A CN 115994252A CN 202310099699 A CN202310099699 A CN 202310099699A CN 115994252 A CN115994252 A CN 115994252A
Authority
CN
China
Prior art keywords
label
sample
weight
prediction model
tag
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
CN202310099699.0A
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 CN202310099699.0A priority Critical patent/CN115994252A/en
Publication of CN115994252A publication Critical patent/CN115994252A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the specification provides a data processing method, a device and equipment, wherein the method comprises the following steps: acquiring a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, and determining the similarity between the new label and the first label based on the second sample and the first sample; acquiring a first weight corresponding to the first tag; determining a second weight corresponding to the newly added tag based on the similarity and a first weight corresponding to the first tag, and updating the weight of the full connection layer in the trained tag prediction model based on the first weight and the second weight to obtain a tag prediction model to be trained; and training the label prediction model to be trained to obtain an updated label prediction model.

Description

Data processing method, device and equipment
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a data processing method, apparatus, and device.
Background
With the rapid development of computer technology, the types and the number of application services provided by enterprises for users are also increasing, and accordingly, the data volume of user data is increasing, so that in order to rapidly acquire needed information from the user data, the user data can be classified through a label prediction model and labeled with corresponding labels.
However, since the service update speed is faster, new labels need to be added, which requires retraining the label prediction model, resulting in higher training cost and low training efficiency, and the performance of the original labels will be affected, resulting in poor prediction efficiency of the label prediction model obtained by retraining, and therefore, a solution capable of improving the training efficiency and the prediction effect of the label prediction model under the condition of adding new labels is needed.
Disclosure of Invention
The embodiment of the specification aims to provide a data processing method, a device and equipment, so as to provide a solution capable of improving training efficiency and prediction effect of a label prediction model under the condition of adding a label.
In order to achieve the above technical solution, the embodiments of the present specification are implemented as follows:
in a first aspect, a data processing method includes: acquiring a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, and determining the similarity between the new label and the first label based on the second sample and the first sample, wherein the first sample and the second sample comprise data generated in a human-computer interaction process; acquiring a first weight corresponding to the first label, wherein the first weight is a weight of a full-connection layer in a label prediction model after training, which is obtained by training the label prediction model based on the first sample; determining a second weight corresponding to the newly added tag based on the similarity and a first weight corresponding to the first tag, and updating the weight of the full connection layer in the trained tag prediction model based on the first weight and the second weight to obtain a tag prediction model to be trained; training the label prediction model to be trained to obtain an updated label prediction model, wherein the updated label prediction model is used for determining a label corresponding to service data for executing preset service.
In a second aspect, embodiments of the present disclosure provide a data processing apparatus, the apparatus comprising: the sample acquisition module is used for acquiring a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, and determining the similarity between the new label and the first label based on the second sample and the first sample, wherein the first sample and the second sample comprise data generated in a human-computer interaction process; the weight acquisition module is used for acquiring a first weight corresponding to the first label, wherein the first weight is the weight of a full-connection layer in the label prediction model after training based on the first sample; the weight determining module is used for determining a second weight corresponding to the newly added tag based on the similarity and a first weight corresponding to the first tag, and updating the weight of the full-connection layer in the trained tag prediction model based on the first weight and the second weight to obtain a tag prediction model to be trained; the model training module is used for training the label prediction model to be trained to obtain an updated label prediction model, and the updated label prediction model is used for determining a label corresponding to service data for executing preset service.
In a third aspect, embodiments of the present specification provide a data processing apparatus, the data processing apparatus comprising: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to: acquiring a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, and determining the similarity between the new label and the first label based on the second sample and the first sample, wherein the first sample and the second sample comprise data generated in a human-computer interaction process; acquiring a first weight corresponding to the first label, wherein the first weight is a weight of a full-connection layer in a label prediction model after training, which is obtained by training the label prediction model based on the first sample; determining a second weight corresponding to the newly added tag based on the similarity and a first weight corresponding to the first tag, and updating the weight of the full connection layer in the trained tag prediction model based on the first weight and the second weight to obtain a tag prediction model to be trained; training the label prediction model to be trained to obtain an updated label prediction model, wherein the updated label prediction model is used for determining a label corresponding to service data for executing preset service.
In a fourth aspect, embodiments of the present description provide a storage medium for storing computer-executable instructions that, when executed, implement the following: acquiring a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, and determining the similarity between the new label and the first label based on the second sample and the first sample, wherein the first sample and the second sample comprise data generated in a human-computer interaction process; acquiring a first weight corresponding to the first label, wherein the first weight is a weight of a full-connection layer in a label prediction model after training, which is obtained by training the label prediction model based on the first sample; determining a second weight corresponding to the newly added tag based on the similarity and a first weight corresponding to the first tag, and updating the weight of the full connection layer in the trained tag prediction model based on the first weight and the second weight to obtain a tag prediction model to be trained; training the label prediction model to be trained to obtain an updated label prediction model, wherein the updated label prediction model is used for determining a label corresponding to service data for executing preset service.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some of the embodiments described in the present description, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1A is a flowchart illustrating an embodiment of a data processing method according to the present disclosure;
FIG. 1B is a schematic diagram illustrating a data processing method according to the present disclosure;
FIG. 2 is a schematic diagram of a data processing process according to the present disclosure;
FIG. 3 is a schematic diagram illustrating a processing procedure of another data processing method according to the present disclosure;
FIG. 4 is a schematic diagram illustrating a processing procedure of another data processing method according to the present disclosure;
FIG. 5 is a schematic diagram illustrating a processing procedure of another data processing method according to the present disclosure;
FIG. 6 is a schematic diagram illustrating a processing procedure of another data processing method according to the present disclosure;
FIG. 7 is a schematic diagram of an embodiment of a data processing apparatus according to the present disclosure;
fig. 8 is a schematic diagram of a data processing apparatus according to the present specification.
Detailed Description
The embodiment of the specification provides a data processing method, a device and equipment.
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. 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.
Example 1
As shown in fig. 1A and 1B, the embodiment of the present disclosure provides a data processing method, where an execution body of the method may be a server, where the server may be an independent server or a server cluster formed by a plurality of servers. The method specifically comprises the following steps:
in S102, the new label, a second sample corresponding to the new label, the first label, and a first sample corresponding to the first label are obtained, and the similarity between the new label and the first label is determined based on the second sample and the first sample.
The new label and the first label may be labels set for the same preset service, the first label may be labels obtained by classifying the first sample, the new label may be labels obtained by manually labeling the first sample and the second sample include data generated in a human-computer interaction process, the first sample and the second sample may include data of different types such as text data, picture data and voice data, the preset service may be any service needing data classification, for example, the preset service may be a resource transfer service, the labels corresponding to the service (i.e., the new label and the first label) may be used for determining whether a risk exists in executing the resource transfer service, specifically, when a user triggers executing the resource transfer service, service data (such as resource transfer time and resource transfer number) related to executing the resource transfer service may be determined as the first sample, training is performed on a label prediction model through the first sample, the first label corresponding to the first sample is obtained according to the trained label prediction model, the first label may include a high risk and a low risk, for example, the new label may be obtained by manually labeling the new label and the risk may be classified as the new label is obtained, and the risk may be obtained as the new label is not high risk.
In implementation, with the rapid development of computer technology, the types and the number of application services provided by enterprises for users are also increasing, and accordingly, the data volume of user data is increasing, so that in order to rapidly obtain required information from the user data, the user data can be classified through a label prediction model and labeled with corresponding labels. However, since the service update speed is faster, new labels need to be added, which requires retraining the label prediction model, resulting in higher training cost and low training efficiency, and the performance of the original labels will be affected, resulting in poor prediction efficiency of the label prediction model obtained by retraining, and therefore, a solution capable of improving the training efficiency and the prediction effect of the label prediction model under the condition of adding new labels is needed. For this reason, the embodiments of the present specification provide a technical solution that can solve the above-mentioned problems, and specifically, reference may be made to the following.
In implementation, the terminal device may acquire data generated by a user in a human-computer interaction process, send the acquired data to the server as a first sample, train the tag prediction model through the first sample after the server receives the first sample, obtain a trained tag prediction model, and determine a first tag corresponding to the first sample through the trained tag prediction model.
The label prediction model can be constructed based on any machine learning algorithm and is used for classifying data to obtain a model of a label corresponding to the data.
The server may further receive a plurality of the additional tags and second samples corresponding to the additional tags, and the number of the additional tags is not specifically limited in this specification.
The server may determine the similarity between the new label and the first label based on the first sample and the second sample, where the method for determining the similarity between the new label and the first label may be multiple, for example, the server may perform feature extraction processing on the first sample and the second sample through a feature extraction model trained in advance, determine the similarity between the feature corresponding to the first sample and the feature corresponding to the second sample as the similarity between the new label and the first label, or, in the case that there are multiple first samples and multiple second samples, the server may perform feature extraction processing on each first sample and each second sample through a feature extraction model trained in advance, and determine the similarity between the mean value of the feature corresponding to each first sample and the mean value of the feature corresponding to each second sample as the similarity between the new label and the first label, and in addition, there may be multiple different determining methods, which may be different according to different practical situations, and the specific embodiment may define this.
In S104, a first weight corresponding to the first tag is acquired.
The first weight is the weight of a full-connection layer in the label prediction model after training based on the first sample, the label prediction model can comprise a feature extraction layer and the full-connection layer, each node of the full-connection layer is connected with all nodes of the upper layer and is used for integrating features extracted by the feature extraction layer, namely the full-connection layer can map the features into a label space by using a linear transformation.
In implementation, the server may input the first sample into the label prediction model, perform feature extraction processing on the first sample through a feature extraction layer of the label prediction model, input the extracted features into the full connection layer, obtain a vector containing each feature and a corresponding weight, and determine a first label corresponding to the first sample through the vector, where the weight corresponding to the feature is the first weight corresponding to the first label.
For example, as shown in fig. 2, the first samples include a sample x1, a sample x2, and a sample x3, the features extracted by the feature extraction layer are a feature F1 corresponding to the sample 1, a feature F2 corresponding to the sample 2, a feature F3 corresponding to the sample 3, and the vectors output by the full connection layer are [ w1×f1, w2×f2, w3×f3], the first label obtained based on the vectors is a first label y1 corresponding to the F1, a first label y2 corresponding to the F2, a first label y3 corresponding to the F, and the first weight corresponding to the first label includes a weight w1 corresponding to the first label y1, a weight w2 corresponding to the first label y2, and a weight w3 corresponding to the first label y 3.
In S106, based on the similarity and the first weight corresponding to the first label, a second weight corresponding to the newly added label is determined, and based on the first weight and the second weight, the weight of the full connection layer in the trained label prediction model is updated, so as to obtain the label prediction model to be trained.
In an implementation, the average value of the product of the similarity and the first weight corresponding to the first label may be determined as the second weight corresponding to the newly added label, for example, assuming that the similarity between the newly added label and the first label 1 is sk1, the similarity between the newly added label and the first label 2 is sk2, the corresponding first weight 1 of the first label 1 is w1, and the corresponding first weight 2 of the first label 2 is w2, then the second weight corresponding to the newly added label may be (sk 1×w1+sk2×w2)/2.
In addition, the above-mentioned second weight determining method is an optional and implementable determining method, and in an actual application scenario, there may be a plurality of different determining methods, and may be different according to the actual application scenario, which is not specifically limited in the embodiment of the present disclosure.
Assuming that the first sample includes a sample x1, a sample x2 and a sample x3, the first weight corresponding to the first sample may include a weight w1 corresponding to the first tag y1, a weight w2 corresponding to the first tag y2, and a weight w3 corresponding to the first tag y3, then the weight of the full-connection layer in the trained tag prediction model may be [ w1, w2, w3], assuming that the second weight corresponding to the newly added tag is wn, updating the weight of the full-connection layer in the trained tag prediction model based on the first weight and the second weight, and the weight of the full-connection layer in the obtained tag prediction model to be trained is [ w1, w2, w3, wn ]. The number of the new labels may be multiple, and the number of the first samples may be multiple, so the weights of the full connection layers of the label prediction model to be trained may be [ w1, w2, w3, ], wk, wk+1, wk+n ], that is, w1 to wk may be k first samples, and wk+1 to wk+n may be n new samples, where n and k are positive integers.
In S108, the label prediction model to be trained is trained to obtain an updated label prediction model, and the updated label prediction model is used for determining a label corresponding to service data for executing the preset service.
In an implementation, the label prediction model to be trained may be trained through the first sample and the second sample, the first sample and the second sample may be screened, and the label prediction model to be trained may be trained based on the screened first sample and the screened second sample, or a third sample corresponding to the newly added label may be obtained, and a fourth sample corresponding to the first label may be obtained, and the label prediction model to be trained may be trained through the third sample and the fourth sample to obtain an updated label prediction model.
After obtaining the updated label prediction model, the server may determine, through the updated label prediction model, a label corresponding to service data for executing the preset service, where the label corresponding to the service data may be used to determine a corresponding service processing policy, for example, taking the task allocation service of the preset service as an intelligent question-answering system as an example, the terminal device may obtain feedback data of the user for the intelligent session, input the feedback data and the intelligent session as the service data into the updated label prediction model, so as to obtain a label corresponding to the service data, and determine, through the label, a corresponding service processing policy, so as to perform service processing according to the determined service processing policy.
Specifically, for example, assuming that the current intelligent question-answering system is an after-sale system, the terminal device may output the intelligent talent 1 on the question-answering page, and if the intelligent talent may be "how is the question you want to consult? The terminal device can acquire feedback data input by the user aiming at the intelligent voice operation, and the terminal device can send the feedback data of the user and the intelligent voice operation as service data to the server. The server may input the received service data into the updated label prediction model to obtain a label corresponding to the service data, and determine a service processing policy corresponding to the label according to a preset corresponding relation between the label and the service processing policy, where the service processing policy corresponding to the label may be manually processed. The server can return the service processing strategy to the terminal equipment, and the terminal equipment can convert the intelligent question-answering system into manual processing according to the service processing strategy.
In addition, the tag corresponding to the service data may be used for information recommendation, user classification, and other processes, and the application of the tag corresponding to the service data in the embodiment of the present disclosure is not particularly limited.
The embodiment of the specification provides a data processing method, which comprises the steps of obtaining a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, determining the similarity between the new label and the first label based on the second sample and the first sample, obtaining a first weight corresponding to the first label by the data generated in a human-computer interaction process, training a label prediction model based on the first sample, determining a second weight corresponding to the new label based on the similarity and the first weight corresponding to the first label, updating the weight of a full connection layer in the trained label prediction model based on the first weight and the second weight, obtaining a label prediction model to be trained, training the label prediction model to be trained, obtaining an updated label prediction model, and determining a label corresponding to service data for executing preset services. Therefore, the similarity between the newly added tag and the first tag is determined by the first sample and the second sample, so that the similarity between the tags can be constructed through the similarity between the samples, then the weight of the full-connection layer in the trained tag prediction model is updated through the first weight corresponding to the first tag and the second weight of the newly added tag, namely, the data information of the original tag (namely, the first tag) can be fully utilized by the tag prediction model to be trained, the prediction effect of the updated tag prediction model is improved, the main network (namely, the part except the full-connection layer) of the tag prediction model is not required to be trained again, the model training cost is saved, and the model training efficiency is improved.
Example two
The embodiment of the specification provides a data processing method, and an execution subject of the method may be a server, where the server may be an independent server or may be a server cluster formed by a plurality of servers. The method specifically comprises the following steps:
in S302, based on a model update period corresponding to a preset service, a new label, a second sample corresponding to the new label, a first label, and a first sample corresponding to the first label are obtained.
The model update period corresponding to the preset service may be one week, one month, three months, etc., and different model update periods may be set according to different preset services.
In implementation, because the data processing amounts, the service upgrading frequencies and other factors of different services have different factors, the label adding frequencies of different services are different, so different model updating periods can be set for different preset services, for example, because the service upgrading frequency of the resource transferring service is lower, the label adding frequency of the resource transferring service is lower, and because the service upgrading frequency of the information recommending service is higher, the label adding frequency of the information recommending service is higher, correspondingly, the model updating period of the resource transferring service can be greater than the model updating period of the information recommending service, for example, the model updating period of the resource transferring service can be three months, the model updating period of the information recommending service can be half month, namely, when the preset service is the resource transferring service, the server can update the label predicting model once every three months, and when the preset service is the information recommending service, the server can update the label predicting model once every half month.
As shown in fig. 3, after the new label, the second sample corresponding to the new label, the first label, and the first sample corresponding to the first label are obtained, the similarity between the new label and the first label may be determined based on the first sample and the second sample, that is, after S302, S308 may be continuously performed.
In S304, a new tag and a candidate tag are obtained, and semantic analysis is performed on the new tag and the candidate tag, so as to obtain a semantic analysis result.
The candidate labels may be labels corresponding to preset services.
In implementation, under the condition that the newly added tag and the candidate tag are non-0-1 tags (i.e., the newly added tag and the candidate tag are tags with semantics), semantic analysis can be performed on the newly added tag and the candidate tag based on a preset semantic analysis algorithm, so as to obtain a semantic analysis result.
In S306, based on the semantic analysis result, a first label corresponding to the newly added label among the candidate labels is determined, and a second sample corresponding to the newly added label and a first sample corresponding to the first label are obtained.
In implementation, the semantic similarity between the newly added tag and each candidate tag can be obtained based on the semantic analysis result, and the candidate tags are screened based on the semantic similarity to obtain a first tag corresponding to the newly added tag in the candidate tags, so that the subsequent data processing efficiency is improved through screening processing of the candidate tags.
The method for determining the first tag is an optional and implementable method, and in an actual application scenario, there may be a plurality of different determining methods, and may be different according to the actual application scenario, which is not specifically limited in the embodiment of the present disclosure.
As shown in fig. 4, after obtaining the new label, the second sample corresponding to the new label, the first label, and the first sample corresponding to the first label, the similarity between the new label and the first label may be determined based on the first sample and the second sample, that is, after S306, S308 may be continuously performed.
In S308, a sample similarity between each second sample and each first sample is acquired.
In implementation, the sample similarity between each second sample and each first sample may be determined based on a preset similarity algorithm, for example, assuming that the first sample and the second sample are picture data, then the picture feature extraction process may be performed on each first sample and the second sample based on a preset feature extraction algorithm, and the sample similarity between the picture feature corresponding to each first sample and the picture feature corresponding to each second sample may be determined as the sample similarity between each first sample and each second sample, or assuming that the first sample and the second sample are text data, the sample similarity between each second sample and each first sample may be determined by a preset text similarity algorithm.
Since the first samples are history samples obtained for the preset service, the number of the first samples may be larger, so in order to improve the data processing efficiency, an alternative implementation manner is provided below, which can be specifically referred to the following steps one to two:
step one, screening the first samples to obtain screened first samples under the condition that the number of the first samples is larger than a preset sample number threshold value.
The preset sample number threshold may be determined based on a data processing requirement of a preset service, for example, if a data processing accuracy requirement of the preset service is higher and a data processing efficiency requirement is lower, the preset sample number threshold may be larger, and if a data processing accuracy requirement of the preset service is lower and a data processing efficiency requirement is higher, the preset sample number threshold may be smaller. Specifically, if the data processing accuracy requirement of the preset service is higher and the data processing efficiency requirement is lower, the preset sample number threshold may be 1 thousand, if the data processing accuracy requirement of the preset service is lower, the preset sample number threshold may be 1 hundred, that is, the preset service with higher data processing accuracy requirement and lower data processing efficiency requirement is aimed at, if the number of the first samples is not greater than 1 thousand, the screening processing is not performed on the first samples, so that the subsequent data processing is performed through the first samples with more numbers, and the data processing accuracy is improved. And aiming at preset services with lower requirements on data processing accuracy and higher requirements on data processing efficiency, under the condition that the first sample is larger than 1 hundred, screening processing is carried out on the first sample so as to improve the subsequent data processing efficiency.
In implementation, there are various methods for performing screening processing on the first samples, for example, a preset number of first samples may be randomly selected from the first samples through a random algorithm to be used as the screened first samples, or the first samples may be subjected to screening processing according to the acquisition time of the first samples, and different screening methods may be selected according to different practical application scenarios, which is not specifically limited in the embodiments of the present disclosure.
And step two, obtaining the sample similarity between each second sample and each first sample in the screened first samples.
In implementation, if the number of the second samples is also greater than the preset sample number threshold, the second samples may be screened, and the sample similarity between each screened second sample and each first sample in the screened first samples may be obtained.
In S310, the average value of the sample similarity is determined as the similarity between the newly added tag and the first tag.
In S104, a first weight corresponding to the first tag is acquired.
The first weight may be a weight of a full connection layer in the obtained trained label prediction model by training the label prediction model based on the first sample.
In S312, the similarity between the newly added tag and each first tag and the sum of the products of the first weights corresponding to the first tags are determined as the second weight corresponding to the newly added tag.
In an implementation, the similarity between the newly added tag and each first tag and the first weight corresponding to the first tag may be substituted into the formula
wk=sum(ski*wi)
Obtaining a second weight corresponding to the newly added tag, wherein wk is the second weight corresponding to the newly added tag, ski is the similarity between the newly added tag and the ith first tag, wi is the first weight corresponding to the ith first tag, and sum () is a sum function.
In addition, when there are a plurality of newly added tags, the similarity between each newly added tag and each first tag may be determined as the sum of the products of the first weights corresponding to the first tags, and the weights corresponding to the plurality of newly added tags may be initialized to obtain the second weight corresponding to each newly added tag.
In addition, after the initialization processing is performed, the second weight corresponding to each newly added tag can meet the preset initialization condition so as to meet the subsequent data processing requirement.
In S106, based on the first weight and the second weight, the weight of the full connection layer in the trained label prediction model is updated to obtain the label prediction model to be trained.
In S314, based on the preset service update requirement, the feature extraction layer in the label prediction model to be trained is updated to obtain a label prediction model updated by the feature extraction layer, and the label prediction model updated by the feature extraction layer is trained to obtain an updated label prediction model.
The label prediction model updated by the feature extraction layer at least comprises a feature extraction layer in the label prediction model to be trained, the label prediction model after updating can be used for determining a label corresponding to service data for executing preset service, and the label corresponding to the service data can be used for determining whether risk exists in executing the preset service.
In implementation, since the service upgrading frequency of the preset service is high, the quantity of the service data to be processed increases fast, so that the model scale of the label prediction model corresponding to the preset service can be updated, that is, the feature extraction layer in the label prediction model to be trained can be updated based on the preset service updating requirement, so that the label prediction model after the feature extraction layer is updated is obtained.
For example, it is assumed that the label prediction model to be trained may include 3 feature extraction layers, and the label prediction model updated by updating the label prediction model to be trained may include 5 feature extraction layers, that is, 2 feature extraction layers may be newly added on the basis of the original 3 feature extraction layers, that is, the label prediction model updated by the feature extraction layers includes at least the feature extraction layer in the label prediction model to be trained.
The updated label prediction model may be used to determine a label corresponding to the service data for executing the preset service, and the label corresponding to the service data may be used to determine whether there is a risk for executing the preset service. For example, assuming that the preset service is a resource transfer service, a tag corresponding to service data of the service may include high risk and no risk. The terminal equipment can acquire service data corresponding to the resource transfer service, the acquired service data can comprise user identification, service identification, resource transfer time, resource transfer quantity and the like, the server can input the received service data into the updated label prediction model to obtain a label corresponding to the service data, determine whether the risk exists in executing the resource transfer service based on the label, if the label is high, the server can pause executing the resource transfer service and return preset alarm information to the terminal equipment, if the label is non-risk, the server can continue executing the resource transfer service and return a service execution result to the terminal equipment.
The embodiment of the specification provides a data processing method, which comprises the steps of obtaining a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, determining the similarity between the new label and the first label based on the second sample and the first sample, obtaining a first weight corresponding to the first label by the data generated in a human-computer interaction process, training a label prediction model based on the first sample, determining a second weight corresponding to the new label based on the similarity and the first weight corresponding to the first label, updating the weight of a full connection layer in the trained label prediction model based on the first weight and the second weight, obtaining a label prediction model to be trained, training the label prediction model to be trained, obtaining an updated label prediction model, and determining a label corresponding to service data for executing preset services. Therefore, the similarity between the newly added tag and the first tag is determined by the first sample and the second sample, so that the similarity between the tags can be constructed through the similarity between the samples, then the weight of the full-connection layer in the trained tag prediction model is updated through the first weight corresponding to the first tag and the second weight of the newly added tag, namely, the data information of the original tag (namely, the first tag) can be fully utilized by the tag prediction model to be trained, the prediction effect of the updated tag prediction model is improved, the main network (namely, the part except the full-connection layer) of the tag prediction model is not required to be trained again, the model training cost is saved, and the model training efficiency is improved.
Example III
The embodiment of the specification provides a data processing method, and an execution subject of the method may be a server, where the server may be an independent server or may be a server cluster formed by a plurality of servers. The method specifically comprises the following steps:
in S302, based on a model update period corresponding to a preset service, a new label, a second sample corresponding to the new label, a first label, and a first sample corresponding to the first label are obtained.
The model update period corresponding to the preset service may be one week, one month, three months, etc., and different model update periods may be set according to different preset services.
As shown in fig. 5, after the new label, the second sample corresponding to the new label, the first label, and the first sample corresponding to the first label are obtained, the similarity between the new label and the first label may be determined based on the first sample and the second sample, that is, after S302, S308 may be continuously performed.
In S304, a new tag and a candidate tag are obtained, and semantic analysis is performed on the new tag and the candidate tag, so as to obtain a semantic analysis result.
The candidate labels may be labels corresponding to preset services.
In S306, based on the semantic analysis result, a first label corresponding to the newly added label among the candidate labels is determined, and a second sample corresponding to the newly added label and a first sample corresponding to the first label are obtained.
As shown in fig. 6, after the new label, the second sample corresponding to the new label, the first label, and the first sample corresponding to the first label are obtained, the similarity between the new label and the first label may be determined based on the first sample and the second sample, that is, after S306, S308 may be continuously performed.
In S308, a sample similarity between each second sample and each first sample is acquired.
In S310, the average value of the sample similarity is determined as the similarity between the newly added tag and the first tag.
In S104, a first weight corresponding to the first tag is acquired.
The first weight may be a weight of a full connection layer in the obtained trained label prediction model by training the label prediction model based on the first sample.
In S316, a target tag corresponding to the newly added tag from among the first tags is determined based on the similarity.
In implementation, since the number of the first tags may be larger, in order to improve the subsequent data processing efficiency, the first tags may be screened, that is, the first tags may be screened by the similarity between each first tag and the newly added tag, and the screened first tags are determined to be target tags corresponding to the newly added tag.
In S318, based on the similarity between the newly added tag and the target tag and the first weight corresponding to the target tag, the second weight corresponding to the newly added tag is determined, and based on the first weight and the second weight corresponding to the target tag, the weight of the full connection layer in the trained tag prediction model is updated, so as to obtain the tag prediction model to be trained.
In implementation, the similarity between the newly added tag and each target tag can be obtained, the product of the first weights corresponding to the target tags is obtained, and the sum of the products is initialized to obtain the second weight corresponding to the newly added tag.
In S314, based on the preset service update requirement, the feature extraction layer in the label prediction model to be trained is updated to obtain a label prediction model updated by the feature extraction layer, and the label prediction model updated by the feature extraction layer is trained to obtain an updated label prediction model.
In implementation, since the first weight corresponding to the first sample is a circle obtained after the tag prediction model is trained by the first sample, the weight of the full-connection layer in the tag prediction model may be initialized by the first weight, so as to preserve the data information of the first sample in the tag prediction model.
Compared with the method for starting training from the full-connection layer with the weight of the full-random initialization, the training speed is increased by 2 percentage points, the convergence speed is increased by 10%, and the method for starting training from the full-connection layer with the weight of the full-random initialization is not suitable for a scene of continuous training on a model with trained partial parameters and cannot retain the data information of the original sample.
The embodiment of the specification provides a data processing method, which comprises the steps of obtaining a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, determining the similarity between the new label and the first label based on the second sample and the first sample, obtaining a first weight corresponding to the first label by the data generated in a human-computer interaction process, training a label prediction model based on the first sample, determining a second weight corresponding to the new label based on the similarity and the first weight corresponding to the first label, updating the weight of a full connection layer in the trained label prediction model based on the first weight and the second weight, obtaining a label prediction model to be trained, training the label prediction model to be trained, obtaining an updated label prediction model, and determining a label corresponding to service data for executing preset services. Therefore, the similarity between the newly added tag and the first tag is determined by the first sample and the second sample, so that the similarity between the tags can be constructed through the similarity between the samples, then the weight of the full-connection layer in the trained tag prediction model is updated through the first weight corresponding to the first tag and the second weight of the newly added tag, namely, the data information of the original tag (namely, the first tag) can be fully utilized by the tag prediction model to be trained, the prediction effect of the updated tag prediction model is improved, the main network (namely, the part except the full-connection layer) of the tag prediction model is not required to be trained again, the model training cost is saved, and the model training efficiency is improved.
Example IV
The data processing method provided in the embodiment of the present disclosure is based on the same concept, and the embodiment of the present disclosure further provides a data processing device, as shown in fig. 7.
The data processing apparatus includes: a sample acquisition module 701, a weight acquisition module 702, a weight determination module 703, and a model training module 704, wherein:
a sample obtaining module 701, configured to obtain a new label, a second sample corresponding to the new label, a first label, and a first sample corresponding to the first label, and determine a similarity between the new label and the first label based on the second sample and the first sample, where the first sample and the second sample include data generated in a human-computer interaction process;
the weight obtaining module 702 is configured to obtain a first weight corresponding to the first label, where the first weight is a weight of a full link layer in the label prediction model after training the label prediction model based on the first sample;
the weight determining module 703 is configured to determine a second weight corresponding to the newly added tag based on the similarity and a first weight corresponding to the first tag, and update a weight of a full-connection layer in the trained tag prediction model based on the first weight and the second weight, so as to obtain a tag prediction model to be trained;
The model training module 704 is configured to train the label prediction model to be trained to obtain an updated label prediction model, where the updated label prediction model is used to determine a label corresponding to service data for executing a preset service.
In this embodiment of the present disclosure, the tag corresponding to the service data is used to determine whether there is a risk in executing the preset service.
In the embodiment of the present disclosure, the sample acquiring module 701 is configured to:
and acquiring the newly added label, a second sample corresponding to the newly added label, a first label and a first sample corresponding to the first label based on a model updating period corresponding to the preset service.
In this embodiment of the present disclosure, there are a plurality of first tags, and the weight determining module 703 is configured to:
and obtaining the similarity between the newly added tag and each first tag, multiplying the similarity by a first weight corresponding to the first tag, and initializing the sum of the products to obtain a second weight corresponding to the newly added tag.
In the embodiment of the present disclosure, the sample acquiring module 701 is configured to:
obtaining sample similarity between each second sample and each first sample;
And determining the average value of the sample similarity as the similarity between the newly added tag and the first tag.
In the embodiment of the present disclosure, the sample acquiring module 701 is configured to:
screening the first samples under the condition that the number of the first samples is larger than a preset sample number threshold value, so as to obtain screened first samples;
and obtaining sample similarity between each second sample and each first sample in the screened first samples.
In the embodiment of the present disclosure, the sample acquiring module 701 is configured to:
acquiring the newly added tag and the candidate tag, and carrying out semantic analysis on the newly added tag and the candidate tag to obtain a semantic analysis result;
and determining a first label corresponding to the newly added label in the candidate labels based on the semantic analysis result.
In the embodiment of the present disclosure, the weight determining module 703 is configured to:
determining a target label corresponding to the newly added label in the first label based on the similarity;
and determining a second weight corresponding to the new label based on the similarity between the new label and the target label and a first weight corresponding to the target label, and updating the weight of the full connection layer in the trained label prediction model based on the first weight and the second weight corresponding to the target label to obtain the label prediction model to be trained.
In the embodiment of the present specification, the model training module 704 is configured to:
based on preset service updating requirements, updating a feature extraction layer in the label prediction model to be trained to obtain a label prediction model updated by the feature extraction layer, and training the label prediction model updated by the feature extraction layer to obtain an updated label prediction model, wherein the label prediction model updated by the feature extraction layer at least comprises the feature extraction layer in the label prediction model to be trained.
The embodiment of the specification provides a data processing device, which is used for obtaining a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, determining the similarity between the new label and the first label based on the second sample and the first sample, obtaining a first weight corresponding to the first label by the data generated in the process of man-machine interaction, training the label prediction model based on the first sample, determining a second weight corresponding to the new label based on the similarity and the first weight corresponding to the first label, updating the weight of the full connection layer in the trained label prediction model based on the first weight and the second weight, obtaining a label prediction model to be trained, training the label prediction model to be trained, obtaining an updated label prediction model, and determining a label corresponding to service data for executing preset service. Therefore, the similarity between the newly added tag and the first tag is determined by the first sample and the second sample, so that the similarity between the tags can be constructed through the similarity between the samples, then the weight of the full-connection layer in the trained tag prediction model is updated through the first weight corresponding to the first tag and the second weight of the newly added tag, namely, the data information of the original tag (namely, the first tag) can be fully utilized by the tag prediction model to be trained, the prediction effect of the updated tag prediction model is improved, the main network (namely, the part except the full-connection layer) of the tag prediction model is not required to be trained again, the model training cost is saved, and the model training efficiency is improved.
Example five
Based on the same idea, the embodiment of the present disclosure further provides a data processing apparatus, as shown in fig. 8.
The data processing apparatus may vary considerably in configuration or performance and may include one or more processors 801 and memory 802, where the memory 802 may store one or more stored applications or data. Wherein the memory 802 may be transient storage or persistent storage. The application programs stored in memory 802 may include one or more modules (not shown) each of which may include a series of computer executable instructions for use in a data processing apparatus. Still further, the processor 801 may be arranged to communicate with a memory 802 to execute a series of computer executable instructions in the memory 802 on a data processing apparatus. The data processing device may also include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more input/output interfaces 805, and one or more keyboards 806.
In particular, in this embodiment, the data processing apparatus includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the data processing apparatus, and the one or more programs configured to be executed by the one or more processors comprise instructions for:
Acquiring a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, and determining the similarity between the new label and the first label based on the second sample and the first sample, wherein the first sample and the second sample comprise data generated in a human-computer interaction process;
acquiring a first weight corresponding to the first label, wherein the first weight is a weight of a full-connection layer in a label prediction model after training, which is obtained by training the label prediction model based on the first sample;
determining a second weight corresponding to the newly added tag based on the similarity and a first weight corresponding to the first tag, and updating the weight of the full connection layer in the trained tag prediction model based on the first weight and the second weight to obtain a tag prediction model to be trained;
training the label prediction model to be trained to obtain an updated label prediction model, wherein the updated label prediction model is used for determining a label corresponding to service data for executing preset service.
Optionally, the tag corresponding to the service data is used for determining whether the preset service is executed at risk.
Optionally, the obtaining the new tag, the second sample corresponding to the new tag, the first tag, and the first sample corresponding to the first tag includes:
and acquiring the newly added label, a second sample corresponding to the newly added label, a first label and a first sample corresponding to the first label based on a model updating period corresponding to the preset service.
Optionally, the number of the first tags is multiple, and determining the second weight corresponding to the new tag based on the similarity and the first weight corresponding to the first tag includes:
and obtaining the similarity between the newly added tag and each first tag, multiplying the similarity by a first weight corresponding to the first tag, and initializing the sum of the products to obtain a second weight corresponding to the newly added tag.
Optionally, the determining, based on the second sample and the first sample, a similarity between the newly added tag and the first tag includes:
obtaining sample similarity between each second sample and each first sample;
and determining the average value of the sample similarity as the similarity between the newly added tag and the first tag.
Optionally, the acquiring the sample similarity between each of the second samples and each of the first samples includes:
screening the first samples under the condition that the number of the first samples is larger than a preset sample number threshold value, so as to obtain screened first samples;
and obtaining sample similarity between each second sample and each first sample in the screened first samples.
Optionally, the obtaining the newly added tag and the first tag includes:
acquiring the newly added tag and the candidate tag, and carrying out semantic analysis on the newly added tag and the candidate tag to obtain a semantic analysis result;
and determining a first label corresponding to the newly added label in the candidate labels based on the semantic analysis result.
Optionally, the determining, based on the similarity and the first weight corresponding to the first label, the second weight corresponding to the newly added label, and updating the weight of the full connection layer in the trained label prediction model based on the first weight and the second weight, to obtain a label prediction model to be trained, including:
determining a target label corresponding to the newly added label in the first label based on the similarity;
And determining a second weight corresponding to the new label based on the similarity between the new label and the target label and a first weight corresponding to the target label, and updating the weight of the full connection layer in the trained label prediction model based on the first weight and the second weight corresponding to the target label to obtain the label prediction model to be trained.
Optionally, the training the label prediction model to be trained to obtain an updated label prediction model includes:
based on preset service updating requirements, updating a feature extraction layer in the label prediction model to be trained to obtain a label prediction model updated by the feature extraction layer, and training the label prediction model updated by the feature extraction layer to obtain an updated label prediction model, wherein the label prediction model updated by the feature extraction layer at least comprises the feature extraction layer in the label prediction model to be trained.
The embodiment of the specification provides data processing equipment, which is used for obtaining a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, determining the similarity between the new label and the first label based on the second sample and the first sample, obtaining first weights corresponding to the first label by the first sample and the second sample including data generated in a human-computer interaction process, training the label prediction model based on the first sample, determining the second weights corresponding to the new label based on the similarity and the first weights corresponding to the first label, updating the weights of all connection layers in the trained label prediction model based on the first weights and the second weights, obtaining a label prediction model to be trained, training the label prediction model to be trained, obtaining an updated label prediction model, and determining the label corresponding to service data for executing preset services by the updated label prediction model. Therefore, the similarity between the newly added tag and the first tag is determined by the first sample and the second sample, so that the similarity between the tags can be constructed through the similarity between the samples, then the weight of the full-connection layer in the trained tag prediction model is updated through the first weight corresponding to the first tag and the second weight of the newly added tag, namely, the data information of the original tag (namely, the first tag) can be fully utilized by the tag prediction model to be trained, the prediction effect of the updated tag prediction model is improved, the main network (namely, the part except the full-connection layer) of the tag prediction model is not required to be trained again, the model training cost is saved, and the model training efficiency is improved.
Example six
The embodiments of the present disclosure further provide a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements each process of the embodiments of the data processing method, and the same technical effects can be achieved, and for avoiding repetition, a detailed description is omitted herein. Wherein the computer readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
The embodiment of the specification provides a computer readable storage medium, which is used for acquiring a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, determining the similarity between the new label and the first label based on the second sample and the first sample, acquiring a first weight corresponding to the first label, training a label prediction model based on the first sample, determining the weight of a full connection layer in the obtained trained label prediction model based on the similarity and the first weight corresponding to the first label, updating the weight of the full connection layer in the trained label prediction model based on the first weight and the second weight, obtaining a label prediction model to be trained, training the label prediction model to be trained, obtaining an updated label prediction model, and determining the label corresponding to service data for executing preset service. Therefore, the similarity between the newly added tag and the first tag is determined by the first sample and the second sample, so that the similarity between the tags can be constructed through the similarity between the samples, then the weight of the full-connection layer in the trained tag prediction model is updated through the first weight corresponding to the first tag and the second weight of the newly added tag, namely, the data information of the original tag (namely, the first tag) can be fully utilized by the tag prediction model to be trained, the prediction effect of the updated tag prediction model is improved, the main network (namely, the part except the full-connection layer) of the tag prediction model is not required to be trained again, the model training cost is saved, and the model training efficiency is improved.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
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 (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) 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 functionality of the units may be implemented in one or more software and/or hardware when implementing one or more embodiments of the present description.
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, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of 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.
Embodiments of the present description are 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 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 the 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, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of 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.
One or more embodiments of the present specification 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. One or more embodiments of the present description 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 exemplary of the present disclosure and is not intended to limit the disclosure. 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 (12)

1. A data processing method, comprising:
acquiring a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, and determining the similarity between the new label and the first label based on the second sample and the first sample, wherein the first sample and the second sample comprise data generated in a human-computer interaction process;
acquiring a first weight corresponding to the first label, wherein the first weight is a weight of a full-connection layer in a label prediction model after training, which is obtained by training the label prediction model based on the first sample;
determining a second weight corresponding to the newly added tag based on the similarity and a first weight corresponding to the first tag, and updating the weight of the full connection layer in the trained tag prediction model based on the first weight and the second weight to obtain a tag prediction model to be trained;
training the label prediction model to be trained to obtain an updated label prediction model, wherein the updated label prediction model is used for determining a label corresponding to service data for executing preset service.
2. The method of claim 1, wherein the tag corresponding to the service data is used for determining whether there is a risk in executing the preset service.
3. The method of claim 2, the obtaining the new tag, the second sample corresponding to the new tag, the first tag, and the first sample corresponding to the first tag, comprising:
and acquiring the newly added label, a second sample corresponding to the newly added label, a first label and a first sample corresponding to the first label based on a model updating period corresponding to the preset service.
4. The method of claim 3, wherein the plurality of first tags, the determining the second weight corresponding to the new tag based on the similarity and the first weight corresponding to the first tag, comprises:
and determining the similarity between the newly added tag and each first tag and the sum of products of the first weights corresponding to the first tags as a second weight corresponding to the newly added tag.
5. The method of claim 4, the determining a similarity between the newly added tag and the first tag based on the second sample and the first sample comprising:
Obtaining sample similarity between each second sample and each first sample;
and determining the average value of the sample similarity as the similarity between the newly added tag and the first tag.
6. The method of claim 5, the obtaining sample similarity between each of the second samples and each of the first samples comprising:
screening the first samples under the condition that the number of the first samples is larger than a preset sample number threshold value, so as to obtain screened first samples;
and obtaining sample similarity between each second sample and each first sample in the screened first samples.
7. The method of claim 1, the obtaining the new tag, the first tag, comprising:
acquiring the newly added tag and the candidate tag, and carrying out semantic analysis on the newly added tag and the candidate tag to obtain a semantic analysis result;
and determining a first label corresponding to the newly added label in the candidate labels based on the semantic analysis result.
8. The method according to any one of claims 1 or 7, wherein the determining, based on the similarity and the first weight corresponding to the first label, the second weight corresponding to the newly added label, and updating the weight of the full link layer in the trained label prediction model based on the first weight and the second weight, to obtain a label prediction model to be trained, includes:
Determining a target label corresponding to the newly added label in the first label based on the similarity;
and determining a second weight corresponding to the new label based on the similarity between the new label and the target label and a first weight corresponding to the target label, and updating the weight of the full connection layer in the trained label prediction model based on the first weight and the second weight corresponding to the target label to obtain the label prediction model to be trained.
9. The method of claim 1, the training the label prediction model to be trained to obtain an updated label prediction model, comprising:
based on preset service updating requirements, updating a feature extraction layer in the label prediction model to be trained to obtain a label prediction model updated by the feature extraction layer, and training the label prediction model updated by the feature extraction layer to obtain an updated label prediction model, wherein the label prediction model updated by the feature extraction layer at least comprises the feature extraction layer in the label prediction model to be trained.
10. A data processing apparatus comprising:
The sample acquisition module is used for acquiring a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, and determining the similarity between the new label and the first label based on the second sample and the first sample, wherein the first sample and the second sample comprise data generated in a human-computer interaction process;
the weight acquisition module is used for acquiring a first weight corresponding to the first label, wherein the first weight is the weight of a full-connection layer in the label prediction model after training based on the first sample;
the weight determining module is used for determining a second weight corresponding to the newly added tag based on the similarity and a first weight corresponding to the first tag, and updating the weight of the full-connection layer in the trained tag prediction model based on the first weight and the second weight to obtain a tag prediction model to be trained;
the model training module is used for training the label prediction model to be trained to obtain an updated label prediction model, and the updated label prediction model is used for determining a label corresponding to service data for executing preset service.
11. A data processing apparatus, the data processing apparatus comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
acquiring a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, and determining the similarity between the new label and the first label based on the second sample and the first sample, wherein the first sample and the second sample comprise data generated in a human-computer interaction process;
acquiring a first weight corresponding to the first label, wherein the first weight is a weight of a full-connection layer in a label prediction model after training, which is obtained by training the label prediction model based on the first sample;
determining a second weight corresponding to the newly added tag based on the similarity and a first weight corresponding to the first tag, and updating the weight of the full connection layer in the trained tag prediction model based on the first weight and the second weight to obtain a tag prediction model to be trained;
training the label prediction model to be trained to obtain an updated label prediction model, wherein the updated label prediction model is used for determining a label corresponding to service data for executing preset service.
12. A storage medium for storing computer-executable instructions that when executed implement the following:
acquiring a new label, a second sample corresponding to the new label, a first label and a first sample corresponding to the first label, and determining the similarity between the new label and the first label based on the second sample and the first sample, wherein the first sample and the second sample comprise data generated in a human-computer interaction process;
acquiring a first weight corresponding to the first label, wherein the first weight is a weight of a full-connection layer in a label prediction model after training, which is obtained by training the label prediction model based on the first sample;
determining a second weight corresponding to the newly added tag based on the similarity and a first weight corresponding to the first tag, and updating the weight of the full connection layer in the trained tag prediction model based on the first weight and the second weight to obtain a tag prediction model to be trained;
training the label prediction model to be trained to obtain an updated label prediction model, wherein the updated label prediction model is used for determining a label corresponding to service data for executing preset service.
CN202310099699.0A 2023-01-31 2023-01-31 Data processing method, device and equipment Pending CN115994252A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310099699.0A CN115994252A (en) 2023-01-31 2023-01-31 Data processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310099699.0A CN115994252A (en) 2023-01-31 2023-01-31 Data processing method, device and equipment

Publications (1)

Publication Number Publication Date
CN115994252A true CN115994252A (en) 2023-04-21

Family

ID=85990163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310099699.0A Pending CN115994252A (en) 2023-01-31 2023-01-31 Data processing method, device and equipment

Country Status (1)

Country Link
CN (1) CN115994252A (en)

Similar Documents

Publication Publication Date Title
CN112015569B (en) Message reminding processing method and device
CN115618964B (en) Model training method and device, storage medium and electronic equipment
CN115712866B (en) Data processing method, device and equipment
CN114819614A (en) Data processing method, device, system and equipment
CN116049761A (en) Data processing method, device and equipment
CN117828360A (en) Model training method, model training device, model code generating device, storage medium and storage medium
CN116402113B (en) Task execution method and device, storage medium and electronic equipment
CN115221523B (en) Data processing method, device and equipment
CN116522939A (en) Data processing method, device and equipment
CN116188023A (en) Method, device, storage medium and equipment for training risk identification model
CN115204395A (en) Data processing method, device and equipment
CN116308375A (en) Data processing method, device and equipment
CN115994252A (en) Data processing method, device and equipment
CN111242195B (en) Model, insurance wind control model training method and device and electronic equipment
CN110321433B (en) Method and device for determining text category
CN113344197A (en) Training method of recognition model, service execution method and device
CN115017915B (en) Model training and task execution method and device
CN115423485B (en) Data processing method, device and equipment
CN116501852B (en) Controllable dialogue model training method and device, storage medium and electronic equipment
CN116340852B (en) Model training and business wind control method and device
CN112115952B (en) Image classification method, device and medium based on full convolution neural network
CN111104591B (en) Recommendation information generation method and device
CN116701624A (en) Data processing method, device and equipment
CN116861345A (en) Data processing method, device and equipment
CN117992829A (en) Data processing method, device and 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