Data processing method, apparatus and device
By updating the weights of the fully connected layers in the label prediction model and utilizing the similarity and weights between the new label and the first label, the high training cost and low efficiency caused by adding new labels are solved, thus achieving efficient label prediction model updates.
Patent Information
- Application Number
- CN202310099699.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-31
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2043-01-31
AI Technical Summary
Existing label prediction models suffer from high training costs and low efficiency when adding new labels, and they also affect the performance of existing labels, resulting in poor prediction efficiency.
By obtaining the similarity between the new label and the first label, the weights of the fully connected layer of the trained label prediction model are updated using the weights of the first label to obtain the label prediction model to be trained, and then trained to obtain the updated label prediction model.
It improves the training efficiency and prediction performance of the label prediction model, saves model training costs, and eliminates the need to retrain the backbone network of the label prediction model.
Smart Images

Figure CN115994252B_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of data processing technology, and in particular to a data processing method, apparatus and equipment. Background Technology
[0002] With the rapid development of computer technology, enterprises are providing more and more types and quantities of application services to users, resulting in a growing volume of user data. In order to quickly obtain the information needed from user data, label prediction models can be used to classify user data and label it with corresponding tags.
[0003] However, due to the rapid pace of business updates, new labels need to be added, which requires retraining the label prediction model. This results in high training costs, low training efficiency, and impacts the performance of the original labels, leading to poor prediction efficiency of the retrained label prediction model. Therefore, a solution is needed that can improve the training efficiency and prediction performance of the label prediction model when new labels are added. Summary of the Invention
[0004] The purpose of the embodiments in this specification is to provide a data processing method, apparatus, and device to provide a solution that can improve the training efficiency and prediction performance of a label prediction model when new labels are added.
[0005] To achieve the above technical solution, the embodiments in this specification are implemented as follows:
[0006] In a first aspect, a data processing method includes: acquiring a newly added label, a second sample corresponding to the newly added label, a first label, and a first sample corresponding to the first label; determining a similarity between the newly added label and the first label based on the second sample and the first sample, wherein the first sample and the second sample include data generated during human-computer interaction; acquiring a first weight corresponding to the first label, wherein the first weight is the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample; determining a second weight corresponding to the newly added label based on the similarity and the first weight corresponding to the first label; updating the weight of the fully connected 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; and training the label prediction model to be trained to obtain an updated label prediction model, wherein the updated label prediction model is used to determine the label corresponding to business data performing a preset business.
[0007] Secondly, embodiments of this specification provide a data processing apparatus, the apparatus comprising: a sample acquisition module, configured to acquire a newly added label, a second sample corresponding to the newly added label, a first label, and a first sample corresponding to the first label, and determine the similarity between the newly added label and the first label based on the second sample and the first sample, wherein the first sample and the second sample include data generated during human-computer interaction; a weight acquisition module, configured to acquire a first weight corresponding to the first label, wherein the first weight is the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample; a weight determination module, configured to determine a second weight corresponding to the newly added label based on the similarity and the first weight corresponding to the first label, and update the weight of the fully connected 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; and a model training module, configured to train the label prediction model to be trained to obtain an updated label prediction model, wherein the updated label prediction model is used to determine the label corresponding to business data performing a preset business.
[0008] Thirdly, embodiments of this specification provide a data processing device, the data processing device comprising: a processor; and a memory arranged to store computer-executable instructions, wherein when the executable instructions are executed, the processor: acquires a new label, a second sample corresponding to the new label, a first label, and a first sample corresponding to the first label, and determines a 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 include data generated during human-computer interaction; acquires a first weight corresponding to the first label, wherein the first weight is the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample; determines a second weight corresponding to the new label based on the similarity and the first weight corresponding to the first label, and updates the weight of the fully connected 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; trains the label prediction model to be trained to obtain an updated label prediction model, wherein the updated label prediction model is used to determine the label corresponding to business data performing a preset business.
[0009] Fourthly, embodiments of this specification provide a storage medium for storing computer-executable instructions. When executed, the executable instructions implement the following process: 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, wherein the first sample and the second sample include data generated during human-computer interaction; acquiring a first weight corresponding to the first label, wherein the first weight is the weight of the fully connected layer in the trained label prediction model obtained by 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 fully connected 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; training the label prediction model to be trained to obtain an updated label prediction model, wherein the updated label prediction model is used to determine the label corresponding to business data for performing a preset business. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1A This is a flowchart illustrating an embodiment of a data processing method described in this specification;
[0012] Figure 1B This is a schematic diagram of the processing procedure of one data processing method described in this specification;
[0013] Figure 2 This is a schematic diagram of a data processing procedure described in this specification;
[0014] Figure 3 This is a schematic diagram illustrating the processing procedure of another data processing method described in this specification;
[0015] Figure 4 This is a schematic diagram illustrating the processing procedure of another data processing method described in this specification;
[0016] Figure 5 This is a schematic diagram illustrating the processing procedure of another data processing method described in this specification;
[0017] Figure 6 This is a schematic diagram illustrating the processing procedure of another data processing method described in this specification;
[0018] Figure 7 This is a schematic diagram of the structure of an embodiment of a data processing device according to this specification;
[0019] Figure 8 This is a schematic diagram of the structure of a data processing device described in this specification. Detailed Implementation
[0020] This specification provides a data processing method, apparatus, and device through its embodiments.
[0021] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0022] Example 1
[0023] like Figure 1A and 1B As shown in the embodiments of this specification, a data processing method is provided. The execution subject of this method can be a server, which can be a standalone server or a server cluster composed of multiple servers. Specifically, the method may include the following steps:
[0024] In S102, the newly added label, the second sample corresponding to the newly added label, the first label, and the first sample corresponding to the first label are obtained, and the similarity between the newly added label and the first label is determined based on the second sample and the first sample.
[0025] The newly added label and the first label can be labels set for the same preset business. The first label can be a label obtained by classifying the first sample, while the newly added label can be a label obtained through manual annotation. The first and second samples include data generated during human-computer interaction. The first and second samples can include different types of data such as text data, image data, and voice data. The preset business can be any business that requires data classification. For example, the preset business can be a resource transfer business. The labels corresponding to this business (i.e., the newly added label and the first label) can be used to determine whether there is a risk in executing the resource transfer business. Specifically, when a user triggers the execution of a resource transfer business, the business data related to the execution of the resource transfer business (such as resource transfer time, resource transfer quantity, etc.) can be determined as the first sample. The label prediction model is trained using the first sample, and the first label corresponding to the first sample is obtained based on the trained label prediction model. The first label can include high risk and low risk, that is, the first sample can be classified to obtain high-risk and low-risk categories. In the case of upgrading the resource transfer business, a newly added label corresponding to the resource transfer business can be obtained. For example, the newly added label can include medium risk and no risk. The newly added label can be a label obtained through manual annotation of the second sample.
[0026] In practice, with the rapid development of computer technology, enterprises are providing users with an increasing variety and quantity of application services, resulting in a surge in user data. To quickly extract necessary information from user data, label prediction models can be used to classify and tag user data accordingly. However, due to the rapid pace of business updates, new labels need to be added, requiring retraining of the label prediction model. This leads to high training costs, low training efficiency, and negatively impacts the performance of existing labels, resulting in poor prediction efficiency of the retrained model. Therefore, a solution is needed that can improve the training efficiency and prediction performance of the label prediction model when adding new labels. To this end, this specification provides a technical solution that can solve the above problems, as detailed below.
[0027] In practice, the terminal device can acquire data generated by the user during human-computer interaction and send the acquired data as the first sample to the server. After receiving the first sample, the server can train the label prediction model using the first sample to obtain the trained label prediction model and determine the first label corresponding to the first sample using the trained label prediction model.
[0028] The label prediction model can be built based on any machine learning algorithm and is used to classify data to obtain the corresponding labels.
[0029] The server can also receive new tags and second samples corresponding to the new tags. There can be multiple new tags and multiple second samples corresponding to each new tag. This specification does not specify the number of new tags.
[0030] The server can determine the similarity between the new label and the first label based on the first sample and the second sample. There are multiple methods for determining the similarity between the new label and the first label. For example, the server can use a pre-trained feature extraction model to perform feature extraction processing on the first sample and the second sample, and determine the similarity between the features corresponding to the first sample and the features corresponding to the second sample as the similarity between the new label and the first label. Alternatively, if there are multiple first samples and multiple second samples, the server can use a pre-trained feature extraction model to perform feature extraction processing on each first sample and each second sample separately, and determine the similarity between the mean of the features corresponding to each first sample and the mean of the features corresponding to each second sample as the similarity between the new label and the first label. In addition, there are many other different methods, which may vary depending on the actual application scenario. This specification does not limit the specific methods used in this embodiment.
[0031] In S104, obtain the first weight corresponding to the first label.
[0032] The first weight is the weight of the fully connected layer in the trained label prediction model, which is obtained by training the label prediction model based on the first sample. The label prediction model can include a feature extraction layer and a fully connected layer. Each node of the fully connected layer is connected to all nodes of the previous layer, which is used to combine the features extracted by the feature extraction layer. That is, the fully connected layer can use a linear transformation to map the features to the label space.
[0033] In implementation, the server can input the first sample into the label prediction model, perform feature extraction processing on the first sample through the feature extraction layer of the label prediction model, and input the extracted features into the fully connected layer to obtain a vector containing each feature and its corresponding weight. The first label corresponding to the first sample can be determined through this vector, and the weight corresponding to the feature is the first weight corresponding to the first label.
[0034] For example, such as Figure 2As shown, the first sample includes sample x1, sample x2, and sample x3. The features extracted by the feature extraction layer are F1 corresponding to sample 1, F2 corresponding to sample 2, and F3 corresponding to sample 3. The vector output by the fully connected layer is [w1*F1, w2*F2, w3*F3]. The first label obtained based on this vector is the first label y1 corresponding to F1, the first label y2 corresponding to F2, and the first label y3 corresponding to F3. The first weights corresponding to the first labels include the weight w1 corresponding to the first label y1, the weight w2 corresponding to the first label y2, and the weight w3 corresponding to the first label y3.
[0035] In S106, based on the similarity and the first weight corresponding to the first label, the second weight corresponding to the new label is determined, and based on the first weight and the second weight, the weights of the fully connected layer in the trained label prediction model are updated to obtain the label prediction model to be trained.
[0036] In practice, the average of the product of similarity and the first weight corresponding to the first label can be determined as the second weight corresponding to the new label. For example, assuming that the similarity between the new label and the first label 1 is sk1, the similarity between the new label and the first label 2 is sk2, the first weight 1 corresponding to the first label 1 is w1, and the first weight 2 corresponding to the first label 2 is w2, then the second weight corresponding to the new label can be (sk1*w1+sk2*w2) / 2.
[0037] Furthermore, the method for determining the second weight mentioned above is an optional and implementable method. In practical application scenarios, there can be a variety of different methods, which may vary depending on the specific application scenario. This specification does not specifically limit the methods used in this embodiment.
[0038] Assuming the first samples include samples x1, x2, and x3, and the first weights corresponding to the first samples can include the weight w1 corresponding to the first label y1, the weight w2 corresponding to the first label y2, and the weight w3 corresponding to the first label y3, then the weights of the fully connected layer in the trained label prediction model can be [w1, w2, w3]. Assuming the second weight corresponding to the newly added label is wn, based on the first and second weights, the weights of the fully connected layer in the trained label prediction model are updated, resulting in the weights of the fully connected layer of the label prediction model to be trained being [w1, w2, w3, wn]. There can be multiple newly added labels and multiple first samples. Therefore, the weights of the fully connected layer of the label prediction model to be trained can be [w1, w2, w3, ..., wk, wk+1, wk+n], where w1 to wk can be k first samples, and wk+1 to wk+n can be n newly added samples, where n and k are positive integers.
[0039] In S108, the label prediction model to be trained is trained to obtain an updated label prediction model. The updated label prediction model is used to determine the label corresponding to the business data that performs the preset business.
[0040] In implementation, the label prediction model to be trained can be trained using the first and second samples, or the first and second samples can be filtered and trained based on the filtered first and second samples. Alternatively, a third sample corresponding to the newly added label and a fourth sample corresponding to the first label can be obtained, and the updated label prediction model can be obtained by training the label prediction model to be trained using the third and fourth samples. The training data of the label prediction model to be trained in this specification embodiment is not specifically limited.
[0041] After obtaining the updated label prediction model, the server can determine the labels corresponding to the business data for executing the preset business. The labels corresponding to the business data can be used to determine the corresponding business processing strategy. For example, taking the task allocation business of the intelligent question-and-answer system as an example, the terminal device can obtain the user's feedback data on the intelligent dialogue, and input the feedback data and intelligent dialogue as business data into the updated label prediction model to obtain the label corresponding to the business data. The corresponding business processing strategy can then be determined through the label, and the business can be processed according to the determined business processing strategy.
[0042] For example, assuming the current intelligent question-and-answer system is an after-sales system, the terminal device can output intelligent dialogue 1 on the question-and-answer page. For instance, the intelligent dialogue could be "What is your question?". The terminal device can obtain user feedback data on this intelligent dialogue input. The terminal device can then send the user feedback data and the intelligent dialogue as business data to the server. The server can input the received business data into an updated tag prediction model to obtain the tag corresponding to the business data. Then, through the preset correspondence between tags and business processing strategies, it determines the business processing strategy corresponding to that tag. For example, the business processing strategy corresponding to that tag could be to transfer to human processing. The server can then return this business processing strategy to the terminal device, which can then transfer the intelligent question-and-answer system to human processing based on this strategy.
[0043] In addition, the tags corresponding to business data can also be used for information recommendation, user classification and other processing. The embodiments in this specification do not specifically limit the use of the tags corresponding to business data.
[0044] This specification provides a data processing method that obtains a new label, a second sample corresponding to the new label, a first label, and a first sample corresponding to the first label. Based on the second sample and the first sample, the similarity between the new label and the first label is determined. The first sample and the second sample include data generated during human-computer interaction. A first weight corresponding to the first label is obtained. The first weight is the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample. Based on the similarity and the first weight corresponding to the first label, a second weight corresponding to the new label is determined. Based on the first weight and the second weight, the weight of the fully connected layer in the trained label prediction model is updated to obtain a label prediction model to be trained. The label prediction model to be trained is trained to obtain an updated label prediction model. The updated label prediction model is used to determine the label corresponding to the business data of the preset business. In this way, since the similarity between the new label and the first label is determined by the first sample and the second sample, the similarity relationship between labels can be constructed through the similarity relationship between samples. Then, the weights of the fully connected layer in the trained label prediction model are updated through the first weight corresponding to the first label and the second weight of the new label. That is, the label prediction model to be trained can make full use of the data information of the original label (i.e., the first label) through the first weight corresponding to the first label, thereby improving the prediction effect of the updated label prediction model. Moreover, it is not necessary to retrain the backbone network of the label prediction model (i.e., the part other than the fully connected layer), saving model training costs and improving model training efficiency.
[0045] Example 2
[0046] This specification provides a data processing method, the execution subject of which can be a server. The server can be a standalone server or a server cluster composed of multiple servers. Specifically, the method may include the following steps:
[0047] In S302, based on the model update cycle corresponding to the preset business, the newly added label, the second sample corresponding to the newly added label, the first label, and the first sample corresponding to the first label are obtained.
[0048] The model update cycle for the preset business can be one week, one month, three months, etc., and different model update cycles can be set according to different preset businesses.
[0049] In implementation, due to differences in data processing volume and upgrade frequency among different services, the tag addition frequency varies. Therefore, different model update cycles can be set for different preset services. For example, because the upgrade frequency of resource transfer services is low, the tag addition frequency is also low, while because the upgrade frequency of information recommendation services is high, the tag addition frequency is also high. Correspondingly, the model update cycle for resource transfer services can be longer than that for information recommendation services. For example, the model update cycle for resource transfer services can be three months, and the model update cycle for information recommendation services can be half a month. That is, when the preset service is resource transfer services, the server can update the tag prediction model every three months, and when the preset service is information recommendation services, the server can update the tag prediction model every half month.
[0050] like Figure 3 As shown, 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 can be determined based on the first sample and the second sample. That is, after S302, S308 can be executed.
[0051] In S304, the newly added tags and candidate tags are obtained, and semantic analysis is performed on the newly added tags and candidate tags to obtain the semantic analysis results.
[0052] Among them, the candidate tags can be tags that correspond to the preset business.
[0053] In practice, when the newly added tags and candidate tags are not 0-1 tags (i.e., the newly added tags and candidate tags are tags with semantic meaning), semantic analysis can be performed on the newly added tags and candidate tags based on a preset semantic analysis algorithm to obtain the semantic analysis results.
[0054] In S306, based on the semantic analysis results, the first label corresponding to the newly added label is determined from the candidate labels, and the second sample corresponding to the newly added label and the first sample corresponding to the first label are obtained.
[0055] In implementation, the semantic similarity between the new tag and each candidate tag can be obtained based on the semantic analysis results. The candidate tags can then be filtered based on the semantic similarity to obtain the first tag that corresponds to the new tag. This filtering process can improve the efficiency of subsequent data processing.
[0056] The method for determining the first label described above is an optional and implementable method. In actual application scenarios, there can be a variety of different methods, which may vary depending on the actual application scenario. This specification does not specifically limit the methods used in this embodiment.
[0057] like Figure 4 As shown, 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 can be determined based on the first sample and the second sample. That is, after S306, S308 can be executed.
[0058] In S308, the sample similarity between each second sample and each first sample is obtained.
[0059] In implementation, the sample similarity between each second sample and each first sample can be determined based on a preset similarity algorithm. For example, assuming the first and second samples are image data, image feature extraction processing can be performed on each first and second sample based on a preset feature extraction algorithm. The similarity between the image features corresponding to each first sample and the image features corresponding to each second sample can be determined as the sample similarity between each first sample and each second sample. Alternatively, assuming the first and second samples are text data, the sample similarity between each second sample and each first sample can be determined using a preset text similarity algorithm.
[0060] Since the first sample is a historical sample obtained for a preset business, the number of samples may be large. Therefore, to improve data processing efficiency, an optional implementation method is provided below, which can be found in steps one and two below:
[0061] Step 1: If the number of first samples is greater than the preset sample number threshold, the first samples are filtered to obtain the filtered first samples.
[0062] The preset sample size threshold can be determined based on the data processing requirements of the preset business. For example, if the preset business has high requirements for data processing accuracy and low requirements for data processing efficiency, the preset sample size threshold can be larger; if the preset business has low requirements for data processing accuracy and high requirements for data processing efficiency, the preset sample size threshold can be smaller. Specifically, if the preset business has high requirements for data processing accuracy and low requirements for data processing efficiency, the preset sample size threshold can be 1,000; if the preset business has low requirements for data processing accuracy, the preset sample size threshold can be 100. That is, for preset businesses with high requirements for data processing accuracy and low requirements for data processing efficiency, if the number of the first sample is no more than 1,000, the first sample will not be filtered, so that subsequent data processing can proceed with the larger number of first samples to improve data processing accuracy. Conversely, for preset businesses with low requirements for data processing accuracy and high requirements for data processing efficiency, if the number of the first sample is greater than 100, the first sample will be filtered to improve the efficiency of subsequent data processing.
[0063] In practice, there are various methods for screening the first sample. For example, a preset number of first samples can be randomly selected from the first samples using a random algorithm as the first sample after screening. Alternatively, the first sample can be screened based on the acquisition time of the first sample. Different screening methods can be selected according to different actual application scenarios. This specification does not specifically limit the methods used in this embodiment.
[0064] Step 2: Obtain the sample similarity between each second sample and each first sample in the filtered first samples.
[0065] In practice, if the number of second samples is also greater than the preset sample number threshold, the second samples can be filtered, and the sample similarity between each filtered second sample and each first sample in the filtered first sample can be obtained.
[0066] In S310, the average sample similarity is determined as the similarity between the new label and the first label.
[0067] In S104, obtain the first weight corresponding to the first label.
[0068] The first weight can be the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample.
[0069] In S312, the sum of the products of the similarity between the new label and each first label and the first weight corresponding to the first label is determined as the second weight corresponding to the new label.
[0070] In implementation, the similarity between the new tag and each first tag, and the first weight corresponding to the first tag, can be substituted into the formula.
[0071] wk = sum(ski*wi)
[0072] The second weight corresponding to the newly added label is obtained, where wk is the second weight corresponding to the newly added label, ski is the similarity between the newly added label and the i-th first label, wi is the first weight corresponding to the i-th first label, and sum() is the summation function.
[0073] Furthermore, when there are multiple new tags, the sum of the products of the similarity between each new tag and each first tag and the first weight corresponding to the first tag can be used to determine the weight corresponding to each new tag. After initializing the weights corresponding to these multiple new tags, the second weight corresponding to each new tag can be obtained.
[0074] In addition, after initialization, the second weight corresponding to each newly added label can meet the preset initialization conditions to satisfy the needs of subsequent data processing.
[0075] In S106, the weights of the fully connected layers in the trained label prediction model are updated based on the first and second weights to obtain the label prediction model to be trained.
[0076] In S314, based on the preset business update requirements, the feature extraction layer in the label prediction model to be trained is updated to obtain the label prediction model with updated feature extraction layer. The updated label prediction model is then trained to obtain the updated label prediction model.
[0077] The updated label prediction model includes at least the feature extraction layer from the label prediction model to be trained. The updated label prediction model can be used to determine the label corresponding to the business data for performing the preset business. The label corresponding to the business data can be used to determine whether there is a risk in performing the preset business.
[0078] In practice, since the business upgrade frequency of the preset business is relatively fast and the amount of business data to be processed is growing rapidly, the model size of the label prediction model corresponding to the preset business can be updated. That is, based on the update requirements of the preset business, the feature extraction layer in the label prediction model to be trained can be updated to obtain the label prediction model after the feature extraction layer is updated.
[0079] For example, suppose the label prediction model to be trained can contain 3 feature extraction layers. The updated label prediction model can contain 5 feature extraction layers. That is, based on the original 3 feature extraction layers, 2 new feature extraction layers can be added. In other words, the updated label prediction model includes at least the feature extraction layers in the label prediction model to be trained.
[0080] The updated label prediction model can be used to determine the labels corresponding to the business data for executing a preset service. These labels can then be used to determine whether there is a risk in executing the preset service. For example, assuming the preset service is a resource transfer service, the labels corresponding to the business data for this service can include high risk and no risk. The terminal device can obtain the business data corresponding to the resource transfer service. This data can include user identifier, service identifier, resource transfer time, resource transfer quantity, etc. The server can input the received business data into the updated label prediction model to obtain the labels corresponding to the business data. Based on these labels, the server determines whether there is a risk in executing the resource transfer service. If the label is high risk, the server can suspend the execution of the resource transfer service and return a preset alarm message to the terminal device. If the label is no risk, the server can continue to execute the resource transfer service and return the execution result to the terminal device.
[0081] This specification provides a data processing method that obtains a new label, a second sample corresponding to the new label, a first label, and a first sample corresponding to the first label. Based on the second sample and the first sample, the similarity between the new label and the first label is determined. The first sample and the second sample include data generated during human-computer interaction. A first weight corresponding to the first label is obtained. The first weight is the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample. Based on the similarity and the first weight corresponding to the first label, a second weight corresponding to the new label is determined. Based on the first weight and the second weight, the weight of the fully connected layer in the trained label prediction model is updated to obtain a label prediction model to be trained. The label prediction model to be trained is trained to obtain an updated label prediction model. The updated label prediction model is used to determine the label corresponding to the business data of the preset business. In this way, since the similarity between the new label and the first label is determined by the first sample and the second sample, the similarity relationship between labels can be constructed through the similarity relationship between samples. Then, the weights of the fully connected layer in the trained label prediction model are updated through the first weight corresponding to the first label and the second weight of the new label. That is, the label prediction model to be trained can make full use of the data information of the original label (i.e., the first label) through the first weight corresponding to the first label, thereby improving the prediction effect of the updated label prediction model. Moreover, it is not necessary to retrain the backbone network of the label prediction model (i.e., the part other than the fully connected layer), saving model training costs and improving model training efficiency.
[0082] Example 3
[0083] This specification provides a data processing method, the execution subject of which can be a server. The server can be a standalone server or a server cluster composed of multiple servers. Specifically, the method may include the following steps:
[0084] In S302, based on the model update cycle corresponding to the preset business, the newly added label, the second sample corresponding to the newly added label, the first label, and the first sample corresponding to the first label are obtained.
[0085] The model update cycle for the preset business can be one week, one month, three months, etc., and different model update cycles can be set according to different preset businesses.
[0086] like Figure 5 As shown, 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 can be determined based on the first sample and the second sample. That is, after S302, S308 can be executed.
[0087] In S304, the newly added tags and candidate tags are obtained, and semantic analysis is performed on the newly added tags and candidate tags to obtain the semantic analysis results.
[0088] Among them, the candidate tags can be tags that correspond to the preset business.
[0089] In S306, based on the semantic analysis results, the first label corresponding to the newly added label is determined from the candidate labels, and the second sample corresponding to the newly added label and the first sample corresponding to the first label are obtained.
[0090] like Figure 6 As shown, 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 can be determined based on the first sample and the second sample. That is, after S306, S308 can be executed.
[0091] In S308, the sample similarity between each second sample and each first sample is obtained.
[0092] In S310, the average sample similarity is determined as the similarity between the new label and the first label.
[0093] In S104, obtain the first weight corresponding to the first label.
[0094] The first weight can be the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample.
[0095] In S316, the target label corresponding to the newly added label in the first label is determined based on similarity.
[0096] In practice, since the number of first tags may be large, in order to improve the efficiency of subsequent data processing, the first tags can be filtered. That is, the first tags can be filtered by the similarity between each first tag and the new tag, and the filtered first tags are determined as the target tags corresponding to the new tags.
[0097] In S318, based on the similarity between the new label and the target label, and the first weight corresponding to the target label, the second weight corresponding to the new label is determined. Based on the first and second weights corresponding to the target label, the weights of the fully connected layers in the trained label prediction model are updated to obtain the label prediction model to be trained.
[0098] In practice, the similarity between the new label and each target label can be obtained, and the product of the similarity with the first weight corresponding to the target label can be obtained. The sum of the products is then initialized to obtain the second weight corresponding to the new label.
[0099] In S314, based on the preset business update requirements, the feature extraction layer in the label prediction model to be trained is updated to obtain the label prediction model with updated feature extraction layer. The updated label prediction model is then trained to obtain the updated label prediction model.
[0100] In practice, since the first weight corresponding to the first sample is a circle obtained by training the label prediction model with the first sample, the weights of the fully connected layer in the label prediction model can be initialized with the first weight to retain the data information of the first sample in the label prediction model.
[0101] Based on the above method, empirical analysis shows that compared with the method of starting training from fully random initialization of the weights of the fully connected layer, the training speed is improved by 2 percentage points and the convergence speed is improved by 10%. It can be seen that the method of starting training from fully random initialization of the weights of the fully connected layer is not suitable for scenarios where training is continued on a model with some parameters that have already been trained, and it cannot retain the data information of the original samples.
[0102] This specification provides a data processing method that obtains a new label, a second sample corresponding to the new label, a first label, and a first sample corresponding to the first label. Based on the second sample and the first sample, the similarity between the new label and the first label is determined. The first sample and the second sample include data generated during human-computer interaction. A first weight corresponding to the first label is obtained. The first weight is the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample. Based on the similarity and the first weight corresponding to the first label, a second weight corresponding to the new label is determined. Based on the first weight and the second weight, the weight of the fully connected layer in the trained label prediction model is updated to obtain a label prediction model to be trained. The label prediction model to be trained is trained to obtain an updated label prediction model. The updated label prediction model is used to determine the label corresponding to the business data of the preset business. In this way, since the similarity between the new label and the first label is determined by the first sample and the second sample, the similarity relationship between labels can be constructed through the similarity relationship between samples. Then, the weights of the fully connected layer in the trained label prediction model are updated through the first weight corresponding to the first label and the second weight of the new label. That is, the label prediction model to be trained can make full use of the data information of the original label (i.e., the first label) through the first weight corresponding to the first label, thereby improving the prediction effect of the updated label prediction model. Moreover, it is not necessary to retrain the backbone network of the label prediction model (i.e., the part other than the fully connected layer), saving model training costs and improving model training efficiency.
[0103] Example 4
[0104] The above describes the data processing method provided in the embodiments of this specification. Based on the same idea, the embodiments of this specification also provide a data processing device, such as... Figure 7 As shown.
[0105] The data processing device includes: a sample acquisition module 701, a weight acquisition module 702, a weight determination module 703, and a model training module 704, wherein:
[0106] The sample acquisition module 701 is used to acquire a new label, a second sample corresponding to the new label, a first label, and a first sample corresponding to the first label, and to determine 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 include data generated during human-computer interaction.
[0107] The weight acquisition module 702 is used to acquire the first weight corresponding to the first label. The first weight is the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample.
[0108] The weight determination module 703 is used to determine the second weight corresponding to the newly added label based on the similarity and the first weight corresponding to the first label, and update the weight of the fully connected layer in the trained label prediction model based on the first weight and the second weight to obtain the label prediction model to be trained.
[0109] The model training module 704 is used to train the label prediction model to be trained to obtain an updated label prediction model, which is used to determine the label corresponding to the business data of the preset business.
[0110] In the embodiments described in this specification, the tags corresponding to the business data are used to determine whether there is a risk in executing the preset business.
[0111] In this embodiment of the specification, the sample acquisition module 701 is used for:
[0112] Based on the model update cycle corresponding to the preset business, obtain the newly added label, the second sample corresponding to the newly added label, the first label, and the first sample corresponding to the first label.
[0113] In this embodiment of the specification, there are multiple first tags, and the weight determination module 703 is used for:
[0114] Obtain the similarity between the newly added label and each of the first labels, multiply it by the first weight corresponding to the first label, and initialize the sum of the products to obtain the second weight corresponding to the newly added label.
[0115] In this embodiment of the specification, the sample acquisition module 701 is used for:
[0116] Obtain the sample similarity between each second sample and each first sample;
[0117] The average value of the sample similarities is determined as the similarity between the new label and the first label.
[0118] In this embodiment of the specification, the sample acquisition module 701 is used for:
[0119] If the number of the first samples is greater than a preset sample number threshold, the first samples are filtered to obtain the filtered first samples.
[0120] Obtain the sample similarity between each of the second samples and each of the first samples in the filtered first samples.
[0121] In this embodiment of the specification, the sample acquisition module 701 is used for:
[0122] The newly added tags and candidate tags are obtained, and semantic analysis is performed on the newly added tags and candidate tags to obtain semantic analysis results;
[0123] Based on the semantic analysis results, a first tag corresponding to the newly added tag is determined from the candidate tags.
[0124] In the embodiments of this specification, the weight determination module 703 is used for:
[0125] Based on the similarity, determine the target tag in the first tag that corresponds to the newly added tag;
[0126] Based on the similarity between the newly added label and the target label, and the first weight corresponding to the target label, the second weight corresponding to the newly added label is determined. Based on the first weight and the second weight corresponding to the target label, the weights of the fully connected layer in the trained label prediction model are updated to obtain the label prediction model to be trained.
[0127] In the embodiments described in this specification, the model training module 704 is used for:
[0128] Based on preset business update requirements, the feature extraction layer in the label prediction model to be trained is updated to obtain a label prediction model with updated feature extraction layer. The updated label prediction model is then trained to obtain the updated label prediction model. The updated label prediction model includes at least the feature extraction layer in the label prediction model to be trained.
[0129] This specification provides a data processing apparatus that acquires a 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 the second sample and the first sample, it determines the similarity between the newly added label and the first label. The first and second samples include data generated during human-computer interaction. It acquires a first weight corresponding to the first label, which is the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample. Based on the similarity and the first weight corresponding to the first label, it determines a second weight corresponding to the newly added label. Based on the first and second weights, it updates the weight of the fully connected layer in the trained label prediction model to obtain a label prediction model to be trained. It trains the label prediction model to be trained to obtain an updated label prediction model. The updated label prediction model is used to determine the label corresponding to the business data of the preset business. In this way, since the similarity between the new label and the first label is determined by the first sample and the second sample, the similarity relationship between labels can be constructed through the similarity relationship between samples. Then, the weights of the fully connected layer in the trained label prediction model are updated through the first weight corresponding to the first label and the second weight of the new label. That is, the label prediction model to be trained can make full use of the data information of the original label (i.e., the first label) through the first weight corresponding to the first label, thereby improving the prediction effect of the updated label prediction model. Moreover, it is not necessary to retrain the backbone network of the label prediction model (i.e., the part other than the fully connected layer), saving model training costs and improving model training efficiency.
[0130] Example 5
[0131] Following the same line of thought, embodiments of this specification also provide a data processing device, such as... Figure 8 As shown.
[0132] Data processing devices can vary considerably due to differences in configuration or performance. They may include one or more processors 801 and memory 802, with memory 802 storing one or more application programs or data. Memory 802 can be temporary or persistent storage. The application programs stored in memory 802 may include one or more modules (not shown), each module including a series of computer-executable instructions for the data processing device. Furthermore, processor 801 may be configured to communicate with memory 802 and execute the series of computer-executable instructions stored in memory 802 on the data processing device. 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.
[0133] Specifically, in this embodiment, the data processing device includes a memory and one or more programs, wherein one or more programs are stored in the memory, and 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 device, and is configured to be executed by one or more processors. The one or more programs include computer-executable instructions for performing the following:
[0134] The process involves 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. The first sample and the second sample include data generated during human-computer interaction.
[0135] Obtain the first weight corresponding to the first label. The first weight is the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample.
[0136] Based on the similarity and the first weight corresponding to the first label, the second weight corresponding to the newly added label is determined, and based on the first weight and the second weight, the weights of the fully connected layer in the trained label prediction model are updated to obtain the label prediction model to be trained.
[0137] The label prediction model to be trained is trained to obtain an updated label prediction model, which is used to determine the label corresponding to the business data that performs the preset business.
[0138] Optionally, the tags corresponding to the business data are used to determine whether there is a risk in executing the preset business.
[0139] Optionally, obtaining the newly added label, the second sample corresponding to the newly added label, the first label, and the first sample corresponding to the first label includes:
[0140] Based on the model update cycle corresponding to the preset business, obtain the newly added label, the second sample corresponding to the newly added label, the first label, and the first sample corresponding to the first label.
[0141] Optionally, there are multiple first tags, and determining the second weight corresponding to the newly added tag based on the similarity and the first weight corresponding to the first tag includes:
[0142] Obtain the similarity between the newly added label and each of the first labels, multiply it by the first weight corresponding to the first label, and initialize the sum of the products to obtain the second weight corresponding to the newly added label.
[0143] Optionally, determining the similarity between the newly added label and the first label based on the second sample and the first sample includes:
[0144] Obtain the sample similarity between each second sample and each first sample;
[0145] The average value of the sample similarities is determined as the similarity between the new label and the first label.
[0146] Optionally, obtaining the sample similarity between each second sample and each first sample includes:
[0147] If the number of the first samples is greater than a preset sample number threshold, the first samples are filtered to obtain the filtered first samples.
[0148] Obtain the sample similarity between each of the second samples and each of the first samples in the filtered first samples.
[0149] Optionally, obtaining the new tag and the first tag includes:
[0150] The newly added tags and candidate tags are obtained, and semantic analysis is performed on the newly added tags and candidate tags to obtain semantic analysis results;
[0151] Based on the semantic analysis results, a first tag corresponding to the newly added tag is determined from the candidate tags.
[0152] Optionally, determining the second weight corresponding to the newly added label based on the similarity and the first weight corresponding to the first label, and updating the weights of the fully connected layer in the trained label prediction model based on the first weight and the second weight to obtain the label prediction model to be trained, includes:
[0153] Based on the similarity, determine the target tag in the first tag that corresponds to the newly added tag;
[0154] Based on the similarity between the newly added label and the target label, and the first weight corresponding to the target label, the second weight corresponding to the newly added label is determined. Based on the first weight and the second weight corresponding to the target label, the weights of the fully connected layer in the trained label prediction model are updated to obtain the label prediction model to be trained.
[0155] Optionally, training the label prediction model to be trained to obtain an updated label prediction model includes:
[0156] Based on preset business update requirements, the feature extraction layer in the label prediction model to be trained is updated to obtain a label prediction model with updated feature extraction layer. The updated label prediction model is then trained to obtain the updated label prediction model. The updated label prediction model includes at least the feature extraction layer in the label prediction model to be trained.
[0157] This specification provides a data processing device that acquires a 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 the second sample and the first sample, it determines the similarity between the newly added label and the first label. The first and second samples include data generated during human-computer interaction. It acquires a first weight corresponding to the first label, which is the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample. Based on the similarity and the first weight corresponding to the first label, it determines a second weight corresponding to the newly added label. Based on the first and second weights, it updates the weight of the fully connected layer in the trained label prediction model to obtain a label prediction model to be trained. It trains the label prediction model to be trained to obtain an updated label prediction model. The updated label prediction model is used to determine the label corresponding to the business data of the preset business. In this way, since the similarity between the new label and the first label is determined by the first sample and the second sample, the similarity relationship between labels can be constructed through the similarity relationship between samples. Then, the weights of the fully connected layer in the trained label prediction model are updated through the first weight corresponding to the first label and the second weight of the new label. That is, the label prediction model to be trained can make full use of the data information of the original label (i.e., the first label) through the first weight corresponding to the first label, thereby improving the prediction effect of the updated label prediction model. Moreover, it is not necessary to retrain the backbone network of the label prediction model (i.e., the part other than the fully connected layer), saving model training costs and improving model training efficiency.
[0158] Example 6
[0159] This specification also provides a computer-readable storage medium storing a computer program. When executed by a processor, this computer program implements the various processes of the above-described data processing method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may include, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0160] This specification provides a computer-readable storage medium that acquires a newly added tag, a second sample corresponding to the newly added tag, a first tag, and a first sample corresponding to the first tag. Based on the second sample and the first sample, it determines the similarity between the newly added tag and the first tag. The first and second samples include data generated during human-computer interaction. It acquires a first weight corresponding to the first tag, which is the weight of the fully connected layer in the trained tag prediction model obtained by training the tag prediction model based on the first sample. Based on the similarity and the first weight corresponding to the first tag, it determines a second weight corresponding to the newly added tag. Based on the first and second weights, it updates the weight of the fully connected layer in the trained tag prediction model to obtain a tag prediction model to be trained. It trains the tag prediction model to be trained to obtain an updated tag prediction model. The updated tag prediction model is used to determine the tag corresponding to the business data of the preset business. In this way, since the similarity between the new label and the first label is determined by the first sample and the second sample, the similarity relationship between labels can be constructed through the similarity relationship between samples. Then, the weights of the fully connected layer in the trained label prediction model are updated through the first weight corresponding to the first label and the second weight of the new label. That is, the label prediction model to be trained can make full use of the data information of the original label (i.e., the first label) through the first weight corresponding to the first label, thereby improving the prediction effect of the updated label prediction model. Moreover, it is not necessary to retrain the backbone network of the label prediction model (i.e., the part other than the fully connected layer), saving model training costs and improving model training efficiency.
[0161] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0162] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using a hardware physical module. For example, a Programmable Logic Device (PLD) (e.g., a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program a digital system themselves to "integrate" it onto a PLD, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, 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, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0163] The controller can be implemented in any suitable manner. For example, it can take the form of 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 (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, ASICs, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0164] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0165] For ease of description, the above apparatus is described by dividing it into various functional units. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in one or more software and / or hardware.
[0166] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0167] The embodiments described herein are illustrated with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can 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 one or more flowchart illustrations and / or one or more block diagrams.
[0168] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0169] 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 one or more flowcharts and / or one or more block diagrams.
[0170] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0171] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0172] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0173] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0174] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0175] One or more embodiments of this specification can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a particular task or implement a particular abstract data type. One or more embodiments of this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0176] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0177] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.
Claims
1. A data processing method, comprising: The process involves 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. The first sample and the second sample include data generated during human-computer interaction. Obtain the first weight corresponding to the first label. The first weight is the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample. Based on the similarity and the first weight corresponding to the first label, the second weight corresponding to the newly added label is determined, and based on the first weight and the second weight, the weights of the fully connected layer in the trained label prediction model are updated to obtain the label prediction model to be trained. The label prediction model to be trained is trained to obtain an updated label prediction model, which is used to determine the label corresponding to the business data that performs the preset business.
2. The method according to claim 1, wherein the tag corresponding to the business data is used to determine whether there is a risk in executing the preset business.
3. The method according to claim 2, wherein obtaining the newly added tag, the second sample corresponding to the newly added tag, the first tag, and the first sample corresponding to the first tag includes: Based on the model update cycle corresponding to the preset business, obtain the newly added label, the second sample corresponding to the newly added label, the first label, and the first sample corresponding to the first label.
4. The method according to claim 3, wherein there are multiple first tags, and determining the second weight corresponding to the newly added tag based on the similarity and the first weight corresponding to the first tag includes: The sum of the products of the similarity between the newly added label and each of the first labels and the first weight corresponding to the first label is determined as the second weight corresponding to the newly added label.
5. The method according to claim 4, wherein determining the similarity between the newly added tag and the first tag based on the second sample and the first sample comprises: Obtain the sample similarity between each second sample and each first sample; The average value of the sample similarities is determined as the similarity between the new label and the first label.
6. The method according to claim 5, wherein obtaining the sample similarity between each second sample and each first sample comprises: If the number of the first samples is greater than a preset sample number threshold, the first samples are filtered to obtain the filtered first samples. Obtain the sample similarity between each of the second samples and each of the first samples in the filtered first samples.
7. The method according to claim 1, wherein obtaining the new tag and the first tag includes: The newly added tags and candidate tags are obtained, and semantic analysis is performed on the newly added tags and candidate tags to obtain semantic analysis results; Based on the semantic analysis results, a first tag corresponding to the newly added tag is determined from the candidate tags.
8. The method according to any one of claims 1 or 7, wherein determining the second weight corresponding to the newly added label based on the similarity and the first weight corresponding to the first label, and updating the weights of the fully connected layer in the trained label prediction model based on the first weight and the second weight to obtain the label prediction model to be trained, comprises: Based on the similarity, determine the target tag in the first tag that corresponds to the newly added tag; Based on the similarity between the newly added label and the target label, and the first weight corresponding to the target label, the second weight corresponding to the newly added label is determined. Based on the first weight and the second weight corresponding to the target label, the weights of the fully connected layer in the trained label prediction model are updated to obtain the label prediction model to be trained.
9. The method according to claim 1, wherein training the label prediction model to be trained to obtain an updated label prediction model comprises: Based on preset business update requirements, the feature extraction layer in the label prediction model to be trained is updated to obtain a label prediction model with updated feature extraction layer. The updated label prediction model is then trained to obtain the updated label prediction model. The updated label prediction model includes at least the feature extraction layer in the label prediction model to be trained.
10. A data processing apparatus, comprising: The sample acquisition module is used to acquire a new label, a second sample corresponding to the new label, a first label, and a first sample corresponding to the first label, and to determine 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 include data generated during human-computer interaction. The weight acquisition module is used to acquire the first weight corresponding to the first label. The first weight is the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample. The weight determination module is used to determine the second weight corresponding to the newly added label based on the similarity and the first weight corresponding to the first label, and update the weights of the fully connected layer in the trained label prediction model based on the first weight and the second weight to obtain the label prediction model to be trained. The model training module is used to train the label prediction model to be trained to obtain an updated label prediction model. The updated label prediction model is used to determine the labels corresponding to the business data that perform the preset business.
11. A data processing apparatus, the data processing apparatus comprising: processor; as well as A memory configured to store computer-executable instructions, which, when executed, cause the processor to: The process involves 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. The first sample and the second sample include data generated during human-computer interaction. Obtain the first weight corresponding to the first label. The first weight is the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample. Based on the similarity and the first weight corresponding to the first label, the second weight corresponding to the newly added label is determined, and based on the first weight and the second weight, the weights of the fully connected layer in the trained label prediction model are updated to obtain the label prediction model to be trained. The label prediction model to be trained is trained to obtain an updated label prediction model, which is used to determine the label corresponding to the business data that performs the preset business.
12. A storage medium for storing computer-executable instructions, which, when executed, perform the following process: The process involves 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. The first sample and the second sample include data generated during human-computer interaction. Obtain the first weight corresponding to the first label. The first weight is the weight of the fully connected layer in the trained label prediction model obtained by training the label prediction model based on the first sample. Based on the similarity and the first weight corresponding to the first label, the second weight corresponding to the newly added label is determined, and based on the first weight and the second weight, the weights of the fully connected layer in the trained label prediction model are updated to obtain the label prediction model to be trained. The label prediction model to be trained is trained to obtain an updated label prediction model, which is used to determine the label corresponding to the business data that performs the preset business.
Citation Information
Patent Citations
Label classification processing method and device
CN113761291A
Risk identification model training method and device, equipment and storage medium
CN115600106A