Classification method and apparatus, and electronic device and storage medium

By utilizing homomorphic encrypted data from different institutions to construct a training sample dataset and train a classification model, the problem of poor accuracy in classification models caused by insufficient data within institutions is solved, achieving a balance between data security and accuracy.

CN115481693BActive Publication Date: 2026-07-10STATE GRID XIONGAN FINANCIAL TECH GRP CO LTD +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID XIONGAN FINANCIAL TECH GRP CO LTD
Filing Date
2022-09-23
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of classification models is poor due to insufficient internal data. How to improve the accuracy of classification models has become an urgent technical problem to be solved.

Method used

By constructing a training sample dataset using homomorphically encrypted data from different institutions, a classification model is trained. By combining homomorphic encryption and decryption techniques, a balance between data security and accuracy is achieved.

Benefits of technology

While ensuring data security, the accuracy of the classification model was improved, the amount of training sample data was increased, and the performance of the classification model was enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115481693B_ABST
    Figure CN115481693B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a classification method and device, electronic equipment and a storage medium. Target data of a target object is obtained, the target data comprising first service data of the target object homomorphically encrypted by a first institution and second service data of the target object homomorphically encrypted by a second institution, the first institution being different from the second institution. The target data is processed by a pre-trained classification model to obtain a ciphertext category to which the target object belongs. The classification model is trained by a target sample data set, the target sample data in the target sample data set comprising first sub-sample data homomorphically encrypted by the first institution and second sub-sample data homomorphically encrypted by the second institution. The ciphertext category is homomorphically decrypted to obtain a category to which the target object belongs. The accuracy of the classification model is improved while ensuring the security of data of different institutions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and more specifically, to a classification method, apparatus, electronic device, and storage medium. Background Technology

[0002] Currently, some organizations categorize their service recipients (such as customers) and then provide corresponding services based on the category to which the service recipient belongs.

[0003] Classifying service recipients typically involves processing relevant data using a pre-trained classification model to determine the category to which the service recipient belongs. However, current classification models are trained using internal organizational data as training samples. When internal data is limited, the accuracy of the trained classification models is relatively poor. Therefore, improving the accuracy of classification models has become a pressing technical problem. Summary of the Invention

[0004] The purpose of this application is to provide a classification method, apparatus, electronic device, and storage medium, including the following technical solutions:

[0005] A classification method for a first device belonging to a first mechanism; the method includes:

[0006] Obtain target data of the target object, the target data including: first business data of the target object after homomorphic encryption in the first institution, and second business data of the target object after homomorphic encryption in the second institution; the first institution and the second institution are different;

[0007] The target data is processed by a pre-trained classification model to obtain the ciphertext category to which the target object belongs; the classification model is trained on a target sample dataset, and the target sample data in the target sample dataset includes first sub-sample data of the first institution and second sub-sample data of the second institution that are homomorphically encrypted;

[0008] The ciphertext category is homomorphically decrypted to obtain the category to which the target object belongs.

[0009] Preferably, in the above method, obtaining the target data of the target object includes:

[0010] Obtain the first business data of the target object in the first institution;

[0011] The first business data is homomorphically encrypted using the first public key to obtain the homomorphically encrypted first business data.

[0012] Based on the associated primary key in the first business data, the privacy set intersection method based on pseudo-random function under the homomorphic encryption algorithm is used to obtain the second business data of the target object in the second institution's dataset after homomorphic encryption.

[0013] The above method, preferably, involves obtaining the homomorphically encrypted second business data of the target object in the second institution's dataset using a privacy set intersection method based on a pseudo-random function under a homomorphic encryption algorithm, based on the associated primary key in the first business data. This includes:

[0014] Perform a first hash operation on the associated primary key in the first business data to obtain a first hash value;

[0015] Multiply the first hash value by the first random factor to obtain the first target hash value;

[0016] Send a data acquisition request to the second device of the second institution, the data acquisition request carrying the first target hash value;

[0017] Obtain the second target hash value sequence sent by the second device; wherein, the i-th second target hash value in the second target hash value sequence is obtained by the second device multiplying the i-th second hash value by a second random factor, and the i-th second hash value is obtained by the second device performing a first hash operation on the associated primary key of the business data of the i-th object of the second organization;

[0018] The second target hash value sequence is multiplied by the first random factor to obtain the third target hash value sequence, which is then sent to the second device.

[0019] The second service data is obtained by homomorphically encrypting the second service data sent by the second device; the second service data is obtained by dividing the third target hash value sequence by the second random factor to obtain a fourth target hash value sequence, and then homomorphically encrypting the service data corresponding to the found fourth target hash value with the first public key based on the fourth target hash value that is the same as the first target hash value found in the fourth target hash value sequence.

[0020] Preferably, the classification model described above is trained using the following method:

[0021] Obtain at least one target sample data from the target sample dataset;

[0022] Input the at least one target sample data into the classification model to obtain the classification result output by the classification model;

[0023] The parameters of the classification model are updated with the goal of making the classification result approximate the label of at least one target sample data; the label of the target sample data is a homomorphically encrypted label.

[0024] Preferably, the target sample dataset is obtained through the following method:

[0025] The first sub-sample dataset of the first institution is obtained by homomorphically encrypting each first sample data in the first sample dataset of the first institution using the first public key.

[0026] Based on the associated primary key in each of the first sample data, the privacy set intersection method based on pseudo-random function under the homomorphic encryption algorithm is used to obtain the second sub-sample dataset in the second institution; the second sub-sample dataset is obtained by homomorphically encrypting each of the second sample data in the second sample dataset in the second institution using the first public key, and the second sample dataset has the same associated primary key as the first sample dataset;

[0027] The first and second subsample data with the same associated primary key are merged to obtain the target sample dataset.

[0028] In the above method, preferably, the first sample dataset is obtained by extracting features from the first source dataset of the first institution; the second sample dataset is obtained by extracting features from the second source dataset of the second institution.

[0029] Preferably, in the above method, the classification model is trained using a third device from a third organization, and the first public key is generated by a key management center; the method further includes:

[0030] The system receives a sample data acquisition request sent by the third device, the sample data acquisition request carrying an electronic signature; the electronic signature is generated by the key management center using a first private key corresponding to the first public key and then sent to the third device.

[0031] The electronic signature is verified using the first public key;

[0032] Upon successful verification, the target sample dataset is sent to the third device.

[0033] A sorting device for a first apparatus, the first apparatus belonging to a first mechanism, the device comprising:

[0034] The acquisition module is used to acquire target data of a target object, the target data including: first business data of the target object after homomorphic encryption in the first institution, and second business data of the target object after homomorphic encryption in the second institution; the first institution and the second institution are different;

[0035] The classification module is used to process the target data using a pre-trained classification model to obtain the ciphertext category to which the target object belongs; the classification model is trained using a target sample dataset, the target sample data in the target sample dataset including first sub-sample data of the first institution and second sub-sample data of the second institution that are homomorphically encrypted;

[0036] The decryption module is used to perform homomorphic decryption on the ciphertext category to obtain the category to which the target object belongs.

[0037] An electronic device, comprising:

[0038] Memory, used to store programs;

[0039] A processor is configured to invoke and execute the program in the memory, thereby implementing the various steps of the classification method as described in any of the preceding claims.

[0040] A readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the classification method as described in any of the preceding claims.

[0041] As can be seen from the above scheme, the classification method, apparatus, electronic device, and storage medium provided in this application obtain target data of a target object. The target data includes: first business data of the target object after homomorphic encryption by a first institution, and second business data of the target object after homomorphic encryption by a second institution; the first institution and the second institution are different; the target data is processed by a pre-trained classification model to obtain the ciphertext category to which the target object belongs; the classification model is trained through a target sample dataset, and the target sample data in the target sample dataset includes first sub-sample data homomorphically encrypted by the first institution and second sub-sample data homomorphically encrypted by the second institution; the ciphertext category is homomorphically decrypted to obtain the category to which the target object belongs. This application uses homomorphically encrypted data from different institutions to construct training sample data and train the classification model. While increasing the training sample data, it ensures the security of data from different institutions, thereby improving the accuracy of the classification model while ensuring the security of data from different institutions. Attached Figure Description

[0042] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 A flowchart illustrating an implementation of the classification method provided in this application embodiment;

[0044] Figure 2 A flowchart illustrating an implementation of obtaining target data of a target object, provided in an embodiment of this application;

[0045] Figure 3 The following is a flowchart illustrating an implementation of this application embodiment: based on the associated primary key in the first business data, using a privacy set intersection method based on a pseudo-random function under the homomorphic encryption algorithm to obtain the homomorphically encrypted second business data of the target object in the dataset of the second institution.

[0046] Figure 4 A flowchart illustrating one implementation of obtaining a target sample dataset provided in this application embodiment;

[0047] Figure 5 A schematic diagram of the structure of the classification device provided in the embodiments of this application;

[0048] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0049] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar parts 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 a sequence other than that illustrated herein. Detailed Implementation

[0050] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0051] The classification method provided in this application embodiment can be used for a first device, which belongs to a first organization. The first device can be a server or a server cluster.

[0052] like Figure 1 The diagram shown is a flowchart of one implementation of the classification method provided in this application, which may include:

[0053] Step S101: Obtain the target data of the target object. The target data includes: first business data of the target object after homomorphic encryption at a first institution, and second business data of the target object after homomorphic encryption at a second institution; the first institution and the second institution are different.

[0054] Optionally, the first and second agencies may include, but are not limited to, any two of the following agencies: industrial and commercial agencies, judicial agencies, tax agencies, financial institutions, power agencies, etc.

[0055] The target audience can be the service recipients of the organization, such as natural persons or corporate entities.

[0056] As an example, the first institution is a financial institution, and the second institution is a power company. Accordingly,

[0057] The primary business data may include, but is not limited to, the basic information of the target entity and loan-related information. Taking a corporate entity as an example, the basic information of the target entity may include, but is not limited to: the company name and / or unified social credit code; further, it may include, but is not limited to, at least one of the following: the corporate entity's number, industry code, and establishment date at the first institution; loan-related information may include, but is not limited to: loan amount, repayment amount, outstanding amount, number of times of default, and duration of default.

[0058] The second business data can be electricity-related data of the target entity, including but not limited to service content data and service-derived data. Service content data may include, but is not limited to: electricity consumption growth trends, represented by month-on-month comparisons of the target entity's electricity consumption over a preset period (e.g., the past three months, six months, twelve months, etc.); electricity consumption fluctuations, represented by year-on-year comparisons of the target entity's electricity consumption over a preset period; seasonality of electricity consumption, represented by the quarter with the highest electricity consumption in a year; fluctuations in electricity bills payable, represented by year-on-year comparisons of the target entity's electricity bills payable over a preset period; fluctuations in actual electricity bills paid, represented by year-on-year comparisons of the target entity's actual electricity bills paid over a preset period; growth in electricity bills payable, represented by month-on-month comparisons of the target entity's electricity bills payable over a preset period; and growth in actual electricity bills paid, represented by month-on-month comparisons of the target entity's electricity bills payable over a preset period. The data includes: month-on-month comparison of electricity bill payments; industry-level electricity consumption, represented by tags corresponding to the target object's electricity consumption within a preset time period (different electricity consumption ranges represent different industry levels, and different ranges correspond to different tags); industry-level electricity bills due, represented by tags corresponding to the target object's electricity bills within a preset time period (different electricity bills within a preset time period represent different industry levels, and different ranges correspond to different tags); and industry-level electricity bills actually paid, represented by tags corresponding to the target object's actual electricity bills within a preset time period (different actual electricity bills within a preset time period represent different industry levels, and different ranges correspond to different tags). Optionally, the second business data may further include, but is not limited to, information such as the target object's electricity address and electricity consumption category. Service-derived data may include, but is not limited to: electricity bill settlement type, which can be represented by the label corresponding to the payment frequency range of the target object's actual electricity bill payments in the past year, with different payment frequency ranges corresponding to different labels; cumulative overdue status, which can be represented by the overdue frequency range of the number of times the target object's late payment penalty is greater than 0 within a preset period, with different overdue frequency ranges corresponding to different labels; level of arrears, which can be represented by the arrears range of the target object's total arrears within a preset period, with different arrears ranges corresponding to different labels; electricity receivable collection level, which can be represented by the ratio of the target object's electricity bill payable to the actual electricity bill paid within a preset period; electricity theft, which can be represented by the number of times the target object committed electricity theft within a preset period, with different electricity theft frequency ranges corresponding to different labels; default status, which can be represented by the number of times the target object defaulted within a preset period, with different default frequency ranges corresponding to different labels; power outage status, which can be represented by the number of times the target object experienced power outages within a preset period, with different power outage frequency ranges corresponding to different labels.

[0059] As an example, the first institution is the power company, and the second institution is the financial institution. Accordingly,

[0060] The first business data can be the target object's power-related data, which may include, but is not limited to, service content data and service-derived data.

[0061] The second business data may include, but is not limited to, basic information about the target and loan-related information.

[0062] Of course, the power companies and financial institutions are merely illustrative examples and do not constitute a limitation of this application.

[0063] The first business data of the first organization, after homomorphic encryption, is obtained by homomorphically encrypting the first business data in the first organization using the first public key; the second business data of the second organization, after homomorphic encryption, is obtained by homomorphically encrypting the second business data in the second organization using the first public key.

[0064] The first public key is generated by the key management center and distributed to the first device of the first organization and the second device of the second organization.

[0065] Step S102: Process the target data using a pre-trained classification model to obtain the ciphertext category to which the target object belongs; the classification model is trained using a target sample dataset, wherein the target sample data in the target sample dataset includes first sub-sample data of the first institution and second sub-sample data of the second institution that are homomorphically encrypted.

[0066] As an example, a classification model could be a credit classification model, used to determine which credit rating a target object belongs to.

[0067] As an example, a classification model could be a risk classification model, used to determine which risk level a target object belongs to.

[0068] The classification model in this application is trained using target sample data consisting of homomorphically encrypted subsample data from different institutions, and the labels of the target sample data are also homomorphically encrypted. Therefore, the category of the target object predicted by the classification model is the category in ciphertext form, i.e., the ciphertext category.

[0069] Step S103: Perform homomorphic decryption on the ciphertext category to obtain the category to which the target object belongs.

[0070] The classification method provided in this application obtains target data of a target object. The target data includes: first business data of the target object homomorphically encrypted by a first institution, and second business data of the target object homomorphically encrypted by a second institution; the first institution and the second institution are different. A pre-trained classification model is used to process the target data to obtain the ciphertext category to which the target object belongs. The classification model is trained using a target sample dataset, where the target sample data includes first sub-sample data homomorphically encrypted by the first institution and second sub-sample data homomorphically encrypted by the second institution. Homomorphic decryption is performed on the ciphertext category to obtain the category to which the target object belongs. This application utilizes homomorphically encrypted data from different institutions to construct training sample data and train the classification model. While increasing the amount of training sample data, it ensures the security of data from different institutions, thereby improving the accuracy of the classification model while maintaining the security of data from different institutions.

[0071] In an optional embodiment, a flowchart illustrating one method for obtaining target data of the target object is shown below. Figure 2 As shown, it may include:

[0072] Step S201: Obtain the first business data of the target object in the first institution.

[0073] Step S202: Use the first public key to perform homomorphic encryption on the first business data to obtain the homomorphically encrypted first business data.

[0074] Step S203: Based on the associated primary key in the first business data, use the privacy set intersection method based on pseudo-random function under the homomorphic encryption algorithm to obtain the second business data of the target object in the second institution's dataset after homomorphic encryption.

[0075] A primary key can be information used to distinguish different objects; for example, a primary key can be a unified social credit code.

[0076] Based on the associated primary key in the first business data, this application uses a privacy set intersection method based on pseudo-random functions under the homomorphic encryption algorithm to determine the second business data of the target object in the second institution's database, and then obtains the homomorphically encrypted second business data of the target object in the second institution.

[0077] It should be noted that this application does not limit the execution order of steps S202 and S203. Step S202 can be executed first, followed by step S203, or step S203 can be executed first, followed by step S202, or steps S202 and S203 can be executed simultaneously.

[0078] Optionally, based on the associated primary key in the first business data, and using a privacy set intersection method based on a pseudo-random function under a homomorphic encryption algorithm, a flowchart is shown below for one implementation of obtaining the homomorphically encrypted second business data of the target object in the second institution's dataset. Figure 3 As shown, it may include:

[0079] Step S301: The first device performs a first hash operation on the associated primary key in the first business data to obtain a first hash value.

[0080] Step S302: The first device multiplies the first hash value by the first random factor to obtain the first target hash value.

[0081] Step S303: The first device sends a data acquisition request to the second device of the second organization, the data acquisition request carrying the first target hash value.

[0082] Step S304: The second device performs a first hash operation on the associated primary key in the business data of each object in the second organization to obtain a second hash value of the associated primary key in the business data of each object. Specifically, the second device performs a first hash operation on the associated primary key in the business data of the i-th object (any object in the second organization) to obtain a second hash value of the associated primary key in the business data of the i-th object (i.e., the i-th second hash value).

[0083] Step S305: The second device multiplies each second hash value by a second random factor to obtain a sequence of second target hash values. Specifically, the second device multiplies the i-th hash value by the second random factor to obtain the i-th second target hash value.

[0084] Step S306: The second device sends the second target value sequence to the first device.

[0085] Step S307: The first device multiplies the second target hash value sequence by the first random factor to obtain the third target hash value sequence.

[0086] Step S308: The first device sends the third target hash value to the second device.

[0087] Step S309: The second device divides the third target hash value sequence by the second random factor to obtain the fourth target hash value sequence.

[0088] Step S310: The second device finds the fourth target hash value that is the same as the first target hash value in the fourth target hash value sequence, and uses the first public key to homomorphically encrypt the business data corresponding to the found fourth target hash value to obtain the homomorphically encrypted second business data;

[0089] Step S311: The second device sends homomorphically encrypted second service data to the first device.

[0090] In summary, the above-mentioned implementation process for obtaining the homomorphically encrypted second business data of the target object in the second institution's dataset, based on the associated primary key in the first business data and using the privacy set intersection method based on pseudo-random functions under the homomorphic encryption algorithm, can be as follows:

[0091] Perform a first hash operation on the associated primary key in the first business data to obtain the first hash value;

[0092] Multiply the first hash value by the first random factor to obtain the first target hash value;

[0093] Send a data acquisition request to the second device of the second institution, the data acquisition request carrying the first target hash value;

[0094] Obtain the second target hash value sequence sent by the second device; wherein, the i-th second target hash value in the second target hash value sequence is obtained by the second device multiplying the i-th second hash value by a second random factor, and the i-th second hash value is obtained by the second device performing a first hash operation on the associated primary key of the business data of the i-th object of the second organization.

[0095] The second target hash value sequence is multiplied by the first random factor to obtain the third target hash value sequence, which is then sent to the second device.

[0096] The second service data is obtained by homomorphically encrypting the second service data sent by the second device. The second service data is obtained by dividing the third target hash value sequence by the second random factor to obtain the fourth target hash value sequence. Based on the fourth target hash value that is the same as the first target hash value found in the fourth target hash value sequence, the service data corresponding to the found fourth target hash value is homomorphically encrypted using the first public key.

[0097] In an optional embodiment, the above classification model is trained as follows:

[0098] Obtain at least one target sample data from the target sample dataset. The target sample data in the target dataset includes a first sub-sample data homomorphically encrypted by a first institution and a second sub-sample data homomorphically encrypted by a second institution. That is, each target sample data consists of two parts, which are homomorphically encrypted data from different institutions. The labels of the target sample data are the homomorphically encrypted labels.

[0099] Input at least one target sample data into the classification model to obtain the classification result output by the classification model;

[0100] The parameters of the classification model are updated with the goal of making the classification result approximate the label of at least one target sample data.

[0101] If the training termination condition is not met, return to the step of obtaining at least one target sample data in the target sample dataset and subsequent steps until the training termination condition is met.

[0102] In an optional embodiment, this application also provides a method for obtaining a target sample dataset. This method can be implemented through interaction between a device of a first institution and a second device of a second institution. A flowchart illustrating one implementation of obtaining a target sample dataset according to an embodiment of this application is shown below. Figure 4 As shown, it may include:

[0103] Step S401: Obtain the first sub-sample dataset of the first institution. The first sub-sample dataset is obtained by homomorphically encrypting each first sample data in the first sample dataset of the first institution using the first public key.

[0104] Step S402: Based on the associated primary key in each of the first sample data, the second sub-sample dataset in the second institution is obtained by using the privacy set intersection method based on pseudo-random function under the homomorphic encryption algorithm; the second sub-sample dataset is obtained by homomorphically encrypting each of the second sample data in the second sample dataset in the second institution using the first public key, and the second sample dataset has the same associated primary key as the first sample dataset.

[0105] For a detailed explanation of the implementation process, please refer to the aforementioned method for obtaining the homomorphically encrypted second business data of the target object in the second institution. Specifically:

[0106] The first device of the first structure can perform a first hash operation on the associated primary key in each first sample data to obtain the first hash value corresponding to each first sample data, thus forming a first hash value sequence.

[0107] The first device multiplies each of the first hash values ​​in the first hash value sequence by a first random factor to obtain the first target hash value sequence.

[0108] The first device sends a data acquisition request to the second device of the second organization, the data acquisition request carrying a first target hash value sequence.

[0109] The second device performs a first hash operation on the associated primary keys of the business data of each object in the second organization to obtain the second hash value corresponding to the business data of each object, thus forming a second hash value sequence.

[0110] The second device multiplies each second hash value in the second hash value sequence by a second random factor to obtain the second target hash value sequence.

[0111] The second device sends a second target hash value sequence to the first device.

[0112] The first device multiplies each of the second target hash values ​​in the second target hash value sequence by a first random factor to obtain the third target hash value sequence.

[0113] The first device sends a sequence of third target hash values ​​to the second device.

[0114] The second device divides each of the third target hash values ​​in the third target hash value sequence by the second random factor to obtain the fourth target hash value sequence.

[0115] The second device searches for a fourth target hash value in the fourth target hash value sequence that is the same as the j-th first target hash value in the first target hash value sequence, and associates the j-th first target hash value with the found fourth target hash value.

[0116] The second device uses the first public key to homomorphically encrypt the business data corresponding to each of the fourth target hash values ​​found, thereby obtaining the second subsample dataset.

[0117] The second device sends the second subsample dataset and the corresponding fourth target hash value (which is the first target hash value) to the first device.

[0118] Step S403: Merge the first subsample data and the second subsample data that have the same associated primary key to obtain the target sample dataset.

[0119] Optionally, if the first target hash value sequence corresponding to the first subsample data is the same as the fourth target hash value corresponding to the second subsample data, it is determined that the first subsample data and the second subsample data have the same associated primary key.

[0120] When the first device merges the first subsample data and the second subsample data, it can concatenate the second subsample data after the first subsample data to obtain the target sample data.

[0121] In an optional embodiment, the first sample dataset is obtained by feature extraction from a first source dataset of a first institution; the second sample dataset is obtained by feature extraction from a second source dataset of a second institution.

[0122] The process of feature extraction for the first source dataset of the first institution is the same as the process of feature extraction for the second source dataset of the second institution. The following uses the process of feature extraction for the first source dataset of the first institution as an example to illustrate the specific implementation of feature extraction:

[0123] The first source dataset is cleaned. Specifically, if the target field in the k-th source data (any source data in the first source dataset) contains invalid or missing values, the valid values ​​of the target fields in the other data in the first source dataset are interpolated to the target field of the k-th source data to obtain the valid value of the target field of the k-th source data. If the correlation between any two fields in the k-th source data is greater than the correlation threshold, one of the two fields is deleted. Optionally, the mean of the valid values ​​of the target fields in the other data in the first source dataset can be used as the valid value of the target field of the k-th source data.

[0124] Encode each field in the cleaned k-th data entry to obtain the k-th sample data entry. As an example, one-hot encoding can be applied to each field individually.

[0125] In an optional embodiment, the classification model can be trained by a third device of a third organization, and the sample data required for the third organization to train the classification model can be provided by a first device of a first organization. To ensure data security, the classification method provided in this application may further include:

[0126] The first device receives a sample data acquisition request sent by the third device. The sample data acquisition request carries an electronic signature, which is generated by the key management center using the first private key corresponding to the first public key and then sent to the third device. In other words, before requesting sample data from the first device, the third device first applies for an electronic signature from the key management center. The key management center obtains the first private key corresponding to the first public key based on the first public key provided by the third device, generates an electronic signature using the first private key, and then provides it to the third device.

[0127] The first device verifies the electronic signature using the first public key;

[0128] If the verification passes, the target sample dataset is sent to the third device. If the electronic signature verification passes, it indicates that the third device is legitimate and can be provided with the target sample dataset; otherwise, it indicates that the third device is illegitimate and providing the target sample dataset to the third device is prohibited.

[0129] Corresponding to the method embodiments, this application also provides a sorting device. A schematic diagram of the sorting device provided in this application is shown below. Figure 5 As shown, it may include:

[0130] The module consists of module 501, classification module 502, and decryption module 503; among which,

[0131] The acquisition module 501 is used to acquire target data of the target object, the target data including: first business data of the target object after homomorphic encryption in the first institution, and second business data of the target object after homomorphic encryption in the second institution; the first institution and the second institution are different;

[0132] The classification module 502 is used to process the target data using a pre-trained classification model to obtain the ciphertext category to which the target object belongs; the classification model is trained using a target sample dataset, and the target sample data in the target sample dataset includes first sub-sample data of the first institution and second sub-sample data of the second institution that are homomorphically encrypted;

[0133] The decryption module 503 is used to perform homomorphic decryption on the ciphertext category to obtain the category to which the target object belongs.

[0134] The classification apparatus provided in this application obtains target data of a target object. The target data includes: first business data of the target object homomorphically encrypted by a first institution, and second business data of the target object homomorphically encrypted by a second institution; the first institution and the second institution are different; the target data is processed by a pre-trained classification model to obtain the ciphertext category to which the target object belongs; the classification model is trained using a target sample dataset, where the target sample data includes first sub-sample data homomorphically encrypted by the first institution and second sub-sample data homomorphically encrypted by the second institution; the ciphertext category is homomorphically decrypted to obtain the category to which the target object belongs. This application utilizes homomorphically encrypted data from different institutions to construct training sample data and train the classification model. While increasing the training sample data, it ensures the security of data from different institutions, thereby improving the accuracy of the classification model while ensuring the security of data from different institutions.

[0135] In an optional embodiment, the obtaining module 501 includes:

[0136] The first obtaining unit is configured to obtain the first business data of the target object in the first institution;

[0137] A homomorphic encryption unit is used to homomorphically encrypt the first business data using a first public key to obtain the homomorphically encrypted first business data.

[0138] The second obtaining unit is used to obtain the second business data of the target object in the second institution's dataset by using the privacy set intersection method based on pseudo-random functions under the homomorphic encryption algorithm, based on the associated primary key in the first business data.

[0139] In an optional embodiment, the second obtaining unit is specifically used for:

[0140] Perform a first hash operation on the associated primary key in the first business data to obtain a first hash value;

[0141] Multiply the first hash value by the first random factor to obtain the first target hash value;

[0142] Send a data acquisition request to the second device of the second institution, the data acquisition request carrying the first target hash value;

[0143] Obtain the second target hash value sequence sent by the second device; wherein, the i-th second target hash value in the second target hash value sequence is obtained by the second device multiplying the i-th second hash value by a second random factor, and the i-th second hash value is obtained by the second device performing a first hash operation on the associated primary key of the business data of the i-th object of the second organization;

[0144] The second target hash value sequence is multiplied by the first random factor to obtain the third target hash value sequence, which is then sent to the second device.

[0145] The second service data is obtained by homomorphically encrypting the second service data sent by the second device; the second service data is obtained by dividing the third target hash value sequence by the second random factor to obtain a fourth target hash value sequence, and then homomorphically encrypting the service data corresponding to the found fourth target hash value with the first public key based on the fourth target hash value that is the same as the first target hash value found in the fourth target hash value sequence.

[0146] In an optional embodiment, the apparatus further includes a training module for:

[0147] Obtain at least one target sample data from the target sample dataset;

[0148] Input the at least one target sample data into the classification model to obtain the classification result output by the classification model;

[0149] The parameters of the classification model are updated with the goal of making the classification result approximate the label of at least one target sample data; the label of the target sample data is a homomorphically encrypted label.

[0150] In an optional embodiment, the apparatus further includes a sample acquisition module for:

[0151] The first sub-sample dataset of the first institution is obtained by homomorphically encrypting each first sample data in the first sample dataset of the first institution using the first public key.

[0152] Based on the associated primary key in each of the first sample data, the privacy set intersection method based on pseudo-random function under the homomorphic encryption algorithm is used to obtain the second sub-sample dataset in the second institution; the second sub-sample dataset is obtained by homomorphically encrypting each of the second sample data in the second sample dataset in the second institution using the first public key, and the second sample dataset has the same associated primary key as the first sample dataset;

[0153] The first and second subsample data with the same associated primary key are merged to obtain the target sample dataset.

[0154] In an optional embodiment, the first sample dataset is obtained by feature extraction from a first source dataset of the first institution; the second sample dataset is obtained by feature extraction from a second source dataset of the second institution.

[0155] In an optional embodiment, the classification model is trained using a third device of a third organization, and the first public key is generated by a key management center; the apparatus further includes:

[0156] The verification module is used to receive a sample data acquisition request sent by the third device, wherein the sample data acquisition request carries an electronic signature; the electronic signature is generated by the key management center using a first private key corresponding to the first public key and then sent to the third device; the electronic signature is verified using the first public key;

[0157] The sending module is used to send the target sample dataset to the third device when the verification is successful.

[0158] Corresponding to the method embodiments, this application also provides an electronic device, which may be a server or server cluster, or other electronic devices capable of implementing the solutions of the embodiments of this application. A schematic diagram of the structure of this electronic device is shown below. Figure 6 As shown, it may include: at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4.

[0159] In this embodiment, the number of processor 1, communication interface 2, memory 3, and communication bus 4 is at least one, and processor 1, communication interface 2, and memory 3 communicate with each other through communication bus 4.

[0160] Processor 1 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0161] Memory 3 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device.

[0162] The memory 3 stores a program, and the processor 1 can call the program stored in the memory 3. The program is used for:

[0163] Obtain target data of the target object, the target data including: first business data of the target object after homomorphic encryption in the first institution, and second business data of the target object after homomorphic encryption in the second institution; the first institution and the second institution are different;

[0164] The target data is processed by a pre-trained classification model to obtain the ciphertext category to which the target object belongs; the classification model is trained on a target sample dataset, and the target sample data in the target sample dataset includes first sub-sample data of the first institution and second sub-sample data of the second institution that are homomorphically encrypted;

[0165] Homomorphic decryption is performed on the ciphertext category to obtain the category to which the target object belongs.

[0166] Optionally, the refined and extended functions of the program can be found in the description above.

[0167] This application embodiment also provides a storage medium that can store a program suitable for execution by a processor, the program being used for:

[0168] Obtain target data of the target object, the target data including: first business data of the target object after homomorphic encryption in the first institution, and second business data of the target object after homomorphic encryption in the second institution; the first institution and the second institution are different;

[0169] The target data is processed by a pre-trained classification model to obtain the ciphertext category to which the target object belongs; the classification model is trained on a target sample dataset, and the target sample data in the target sample dataset includes first sub-sample data of the first institution and second sub-sample data of the second institution that are homomorphically encrypted;

[0170] Homomorphic decryption is performed on the ciphertext category to obtain the category to which the target object belongs.

[0171] Optionally, the refined and extended functions of the program can be found in the description above.

[0172] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0173] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0174] 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.

[0175] In addition, 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.

[0176] It should be understood that in the embodiments of this application, the claims, various embodiments, and features can be combined with each other to solve the aforementioned technical problems.

[0177] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they 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 a portion 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 USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0178] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A classification method, characterized in that, For use in a first device, the first device belonging to a first mechanism; the method includes: Obtain the first business data of the target object in the first institution; The first business data is homomorphically encrypted using the first public key to obtain the homomorphically encrypted first business data. Perform a first hash operation on the associated primary key in the first business data to obtain a first hash value; Multiply the first hash value by the first random factor to obtain the first target hash value; Send a data acquisition request to the second device of the second institution, the data acquisition request carrying the first target hash value; Obtain the second target hash value sequence sent by the second device; wherein, the i-th second target hash value in the second target hash value sequence is obtained by the second device multiplying the i-th second hash value by a second random factor, and the i-th second hash value is obtained by the second device performing a first hash operation on the associated primary key of the business data of the i-th object of the second organization; The second target hash value sequence is multiplied by the first random factor to obtain the third target hash value sequence, which is then sent to the second device. The second service data sent by the second device is obtained by dividing the third target hash value sequence by the second random factor to obtain the fourth target hash value sequence. Based on the fourth target hash value that is the same as the first target hash value found in the fourth target hash value sequence, the service data corresponding to the found fourth target hash value is homomorphically encrypted using the first public key. The first service data and the second service data are target data. The first organization and the second organization are different. The target data is processed by a pre-trained classification model to obtain the ciphertext category to which the target object belongs; the classification model is trained on a target sample dataset, and the target sample data in the target sample dataset includes first sub-sample data of the first institution and second sub-sample data of the second institution that are homomorphically encrypted; The ciphertext category is homomorphically decrypted to obtain the category to which the target object belongs.

2. The method according to claim 1, characterized in that, The classification model was trained using the following method: Obtain at least one target sample data from the target sample dataset; Input the at least one target sample data into the classification model to obtain the classification result output by the classification model; The parameters of the classification model are updated with the goal of making the classification result approximate the label of at least one target sample data. The labels of the target sample data are homomorphically encrypted labels.

3. The method according to claim 2, characterized in that, The target sample dataset was obtained through the following method: The first sub-sample dataset of the first institution is obtained by homomorphically encrypting each first sample data in the first sample dataset of the first institution using the first public key. Based on the associated primary key in each of the first sample data, the privacy set intersection method based on pseudo-random function under the homomorphic encryption algorithm is used to obtain the second sub-sample dataset in the second institution; the second sub-sample dataset is obtained by homomorphically encrypting each of the second sample data in the second sample dataset in the second institution using the first public key, and the second sample dataset has the same associated primary key as the first sample dataset; The first and second subsample data with the same associated primary key are merged to obtain the target sample dataset.

4. The method according to claim 3, characterized in that, The first sample dataset is obtained by extracting features from the first source dataset of the first institution; the second sample dataset is obtained by extracting features from the second source dataset of the second institution.

5. The method according to claim 3 or 4, characterized in that, The classification model is trained using a third device from a third organization, and the first public key is generated by a key management center; the method further includes: The system receives a sample data acquisition request sent by the third device, the sample data acquisition request carrying an electronic signature; the electronic signature is generated by the key management center using a first private key corresponding to the first public key and then sent to the third device. The electronic signature is verified using the first public key; Upon successful verification, the target sample dataset is sent to the third device.

6. A sorting device, characterized in that, For use in a first device, the first device being part of a first mechanism, the device includes: The acquisition module is used to acquire target data of a target object, the target data including: first business data of the target object after homomorphic encryption in the first institution, and second business data of the target object after homomorphic encryption in the second institution; the first institution and the second institution are different; The classification module is used to process the target data using a pre-trained classification model to obtain the ciphertext category to which the target object belongs; the classification model is trained using a target sample dataset, the target sample data in the target sample dataset including first sub-sample data of the first institution and second sub-sample data of the second institution that are homomorphically encrypted; The decryption module is used to perform homomorphic decryption on the ciphertext category to obtain the category to which the target object belongs; The obtaining module includes: The first obtaining unit is configured to obtain the first business data of the target object in the first institution; A homomorphic encryption unit is used to homomorphically encrypt the first business data using a first public key to obtain the homomorphically encrypted first business data. The second obtaining unit is configured to perform a first hash operation on the associated primary key in the first business data to obtain a first hash value; multiply the first hash value by a first random factor to obtain a first target hash value; send a data acquisition request to the second device of the second organization, the data acquisition request carrying the first target hash value; obtain a second target hash value sequence sent by the second device; wherein the i-th second target hash value in the second target hash value sequence is obtained by the second device multiplying the i-th second hash value by a second random factor, the i-th second hash value being obtained by the second device performing a first hash operation on the associated primary key of the business data of the i-th object of the second organization; multiply the second target hash value sequence by the first random factor to obtain a third target hash value sequence, and send it to the second device; obtain homomorphically encrypted second business data sent by the second device; the second business data is obtained by the second device dividing the third target hash value sequence by the second random factor to obtain a fourth target hash value sequence, and by using the first public key to homomorphically encrypt the business data corresponding to the found fourth target hash value that is the same as the first target hash value in the fourth target hash value sequence.

7. An electronic device, comprising: Memory, used to store programs; A processor is configured to invoke and execute the program in the memory, thereby implementing the various steps of the classification method as described in any one of claims 1-5.

8. A readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the classification method as described in any one of claims 1-5.