Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings. Embodiments of the present disclosure and features of embodiments may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a flow chart of some embodiments of a privacy protection based power data interaction encryption method according to the present disclosure. A flow 100 of some embodiments of a privacy protection based power data interaction encryption method according to the present disclosure is shown. The electric power data interaction encryption method based on privacy protection is applied to a business server and comprises the following steps:
Step 101, in response to receiving a public key sent by the power terminal associated with the service server, for each service user sample in the service user sample set, respectively performing encryption processing on a service user code and a service user name included in the service user sample by using the public key, so as to generate an encrypted service user code and an encrypted service user name.
In some embodiments, the service server may, in response to receiving a public key sent by the power terminal associated with the service server, respectively encrypt, by using the public key, a service user code and a service user name included in the service user sample for each service user sample in the service user sample set, so as to generate an encrypted service user code and an encrypted service user name. The business server may refer to a server that manages individual enterprise users. For example, the service server may refer to a server terminal of a bank. Here, the power terminal and the service server are in the same area and are in communication connection.
In practice, the service server may encrypt the service user code and the service user name included in the service user sample to generate an encrypted service user code and an encrypted service user name, where the encrypted service user code and the encrypted service user name are respectively:
First, it is determined whether the service user code is empty. I.e. it is determined if the field of the service user code is empty.
And step two, in response to the fact that the service user code is not null, randomly generating a code disturbance value corresponding to the service user code. That is, a 5-digit code perturbation value corresponding to the service user code may be randomly generated.
And thirdly, encrypting the service user code according to the code disturbance value and the public key to generate an encrypted service user code. That is, it can pass
And (3) carrying out encryption processing on the service user codes to generate encrypted service user codes. Where u may represent an encrypted service user code. r may represent a code perturbation value. e is a common index. N is the total number. % may represent the remainder operation. H () may represent a hash operation. b may represent a service user code.
And step four, determining whether the service user name is empty.
And fifthly, in response to determining that the service user name is not null, randomly generating a name disturbance value corresponding to the service user name.
And sixthly, encrypting the service user name according to the name disturbance value and the public key to generate an encrypted service user name. That is, it can pass
And (3) carrying out encryption processing on the service user name to generate an encrypted service user name. Where U may represent an encrypted service user name. R may represent a name perturbation value. e is a common index. N is the total number. % may represent the remainder operation. H () may represent a hash operation. c may represent a service user name.
The related content in the step 101 is taken as an invention point of the disclosure, which solves the second technical problem mentioned in the background art, and the confidentiality of data is low. ". Factors that contribute to lower confidentiality of data tend to be as follows: because of certain sensitivity of the data, the data is encrypted by adopting a common encryption algorithm, and privacy protection of each data is difficult to realize. If the above factors are solved, the effect of improving the confidentiality of the data can be achieved. To achieve this, first, it is determined whether the service user code is empty. And then, in response to determining that the service user code is not null, randomly generating a code disturbance value corresponding to the service user code. Thus, different values can be generated for encryption according to different service user codes. And then, according to the code disturbance value and the public key, carrying out encryption processing on the service user code to generate an encrypted service user code. Therefore, the encryption mode of each service user code is different, and the confidentiality of the service user code is greatly improved. And then determining whether the service user name is empty. Then, in response to determining that the service user name is not null, a name perturbation value corresponding to the service user name is randomly generated. Thus, different values can be generated for encryption according to different service user names. And finally, carrying out encryption processing on the service user name according to the name disturbance value and the public key so as to generate an encrypted service user name. Therefore, the encryption mode of each data is different, and the confidentiality of the data is improved.
Step 102, constructing an encrypted service user identification sample list according to the generated encrypted service user code set and the encrypted service user name set, sending the encrypted service user identification sample list to the electric power terminal, enabling the electric power terminal to respond to receiving the encrypted service user identification sample list, performing conversion processing on each encrypted service user identification sample in the encrypted service user identification sample list to generate a converted encrypted service user identification sample list, constructing an encrypted electric power user sample list according to the private key and the electric power user sample set, and sending the encrypted electric power user sample list and the converted encrypted service user identification sample list to the service server.
In some embodiments, the service server may construct an encrypted service subscriber identity sample list according to the generated encrypted service subscriber code set and the encrypted service subscriber name set, and send the encrypted service subscriber identity sample list to the power terminal, so that the power terminal may perform conversion processing on each encrypted service subscriber identity sample in the encrypted service subscriber identity sample list in response to receiving the encrypted service subscriber identity sample list, to generate a converted encrypted service subscriber identity sample list, and construct an encrypted power subscriber sample list according to the private key and the power subscriber sample set, and send the encrypted power subscriber sample list and the converted encrypted service subscriber identity sample list to the service server.
In practice, the service server may construct an encrypted service user identifier sample list by:
first, constructing an empty list of encrypted service user identification samples.
And a second step of combining the encrypted service user code and the encrypted service user name corresponding to the encrypted service user code into an encrypted service user identification sample for each encrypted service user code in the encrypted service user code set. Combining may be referred to as merging. That is, the encrypted service user name corresponding to the encrypted service user code may refer to an encrypted service user name of the same service user sample as the encrypted service user code.
And thirdly, adding each encrypted service user identification sample into the above encrypted service user identification sample empty list to obtain an encrypted service user identification sample list.
And 103, constructing a common user identification sample list according to the encrypted power user sample list and the converted encrypted service user identification sample list, and sending the common user identification sample list to the power terminal.
In some embodiments, the service server may construct a common subscriber identity sample list according to the encrypted power subscriber sample list and the transformed encrypted service subscriber identity sample list, and send the common subscriber identity sample list to the power terminal.
In practice, the service server may construct a common user identifier sample list by:
first, creating a reference encrypted service user identification sample empty list, and adding each reference encrypted service user identification sample to the reference encrypted service user identification sample empty list to obtain a reference encrypted service user identification sample list.
Each reference encrypted service user identification sample is obtained through the following processing steps:
a first sub-step of determining whether the target encrypted service user code included in the transformed encrypted service user identification sample is null.
And a second sub-step, in response to determining that the target encrypted service user code is not null, performing encryption processing on the encrypted service user code corresponding to the target encrypted service user code according to the private key and the associated code disturbance value to generate a reference encrypted service user code. The associated code perturbation value may refer to the code perturbation value corresponding to the target encrypted service user code. That is, it can pass
And (3) carrying out encryption processing on the encrypted service user codes to generate reference encrypted service user codes. Where k may represent a reference encrypted service user code. u may represent an encrypted service user code. d is a private exponent. N is the total number. % may represent the remainder operation. H () may represent a hash operation. r may represent a code perturbation value.
And a third sub-step, in response to determining that the target encrypted service user name is not null, performing encryption processing on the encrypted service user name corresponding to the target encrypted service user name according to the private key and the associated name perturbation value, so as to generate a reference encrypted service user name. That is, it can pass
And (3) carrying out encryption processing on the encrypted service user name to generate a reference encrypted service user name. Where K may represent a reference encrypted service user name. U may represent an encrypted service user name. d is a private exponent. N is the total number. % may represent the remainder operation. H () may represent a hash operation. R may represent a name perturbation value.
And a fourth sub-step of combining the reference encrypted service user code and the reference encrypted service user name into a reference encrypted service user identification sample.
And secondly, constructing a common user identification sample list according to the encrypted power user sample list and the reference encrypted service user identification sample list.
In practice, a shared user identification sample empty list can be constructed, and each shared user identification sample is added into the shared user identification sample empty list to obtain the shared user identification sample list.
Wherein, each shared user identification sample is obtained through the following processing steps:
1. and determining whether an encrypted power consumer sample matched with the reference encrypted service consumer code included in the reference encrypted service consumer identification sample exists in the encrypted power consumer sample list. That is, it is determined whether or not there is an encrypted power consumer sample in the encrypted power consumer sample list that includes the same encrypted power consumer code as the reference encrypted service consumer code included in the reference encrypted service consumer identification sample.
2. In response to determining that there is an encrypted power subscriber sample that includes an encrypted power subscriber code that matches a reference encrypted service subscriber code that includes the reference encrypted service subscriber identity sample, determining whether there is an encrypted power subscriber sample in the encrypted power subscriber sample list that includes an encrypted power subscriber name that matches a reference encrypted service subscriber name that includes the reference encrypted service subscriber identity sample. Matching may refer to the same.
3. And setting the matching state of the reference encrypted service subscriber identity sample to be a two-factor matching in response to determining that there is an encrypted power subscriber sample including an encrypted power subscriber name that matches a reference encrypted service subscriber name included in the reference encrypted service subscriber identity sample. The two-factor match indicates that the power subscriber code matches the service subscriber name.
4. And setting the matching state of the reference encrypted service subscriber identity sample as the power subscriber code matching in response to determining that no encrypted power subscriber sample exists, the encrypted power subscriber name of which matches the reference encrypted service subscriber name included in the reference encrypted service subscriber identity sample.
5. And determining the reference encrypted service user identification sample after the modification state as a common user identification sample.
The above related matters are taken as an invention point of the present disclosure, and solve the third technical problem mentioned in the background art, which causes the waste of computational resources. ". Factors that cause waste of computational resources are often as follows: the matching data is not classified, resulting in further parsing being required when using the data. If the above factors are solved, the effect of reducing the waste of the computational resources can be achieved. To achieve this, first, it is determined whether or not there is an encrypted power consumer sample in the encrypted power consumer sample list that matches the reference encrypted service consumer code included in the reference encrypted service consumer identification sample. Therefore, the matching state of the reference encrypted service user identification sample is conveniently marked according to the matching result. And secondly, in response to determining that the encrypted power consumer sample which is matched with the reference encrypted service consumer code which is included in the reference encrypted service consumer identification sample exists, determining whether the encrypted power consumer sample which is included in the encrypted power consumer sample list and the reference encrypted service consumer name which is included in the reference encrypted service consumer identification sample are matched. Then, in response to determining that there is an encrypted power subscriber sample that includes an encrypted power subscriber name that matches a reference encrypted service subscriber name that is included in the reference encrypted service subscriber identity sample, a matching state of the reference encrypted service subscriber identity sample is set to a two-factor match. Thus, it can be determined whether the data is a single-identity match or a double-identity match. Then, in response to determining that there is no encrypted power subscriber sample including an encrypted power subscriber name that matches a reference encrypted service subscriber name included in the reference encrypted service subscriber identification sample, setting a matching state of the reference encrypted service subscriber identification sample to a power subscriber code match. Finally, in response to determining that there is no encrypted power subscriber sample including an encrypted power subscriber code that matches a reference encrypted service subscriber code included in the reference encrypted service subscriber identity sample, and determining that there is an encrypted power subscriber sample including an encrypted power subscriber name that matches a reference encrypted service subscriber name included in the reference encrypted service subscriber identity sample, setting a matching state of the reference encrypted service subscriber identity sample to a service subscriber name match. Thus, it can be marked which identifications in the data are matching identifications. Therefore, when the data is used, the data user can directly screen the data according to the matching state, so that the data is prevented from being further analyzed. Furthermore, the waste of calculation power resources is reduced.
Fig. 2 is a flow chart of some embodiments of a power data interaction encryption method according to the present disclosure. A flow 200 of some embodiments of a power data interaction encryption method according to the present disclosure is shown. The electric power data interaction encryption method is applied to an electric power terminal and comprises the following steps:
step 201, randomly generating a key pair, and transmitting a public key of the key pair to an associated service server.
In some embodiments, the power terminal may randomly generate a key pair and send the public key of the key pair to the associated service server. Wherein the key pair comprises a public key and a private key. The power terminal may refer to a server that manages power. For example, the power terminal may refer to a server of a national grid. The business server may refer to a server that manages individual enterprise users. For example, the service server may refer to a server terminal of a bank. Here, the power terminal and the service server are in the same area and are in communication connection. Here, the power terminal may randomly generate an RSA key pair of 1024 bits in length. The public key consists of two parts, one part is: the total number N, the other part is: public index e. The private key consists of two parts, one part is: the total number N, the other part is: a private exponent d. That is, the composite number N is a modulus N in a cryptographic RSA encryption algorithm (RSA key pair); the public exponent e is the public key exponent in the RSA encryption algorithm (RSA key pair); the private exponent d is the private key exponent in the RSA encryption algorithm (RSA key pair).
Step 202, in response to receiving the encrypted service user identification sample list sent by the service server, performing conversion processing on each encrypted service user identification sample in the encrypted service user identification sample list to generate a converted encrypted service user identification sample list.
In some embodiments, the power terminal may respond to receiving the encrypted service subscriber identity sample list sent by the service server, and perform conversion processing on each encrypted service subscriber identity sample in the encrypted service subscriber identity sample list to generate a converted encrypted service subscriber identity sample list. The power consumer samples in the power consumer sample set include a power consumer code and a power consumer name. Here, the power consumer code may represent a unified social credit code field of the power terminal stored enterprise user. The power consumer name may represent a business name stored by the power terminal.
In practice, the power terminal may perform conversion processing on each encrypted service subscriber identity sample in the encrypted service subscriber identity sample list to generate a converted encrypted service subscriber identity sample list by:
The first step, creating a sample empty list of the transformed encrypted service user identification, and adding each transformed encrypted service user identification sample into the sample empty list of the transformed encrypted service user identification to obtain a sample list of the transformed encrypted service user identification.
Each conversion encryption service user identification sample is obtained through the following processing steps:
and a first sub-step, in response to determining that the encrypted service user code included in the encrypted service user identification sample is not null, performing encryption processing on the encrypted service user code according to the private key to generate a target encrypted service user code. That is, it can pass
And (3) carrying out encryption processing on the encrypted service user codes to generate target encrypted service user codes. Where z may represent the target encrypted service user code. u may represent an encrypted service user code. d is privateAn index. N is the total number. % may represent the remainder operation.
And a second sub-step, in response to determining that the encrypted service user name included in the encrypted service user identification sample is not null, performing encryption processing on the encrypted service user name according to the private key to generate a target encrypted service user name. That is, it can pass
And (3) carrying out encryption processing on the encrypted service user name to generate a target encrypted service user name. Where x may represent the target encrypted service user name. U may represent an encrypted service user name. d is a private exponent. N is the total number. % may represent the remainder operation.
And a third sub-step of combining the target encrypted service user code and the target encrypted service user name into a converted encrypted service user identification sample.
Step 203, constructing an encrypted power user sample list according to the private key and the power user sample set, and sending the encrypted power user sample list and the transformed encrypted service user identifier sample list to the service server.
In some embodiments, the power terminal may construct an encrypted power subscriber sample list according to the private key and the power subscriber sample set, and send the encrypted power subscriber sample list and the transformed encrypted service subscriber identifier sample list to the service server. The power consumer sample set may refer to power sample information stored by the power terminal for each enterprise consumer.
In practice, the above power terminal may construct an encrypted power consumer sample list by:
First, constructing an encrypted power consumer sample empty list, and adding each encrypted power consumer sample into the encrypted power consumer sample empty list to obtain an encrypted power consumer sample list.
Each encrypted power consumer sample is obtained through the following processing steps:
a first sub-step of determining whether a power consumer code included in the power consumer sample is empty.
And a second sub-step of encrypting the power consumer code using the private key to generate an encrypted power consumer code in response to determining that the power consumer code is not empty. That is, it can pass
And (3) carrying out encryption processing on the power user code to generate an encrypted power user code. Where m may represent an encrypted power consumer code. a may represent a power consumer code. d is a private exponent. N is the total number. % may represent the remainder operation. H () may represent a hash operation.
And a third sub-step of determining whether the power consumer name included in the power consumer sample is empty.
And a fourth sub-step of encrypting the power consumer name by using the private key to generate an encrypted power consumer name in response to determining that the power consumer name is not empty. That is, it can pass
And (3) carrying out encryption processing on the power user name to generate an encrypted power user name. Where M may represent an encrypted power user name. A may represent a power consumer name. d is a private exponent. N is the total number. % may represent the remainder operation. H () may represent a hash operation. />
And a fifth sub-step of combining the encrypted power consumer code and the encrypted power consumer name into an encrypted power consumer sample.
Fig. 3 is a flow chart of some embodiments of a privacy protection based power data interaction encryption system according to the present disclosure. A flow 300 of some embodiments of a privacy protection based power data interaction encryption system according to the present disclosure is shown. The privacy protection-based power data interaction encryption system comprises: the system comprises a power terminal and a business server.
Step 301, the power terminal randomly generates a key pair, and sends a public key in the key pair to an associated service server.
In some embodiments, the power terminal may randomly generate a key pair and send the public key of the key pair to the associated service server. Wherein the key pair comprises a public key and a private key. Here, the power terminal may refer to a service terminal that manages power. For example, the power terminal may refer to a server of a national grid. The business server may refer to a server that manages individual enterprise users. For example, the service server may refer to a server terminal of a bank. Here, the power terminal and the service server are in the same area and are in communication connection. Here, the power terminal may randomly generate an RSA key pair of 1024 bits in length. The public key consists of two parts, one part is: the total number N, the other part is: public index e. The private key consists of two parts, one part is: the total number N, the other part is: a private exponent d. That is, the composite number N is a modulus N in a cryptographic RSA encryption algorithm (RSA key pair); the public exponent e is the public key exponent in the RSA encryption algorithm (RSA key pair); the private exponent d is the private key exponent in the RSA encryption algorithm (RSA key pair).
Step 302, the service server responds to receiving the public key sent by the power terminal, and for each service user sample in the service user sample set, the service user code and the service user name included in the service user sample are respectively encrypted by using the public key to generate an encrypted service user code and an encrypted service user name.
In some embodiments, the service server may, in response to receiving the public key sent by the power terminal, respectively encrypt, by using the public key, a service user code and a service user name included in the service user sample for each service user sample in the service user sample set, so as to generate an encrypted service user code and an encrypted service user name. Business user codes may refer to enterprise uniform social credit code fields. Business user names may refer to business names. The business user sample in the business user sample set may refer to enterprise sample information of a certain enterprise stored in the business server.
In practice, the service server may encrypt the service user code and the service user name included in the service user sample to generate an encrypted service user code and an encrypted service user name, where the encrypted service user code and the encrypted service user name are respectively:
First, it is determined whether the service user code is empty. I.e. it is determined if the field of the service user code is empty.
And step two, in response to the fact that the service user code is not null, randomly generating a code disturbance value corresponding to the service user code. That is, a 5-digit code perturbation value corresponding to the service user code may be randomly generated.
And thirdly, encrypting the service user code according to the code disturbance value and the public key to generate an encrypted service user code. That is, it can pass
And (3) carrying out encryption processing on the service user codes to generate encrypted service user codes. Where u may represent an encrypted service user code. r may represent a code perturbation value. e is a common index. N is the total number. % may represent the remainder operation. H () may represent a hash operation. b may represent a service user code.
And step four, determining whether the service user name is empty.
And fifthly, in response to determining that the service user name is not null, randomly generating a name disturbance value corresponding to the service user name.
And sixthly, encrypting the service user name according to the name disturbance value and the public key to generate an encrypted service user name. That is, it can pass
And (3) carrying out encryption processing on the service user name to generate an encrypted service user name. Where U may represent an encrypted service user name. R may represent a name perturbation value. e is a common index. N is the total number.% may represent the remainder operation. H () may represent a hash operation. c may represent a service user name.
Step 303, the service server builds an encrypted service user identifier sample list according to the generated encrypted service user code set and the encrypted service user name set, and sends the encrypted service user identifier sample list to the power terminal.
In some embodiments, the service server may construct an encrypted service user identifier sample list according to the generated encrypted service user code set and the encrypted service user name set, and send the encrypted service user identifier sample list to the power terminal.
In practice, the service server may construct an encrypted service user identifier sample list by:
first, constructing an empty list of encrypted service user identification samples.
And a second step of combining the encrypted service user code and the encrypted service user name corresponding to the encrypted service user code into an encrypted service user identification sample for each encrypted service user code in the encrypted service user code set. Combining may be referred to as merging. That is, the encrypted service user name corresponding to the encrypted service user code may refer to an encrypted service user name of the same service user sample as the encrypted service user code.
And thirdly, adding each encrypted service user identification sample into the above encrypted service user identification sample empty list to obtain an encrypted service user identification sample list.
Step 304, the power terminal responds to the received encrypted service subscriber identification sample list, and performs conversion processing on each encrypted service subscriber identification sample in the encrypted service subscriber identification sample list to generate a converted encrypted service subscriber identification sample list, constructs an encrypted power subscriber sample list according to the private key and the power subscriber sample set, and sends the encrypted power subscriber sample list and the converted encrypted service subscriber identification sample list to the service server.
In some embodiments, the power terminal may respond to receiving the encrypted service subscriber identity sample list, perform conversion processing on each encrypted service subscriber identity sample in the encrypted service subscriber identity sample list to generate a converted encrypted service subscriber identity sample list, construct an encrypted power subscriber sample list according to the private key and the power subscriber sample set, and send the encrypted power subscriber sample list and the converted encrypted service subscriber identity sample list to the service server. The power consumer samples in the power consumer sample set include a power consumer code and a power consumer name. Here, the power consumer code may represent a unified social credit code field of the power terminal stored enterprise user. The power consumer name may represent a business name stored by the power terminal. The power consumer sample set may refer to power sample information stored by the power terminal for each enterprise consumer.
In practice, the executing body may perform conversion processing on each encrypted service subscriber identity sample in the encrypted service subscriber identity sample list to generate a converted encrypted service subscriber identity sample list by:
the first step, creating a sample empty list of the transformed encrypted service user identification, and adding each transformed encrypted service user identification sample into the sample empty list of the transformed encrypted service user identification to obtain a sample list of the transformed encrypted service user identification.
Each conversion encryption service user identification sample is obtained through the following processing steps:
and a first sub-step, in response to determining that the encrypted service user code included in the encrypted service user identification sample is not null, performing encryption processing on the encrypted service user code according to the private key to generate a target encrypted service user code. That is, it can pass
And (3) carrying out encryption processing on the encrypted service user codes to generate target encrypted service user codes.Where z may represent the target encrypted service user code. u may represent an encrypted service user code. d is a private exponent. N is the total number. % may represent the remainder operation.
And a second sub-step, in response to determining that the encrypted service user name included in the encrypted service user identification sample is not null, performing encryption processing on the encrypted service user name according to the private key to generate a target encrypted service user name. That is, it can pass
And (3) carrying out encryption processing on the encrypted service user name to generate a target encrypted service user name. Where x may represent the target encrypted service user name. U may represent an encrypted service user name. d is a private exponent. N is the total number. % may represent the remainder operation.
And a third sub-step of combining the target encrypted service user code and the target encrypted service user name into a converted encrypted service user identification sample.
In practice, the above power terminal may construct an encrypted power consumer sample list by:
first, constructing an encrypted power consumer sample empty list, and adding each encrypted power consumer sample into the encrypted power consumer sample empty list to obtain an encrypted power consumer sample list.
Each encrypted power consumer sample is obtained through the following processing steps:
a first sub-step of determining whether a power consumer code included in the power consumer sample is empty.
And a second sub-step of encrypting the power consumer code using the private key to generate an encrypted power consumer code in response to determining that the power consumer code is not empty. That is, it can pass
And (3) carrying out encryption processing on the power user code to generate an encrypted power user code. Wherein m may represent an encrypted power consumer proxyAnd (5) code. a may represent a power consumer code. d is a private exponent. N is the total number. % may represent the remainder operation. H () may represent a hash operation.
And a third sub-step of determining whether the power consumer name included in the power consumer sample is empty.
And a fourth sub-step of encrypting the power consumer name by using the private key to generate an encrypted power consumer name in response to determining that the power consumer name is not empty. That is, it can pass
And (3) carrying out encryption processing on the power user name to generate an encrypted power user name. Where M may represent an encrypted power user name. A may represent a power consumer name. d is a private exponent. N is the total number. % may represent the remainder operation. H () may represent a hash operation.
And a fifth sub-step of combining the encrypted power consumer code and the encrypted power consumer name into an encrypted power consumer sample.
In step 305, the service server builds a common subscriber identity sample list according to the encrypted power subscriber sample list and the transformed encrypted service subscriber identity sample list, and sends the common subscriber identity sample list to the power terminal.
In some embodiments, the service server may construct a common subscriber identity sample list according to the encrypted power subscriber sample list and the transformed encrypted service subscriber identity sample list, and send the common subscriber identity sample list to the power terminal.
In practice, the service server may construct a common user identifier sample list by:
first, creating a reference encrypted service user identification sample empty list, and adding each reference encrypted service user identification sample to the reference encrypted service user identification sample empty list to obtain a reference encrypted service user identification sample list.
Each reference encrypted service user identification sample is obtained through the following processing steps:
a first sub-step of determining whether the target encrypted service user code included in the transformed encrypted service user identification sample is null.
And a second sub-step, in response to determining that the target encrypted service user code is not null, performing encryption processing on the encrypted service user code corresponding to the target encrypted service user code according to the private key and the associated code disturbance value to generate a reference encrypted service user code. The associated code perturbation value may refer to the code perturbation value corresponding to the target encrypted service user code. That is, it can pass
And (3) carrying out encryption processing on the encrypted service user codes to generate reference encrypted service user codes. Where k may represent a reference encrypted service user code. u may represent an encrypted service user code. d is a private exponent. N is the total number. % may represent the remainder operation. H () may represent a hash operation. r may represent a code perturbation value.
And a third sub-step, in response to determining that the target encrypted service user name is not null, performing encryption processing on the encrypted service user name corresponding to the target encrypted service user name according to the private key and the associated name perturbation value, so as to generate a reference encrypted service user name. That is, it can pass
And (3) carrying out encryption processing on the encrypted service user name to generate a reference encrypted service user name. Where K may represent a reference encrypted service user name. U may represent an encrypted service user name. d is a private exponent. N is the total number. % may represent the remainder operation. H () may represent a hash operation. R may represent a name perturbation value.
And a fourth sub-step of combining the reference encrypted service user code and the reference encrypted service user name into a reference encrypted service user identification sample.
And secondly, constructing a common user identification sample list according to the encrypted power user sample list and the reference encrypted service user identification sample list.
In practice, a shared user identification sample empty list can be constructed, and each shared user identification sample is added into the shared user identification sample empty list to obtain the shared user identification sample list.
Wherein, each shared user identification sample is obtained through the following processing steps:
1. and determining whether an encrypted power consumer sample matched with the reference encrypted service consumer code included in the reference encrypted service consumer identification sample exists in the encrypted power consumer sample list. That is, it is determined whether or not there is an encrypted power consumer sample in the encrypted power consumer sample list that includes the same encrypted power consumer code as the reference encrypted service consumer code included in the reference encrypted service consumer identification sample.
2. In response to determining that there is an encrypted power subscriber sample that includes an encrypted power subscriber code that matches a reference encrypted service subscriber code that includes the reference encrypted service subscriber identity sample, determining whether there is an encrypted power subscriber sample in the encrypted power subscriber sample list that includes an encrypted power subscriber name that matches a reference encrypted service subscriber name that includes the reference encrypted service subscriber identity sample. Matching may refer to the same.
3. And setting the matching state of the reference encrypted service subscriber identity sample to be a two-factor matching in response to determining that there is an encrypted power subscriber sample including an encrypted power subscriber name that matches a reference encrypted service subscriber name included in the reference encrypted service subscriber identity sample. The two-factor match indicates that the power subscriber code matches the service subscriber name.
4. And setting the matching state of the reference encrypted service subscriber identity sample as the power subscriber code matching in response to determining that no encrypted power subscriber sample exists, the encrypted power subscriber name of which matches the reference encrypted service subscriber name included in the reference encrypted service subscriber identity sample.
5. And determining the reference encrypted service user identification sample after the modification state as a common user identification sample.
The above related matters are taken as an invention point of the present disclosure, and solve the third technical problem mentioned in the background art, which causes the waste of computational resources. ". Factors that cause waste of computational resources are often as follows: the matching data is not classified, resulting in further parsing being required when using the data. If the above factors are solved, the effect of reducing the waste of the computational resources can be achieved. To achieve this, first, it is determined whether or not there is an encrypted power consumer sample in the encrypted power consumer sample list that matches the reference encrypted service consumer code included in the reference encrypted service consumer identification sample. Therefore, the matching state of the reference encrypted service user identification sample is conveniently marked according to the matching result. And secondly, in response to determining that the encrypted power consumer sample which is matched with the reference encrypted service consumer code which is included in the reference encrypted service consumer identification sample exists, determining whether the encrypted power consumer sample which is included in the encrypted power consumer sample list and the reference encrypted service consumer name which is included in the reference encrypted service consumer identification sample are matched. Then, in response to determining that there is an encrypted power subscriber sample that includes an encrypted power subscriber name that matches a reference encrypted service subscriber name that is included in the reference encrypted service subscriber identity sample, a matching state of the reference encrypted service subscriber identity sample is set to a two-factor match. Thus, it can be determined whether the data is a single-identity match or a double-identity match. Then, in response to determining that there is no encrypted power subscriber sample including an encrypted power subscriber name that matches a reference encrypted service subscriber name included in the reference encrypted service subscriber identification sample, setting a matching state of the reference encrypted service subscriber identification sample to a power subscriber code match. Finally, in response to determining that there is no encrypted power subscriber sample including an encrypted power subscriber code that matches a reference encrypted service subscriber code included in the reference encrypted service subscriber identity sample, and determining that there is an encrypted power subscriber sample including an encrypted power subscriber name that matches a reference encrypted service subscriber name included in the reference encrypted service subscriber identity sample, setting a matching state of the reference encrypted service subscriber identity sample to a service subscriber name match. Thus, it can be marked which identifications in the data are matching identifications. Therefore, when the data is used, the data user can directly screen the data according to the matching state, so that the data is prevented from being further analyzed. Furthermore, the waste of calculation power resources is reduced.
Referring now to fig. 4, a schematic diagram of an electronic device (e.g., a power terminal and/or a business server) 400 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic devices in some embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), car terminals (e.g., car navigation terminals), and the like, as well as stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 4, the electronic device 400 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 401, which may perform various suitable actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage means 408 into a Random Access Memory (RAM) 403. In the RAM403, various programs and data necessary for the operation of the electronic device 400 are also stored. The processing device 401, the ROM402, and the RAM403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
In general, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, magnetic tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 shows an electronic device 400 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 4 may represent one device or a plurality of devices as needed.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via communications device 409, or from storage 408, or from ROM 402. The above-described functions defined in the methods of some embodiments of the present disclosure are performed when the computer program is executed by the processing device 401.
It should be noted that, the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: in response to receiving a public key sent by a power terminal associated with the service server, for each service user sample in a service user sample set, respectively performing encryption processing on a service user code and a service user name included in the service user sample by using the public key to generate an encrypted service user code and an encrypted service user name; constructing an encrypted service user identification sample list according to the generated encrypted service user code set and the encrypted service user name set, transmitting the encrypted service user identification sample list to the power terminal, enabling the power terminal to respond to receiving the encrypted service user identification sample list, converting each encrypted service user identification sample in the encrypted service user identification sample list to generate a converted encrypted service user identification sample list, constructing an encrypted power user sample list according to the private key and the power user sample set, and transmitting the encrypted power user sample list and the converted encrypted service user identification sample list to the service server; and constructing a common user identification sample list according to the encrypted power user sample list and the conversion encrypted service user identification sample list, and sending the common user identification sample list to the power terminal.
Or cause the electronic device to: randomly generating a key pair and sending a public key of the key pair to an associated service server, wherein the key pair comprises a public key and a private key; responding to the received encrypted service user identification sample list sent by the service server, and converting each encrypted service user identification sample in the encrypted service user identification sample list to generate a converted encrypted service user identification sample list; and constructing an encrypted power user sample list according to the private key and the power user sample set, and sending the encrypted power user sample list and the converted encrypted service user identification sample list to the service server.
Computer program code for carrying out operations for some embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.