Account classification method and device, storage medium and electronic equipment

By employing a secure gradient boosting algorithm within a federated learning framework, and utilizing encrypted gradient parameter aggregation to train an account classification model, the problem of low classification accuracy caused by data silos is solved. This achieves privacy and security in model training, efficient updates, and improved classification accuracy.

CN120995189APending Publication Date: 2025-11-21INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510895714.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

In existing technologies, the phenomenon of data silos is common, and the data held by each service platform is limited and has a single data dimension, resulting in low accuracy of account classification.

Method used

We employ a secure gradient boosting algorithm within the federated learning framework. By encrypting and aggregating gradient parameters, we train an account classification model, ensuring privacy and security during training, efficient updates, and improved accuracy.

Benefits of technology

This approach improves the training speed and accuracy of account classification models while protecting data privacy, thus solving the problem of low classification accuracy caused by data silos.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120995189A_ABST
    Figure CN120995189A_ABST
Patent Text Reader

Abstract

The invention discloses an account classification method and device, a storage medium and electronic equipment. The method comprises the following steps: acquiring account information of a target account; in an account classification model, a classification result of the target account is determined based on the account information, and the account classification model is obtained by training based on the following steps: in the account classification model in an initial state, a predicted classification result of a sample account is determined based on sample account information of the sample account; calculating a gradient parameter by using the predicted classification result and a real classification result of the sample account; encrypted gradient parameters obtained after the gradient parameters are encrypted are sent to a central server, the central server carries out aggregation processing on the multiple encrypted gradient parameters sent by the multiple model training nodes, and aggregation gradient parameters are obtained; and adjusting model parameters of the account classification model based on the aggregation gradient parameters. Through the account classification method and device, the problem that the account classification accuracy is low in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of financial technology, and more specifically, to a method and apparatus for classifying accounts, a storage medium, and an electronic device. Background Technology

[0002] In the fintech sector, user accounts are typically categorized before providing resource exchange services to users in order to determine whether a user is suitable for a particular resource exchange service.

[0003] The account classification methods used in related technologies are typically rule-based traditional methods or simple machine learning models. These methods may rely on pre-set rules or thresholds, such as indicators like a user's resource exchange history, account rating, and account activity, to determine the account category.

[0004] However, the account classification methods provided by the above-mentioned technologies suffer from inaccurate account classification due to the prevalence of data silos, the limited data held by each service platform, and the single data dimension, making it difficult to form a complete and in-depth user profile.

[0005] There is currently no effective solution to the problem of low accuracy in account classification in related technologies. Summary of the Invention

[0006] The main objective of this application is to provide a method, apparatus, storage medium, and electronic device for classifying accounts, in order to solve the problem of low accuracy in account classification in related technologies.

[0007] To achieve the above objectives, according to one aspect of this application, a method for classifying accounts is provided. The method includes: obtaining account information of a target account to be classified, wherein the account information is used to characterize the resource exchange behavior features of the target account; in an account classification model, determining a classification result of the target account based on the account information, wherein the classification result is used to determine resource exchange services matching the target account, the account classification model being trained based on the following steps: in an initial state of the account classification model, determining a predicted classification result of a sample account based on sample account information; calculating gradient parameters using the predicted classification result and the actual classification result of the sample account; sending encrypted gradient parameters (obtained by encrypting the gradient parameters) to a central server, so that the central server aggregates multiple encrypted gradient parameters sent by multiple model training nodes to obtain aggregated gradient parameters; and adjusting the model parameters of the account classification model based on the aggregated gradient parameters obtained from the central server.

[0008] To achieve the above objectives, according to one aspect of this application, a training method for an account classification model is provided. The method includes: in an account classification model in its initial state, determining a predicted classification result for a sample account based on sample account information, where the sample account information is used to characterize the resource substitution behavior features of the sample account; calculating gradient parameters using the predicted classification result and the true classification result of the sample account, wherein the true classification result is used to determine the resource substitution service matching the sample account; sending encrypted gradient parameters (obtained by encrypting the gradient parameters) to a central server, so that the central server aggregates multiple encrypted gradient parameters sent by multiple model training nodes to obtain aggregated gradient parameters; and adjusting the model parameters of the account classification model based on the aggregated gradient parameters obtained from the central server.

[0009] To achieve the above objectives, according to another aspect of this application, an account classification apparatus is provided. The apparatus includes: an acquisition unit for acquiring account information of a target account to be classified, wherein the account information is used to characterize the resource exchange behavior features of the target account; and a determination unit for determining a classification result of the target account based on the account information in an account classification model, wherein the classification result is used to determine a resource exchange service matching the target account. The account classification model is trained based on the following steps: in an initial state of the account classification model, determining a predicted classification result of a sample account based on sample account information; calculating gradient parameters using the predicted classification result and the actual classification result of the sample account; sending encrypted gradient parameters (obtained by encrypting the gradient parameters) to a central server, so that the central server aggregates multiple encrypted gradient parameters sent by multiple model training nodes to obtain aggregated gradient parameters; and adjusting the model parameters of the account classification model based on the aggregated gradient parameters obtained from the central server.

[0010] To achieve the above objectives, according to another aspect of this application, a training apparatus for an account classification model is provided. The apparatus includes: a determining unit, configured to determine a predicted classification result for a sample account based on sample account information in an account classification model in its initial state, wherein the sample account information is used to characterize the resource substitution behavior features of the sample account; a calculation unit, configured to calculate gradient parameters using the predicted classification result and the true classification result of the sample account, wherein the true classification result is used to determine a resource substitution service matching the sample account; a sending unit, configured to send encrypted gradient parameters (obtained by encrypting the gradient parameters) to a central server, so that the central server aggregates multiple encrypted gradient parameters sent by multiple model training nodes to obtain aggregated gradient parameters; and an adjusting unit, configured to adjust the model parameters of the account classification model based on the aggregated gradient parameters obtained from the central server.

[0011] In this embodiment, account information of the target account to be classified is obtained, wherein the account information is used to characterize the resource exchange behavior features of the target account; in the account classification model, the classification result of the target account is determined based on the account information, wherein the classification result is used to determine the resource exchange service matching the target account. The account classification model is trained based on the following steps: in the account classification model in the initial state, the predicted classification result of the sample account is determined based on the sample account information of the sample account; gradient parameters are calculated using the predicted classification result and the true classification result of the sample account; encrypted gradient parameters obtained by encrypting the gradient parameters are sent to the central server, so that the central server aggregates the multiple encrypted gradient parameters sent by multiple model training nodes to obtain aggregated gradient parameters; the model parameters of the account classification model are adjusted based on the aggregated gradient parameters obtained from the central server. In other words, by using the embodiments of this application, the privacy and security of model training are guaranteed and the model parameters are efficiently updated, thereby improving the training speed and accuracy of the account classification model. This makes the classification results of accounts using this model more accurate, thus solving the technical problem of low accuracy in account classification caused by the common existence of data silos in model training, the limited data held by various service platforms, and the single data dimension. Attached Figure Description

[0012] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0013] Figure 1 A hardware structure block diagram of a computer terminal for implementing an account classification method is shown.

[0014] Figure 2 This is a flowchart of an account classification method provided according to an embodiment of this application;

[0015] Figure 3 This is a flowchart of the training method for the account classification model provided in the embodiments of this application;

[0016] Figure 4 This is a schematic diagram of a training method for an account classification model provided in an embodiment of this application;

[0017] Figure 5 This is another schematic diagram of the training method for the account classification model provided in the embodiments of this application;

[0018] Figure 6 This is yet another schematic diagram of the training method for the account classification model provided in the embodiments of this application;

[0019] Figure 7 This is yet another schematic diagram of the training method for the account classification model provided in the embodiments of this application;

[0020] Figure 8 This is a schematic diagram of an account classification device provided according to an embodiment of this application;

[0021] Figure 9 This is a schematic diagram of a training device for an account classification model provided in an embodiment of this application;

[0022] Figure 10 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0025] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:

[0026] Federated learning is a distributed machine learning framework designed to enable multiple participants (such as devices, organizations, or data centers) to collaboratively train a model without sharing the original data. The core of this approach lies in its ability to achieve efficient model training and updates within data ownership and privacy constraints, thereby breaking down data silos, promoting the sharing and utilization of data value, and protecting data privacy and security.

[0027] Extreme Gradient Boosting (XGBoost) is an ensemble learning method primarily used to improve the performance and accuracy of predictive models. The core idea of ​​XGBoost is to combine multiple weak predictive models (usually decision trees) into a powerful predictive model. In each iteration, it adds a new decision tree to correct errors in existing models, gradually improving the overall performance of the model.

[0028] SecureBoost is a secure version of the gradient boosting decision tree algorithm within the federated learning framework. It primarily addresses privacy concerns during model training in multi-party data collaboration scenarios. It combines homomorphic encryption with the classic XGBoost algorithm, enabling different participants to collaboratively train an efficient prediction model without exposing the original data.

[0029] Horizontal Federated Learning, also known as sample-based federated learning, is a distributed learning strategy for training machine learning models among multiple participants. In horizontal federated learning, participants typically have different but partially overlapping sample sets, and these samples share the same feature space. This means that although each participant's dataset may contain different individuals or instances (such as different users), the characteristics of these individuals or instances are the same (such as age, gender, etc.).

[0030] It should be noted that the information collected in this application (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of this data all comply with relevant laws, regulations, and standards, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding access points are provided for users to choose to authorize or refuse. For example, interfaces are set up between this system and relevant users or organizations, providing users with corresponding access points to choose to agree to or refuse automated decision-making results; if the user chooses to refuse, the process proceeds to the expert decision-making stage.

[0031] Example 1

[0032] According to an embodiment of this application, an embodiment of an account classification method is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0033] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing account classification is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0034] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0035] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the account classification method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the aforementioned account classification method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0036] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0037] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).

[0038] This application provides, as follows: Figure 2 The account classification method shown. Figure 2 This is a flowchart of the account classification method according to Embodiment 1 of this application.

[0039] Step S101: Obtain the account information of the target account to be classified, wherein the account information is used to characterize the resource exchange behavior of the target account.

[0040] Optionally, the above-mentioned account classification method can be applied to, but is not limited to, the fintech field. Specifically, it can be applied to resource exchange scenarios. For example, before providing resource exchange services to an account, the account information can be analyzed to determine whether the account is eligible for resource exchange services. If the account is eligible for resource exchange services, the type of resources, quantity of resources, and duration of resource exchange should be provided to the account. In this embodiment, this is not limited.

[0041] It should be noted that the aforementioned account information may be used, but is not limited to, to represent the account's account status, resource replacement history, and the object information of the user object corresponding to the account. Specifically, account information may include, but is not limited to: account login frequency, resource replacement frequency, resource replacement history, replacement time, type of replaced resources, quantity of replaced resources, age of the user object, gender of the user object, etc., but no limitations are imposed on this in this embodiment.

[0042] Step S102: In the account classification model, the classification result of the target account is determined based on the account information. The classification result is used to determine the resource replacement service matching the target account. The account classification model is trained based on the following steps: In the account classification model in the initial state, the predicted classification result of the sample account is determined based on the sample account information of the sample account; the gradient parameters are calculated using the predicted classification result and the true classification result of the sample account; the encrypted gradient parameters obtained after encrypting the gradient parameters are sent to the central server so that the central server can aggregate the multiple encrypted gradient parameters sent by multiple model training nodes to obtain the aggregated gradient parameters; the model parameters of the account classification model are adjusted based on the aggregated gradient parameters obtained from the central server.

[0043] Optionally, the account classification model described above can be, but is not limited to, a machine learning model trained to identify and classify the resource substitution behavior of accounts. The model can be a decision tree, random forest, neural network, etc., depending on the characteristics of the data and the complexity of the classification task. For example, using a random forest model, by learning the association between different substitution behavior features and classification results, it is possible to predict which resource substitution service category an account belongs to.

[0044] Furthermore, the classification result may include, but is not limited to, a first result indicating whether resource replacement service is provided to the target account. If the first result indicates yes, the classification result may also include the service type for providing resource replacement service to the target account, the amount of resources that can be provided to the target account, the amount of resources that the target account needs to provide for the replacement, and the duration for which the target account needs to provide resources, etc. This embodiment does not limit these aspects.

[0045] Optionally, the above classification results may also include, but are not limited to, the account stability level of the target account. The service platform that provides resource exchange services may also determine the resource exchange services provided to the target account based on the account stability level of the target account.

[0046] It should be noted that the account classification model in its initial state can be, but is not limited to, an account classification model that has not yet been trained, or an account classification model that has been iteratively trained but has not yet reached convergence. Furthermore, the sample account information mentioned above can be found in the explanation of account information provided earlier, and will not be repeated here.

[0047] Optionally, the true classification result of the sample account is obtained from the historical resource exchange records of the sample account, and this true classification result is used as the training label to constrain the model training. Further, the aforementioned gradient parameters can, but are not limited to, indicate the gradient of the loss function calculated by comparing the predicted result with the true classification result; these are numerical values ​​used to guide the direction and magnitude of parameter adjustments during model training. The aforementioned encrypted gradient parameters can, but are not limited to, be calculated using techniques such as homomorphic encryption or secret sharing to protect data privacy.

[0048] It should be noted that the central server can receive encrypted gradient parameters from different service platforms. These different service platforms will use sample information obtained from their respective platforms (such as sample accounts, sample account information, and the actual classification results corresponding to the sample accounts) to train the account classification model. They will encrypt the gradient parameters during the training process and send them to the central server. The central server will then aggregate these encrypted gradient parameters to obtain aggregated gradient parameters, and then return the aggregated gradient parameters to each service node. The service nodes will then adjust the model according to the aggregated gradient parameters. This process will continue iterating until the model reaches the training convergence condition.

[0049] Optionally, the above-mentioned adjustment of model parameters based on aggregated gradient parameters can be used, but is not limited to, to indicate that: the central server returns the aggregated gradient parameters to each participant (i.e., the service platform), and the participants decrypt the aggregated gradient parameters locally using their own decryption keys, and then update their own model parameters accordingly.

[0050] For example, but not limited to, the above steps can be explained through the following example: In a horizontal federated learning framework, Platform 1 and Platform 2 act as two participants to jointly train an account classification model. The initial state of the model may be randomly initialized parameters. In the first round of training, Platform 1 uses data B from user group A to predict the classification result, and Platform 2 uses data B from user group C to predict. Both parties calculate their gradient parameters and then encrypt and send them to the central server. The central server aggregates these two encrypted gradients and sends the aggregated gradient back to the participants. After decrypting the aggregated gradient, the participants update their own model parameters. This process is repeated multiple times until the model converges, i.e., the classification accuracy reaches a certain standard or a predetermined number of iterations is reached.

[0051] In this embodiment, account information of the target account to be classified is obtained, wherein the account information is used to characterize the resource exchange behavior features of the target account; in the account classification model, the classification result of the target account is determined based on the account information, wherein the classification result is used to determine the resource exchange service matching the target account. The account classification model is trained based on the following steps: in the account classification model in the initial state, the predicted classification result of the sample account is determined based on the sample account information of the sample account; gradient parameters are calculated using the predicted classification result and the true classification result of the sample account; encrypted gradient parameters obtained by encrypting the gradient parameters are sent to the central server, so that the central server aggregates the multiple encrypted gradient parameters sent by multiple model training nodes to obtain aggregated gradient parameters; the model parameters of the account classification model are adjusted based on the aggregated gradient parameters obtained from the central server. In other words, by using the embodiments of this application, the privacy and security of model training are guaranteed by encrypting and aggregating gradient parameters, while the efficient updating of model parameters is achieved, which improves the training speed and accuracy of the account classification model. This makes the classification results of accounts using this model more accurate, thereby solving the technical problem of low accuracy in account classification caused by the common existence of data silos in model training, the limited data held by various service platforms, and the single data dimension.

[0052] Optionally, in the account classification method provided in this application embodiment, after determining the classification result of the target account based on the account information in the account classification model, it further includes:

[0053] S1, based on the classification results, determines the resource replacement service that matches the target account.

[0054] It should be noted that the resource replacement service based on the classification results to determine the matching of the target account can be used, but is not limited to, to instruct on what kind of resource replacement service should be provided after the account is classified (such as stable user, unstable user, etc.). For example, for accounts classified as stable users, the platform may provide more replaceable resources; while for unstable users, the platform may restrict their resource replacement function, or add additional review steps, etc., which are not limited in this embodiment.

[0055] S2 provides the target account with the first replacement resource that matches the resource replacement service result.

[0056] Optionally, the provision of the first replacement resource matching the resource replacement service result to the target account can be, but is not limited to, indicating that: according to the resource replacement service corresponding to the classification result, a certain amount of resources are provided to the target account so that the account can carry out resource replacement activities. For example, the platform may provide a certain amount of virtual or physical resources, which is not limited in this embodiment.

[0057] It should be noted that before providing the target account with the first replacement resource that matches the resource replacement service result, an agreement needs to be reached between the target account and the target resource replacement platform. Specifically, this agreement is used to instruct the target resource replacement platform to provide the target account with the first replacement resource, and the target account needs to return the second replacement resource to the target resource replacement platform before a predetermined deadline (such as a predetermined time).

[0058] S3, notify the target account to provide the target resource exchange platform that provides the first exchange resource to exchange for the first exchange resource before the predetermined time is reached, wherein the amount of the second exchange resource is greater than the amount of the first exchange resource.

[0059] It should be noted that, but not limited to, a notification message may be sent to the target account via SMS, email or other communication methods to notify that a second replacement resource for replacing the first replacement resource will be provided to the target resource replacement platform that provides the first replacement resource before the predetermined time is reached. This embodiment does not limit this.

[0060] In this embodiment, a resource replacement service matching the target account is determined based on the classification result; a first replacement resource matching the resource replacement service result is provided to the target account; and the target account is notified to provide a second replacement resource to the target resource replacement platform that provided the first replacement resource before a predetermined time, wherein the quantity of the second replacement resource is greater than the quantity of the first replacement resource. In other words, by adopting this embodiment, a matching resource replacement service is provided to the account based on the classification result, ensuring the accuracy and timeliness of resource replacement. At the same time, the notification mechanism prompts the account to prepare resources in advance, avoiding the problem of insufficient resources during the replacement process, and enhancing the smoothness of resource replacement and user experience.

[0061] Example 2

[0062] According to an embodiment of this application, a method embodiment for training an account classification model is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0063] Optionally, this application provides as follows Figure 3 The training method for the account classification model shown: Figure 3 This is a flowchart of the training method for the account classification model according to Embodiment 2 of this application.

[0064] S201, In the account classification model in its initial state, the predicted classification result of the sample account is determined based on the sample account information. The sample account information is used to characterize the resource exchange behavior features of the sample account.

[0065] Optionally, the training method of the above account classification model can be applied to, but is not limited to, the field of fintech. Specifically, it can be applied to resource exchange scenarios. For example, before providing resource exchange services to an account, the model training scenario can be used to determine whether the account is eligible for resource exchange services by analyzing the account information. If the account is eligible for resource exchange services, the type of resources, quantity of resources, and duration of resource exchange should be specified. In this embodiment, this is not limited.

[0066] It should be noted that the aforementioned account information may be used, but is not limited to, to represent the account's account status, resource replacement history, and the object information of the user object corresponding to the account. Specifically, account information may include, but is not limited to: account login frequency, resource replacement frequency, resource replacement history, replacement time, type of replaced resources, quantity of replaced resources, age of the user object, gender of the user object, etc., but no limitations are imposed on this in this embodiment.

[0067] S202, using the predicted classification results and the actual classification results of the sample accounts, calculate the gradient parameters, where the actual classification results are used to determine the resource replacement service that matches the sample accounts.

[0068] Optionally, the aforementioned true classification results can be, but are not limited to, used to indicate the actual classification labels of sample accounts, which is the goal of model training. In a federated learning scenario, this information may only be available to the participating parties and used to compare prediction results and calculate model error.

[0069] It should be noted that the gradient parameters mentioned above can be, but are not limited to, those calculated during training based on the difference between the model's predictions and the actual classification results, serving as a guide for updating model parameters. The gradient parameters reflect the direction and magnitude of model parameter adjustments to ensure more accurate predictions in the next iteration.

[0070] Specifically, the above method of calculating gradient parameters using the predicted classification results and the actual classification results of sample accounts may include, but is not limited to: determining the target loss function based on the predicted classification results and the actual classification results; and calculating the gradient parameters by using the derivative of the predicted classification results with the target loss function.

[0071] S203 sends the encrypted gradient parameters obtained after encrypting the gradient parameters to the central server, so that the central server can aggregate the multiple encrypted gradient parameters sent by multiple model training nodes to obtain aggregated gradient parameters.

[0072] It should be noted that the above-mentioned encrypted gradient parameters may, but are not limited to, be obtained by encrypting the gradient parameters using homomorphic encryption.

[0073] Furthermore, the aforementioned central server can be, but is not limited to, a server responsible for coordinating and aggregating the model parameters and gradient parameters of the various participants in federated learning. The central server does not possess the original data (e.g., sample account information, true classification results, etc.), but only participates in the aggregation of gradient parameters to generate updated model parameters.

[0074] It should be noted that the aforementioned participants can be different platforms, which may, but are not limited to, provide different resource exchange services.

[0075] Optionally, the aggregated gradient parameters mentioned above may be, but are not limited to, the result of an aggregation operation performed by the central server on the encrypted gradient parameters received from all participants. The aggregation operation is typically a weighted average of homomorphic encryption operations, ensuring aggregate computation without decrypting individual gradient parameters.

[0076] S204, adjust the model parameters of the account classification model based on the aggregated gradient parameters obtained from the central server.

[0077] Specifically, the above-mentioned adjustment of the model parameters of the account classification model based on the aggregated gradient parameters obtained from the central server may include, but is not limited to: decrypting the aggregated gradient parameters using a private key that matches the public key to obtain the target aggregated gradient parameters; and updating the split nodes in the decision tree based on the target aggregated gradient parameters, wherein the account classification model includes a decision tree, and the split nodes are used to classify the sample account information input to the account classification model.

[0078] As an optional example, the relationship between the aforementioned participants (i.e., the various service platforms) and the central server can be, but is not limited to, referenced to, [example missing]. Figure 4As shown, the central server is used to obtain the encrypted gradient parameters sent by each participant, then aggregate these encrypted gradient parameters, and then return the aggregated gradient parameters to each participant so that each participant can adjust the model according to the aggregated gradient parameters.

[0079] It should be noted that, in this embodiment, the training of the account classification model may be performed using, but is not limited to, horizontal federated learning combined with SecureBoost or Extreme Gradient Boosting (XGBoost).

[0080] Specifically, horizontal federated learning splits user data (i.e., account information) among different participants, then distributes model training across their respective clients, with the final model built on a central server (representing the central server). During the modeling process, there is no data interaction between the different participants, thus avoiding the possibility of privacy data leakage. In the federated learning framework, the central server receives gradient information from different participants using a federated averaging algorithm. In this algorithm, the central server continuously collects parameter information from clients, performs weighted calculations, and then shares the resulting information with each client for the next round of calculation, iterating until the model converges. The specific training process steps are as follows:

[0081] S1, each participant calculates the model gradient locally and encrypts the gradient information using encryption techniques such as homomorphic encryption or secret sharing, and then sends the encrypted gradient to the central server.

[0082] S2, the central server performs secure aggregation operations through homomorphic encryption and weighted averaging.

[0083] S3, then the central server sends the aggregated gradient information to each participant.

[0084] S2, each participant decrypts the received gradient and then updates the model parameters based on the decrypted gradient information.

[0085] Furthermore, within the federated learning framework, the logistic regression algorithm primarily employs secure gradient descent combined with homomorphic encryption to protect the gradient transmission process. In the horizontal federated learning framework, since both the guest and host servers possess data labels, they can locally compute the gradient and loss function values. Therefore, the logistic regression algorithm under horizontal federated learning can be referenced... Figure 5It's important to clarify that the guest side refers to the party that possesses the target labels (i.e., the final result to be predicted), or the party that needs to build a model to solve a specific problem. Conversely, the host side refers to the party that possesses user feature data but not target label data. However, in the horizontal federated learning framework, both the guest and host sides possess label data.

[0086] Furthermore, when building account classification models (such as the XGBoost model), the selection of split points has a crucial impact on the model's performance. Typically, to choose the optimal split point, it's necessary to traverse all features of each node and then calculate the split point using the optimal split formula. However, when the dataset has a large sample size and cannot include all features, approximate algorithms are needed for optimization. For specific algorithms, please refer to [reference needed]. Figure 6 .

[0087] Optionally, under the federated learning framework, the XGBoost algorithm is processed into the SecureBoost algorithm, which is suitable for federated learning environments. This algorithm mainly includes two steps: first, implementing encrypted alignment of samples under security constraints; second, sharing a gradient boosting tree model through collaborative learning, keeping the data confidential during collaborative training, and eliminating trusted third parties in this algorithm.

[0088] The optimal parameters of the model can be determined by the gradient parameters. However, since the labels (i.e., the true classification results) can also be derived from the gradient parameters, sending them directly would easily expose the guest's true labels. Therefore, encryption is required. Combining this with an additive homomorphic encryption algorithm, the entire training process of the SecureBoost algorithm becomes:

[0089] S1, the Guest calculates the first and second derivatives (used to represent gradient parameters), encrypts them using additive homomorphic encryption, and sends them to the Host;

[0090] S2, the Host calculates the AND with the local encrypted data and returns it to the Guest;

[0091] S3, the Guest party decrypts the data after receiving it to calculate the profit of all combinations;

[0092] S4, split nodes based on returns.

[0093] Therefore, combining the output results of the logistic regression algorithm under horizontal federated learning with the characteristics of federated learning, the XGBoost optimal split point algorithm under the federated learning framework can be, but is not limited to, referencing... Figure 7 .

[0094] In this embodiment, in the initial state of the account classification model, the predicted classification result of the sample account is determined based on the sample account information, which is used to characterize the resource substitution behavior of the sample account. Gradient parameters are calculated using the predicted classification result and the actual classification result of the sample account, where the actual classification result is used to determine the resource substitution service matching the sample account. The encrypted gradient parameters, obtained by encrypting the gradient parameters, are sent to the central server, allowing the central server to aggregate the multiple encrypted gradient parameters sent by multiple model training nodes to obtain aggregated gradient parameters. Based on the aggregated gradient parameters obtained from the central server, the model parameters of the account classification model are adjusted. In other words, by encrypting and aggregating the gradient parameters, this embodiment ensures the privacy and security of model training while achieving efficient updating of model parameters, improving the training speed and accuracy of the account classification model. It solves the technical problem of low accuracy in account classification caused by the widespread existence of data silos in model training, the limited data held by various service platforms, and the single data dimension.

[0095] Optionally, in the training method of the account classification model provided in this application embodiment, the gradient parameters used to adjust the account classification model are calculated using the predicted classification results and the actual classification results of the sample accounts, including:

[0096] S1, based on the predicted classification results and the actual classification results, determine the target loss function.

[0097] S2, use the target loss function to calculate the derivative of the predicted classification result to obtain the gradient parameters.

[0098] Optionally, the aforementioned objective loss function can be, but is not limited to, a function used to measure the difference between the model's predictions and the actual results, and is a core component of the machine learning model training process. Common loss functions include cross-entropy loss function, squared loss function, etc., which play important roles in different types of classification tasks.

[0099] It should be noted that the gradient parameters mentioned above may include, but are not limited to, first and second gradient parameters. The first gradient parameter is the first-order reciprocal of the target loss with respect to the predicted classification result, and the second gradient parameter is the second-order reciprocal of the target loss with respect to the predicted classification result. Specifically, the model aims to reduce the target loss function, the definition of which depends on the specific task, such as regression or classification. For the loss function, the derivative of the loss with respect to the predicted value for each sample is typically calculated to determine how to adjust the model parameters to reduce the loss. During the construction of each tree in the model, the first and second gradient parameters are used to determine the optimal feature split point (split point) and the weights of the leaf nodes. Specifically, for each value of each feature, the algorithm attempts to split the sample and then calculates the weighted sum of the first and second gradient parameters before and after the split to evaluate the loss reduction resulting from the split.

[0100] In this embodiment, a target loss function is determined based on the predicted classification result and the actual classification result; the gradient parameters are obtained by calculating the derivative of the predicted classification result using the target loss function. In other words, by using this embodiment, the direction of model parameter adjustment is clarified through the calculation of the target loss function, making the model training process more scientific, helping to accelerate model convergence, and improving classification accuracy.

[0101] Optionally, in the training method of the account classification model provided in this application embodiment, after calculating the gradient parameters using the predicted classification results and the actual classification results of the sample accounts, the method further includes: encrypting the gradient parameters using a public key to obtain encrypted gradient parameters.

[0102] It's important to note that in a public-key cryptography system, each participant has a pair of keys—a public key and a private key. The public key is used to encrypt data; any participant can use it to encrypt information, but it can only be decrypted using the matching private key.

[0103] Optionally, after each round of training, the participants calculate gradient parameters based on the difference between the predicted and actual classification results, and encrypt these parameters using a public key. The purpose of encryption is to protect the participants' data from direct access by other parties or the central server.

[0104] The adjustment of the model parameters of the account classification model based on the aggregated gradient parameters obtained from the central server includes: decrypting the aggregated gradient parameters using a private key that matches the public key to obtain the target aggregated gradient parameters; and adjusting the model parameters of the account classification model using the target aggregated gradient parameters.

[0105] Optionally, the central server collects the encrypted gradient parameters from all participants and, without compromising the privacy of each participant, aggregates these gradient parameters to form a global gradient parameter. When using homomorphic encryption, the encrypted data can be directly aggregated and calculated, and the result of decrypting the aggregated data is consistent with the result of aggregating and calculating the data corresponding to the encrypted data.

[0106] Optionally, after receiving the encrypted aggregated gradient parameters from the central server, each participant decrypts these parameters using their own private key to obtain the plaintext gradient information. Then, based on the decrypted target aggregated gradient parameters, the participants may use gradient descent or related optimization algorithms to adjust the model parameters to reduce the difference between the predicted classification results and the actual classification results.

[0107] As an optional example, the above steps can be illustrated using examples, but are not limited to:

[0108] Initialization: Participant 1 and Participant 2 each train their local decision tree model, but do not exchange original data. In the early stages of model training, the splitting of nodes is based on their respective datasets and features.

[0109] Gradient calculation: In each training epoch, Participant 1 calculates the first derivative g and the second derivative h, which are based on the credit tag data it possesses and reflect the gap between the model's predictions and the true labels. Participant 2, on the other hand, calculates some information related to the gradient of Participant 2's model based on its feature data.

[0110] Gradient encryption and transmission: Participant 1 encrypts the calculated gradients g and h (using additive homomorphic encryption or secret sharing technology) and then sends them to the central server. Correspondingly, Participant 2 also encrypts its local gradient information.

[0111] Gradient aggregation: The central server, acting as the aggregator, receives the encrypted gradient and securely aggregates the encrypted gradients from both parties using a specific security protocol (such as addition operation under additive homomorphic encryption) to form the target aggregated gradient parameters.

[0112] Updating split nodes: The aggregated gradient parameters are key to updating the split nodes of the decision tree. For example, during the construction of the decision tree, if a split point for a certain feature can significantly reduce the model's loss function under aggregated gradient parameters, then that split point will be selected, and the structure of the decision tree will be adjusted accordingly to optimize the model's classification performance.

[0113] Local Model Update: Based on the updated split nodes and aggregated gradient parameters, Participant 1 and Participant 2 each update their local decision tree models. Participant 1 adjusts the weights and split points in its model according to the aggregated gradient information, while Participant 2 optimizes the pairing of its features with the model based on the gradient information.

[0114] Repeated iterations: The above process will be repeated multiple times until the model converges, reaching the preset training accuracy or the maximum number of iterations. After each iteration, both participant 1 and participant 2 will re-evaluate the split nodes of the decision tree based on the new aggregation gradient parameters, continuously optimizing the model.

[0115] In this embodiment, after calculating the gradient parameters using the predicted classification results and the actual classification results of the sample accounts, the method further includes: encrypting the gradient parameters using a public key to obtain encrypted gradient parameters; adjusting the model parameters of the account classification model based on the aggregated gradient parameters obtained from the central server, including: decrypting the aggregated gradient parameters using a private key matching the public key to obtain target aggregated gradient parameters; and adjusting the model parameters of the account classification model using the target aggregated gradient parameters. In other words, by using this embodiment, the security of gradient parameter transmission is further enhanced through public key encryption and private key decryption, ensuring data privacy during model training. It also clarifies how to use aggregated gradient parameters to adjust model parameters, achieving a balance between security and efficiency in model training.

[0116] Optionally, in the training method of the account classification model provided in this application embodiment, adjusting the model parameters of the account classification model using the target aggregation gradient parameter includes:

[0117] Based on the target aggregation gradient parameters, the split nodes in the decision tree are updated. The account classification model includes a decision tree, and the split nodes are used to classify the sample account information input to the account classification model.

[0118] It should be noted that the target aggregated gradient parameters are gradient parameters received from the central server and decrypted using a private key. They synthesize the data contributions of all participants and are used to guide the update of model parameters. In a federated learning environment, these parameters are obtained by aggregating the encrypted gradient parameters of each participant, ensuring data privacy and security.

[0119] It's important to note that in a decision tree, data progresses along the tree branches through a series of tests or conditional judgments, eventually reaching a leaf node to obtain a classification or regression result. The splitting nodes mentioned above are internal nodes in the decision tree, used to partition the input data based on specific features, with the aim of finding features and thresholds that maximize the purity of the child nodes. In XGBoost or SecureBoost algorithms, the selection of splitting nodes is based on gradient information to calculate the gain, in order to find the optimal split point.

[0120] Furthermore, in the context of federated learning, each participant uses the target aggregate gradient parameters to update the decision tree structure in its local model. Specifically, the selection of split nodes depends on the updated gradient information to ensure that the model can better classify accounts in subsequent iterations.

[0121] In this embodiment, the split nodes in the decision tree are updated based on the target aggregation gradient parameters. The account classification model includes a decision tree, and the split nodes are used to classify the sample account information input to the account classification model. In other words, by updating the split nodes in the decision tree, the structure of the account classification model is optimized, enabling the model to process and classify account information more accurately, thus improving classification accuracy and model flexibility.

[0122] Optionally, in the training method of the account classification model provided in this application embodiment, after determining the predicted classification result of the sample account based on the sample account information, it further includes:

[0123] If the target loss value calculated based on the predicted classification results and the actual classification results is less than the target threshold, the account classification model is considered to have reached the convergence condition.

[0124] It should be noted that the target loss value refers to the loss function value calculated by the model in the current training epoch, based on the predicted classification result and the true classification result. The target loss function is used to measure the difference between the model's prediction result and the actual result, and it directly reflects the optimization objective during the model training process.

[0125] Alternatively, if the number of iterations for training the account classification model exceeds the target number, the convergence condition of the account classification model can be determined.

[0126] In this embodiment, the account classification model is determined to have reached convergence if the target loss value calculated based on the predicted classification result and the actual classification result is less than the target threshold; or if the number of iterations used to train the account classification model is greater than the target number of iterations. In other words, this embodiment provides a criterion for judging model convergence, determining whether the model has reached the training objective by the magnitude of the target loss value or the number of iterations, thereby avoiding overtraining and resource waste, and ensuring the efficiency and quality of model training.

[0127] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0128] Example 3

[0129] This application also provides an account classification device. It should be noted that the account classification device of this application can be used to execute the account classification method provided in this application. The account classification device provided in this application is described below.

[0130] According to embodiments of this application, an account classification apparatus for implementing the above-described account classification method is also provided, such as... Figure 8 As shown, the device includes:

[0131] The acquisition unit 802 is used to acquire the account information of the target account to be classified, wherein the account information is used to characterize the resource exchange behavior features of the target account;

[0132] The determination unit 804 is used to determine the classification result of a target account based on account information in the account classification model. The classification result is used to determine the resource substitution service that matches the target account. The account classification model is trained based on the following steps: in the account classification model in the initial state, the predicted classification result of the sample account is determined based on the sample account information of the sample account; the gradient parameters are calculated using the predicted classification result and the true classification result of the sample account; the encrypted gradient parameters obtained by encrypting the gradient parameters are sent to the central server so that the central server can aggregate the multiple encrypted gradient parameters sent by multiple model training nodes to obtain the aggregated gradient parameters; the model parameters of the account classification model are adjusted based on the aggregated gradient parameters obtained from the central server.

[0133] The account classification device provided in this application provides matching resource replacement services to accounts based on the classification results, ensuring the accuracy and timeliness of resource replacement. At the same time, the notification mechanism prompts accounts to prepare resources in advance, avoiding the problem of insufficient resources during the replacement process, and enhancing the smoothness of resource replacement and user experience.

[0134] Optionally, the account classification device provided in this application embodiment further includes: a first determining unit, configured to determine a resource replacement service matching the target account based on the classification result; a resource allocation unit, configured to provide the target account with a first replacement resource matching the resource replacement service result; and a notification unit, configured to notify the target account to provide a second replacement resource to the target resource replacement platform that provides the first replacement resource before a predetermined time is reached, wherein the resource quantity of the second replacement resource is greater than the resource quantity of the first replacement resource.

[0135] It should be noted that the above-mentioned acquisition unit and determination unit correspond to steps S101 to S102 in Embodiment 1. The two modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above-mentioned modules or units can be hardware components or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above-mentioned modules can also be part of the device and run in the computer terminal 10 provided in Embodiment 1.

[0136] Example 4

[0137] This application also provides a training apparatus for an account classification model. It should be noted that the training apparatus for the account classification model in this application can be used to execute the training method for the account classification model provided in this application. The following describes the training apparatus for the account classification model provided in this application.

[0138] According to embodiments of this application, an apparatus for implementing the training method of the above-described account classification model is also provided, such as... Figure 9 As shown, the device includes:

[0139] The determining unit 902 is used to determine the predicted classification result of the sample account based on the sample account information in the account classification model in the initial state. The sample account information is used to characterize the resource exchange behavior features of the sample account.

[0140] The calculation unit 904 is used to calculate gradient parameters using the predicted classification results and the actual classification results of the sample accounts, wherein the actual classification results are used to determine the resource replacement service that matches the sample accounts.

[0141] The sending unit 906 is used to send the encrypted gradient parameters obtained after encrypting the gradient parameters to the central server, so that the central server can aggregate the multiple encrypted gradient parameters sent by multiple model training nodes to obtain aggregated gradient parameters.

[0142] Adjustment unit 908 is used to adjust the model parameters of the account classification model based on the aggregated gradient parameters obtained from the central server.

[0143] The training device for the account classification model provided in this application embodiment, by encrypting and aggregating gradient parameters, not only ensures the privacy and security of model training, but also achieves efficient updating of model parameters, thereby improving the training speed and accuracy of the account classification model. It solves the technical problem of low accuracy in account classification caused by the widespread existence of data silos in model training, the limited data held by various service platforms, and the single data dimension.

[0144] Optionally, in the training apparatus for the account classification model provided in this application embodiment, the calculation unit includes: a determination module, used to determine a target loss function based on the predicted classification result and the actual classification result; and a calculation module, used to calculate the derivative of the predicted classification result using the target loss function to obtain gradient parameters.

[0145] Optionally, the training apparatus for the account classification model provided in this application embodiment further includes: an encryption unit, used to encrypt the gradient parameters using a public key to obtain encrypted gradient parameters; the adjustment unit includes: a decryption module, used to adjust the model parameters of the account classification model based on the aggregated gradient parameters obtained from the central server, including: decrypting the aggregated gradient parameters using a private key matching the public key to obtain target aggregated gradient parameters; and an adjustment module, used to adjust the model parameters of the account classification model using the target aggregated gradient parameters.

[0146] Optionally, in the training apparatus for the account classification model provided in this application embodiment, the above-mentioned adjustment module is further used to: update the split nodes in the decision tree based on the target aggregation gradient parameters, wherein the account classification model includes a decision tree, and the split nodes are used to classify the sample account information input to the account classification model.

[0147] Optionally, the training apparatus for the account classification model provided in this application embodiment further includes: a first determining unit, used to determine that the account classification model has reached the convergence condition when the target loss value calculated based on the predicted classification result and the real classification result is less than the target threshold; and a second determining unit, used to determine that the account classification model has reached the convergence condition when the number of iterations for training the account classification model is greater than the target number.

[0148] It should be noted that the aforementioned determining unit, calculation unit, sending unit, and adjustment unit correspond to steps S201 to S204 in Embodiment 2. The instances and application scenarios implemented by the two modules and their corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1. It should be noted that the aforementioned modules or units may be hardware or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The aforementioned modules may also be part of a device and can run in the computer terminal 10 provided in Embodiment 1.

[0149] Example 5

[0150] Embodiments of this application may provide an electronic device. Figure 10 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 10As shown, the electronic device may include: one or more ( Figure 10 (Only one is shown) processor 1002, memory 1004, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0151] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the above-described methods. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0152] The processor can access information and applications stored in memory via a transmission device to perform the following steps: acquiring account information of the target account to be classified, wherein the account information characterizes the resource substitution behavior of the target account; determining the classification result of the target account based on the account information in the account classification model, wherein the classification result is used to determine the resource substitution service matching the target account; the account classification model is trained based on the following steps: in the initial state of the account classification model, determining the predicted classification result of the sample account based on the sample account information of the sample account; calculating gradient parameters using the predicted classification result and the true classification result of the sample account; sending the encrypted gradient parameters (after encrypting the gradient parameters) to the central server, so that the central server aggregates the multiple encrypted gradient parameters sent by multiple model training nodes to obtain aggregated gradient parameters; adjusting the model parameters of the account classification model based on the aggregated gradient parameters obtained from the central server.

[0153] The processor can also invoke information and applications stored in the memory via the transmission device to perform the following steps: determining a resource replacement service that matches the target account based on the classification result; providing the target account with a first replacement resource that matches the resource replacement service result; and notifying the target account to provide a second replacement resource to the target resource replacement platform that provides the first replacement resource before a predetermined time is reached, wherein the number of resources in the second replacement resource is greater than the number of resources in the first replacement resource.

[0154] The processor can also access information and applications stored in the memory via a transmission device to perform the following steps: In the account classification model in its initial state, based on the sample account information of the sample accounts, determine the predicted classification result of the sample accounts, where the sample account information is used to characterize the resource substitution behavior features of the sample accounts; calculate gradient parameters using the predicted classification result and the true classification result of the sample accounts, where the true classification result is used to determine the resource substitution service matching the sample accounts; send the encrypted gradient parameters, obtained by encrypting the gradient parameters, to the central server so that the central server can aggregate the multiple encrypted gradient parameters sent by multiple model training nodes to obtain aggregated gradient parameters; adjust the model parameters of the account classification model based on the aggregated gradient parameters obtained from the central server.

[0155] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: determine the target loss function based on the predicted classification result and the actual classification result; calculate the gradient parameter by using the derivative of the predicted classification result using the target loss function.

[0156] The processor can also access information and applications stored in the memory via a transmission device to perform the following steps: After calculating gradient parameters using the predicted classification results and the actual classification results of sample accounts, the steps further include: encrypting the gradient parameters using a public key to obtain encrypted gradient parameters; adjusting the model parameters of the account classification model based on the aggregated gradient parameters obtained from the central server, including: decrypting the aggregated gradient parameters using a private key that matches the public key to obtain target aggregated gradient parameters; and adjusting the model parameters of the account classification model using the target aggregated gradient parameters.

[0157] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: update the split nodes in the decision tree based on the target aggregation gradient parameters, wherein the account classification model includes a decision tree, and the split nodes are used to classify the sample account information input to the account classification model.

[0158] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: if the target loss value calculated based on the predicted classification result and the real classification result is less than the target threshold, determine that the account classification model has reached the convergence condition; or if the number of iterations for training the account classification model is greater than the target number, determine that the account classification model has reached the convergence condition.

[0159] By employing the embodiments of this application, the encryption and aggregation of gradient parameters not only ensure the privacy and security of model training but also achieve efficient updates of model parameters, thereby improving the training speed and accuracy of the account classification model. This solves the technical problem of low accuracy in account classification caused by the widespread existence of data silos in model training, the limited data held by various service platforms, and the single data dimension.

[0160] Those skilled in the art will understand that Figure 10 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 10 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 10 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 10 The different configurations shown.

[0161] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0162] Example 6

[0163] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the account classification method provided in Embodiment 1.

[0164] Optionally, in this embodiment, the storage medium can also be used to store the program code executed by the training method of the account classification model provided in Embodiment 2.

[0165] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0166] This application also provides a computer program product, which, when executed on a data processing device, is suitable for performing the steps of an account classification method and an account classification model training method.

[0167] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0168] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0169] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0170] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0171] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0172] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0173] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for classifying accounts, characterized in that, include: Obtain the account information of the target account to be classified, wherein the account information is used to characterize the resource exchange behavior features of the target account; In the account classification model, the classification result of the target account is determined based on the account information. The classification result is used to determine the resource substitution service matching the target account. The account classification model is trained based on the following steps: In the initial state of the account classification model, the predicted classification result of the sample account is determined based on the sample account information; gradient parameters are calculated using the predicted classification result and the actual classification result of the sample account; encrypted gradient parameters are sent to a central server, so that the central server aggregates the multiple encrypted gradient parameters sent by multiple model training nodes to obtain aggregated gradient parameters; and the model parameters of the account classification model are adjusted based on the aggregated gradient parameters obtained from the central server.

2. The method according to claim 1, characterized in that, In the account classification model, after determining the classification result of the target account based on the account information, the model further includes: Based on the classification results, a resource replacement service matching the target account is determined; Provide the target account with a first replacement resource that matches the resource replacement service result; The target account is notified to provide a second replacement resource to the target resource replacement platform that provides the first replacement resource before a predetermined time is reached, wherein the quantity of the second replacement resource is greater than the quantity of the first replacement resource.

3. A training method for an account classification model, characterized in that, include: In the initial state of the account classification model, the predicted classification result of the sample account is determined based on the sample account information, and the sample account information is used to characterize the resource substitution behavior features of the sample account. Using the predicted classification results and the actual classification results of the sample account, gradient parameters are calculated, wherein the actual classification results are used to determine the resource replacement service that matches the sample account; The encrypted gradient parameters obtained by encrypting the gradient parameters are sent to the central server, so that the central server can aggregate the multiple encrypted gradient parameters sent by multiple model training nodes to obtain aggregated gradient parameters. The model parameters of the account classification model are adjusted based on the aggregated gradient parameters obtained from the central server.

4. The method according to claim 3, characterized in that, The calculation of gradient parameters using the predicted classification result and the actual classification result of the sample account includes: Based on the predicted classification results and the actual classification results, determine the target loss function; The gradient parameters are obtained by calculating the derivative of the predicted classification result using the target loss function.

5. The method according to claim 3, characterized in that, After calculating the gradient parameters using the predicted classification results and the actual classification results of the sample accounts, the method further includes: encrypting the gradient parameters using a public key to obtain the encrypted gradient parameters; The step of adjusting the model parameters of the account classification model based on the aggregated gradient parameters obtained from the central server includes: decrypting the aggregated gradient parameters using a private key that matches the public key to obtain target aggregated gradient parameters; and adjusting the model parameters of the account classification model using the target aggregated gradient parameters.

6. The method according to claim 5, characterized in that, The step of adjusting the model parameters of the account classification model using the target aggregation gradient parameters includes: Based on the target aggregation gradient parameters, the split nodes in the decision tree are updated, wherein the account classification model includes the decision tree, and the split nodes are used to classify the sample account information input to the account classification model.

7. The method according to any one of claims 3 to 5, characterized in that, After determining the predicted classification result of the sample account based on the sample account information, the process further includes: If the target loss value calculated based on the predicted classification result and the actual classification result is less than the target threshold, the account classification model is determined to have reached the convergence condition; or If the number of iterations for training the account classification model exceeds the target number, the account classification model is determined to have reached the convergence condition.

8. An account classification device, characterized in that, include: The acquisition unit is used to acquire account information of the target account to be classified, wherein the account information is used to characterize the resource exchange behavior features of the target account; A determining unit is used to determine the classification result of a target account based on the account information in an account classification model. The classification result is used to determine a resource substitution service matching the target account. The account classification model is trained based on the following steps: in the initial state of the account classification model, a predicted classification result for the sample account is determined based on the sample account information; gradient parameters are calculated using the predicted classification result and the actual classification result of the sample account; encrypted gradient parameters are sent to a central server, so that the central server aggregates multiple encrypted gradient parameters sent by multiple model training nodes to obtain aggregated gradient parameters; and the model parameters of the account classification model are adjusted based on the aggregated gradient parameters obtained from the central server.

9. A training device for an account classification model, characterized in that, include: The determining unit is used to determine the predicted classification result of the sample account based on the sample account information of the sample account in the account classification model in the initial state, wherein the sample account information is used to characterize the resource substitution behavior features of the sample account. The calculation unit is used to calculate gradient parameters using the predicted classification results and the actual classification results of the sample account, wherein the actual classification results are used to determine the resource replacement service that matches the sample account; The sending unit is used to send the encrypted gradient parameters obtained by encrypting the gradient parameters to the central server, so that the central server can aggregate the multiple encrypted gradient parameters sent by multiple model training nodes to obtain aggregated gradient parameters. The adjustment unit is used to adjust the model parameters of the account classification model based on the aggregation gradient parameters obtained from the central server.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the method of any one of claims 1 to 7.

11. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the method according to any one of claims 1 to 7.

12. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the method described in any one of claims 1 to 7.