Data aggregation method, device, system and equipment based on fog computing and medium

By adopting a data aggregation method based on fog computing in the smart grid and using encryption technologies such as public keys and private keys, the problem of user privacy information leakage during data aggregation is solved, and the security and stability of the system are improved.

CN119892352AInactive Publication Date: 2025-04-25BEIJING SMARTCHIP MICROELECTRONICS TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510003100.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-04-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the smart grid, user privacy information faces a security threat of leakage during data aggregation, affecting the security and stability of the system.

Method used

Data aggregation method based on fog calculation is adopted to ensure the security of data transmission by generating the secret keys of public keys, private keys, super-incremental sequences and lightweight packet passwords.

Benefits of technology

It effectively reduces the probability of user data leakage and improves the security and stability of smart grid systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892352A_ABST
    Figure CN119892352A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power supply and distribution, in particular to a data aggregation method, device, system and equipment based on fog computing and a medium, the method is applied to a control end, and the method comprises the following steps: generating a public key, a private key, a hyper-incremental sequence and a secret key of a lightweight block cipher; sending a public key, a hyper-incremental sequence, a fog node random number and a secret key of the lightweight block cipher; receiving and analyzing the aggregated data to obtain fog aggregated power consumption data, a fog node message authentication code, a fog node identity identifier and a first timestamp; acquiring a control end message authentication code generated based on the fog node random number, the fog node identity label, the first timestamp and the secret key of the lightweight block cipher; and if the fog node message authentication code is matched with the control end message authentication code, decrypting the encrypted power consumption data in the aggregated power consumption data based on the public key, the private key and the hyper-incremental sequence. According to the scheme, the probability of user data leakage can be reduced, and the safety and stability of the smart power grid are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of power supply and distribution technology, and in particular to a data aggregation method, device, system, equipment and medium based on fog computing. Background Art

[0002] Smart grid is a new type of power grid that combines traditional power grid with modern information technology. Its emergence enhances the compatibility, controllability and self-healing of the entire power grid system. Data aggregation technology enables smart grid to collect, transmit and process data more efficiently.

[0003] In recent years, the amount of data generated by edge devices in smart grids has continued to increase. Bandwidth congestion and data transmission delays are becoming bottlenecks for cloud computing systems. At the same time, real-world IoT applications have put forward higher requirements for mobility support, location awareness, and low latency. Therefore, data aggregation in smart grids has become a more common solution.

[0004] However, the applicant found that as smart grids are booming, users' privacy information faces security threats of being leaked during the process of data aggregation, thereby damaging the security and stability of the smart grid system. Summary of the invention

[0005] In order to solve the problems in the related art, the embodiments of the present disclosure provide a data aggregation method, apparatus, system, device and medium based on fog computing.

[0006] In a first aspect, an embodiment of the present disclosure provides a data aggregation method based on fog computing, the method is applied to a control end, and the method includes:

[0007] Generate public keys and corresponding private keys, super-increasing sequences, and lightweight block cipher keys;

[0008] Send the public key and super-incrementing sequence to the user end, and send the fog node random number corresponding to the fog node and the secret key of the lightweight block cipher to the fog node;

[0009] Receiving aggregated data sent by the fog node, and parsing the aggregated data to obtain aggregated power consumption data, a fog node message authentication code, a fog node identity, and a first timestamp obtained by the fog node based on the data sent by the user end;

[0010] Obtain a control-end message authentication code generated based on a fog node random number corresponding to the fog node, a fog node identity in the aggregated data, a first timestamp, and a secret key of a lightweight block cipher;

[0011] If the fog node message authentication code matches the control end message authentication code, the encrypted power consumption data in the aggregated power consumption data is decrypted based on the public key, the private key, and the super-increasing sequence.

[0012] In one embodiment of the present disclosure, generating a public key and a corresponding private key, a super-incremental sequence, and a key of a lightweight block cipher includes:

[0013] Generate a public key (N, g) and the corresponding private key (λ, μ), a super-increasing sequence ( a1,a2, … ,al ) and the secret key K of the lightweight block cipher GIFT-COFB;

[0014] Obtaining a control-end message authentication code generated based on a fog node random number corresponding to the fog node, a fog node identity in the aggregated data, a first timestamp, and a secret key of a lightweight block cipher, including:

[0015] MAC-based GW =GIFT(ID GW ||b1||TS GW ||K) Generate the control end message authentication code MAC GW , where ID GW is the fog node identity in the aggregated data, TS GW is the first timestamp, b1 is the fog node random number corresponding to the fog node;

[0016] Decrypting the encrypted power consumption data in the aggregated power consumption data based on the public key, the private key, and the super-incremental sequence, including:

[0017] Based on Dec(C)=((C λ modN 2 -1) / (g λ modN 2 -1))modN obtains the decrypted aggregated data Dec(C), where C is the encrypted power consumption data in the aggregated power consumption data;

[0018] Solution To obtain the l types of electricity consumption data collected by the i-th user end (m i1 ,m i2 ,…,m il ).

[0019] In one embodiment of the present disclosure, before receiving the aggregated data sent by the fog node, the method further includes:

[0020] Receiving fog node registration request information sent by the fog node, and parsing the fog node registration request information to obtain a fog node registration message authentication code, a fog node identity, and a second timestamp;

[0021] Generate a fog node verification message authentication code based on the fog node random number corresponding to the fog node, the fog node identity in the fog node registration request information, the second timestamp, and the secret key of the lightweight block cipher;

[0022] If the fog node verification message authentication code matches the fog node registration message authentication code, the fog node is registered and a fog node registration confirmation message is sent to the fog node;

[0023] Receive aggregated data sent by fog nodes, including:

[0024] Receive aggregated data sent by registered fog nodes.

[0025] In one embodiment of the present disclosure, a fog node verification message authentication code is generated based on a fog node random number corresponding to the fog node, a fog node identity in the fog node registration request information, a second timestamp, and a secret key of a lightweight block cipher, including:

[0026] Based on MAC′ GW =GIFT(ID′ GW ||b1||TS′ GW ||K) Generate fog node verification message authentication code MAC′ GW , where ID′ GW is the fog node identity in the fog node registration request information, b1 is the fog node random number corresponding to the fog node, TS′ GW is the second timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0027] In one embodiment of the present disclosure, before receiving the aggregated data sent by the fog node, the method further includes:

[0028] Receiving user terminal registration request information sent by the user terminal, and parsing the user terminal registration request information to obtain a user terminal registration message authentication code, a user terminal identity identifier, and a third timestamp;

[0029] Generate a user terminal verification message authentication code based on a user terminal random number corresponding to the user terminal, a user terminal identity in the user terminal registration request information, a third timestamp in the user terminal registration request information, and a secret key of the lightweight block cipher;

[0030] If the user terminal verification message authentication code matches the user terminal registration message authentication code, the user terminal is registered and a user terminal registration confirmation message is sent to the user terminal.

[0031] In one embodiment of the present disclosure, a user terminal verification message authentication code is generated based on a user terminal random number corresponding to the user terminal, a user terminal identity in the user terminal registration request information, a third timestamp in the user terminal registration request information, and a secret key of a lightweight block cipher, including:

[0032] MAC-based i =GIFT(ID i ||b2||TS i ||K) Generate a message authentication code MAC for user verification i , where ID i is the user terminal identity in the user terminal registration request information, b2 is the user terminal random number corresponding to the user terminal, TS i is the third timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0033] In a second aspect, an embodiment of the present disclosure provides a data aggregation method based on fog computing, the method is applied to a fog node, and the method includes:

[0034] Receive the fog node random number corresponding to the fog node and the secret key of the lightweight block cipher sent by the control end;

[0035] Receive power consumption data uploaded by the client, and aggregate the power consumption data to obtain aggregated power consumption data;

[0036] generating a fog node message authentication code based on a fog node random number corresponding to the fog node, a fog node identity of the fog node itself, a fourth timestamp of the current time, and a secret key of the lightweight block cipher;

[0037] Aggregate data including at least aggregated power consumption data, a fog node message authentication code, a fog node identity of the fog node itself, and a fourth timestamp is generated, and the aggregate data is sent to the control end.

[0038] In one embodiment of the present disclosure, a fog node message authentication code is generated based on a fog node random number corresponding to a fog node, a fog node identity of the fog node itself, a fourth timestamp of the current time, and a secret key of a lightweight block cipher, including:

[0039] MAC-based GW =GIFT(ID″ GW ||b1||TS″ GW ||K) Generate fog node message authentication code MAC″ GW , where ID″ GW is the fog node identity of the fog node itself, b1 is the fog node random number corresponding to the fog node, TS″ GW is the fourth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0040] In one embodiment of the present disclosure, before receiving the power consumption data uploaded by the client and aggregating the power consumption data, the method further includes:

[0041] Generate a fog node registration message authentication code based on the fog node random number corresponding to the fog node, the fog node identity of the fog node itself, the fifth timestamp of the current time, and the secret key of the lightweight block cipher;

[0042] Sending fog node registration request information including fog node registration message authentication code to the control end;

[0043] Receiving fog node registration confirmation information sent by the control end in response to the fog node registration request information;

[0044] Receive power consumption data uploaded by the client and aggregate the power consumption data, including:

[0045] In response to the fog node registration confirmation information, the power consumption data uploaded by the client is received and the power consumption data is aggregated.

[0046] In one embodiment of the present disclosure, a fog node registration message authentication code is generated based on a fog node random number corresponding to a fog node, a fog node identity of the fog node itself, a fifth timestamp of the current time, and a secret key of a lightweight block cipher, including:

[0047] Get MAC-based GW =GIFT(ID″ GW ||b1||TS″′ GW ||K) generated fog node message authentication code MAC i , where ID″ GW is the fog node identity of the fog node itself, b1 is the fog node random number corresponding to the fog node, TS″′ GW is the fifth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0048] In a third aspect, an embodiment of the present disclosure provides a data aggregation method based on fog computing, which is applied to a user end and includes:

[0049] Receive the public key and super-incremental sequence sent by the control end;

[0050] Collecting electricity consumption data, and encrypting the aggregated electricity consumption data based on a public key and a super-increasing sequence to obtain encrypted electricity consumption data;

[0051] Send encrypted electricity usage data to fog nodes.

[0052] In one embodiment of the present disclosure, before collecting the electricity consumption data, the method further includes:

[0053] Receive the user-side random number and the secret key of the lightweight block cipher sent by the control end;

[0054] Generate a user registration message authentication code based on the user random number, the user identity of the user, the sixth timestamp of the current time, and the secret key of the lightweight block cipher;

[0055] Sending a user terminal registration request message including a user terminal registration message authentication code to the control terminal;

[0056] Receiving user terminal registration confirmation information sent by the control terminal in response to the user terminal registration request information;

[0057] Collect electricity consumption data, including:

[0058] In response to the user-side registration confirmation information, power consumption data is collected.

[0059] In one embodiment of the present disclosure, a user registration message authentication code is generated based on a user random number, a user identity of the user, a sixth timestamp of the current time, and a secret key of a lightweight block cipher, including:

[0060] Based on MAC′ i =GIFT(ID″i||b2||TS″ i ||K) Generate the user registration message authentication code MAC′ i , where ID i ′ is the client's own client identity, b2 is the client random number corresponding to the client, TS i ′ is the sixth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0061] In a fourth aspect, an embodiment of the present disclosure provides a data aggregation device based on fog computing, the device is located at a control end, and includes:

[0062] A key acquisition module, configured to generate a public key and a corresponding private key, a super-incremental sequence, and a key for a lightweight block cipher;

[0063] The secret key sending module is configured to send a public key and a super-incrementing sequence to a user terminal, and send a fog node random number corresponding to the fog node and a secret key of a lightweight block cipher to a fog node;

[0064] A data parsing module is configured to receive aggregated data sent by the fog node and parse the aggregated data to obtain aggregated power consumption data, a fog node message authentication code, a fog node identity, and a first timestamp obtained by the fog node based on the data sent by the user terminal;

[0065] A first authentication code acquisition module is configured to obtain a control end message authentication code generated based on a fog node random number corresponding to the fog node, a fog node identity in the aggregated data, a first timestamp, and a secret key of a lightweight block cipher;

[0066] The data decryption module is configured to decrypt the encrypted power usage data in the aggregated power usage data based on the public key, the private key, and the super-incremental sequence if the fog node message authentication code matches the control end message authentication code.

[0067] In one embodiment of the present disclosure, the key acquisition module is specifically configured as follows:

[0068] Generate a public key (N, g) and the corresponding private key (λ, μ), a super-increasing sequence (a1, a2, …, a l ) and the secret key K of the lightweight block cipher GIFT-COFB;

[0069] The first authentication code acquisition module is specifically configured as follows:

[0070] MAC-based GW =GIFT(ID GW ||b1||TS GW ||K) Generate the control end message authentication code MAC GW , where ID GW is the fog node identity in the aggregated data, TS GW is the first timestamp, b1 is the fog node random number corresponding to the fog node;

[0071] The data decryption module is specifically configured as follows:

[0072] Based on Dec(C)=((C λ modN 2 -1) / (g λ modN 2 -1))modN obtains the decrypted aggregated data Dec(C), where C is the encrypted power consumption data in the aggregated power consumption data;

[0073] Solution To obtain the l types of electricity consumption data collected by the i-th user end (m i1 ,m i2 ,…,m il ).

[0074] In one embodiment of the present disclosure, the apparatus further includes a fog node registration module configured to:

[0075] Receiving fog node registration request information sent by the fog node, and parsing the fog node registration request information to obtain a fog node registration message authentication code, a fog node identity, and a second timestamp;

[0076] Generate a fog node verification message authentication code based on the fog node random number corresponding to the fog node, the fog node identity in the fog node registration request information, the second timestamp, and the secret key of the lightweight block cipher;

[0077] If the fog node verification message authentication code matches the fog node registration message authentication code, the fog node is registered and a fog node registration confirmation message is sent to the fog node;

[0078] The data parsing module is specifically configured as follows:

[0079] Receive aggregated data sent by registered fog nodes.

[0080] In one embodiment of the present disclosure, the fog node registration module is specifically configured as follows:

[0081] Based on MAC′ GW =GIFT(ID′ GW ||b1||TS′ GW ||K) Generate fog node verification message authentication code MAC′ GW , where ID′ GW is the fog node identity in the fog node registration request information, b1 is the fog node random number corresponding to the fog node, TS′ GW is the second timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0082] In one embodiment of the present disclosure, the device further includes a user-side registration module configured to:

[0083] Receiving user terminal registration request information sent by the user terminal, and parsing the user terminal registration request information to obtain a user terminal registration message authentication code, a user terminal identity identifier, and a third timestamp;

[0084] Generate a user terminal verification message authentication code based on a user terminal random number corresponding to the user terminal, a user terminal identity in the user terminal registration request information, a third timestamp in the user terminal registration request information, and a secret key of the lightweight block cipher;

[0085] If the user terminal verification message authentication code matches the user terminal registration message authentication code, the user terminal is registered and a user terminal registration confirmation message is sent to the user terminal.

[0086] In one embodiment of the present disclosure, the user-side registration module is specifically configured as follows:

[0087] MAC-based i =GIFT(ID i ||b2||TS i||K) Generate a message authentication code MAC for user verification i , where ID i is the user terminal identity in the user terminal registration request information, b2 is the user terminal random number corresponding to the user terminal, TS i is the third timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0088] In a fifth aspect, an embodiment of the present disclosure provides a data aggregation device based on fog computing, the device is located at a fog node, and includes:

[0089] The key receiving module is configured to receive a fog node random number corresponding to the fog node and a key of a lightweight block cipher sent by the control terminal;

[0090] A data aggregation module is configured to receive the power consumption data uploaded by the client and aggregate the power consumption data to obtain aggregated power consumption data;

[0091] A second authentication code acquisition module is configured to generate a fog node message authentication code based on a fog node random number corresponding to the fog node, a fog node identity of the fog node itself, a fourth timestamp of the current time, and a secret key of the lightweight block cipher;

[0092] The first data sending module is configured to generate aggregated data including at least aggregated power consumption data, a fog node message authentication code, a fog node identity identifier of the fog node itself, and a fourth timestamp, and send the aggregated data to the control end.

[0093] In one embodiment of the present disclosure, the second authentication code acquisition module is specifically configured as follows:

[0094] MAC-based GW =GIFT(ID″ GW ||b1||TS″ GW ||K) Generate fog node message authentication code MAC″ GW , where ID″ GW is the fog node identity of the fog node itself, b1 is the fog node random number corresponding to the fog node, TS″ GW is the fourth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0095] In one embodiment of the present disclosure, the apparatus further includes a fog node registration request module, which is configured to:

[0096] Generate a fog node registration message authentication code based on the fog node random number corresponding to the fog node, the fog node identity of the fog node itself, the fifth timestamp of the current time, and the secret key of the lightweight block cipher;

[0097] Sending fog node registration request information including fog node registration message authentication code to the control end;

[0098] Receiving fog node registration confirmation information sent by the control end in response to the fog node registration request information;

[0099] The data aggregation module is specifically configured as follows:

[0100] In response to the fog node registration confirmation information, the power consumption data uploaded by the client is received and the power consumption data is aggregated.

[0101] In one embodiment of the present disclosure, the fog node request registration module is specifically configured as follows:

[0102] Get MAC-based GW =GIFT(ID″ GW ||b1||TS″′ GW ||K) generated fog node message authentication code MAC i , where ID″ GW is the fog node identity of the fog node itself, b1 is the fog node random number corresponding to the fog node, TS″′ GW is the fifth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0103] In a sixth aspect, an embodiment of the present disclosure provides a data aggregation device based on fog computing, the device is located at a user end, and includes:

[0104] A public key receiving module is configured to receive a public key and a super-incrementing sequence sent by a control terminal;

[0105] A data collection module is configured to collect power consumption data and encrypt the aggregated power consumption data based on a public key and a super-incremental sequence to obtain encrypted power consumption data;

[0106] The second data sending module is configured to send encrypted electricity usage data to the fog node.

[0107] In one embodiment of the present disclosure, the device further includes a user-side registration request module configured to:

[0108] Receive the user-side random number and the secret key of the lightweight block cipher sent by the control end;

[0109] Generate a user registration message authentication code based on the user random number, the user identity of the user, the sixth timestamp of the current time, and the secret key of the lightweight block cipher;

[0110] Sending a user terminal registration request message including a user terminal registration message authentication code to the control terminal;

[0111] Receiving user terminal registration confirmation information sent by the control terminal in response to the user terminal registration request information;

[0112] The data acquisition module is specifically configured as follows:

[0113] In response to the user-side registration confirmation information, power consumption data is collected.

[0114] In one embodiment of the present disclosure, the user terminal registration request module is specifically configured as follows:

[0115] Based on MAC′ i =GIFT(ID i ′||b2||TS i ′||K) Generate the user-side registration message authentication code MAC′ i , where ID i ′ is the client's own client identity, b2 is the client random number corresponding to the client, TS i ′ is the sixth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0116] In the seventh aspect, a data aggregation system based on fog computing is provided in an embodiment of the present disclosure, characterized in that the system includes a control end, a fog node and a user end, the control end includes the data aggregation device based on fog computing according to any one of the third aspects, the fog node includes the data aggregation device based on fog computing according to any one of the fourth aspects, and the user end includes the data aggregation device based on fog computing according to any one of the fifth aspects.

[0117] In an eighth aspect, an embodiment of the present disclosure provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement a method as described in any one of the first aspect, the second aspect and the third aspect.

[0118] In the ninth aspect, a computer-readable storage medium is provided in an embodiment of the present disclosure, on which computer instructions are stored. When the computer instructions are executed by a processor, the method as described in any one of the first aspect, the second aspect and the third aspect is implemented.

[0119] According to the technical solution provided by the embodiment of the present disclosure, by generating a public key and a corresponding private key, a super-incremental sequence and a secret key of a lightweight block cipher; sending a public key and a super-incremental sequence to a user end, and sending a fog node random number corresponding to the fog node and a secret key of a lightweight block cipher to a fog node; receiving the aggregated data sent by the fog node, and parsing the aggregated data to obtain the aggregated power consumption data, the fog node message authentication code, the fog node identity and the first timestamp obtained by the fog node based on the data sent by the user end; obtaining the control end message authentication code generated based on the fog node random number corresponding to the fog node, the fog node identity in the aggregated data, the first timestamp and the secret key of the lightweight block cipher; if the fog node message authentication code matches the control end message authentication code, then the encrypted power consumption data in the aggregated power consumption data is decrypted based on the public key, the private key and the super-incremental sequence. This solution can reduce the probability of user data leakage in the process of data aggregation, thereby improving the security and stability of the smart grid system.

[0120] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0121] Figure 1 A flowchart of a data aggregation method based on fog computing according to an embodiment of the present disclosure is shown.

[0122] Figure 2 A flowchart of a data aggregation method based on fog computing according to an embodiment of the present disclosure is shown.

[0123] Figure 3 A flowchart of a data aggregation method based on fog computing according to an embodiment of the present disclosure is shown.

[0124] Figure 4 A structural block diagram of a data aggregation device based on fog computing according to an embodiment of the present disclosure is shown.

[0125] Figure 5 A structural block diagram of a data aggregation device based on fog computing according to an embodiment of the present disclosure is shown.

[0126] Figure 6 A structural block diagram of a data aggregation device based on fog computing according to an embodiment of the present disclosure is shown.

[0127] Figure 7 A structural block diagram of a data aggregation system based on fog computing according to an embodiment of the present disclosure is shown.

[0128] Figure 8 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0129] Fig. 9 A schematic diagram showing the structure of a computer system suitable for implementing the method according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0130] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts not related to the description of the exemplary embodiments are omitted in the accompanying drawings.

[0131] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate the presence of features, numbers, steps, behaviors, components, parts, or a combination thereof disclosed in the present specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or a combination thereof exist or are added.

[0132] It should also be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0133] In the present disclosure, if it involves operations of obtaining user information or user data or displaying user information or user data to others, the operations are all authorized and confirmed by the user, or actively selected by the user.

[0134] In recent years, the amount of data generated by edge devices in smart grids has continued to increase. Bandwidth congestion and data transmission delays are becoming bottlenecks for cloud computing systems. At the same time, real-world IoT applications have put forward higher requirements for mobility support, location awareness, and low latency. Therefore, data aggregation in smart grids has become a more common solution.

[0135] However, the applicant found that as smart grids are booming, users' privacy information faces security threats of being leaked during the process of data aggregation, thereby damaging the security and stability of the smart grid system.

[0136] In order to solve the above problems, the embodiments of the present disclosure provide a data aggregation method, apparatus, system, device and medium based on fog computing.

[0137] According to the technical solution provided by the embodiment of the present disclosure, by generating a public key and a corresponding private key, a super-incremental sequence and a secret key of a lightweight block cipher; sending a public key and a super-incremental sequence to a user end, and sending a fog node random number corresponding to the fog node and a secret key of a lightweight block cipher to a fog node; receiving the aggregated data sent by the fog node, and parsing the aggregated data to obtain the aggregated power consumption data, the fog node message authentication code, the fog node identity and the first timestamp obtained by the fog node based on the data sent by the user end; obtaining the control end message authentication code generated based on the fog node random number corresponding to the fog node, the fog node identity in the aggregated data, the first timestamp and the secret key of the lightweight block cipher; if the fog node message authentication code matches the control end message authentication code, then the encrypted power consumption data in the aggregated power consumption data is decrypted based on the public key, the private key and the super-incremental sequence. This solution can reduce the probability of user data leakage in the process of data aggregation, thereby improving the security and stability of the smart grid system.

[0138] Figure 1 A flow chart of a data aggregation method based on fog computing according to an embodiment of the present disclosure is shown. The method is applied to the control end, such as Figure 1 As shown, the data aggregation method based on fog computing includes the following steps S101-S105:

[0139] In step S101, a public key and a corresponding private key, a super-incremental sequence and a key of a lightweight block cipher are generated;

[0140] In step S102, a public key and a super-incrementing sequence are sent to the user end, and a fog node random number corresponding to the fog node and a secret key of a lightweight block cipher are sent to the fog node;

[0141] In step S103, the aggregated data sent by the fog node is received, and the aggregated data is parsed to obtain the aggregated power consumption data, the fog node message authentication code, the fog node identity and the first timestamp obtained by the fog node based on the data sent by the user end;

[0142] In step S104, a control end message authentication code generated based on a fog node random number corresponding to the fog node, a fog node identity in the aggregated data, a first timestamp, and a secret key of a lightweight block cipher is obtained;

[0143] In step S105, if the fog node message authentication code matches the control end message authentication code, the encrypted power usage data in the aggregated power usage data is decrypted based on the public key, the private key, and the super-incremental sequence.

[0144] In one implementation of the present disclosure, the user end can be understood as a device set at the edge for collecting, storing and processing the user's electricity consumption data, such as a smart meter. The fog node can be understood as a server or router with a memory in the smart grid; the control end, the fog node and the user end can transmit data via wired or wireless means. Among them, by distributing data collection and processing in the fog nodes and the user end, rather than performing all of it by the control end, the time required for data transmission and processing can be effectively shortened, so that it has less delay, thereby reducing the computing and storage pressure of the control end, and improving the efficiency of data collection, transmission and processing.

[0145] According to the technical solution provided by the embodiment of the present disclosure, by generating a public key and a corresponding private key, a super-incremental sequence and a secret key of a lightweight block cipher; sending a public key and a super-incremental sequence to a user end, and sending a fog node random number corresponding to the fog node and a secret key of a lightweight block cipher to a fog node; receiving the aggregated data sent by the fog node, and parsing the aggregated data to obtain the aggregated power consumption data, the fog node message authentication code, the fog node identity and the first timestamp obtained by the fog node based on the data sent by the user end; obtaining the control end message authentication code generated based on the fog node random number corresponding to the fog node, the fog node identity in the aggregated data, the first timestamp and the secret key of the lightweight block cipher; if the fog node message authentication code matches the control end message authentication code, then the encrypted power consumption data in the aggregated power consumption data is decrypted based on the public key, the private key and the super-incremental sequence. This solution can reduce the probability of user data leakage in the process of data aggregation, thereby improving the security and stability of the smart grid system.

[0146] In one embodiment of the present disclosure, generating a public key and a corresponding private key, a super-incremental sequence, and a key of a lightweight block cipher includes:

[0147] Generate a public key (N, g) and the corresponding private key (λ, μ), a super-increasing sequence (a1, a2, …, a l ) and the secret key K of the lightweight block cipher GIFT-COFB;

[0148] Obtaining a control-end message authentication code generated based on a fog node random number corresponding to the fog node, a fog node identity in the aggregated data, a first timestamp, and a secret key of a lightweight block cipher, including:

[0149] MAC-based GW =GIFT(ID GW ||b1||TS GW ||K) Generate the control end message authentication code MAC GW , where ID GW is the fog node identity in the aggregated data, TSGW is the first timestamp, b1 is the fog node random number corresponding to the fog node, (ID GW ||b1||TS GW ||K) is the pair ID GW , b1, TS GW And K for cascading, GIFT (ID GW ||b1||TS GW ||K) is to perform lightweight block encryption on the result of the above cascade;

[0150] Decrypting the encrypted power consumption data in the aggregated power consumption data based on the public key, the private key, and the super-incremental sequence, including:

[0151] Based on Dec(C)=((C λ modN 2 -1) / (g λ modN 2 -1))modN obtains the decrypted aggregate data Dec(C), where C is the encrypted power consumption data in the aggregated power consumption data, and mod is the modulus operator;

[0152] Solution To obtain the l types of electricity consumption data collected by the i-th user end (m i1 ,m i2 ,…,m il ).

[0153] According to the technical solution provided by the embodiment of the present disclosure, through the above solution, the reliability of matching the fog node message authentication code with the control end message authentication code can be ensured, while improving the efficiency of decrypting the encrypted power consumption data in the aggregated power consumption data.

[0154] In one embodiment of the present disclosure, before receiving the aggregated data sent by the fog node, the method further includes:

[0155] Receiving fog node registration request information sent by the fog node, and parsing the fog node registration request information to obtain a fog node registration message authentication code, a fog node identity, and a second timestamp;

[0156] Generate a fog node verification message authentication code based on the fog node random number corresponding to the fog node, the fog node identity in the fog node registration request information, the second timestamp, and the secret key of the lightweight block cipher;

[0157] If the fog node verification message authentication code matches the fog node registration message authentication code, the fog node is registered and a fog node registration confirmation message is sent to the fog node;

[0158] Receive aggregated data sent by fog nodes, including:

[0159] Receive aggregated data sent by registered fog nodes.

[0160] According to the technical solution provided by the embodiment of the present disclosure, the fog node registration request information sent by the fog node is received, and the fog node registration request information is parsed to obtain the fog node registration message authentication code, the fog node identity and the second timestamp; the fog node verification message authentication code is generated based on the fog node random number corresponding to the fog node, the fog node identity in the fog node registration request information, the second timestamp and the secret key of the lightweight block cipher; if the fog node verification message authentication code matches the fog node registration message authentication code, the fog node is registered, and the fog node registration confirmation information is sent to the fog node; the aggregated data sent by the registered fog node is received. The above scheme can ensure that the fog node is registered before receiving the aggregated data sent by the fog node, thereby avoiding the situation of obtaining illegal aggregated data from unregistered fog nodes, which helps to further reduce the probability of user data leakage in the process of data aggregation.

[0161] In one embodiment of the present disclosure, a fog node verification message authentication code is generated based on a fog node random number corresponding to the fog node, a fog node identity in the fog node registration request information, a second timestamp, and a secret key of a lightweight block cipher, including:

[0162] Based on MAC′ GW =GIFT(ID′ GW ||b1||TS′ GW ||K) Generate fog node verification message authentication code MAC′ GW , where ID′ GW is the fog node identity in the fog node registration request information, b1 is the fog node random number corresponding to the fog node, TS′ GW is the second timestamp, K is the secret key of the lightweight block cipher GIFT-COFB, (ID′ GW ||b1||TS′ GW ||K) is the pair ID′ GW , b1, TS′ GW And K cascade, GIFT (ID ′ GW ||b1||TS′ GW ||K) is to perform lightweight block encryption on the above cascade result.

[0163] In one embodiment of the present disclosure, before receiving the aggregated data sent by the fog node, the method further includes:

[0164] Receiving user terminal registration request information sent by the user terminal, and parsing the user terminal registration request information to obtain a user terminal registration message authentication code, a user terminal identity identifier, and a third timestamp;

[0165] Generate a user terminal verification message authentication code based on a user terminal random number corresponding to the user terminal, a user terminal identity in the user terminal registration request information, a third timestamp in the user terminal registration request information, and a secret key of the lightweight block cipher;

[0166] If the user terminal verification message authentication code matches the user terminal registration message authentication code, the user terminal is registered and a user terminal registration confirmation message is sent to the user terminal.

[0167] According to the technical solution provided by the embodiment of the present disclosure, the user terminal registration request information sent by the user terminal is received and the user terminal registration request information is parsed to obtain the user terminal registration message authentication code, the user terminal identity and the third timestamp; the user terminal verification message authentication code is generated based on the user terminal random number corresponding to the user terminal, the user terminal identity in the user terminal registration request information, the third timestamp in the user terminal registration request information and the secret key of the lightweight block cipher; if the user terminal verification message authentication code matches the user terminal registration message authentication code, the user terminal is registered and the user terminal registration confirmation information is sent to the user terminal. According to the above scheme, the user terminal can be registered to ensure that the fog node can receive the data sent by the registered user terminal, which helps to further reduce the probability of user data leakage in the process of data aggregation.

[0168] In one embodiment of the present disclosure, a user terminal verification message authentication code is generated based on a user terminal random number corresponding to the user terminal, a user terminal identity in the user terminal registration request information, a third timestamp in the user terminal registration request information, and a secret key of a lightweight block cipher, including:

[0169] MAC-based i =GIFT(ID i ||b2||TS i ||K) Generate a message authentication code MAC for user verification i , where ID i is the user terminal identity in the user terminal registration request information, b2 is the user terminal random number corresponding to the user terminal, TS i is the third timestamp, K is the secret key of the lightweight block cipher GIFT-COFB, where (ID i ||b2||TS i ||K) is the pair ID i , b2, TS i And K for cascading, MAC i =GIFT(ID i ||b2||TS i ||K) is to perform lightweight block encryption on the above cascade result.

[0170] According to the technical solution provided by the embodiment of the present disclosure, the reliability of the user-side verification message authentication code and the efficiency of generating the user-side verification message authentication code can be improved.

[0171] Figure 2 A flow chart of a data aggregation method based on fog computing according to an embodiment of the present disclosure is shown. The method is applied to fog nodes, such as Figure 2 As shown, the data aggregation method based on fog computing includes the following steps S201-S204:

[0172] In step S201, a fog node random number corresponding to the fog node and a secret key of a lightweight block cipher sent by a control terminal are received;

[0173] In step S202, power consumption data uploaded by the client is received, and the power consumption data is aggregated to obtain aggregated power consumption data;

[0174] In step S203, a fog node message authentication code is generated based on the fog node random number corresponding to the fog node, the fog node identity of the fog node itself, a fourth timestamp of the current time, and a secret key of the lightweight block cipher;

[0175] In step S204, aggregated data including at least the aggregated power consumption data, the fog node message authentication code, the fog node's own fog node identity and a fourth timestamp is generated, and the aggregated data is sent to the control end.

[0176] According to the technical solution provided by the embodiment of the present disclosure, by receiving the fog node random number corresponding to the fog node and the secret key of the lightweight block cipher sent by the control end; receiving the power consumption data uploaded by the client, and aggregating the power consumption data to obtain the aggregated power consumption data; generating the fog node message authentication code based on the fog node random number corresponding to the fog node, the fog node's own fog node identity, the fourth timestamp of the current time and the secret key of the lightweight block cipher; generating aggregated data including at least the aggregated power consumption data, the fog node message authentication code, the fog node's own fog node identity and the fourth timestamp, and sending the aggregated data to the control end. Based on the above scheme, the probability of user data leakage can be reduced in the process of data aggregation, thereby improving the security and stability of the smart grid system.

[0177] In one embodiment of the present disclosure, a fog node message authentication code is generated based on a fog node random number corresponding to a fog node, a fog node identity of the fog node itself, a fourth timestamp of the current time, and a secret key of a lightweight block cipher, including:

[0178] MAC-based GW =GIFT(ID″ GW ||b1||TS″ GW||K) Generate fog node message authentication code MAC″ GW , where ID″ GW is the fog node identity of the fog node itself, b1 is the fog node random number corresponding to the fog node, TS″ GW is the fourth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0179] According to the technical solution provided by the embodiment of the present disclosure, through the above solution, the reliability of the fog node message authentication code generated by the secret key and the efficiency of the fog node message authentication code generated by the secret key can be improved.

[0180] In one embodiment of the present disclosure, before receiving the power consumption data uploaded by the client and aggregating the power consumption data, the method further includes:

[0181] Generate a fog node registration message authentication code based on the fog node random number corresponding to the fog node, the fog node identity of the fog node itself, the fifth timestamp of the current time, and the secret key of the lightweight block cipher;

[0182] Sending fog node registration request information including fog node registration message authentication code to the control end;

[0183] Receiving fog node registration confirmation information sent by the control end in response to the fog node registration request information;

[0184] Receive power consumption data uploaded by the client and aggregate the power consumption data, including:

[0185] In response to the fog node registration confirmation information, the power consumption data uploaded by the client is received and the power consumption data is aggregated.

[0186] According to the technical solution provided by the embodiment of the present disclosure, a fog node registration message authentication code is generated based on the fog node random number corresponding to the fog node, the fog node identity of the fog node itself, the fifth timestamp of the current time, and the secret key of the lightweight block cipher; a fog node registration request message including the fog node registration message authentication code is sent to the control end; the fog node registration confirmation message sent by the control end in response to the fog node registration request message is received; in response to the fog node registration confirmation message, the power consumption data uploaded by the client is received, and the power consumption data is aggregated. The above scheme can register the fog node, thereby avoiding the situation where the control end obtains illegal aggregated data from unregistered fog nodes, which helps to further reduce the probability of user data leakage in the process of data aggregation.

[0187] In one embodiment of the present disclosure, a fog node registration message authentication code is generated based on a fog node random number corresponding to a fog node, a fog node identity of the fog node itself, a fifth timestamp of the current time, and a secret key of a lightweight block cipher, including:

[0188] Get MAC-based GW =GIFT(ID″ GW ||b1||TS″′ GW ||K) generated fog node message authentication code MAC i , where ID″ GW is the fog node identity of the fog node itself, b1 is the fog node random number corresponding to the fog node, TS″′ GW is the fifth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0189] According to the technical solution provided by the embodiment of the present disclosure, through the above solution, the reliability of the secret key to generate the fog node registration message authentication code and the efficiency of the secret key to generate the fog node registration message authentication code can be improved.

[0190] Figure 3 A flow chart of a data aggregation method based on fog computing according to an embodiment of the present disclosure is shown. The method is applied to a user end, such as Figure 3 As shown, the data aggregation method based on fog computing includes the following steps S301-S303:

[0191] In step S301, a public key and a super-incremental sequence sent by a control terminal are received;

[0192] In step S302, electricity consumption data is collected, and the aggregated electricity consumption data is encrypted based on a public key and a super-incremental sequence to obtain encrypted electricity consumption data;

[0193] In step S303, the encrypted electricity usage data is sent to the fog node.

[0194] According to the technical solution provided by the embodiment of the present disclosure, by receiving the public key and super-incremental sequence sent by the control end; collecting power consumption data, and encrypting the aggregated power consumption data based on the public key and super-incremental sequence to obtain encrypted power consumption data; sending the encrypted power consumption data to the fog node. This solution can reduce the probability of user data leakage during data aggregation, thereby improving the security and stability of the smart grid system.

[0195] In one embodiment of the present disclosure, before collecting the electricity consumption data, the method further includes:

[0196] Receive the user-side random number and the secret key of the lightweight block cipher sent by the control end;

[0197] Generate a user registration message authentication code based on the user random number, the user identity of the user, the sixth timestamp of the current time, and the secret key of the lightweight block cipher;

[0198] Sending a user terminal registration request message including a user terminal registration message authentication code to the control terminal;

[0199] Receiving user terminal registration confirmation information sent by the control terminal in response to the user terminal registration request information;

[0200] Collect electricity consumption data, including:

[0201] In response to the user-side registration confirmation information, power consumption data is collected.

[0202] According to the technical solution provided by the embodiment of the present disclosure, by receiving the user-side random number and the secret key of the lightweight block cipher sent by the control end; generating the user-side registration message authentication code based on the user-side random number, the user-side identity of the user end itself, the sixth timestamp of the current time and the secret key of the lightweight block cipher; sending the user-side registration request information including the user-side registration message authentication code to the control end; receiving the user-side registration confirmation information sent by the control end in response to the user-side registration request information; and collecting the power consumption data in response to the user-side registration confirmation information. According to the above scheme, the user end can be registered to ensure that the fog node can receive the data sent by the registered user end, which helps to further reduce the probability of user data leakage in the process of data aggregation.

[0203] In one embodiment of the present disclosure, a user registration message authentication code is generated based on a user random number, a user identity of the user, a sixth timestamp of the current time, and a secret key of a lightweight block cipher, including:

[0204] Based on MAC′ i =GIFT(ID i ′||b2||TS i ′||K) Generate the user-side registration message authentication code MAC′ i , where ID i ′ is the client's own client identity, b2 is the client random number corresponding to the client, TS i ′ is the sixth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0205] According to the technical solution provided by the embodiment of the present disclosure, the reliability of the user-side registration message authentication code and the efficiency of generating the user-side registration message authentication code can be improved.

[0206] Figure 4 The structural block diagram of the data aggregation device based on fog computing according to an embodiment of the present disclosure is shown. The device is located at the control end and can be implemented as part or all of the electronic device through software, hardware or a combination of both.

[0207] like Figure 4As shown, the data aggregation device 400 based on fog computing includes:

[0208] The key acquisition module 401 is configured to generate a public key and a corresponding private key, a super-incremental sequence, and a key for a lightweight block cipher;

[0209] The key sending module 402 is configured to send a public key and a super-incrementing sequence to a user terminal, and send a fog node random number corresponding to the fog node and a key of a lightweight block cipher to a fog node;

[0210] The data parsing module 403 is configured to receive the aggregated data sent by the fog node and parse the aggregated data to obtain the aggregated power consumption data, the fog node message authentication code, the fog node identity and the first timestamp obtained by the fog node based on the data sent by the user terminal;

[0211] The first authentication code acquisition module 404 is configured to obtain a control end message authentication code generated based on a fog node random number corresponding to the fog node, a fog node identity in the aggregated data, a first timestamp, and a secret key of a lightweight block cipher;

[0212] The data decryption module 405 is configured to decrypt the encrypted power usage data in the aggregated power usage data based on the public key, the private key, and the super-incremental sequence if the fog node message authentication code matches the control end message authentication code.

[0213] In one embodiment of the present disclosure, the key acquisition module 401 is specifically configured as follows:

[0214] Generate a public key (N, g) and the corresponding private key (λ, μ), a super-increasing sequence (a1, a2, …, a l ) and the secret key K of the lightweight block cipher GIFT-COFB;

[0215] The first authentication code acquisition module 404 is specifically configured as follows:

[0216] MAC-based GW =GIFT(ID GW |||b1||TS GW ||K) Generate the control end message authentication code MAC GW , where ID GW is the fog node identity in the aggregated data, TS GW is the first timestamp, b1 is the fog node random number corresponding to the fog node;

[0217] The data decryption module 405 is specifically configured as follows:

[0218] Based on Dec(C)=((C λ modN 2-1) / (g λ modN 2 -1))modN obtains the decrypted aggregated data Dec(C), where C is the encrypted power consumption data in the aggregated power consumption data;

[0219] Solution To obtain the l types of electricity consumption data collected by the i-th user end (m i1 ,m i2 ,…,m il ).

[0220] In one embodiment of the present disclosure, the apparatus further includes a fog node registration module configured to:

[0221] Receiving fog node registration request information sent by the fog node, and parsing the fog node registration request information to obtain a fog node registration message authentication code, a fog node identity, and a second timestamp;

[0222] Generate a fog node verification message authentication code based on the fog node random number corresponding to the fog node, the fog node identity in the fog node registration request information, the second timestamp, and the secret key of the lightweight block cipher;

[0223] If the fog node verification message authentication code matches the fog node registration message authentication code, the fog node is registered and a fog node registration confirmation message is sent to the fog node;

[0224] The data analysis module 403 is specifically configured as follows:

[0225] Receive aggregated data sent by registered fog nodes.

[0226] In one embodiment of the present disclosure, the fog node registration module is specifically configured as follows:

[0227] Based on MAC′ GW =GIFT(ID′ GW ||b1||TS′ GW ||K) Generate fog node verification message authentication code MAC′ GW , where ID′ GW is the fog node identity in the fog node registration request information, b1 is the fog node random number corresponding to the fog node, TS′ GW is the second timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0228] In one embodiment of the present disclosure, the device further includes a user-side registration module configured to:

[0229] Receiving user terminal registration request information sent by the user terminal, and parsing the user terminal registration request information to obtain a user terminal registration message authentication code, a user terminal identity identifier, and a third timestamp;

[0230] Generate a user terminal verification message authentication code based on a user terminal random number corresponding to the user terminal, a user terminal identity in the user terminal registration request information, a third timestamp in the user terminal registration request information, and a secret key of the lightweight block cipher;

[0231] If the user terminal verification message authentication code matches the user terminal registration message authentication code, the user terminal is registered and a user terminal registration confirmation message is sent to the user terminal.

[0232] In one embodiment of the present disclosure, the user-side registration module is specifically configured as follows:

[0233] MAC-based i =GIFT(ID i ||b2||TS i ||K) Generate a message authentication code MAC for user verification i , where ID i is the user terminal identity in the user terminal registration request information, b2 is the user terminal random number corresponding to the user terminal, TS i is the third timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0234] Figure 5 The structural block diagram of a data aggregation device based on fog computing according to an embodiment of the present disclosure is shown. The device is located in a fog node and can be implemented as part or all of an electronic device through software, hardware, or a combination of both.

[0235] like Figure 5 As shown, the data aggregation device 500 based on fog computing includes:

[0236] The key receiving module 501 is configured to receive a fog node random number corresponding to the fog node and a key of a lightweight block cipher sent by the control terminal;

[0237] The data aggregation module 502 is configured to receive the power consumption data uploaded by the client and aggregate the power consumption data to obtain aggregated power consumption data;

[0238] The second authentication code acquisition module 503 is configured to generate a fog node message authentication code based on a fog node random number corresponding to the fog node, a fog node identity of the fog node itself, a fourth timestamp of the current time, and a secret key of the lightweight block cipher;

[0239] The first data sending module 504 is configured to generate aggregated data including at least the aggregated power consumption data, the fog node message authentication code, the fog node's own fog node identity and a fourth timestamp, and send the aggregated data to the control end.

[0240] In one embodiment of the present disclosure, the second authentication code acquisition module 503 is specifically configured as follows:

[0241] MAC-based GW =GIFT(ID″ GW ||b1||TS″ GW ||K) Generate fog node message authentication code MAC″ GW , where ID″ GW is the fog node identity of the fog node itself, b1 is the fog node random number corresponding to the fog node, TS″ GW is the fourth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0242] In one embodiment of the present disclosure, the apparatus further includes a fog node registration request module, which is configured to:

[0243] Generate a fog node registration message authentication code based on the fog node random number corresponding to the fog node, the fog node identity of the fog node itself, the fifth timestamp of the current time, and the secret key of the lightweight block cipher;

[0244] Sending fog node registration request information including fog node registration message authentication code to the control end;

[0245] Receiving fog node registration confirmation information sent by the control end in response to the fog node registration request information;

[0246] The data aggregation module 502 is specifically configured to:

[0247] In response to the fog node registration confirmation information, the power consumption data uploaded by the client is received and the power consumption data is aggregated.

[0248] In one embodiment of the present disclosure, the fog node request registration module is specifically configured as follows:

[0249] Get MAC-based GW =GIFT(ID″ GW ||b1||TS″′ GW ||K) generated fog node message authentication code MAC i , where ID″ GW is the fog node identity of the fog node itself, b1 is the fog node random number corresponding to the fog node, TS″′ GW is the fifth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0250] According to the technical solution provided by the embodiment of the present disclosure, by receiving the fog node random number corresponding to the fog node and the secret key of the lightweight block cipher sent by the control end; receiving the power consumption data uploaded by the client, and aggregating the power consumption data to obtain the aggregated power consumption data; generating the fog node message authentication code based on the fog node random number corresponding to the fog node, the fog node's own fog node identity, the fourth timestamp of the current time and the secret key of the lightweight block cipher; generating aggregated data including at least the aggregated power consumption data, the fog node message authentication code, the fog node's own fog node identity and the fourth timestamp, and sending the aggregated data to the control end. Based on the above scheme, the probability of user data leakage can be reduced in the process of data aggregation, thereby improving the security and stability of the smart grid system.

[0251] Figure 6 The structural block diagram of a data aggregation device based on fog computing according to an embodiment of the present disclosure is shown. The device is located at the user end and can be implemented as part or all of an electronic device through software, hardware or a combination of both.

[0252] like Figure 6 As shown, the data aggregation device 600 based on fog computing includes:

[0253] The public key receiving module 601 is configured to receive the public key and the super-incremental sequence sent by the control terminal;

[0254] The data collection module 602 is configured to collect power consumption data and encrypt the aggregated power consumption data based on a public key and a super-incremental sequence to obtain encrypted power consumption data;

[0255] The second data sending module 603 is configured to send encrypted electricity usage data to the fog node.

[0256] In one embodiment of the present disclosure, the device further includes a user-side registration request module configured to:

[0257] Receive the user-side random number and the secret key of the lightweight block cipher sent by the control end;

[0258] Generate a user registration message authentication code based on the user random number, the user identity of the user, the sixth timestamp of the current time, and the secret key of the lightweight block cipher;

[0259] Sending a user terminal registration request message including a user terminal registration message authentication code to the control terminal;

[0260] Receiving user terminal registration confirmation information sent by the control terminal in response to the user terminal registration request information;

[0261] The data acquisition module 602 is specifically configured as follows:

[0262] In response to the user-side registration confirmation information, power consumption data is collected.

[0263] In one embodiment of the present disclosure, the user terminal registration request module is specifically configured as follows:

[0264] Based on MAC′ i =GIFT(ID i ′||b2||TS i 'K) Generate the user-side registration message authentication code MAC' i , where ID i ′ is the client's own client identity, b2 is the client random number corresponding to the client, TS i ′ is the sixth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0265] According to the technical solution provided by the embodiment of the present disclosure, by receiving the user-side random number and the secret key of the lightweight block cipher sent by the control end; generating the user-side registration message authentication code based on the user-side random number, the user-side identity of the user end itself, the sixth timestamp of the current time and the secret key of the lightweight block cipher; sending the user-side registration request information including the user-side registration message authentication code to the control end; receiving the user-side registration confirmation information sent by the control end in response to the user-side registration request information; and collecting the power consumption data in response to the user-side registration confirmation information. According to the above scheme, the user end can be registered to ensure that the fog node can receive the data sent by the registered user end, which helps to further reduce the probability of user data leakage in the process of data aggregation.

[0266] Figure 7 FIG. 2 shows a structural block diagram of a data aggregation system based on fog computing according to an embodiment of the present disclosure. Figure 7 As shown, the data aggregation system based on fog computing includes a control terminal 701, a fog node 702 and a user terminal 703. The control terminal 701 includes Figure 4 Corresponding to any one of the data aggregation devices based on fog computing, the fog node 702 includes Figure 5 Corresponding to any one of the fog computing-based data aggregation devices, the user terminal 703 includes Figure 6 Any corresponding data aggregation device based on fog computing.

[0267] The present disclosure also discloses an electronic device, Figure 8 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0268] like Figure 8As shown, the electronic device includes a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method according to an embodiment of the present disclosure.

[0269] In a first aspect, an embodiment of the present disclosure provides a data aggregation method based on fog computing, the method is applied to a control end, and the method includes:

[0270] Generate public keys and corresponding private keys, super-increasing sequences, and lightweight block cipher keys;

[0271] Send the public key and super-incrementing sequence to the user end, and send the fog node random number corresponding to the fog node and the secret key of the lightweight block cipher to the fog node;

[0272] Receiving aggregated data sent by the fog node, and parsing the aggregated data to obtain aggregated power consumption data, a fog node message authentication code, a fog node identity, and a first timestamp obtained by the fog node based on the data sent by the user end;

[0273] Obtain a control-end message authentication code generated based on a fog node random number corresponding to the fog node, a fog node identity in the aggregated data, a first timestamp, and a secret key of a lightweight block cipher;

[0274] If the fog node message authentication code matches the control end message authentication code, the encrypted power consumption data in the aggregated power consumption data is decrypted based on the public key, the private key, and the super-increasing sequence.

[0275] In one embodiment of the present disclosure, generating a public key and a corresponding private key, a super-incremental sequence, and a key of a lightweight block cipher includes:

[0276] Generate a public key (N, g) and the corresponding private key (λ, μ), a super-increasing sequence (a1, a2, …, a l ) and the secret key K of the lightweight block cipher GIFT-COFB;

[0277] Obtaining a control-end message authentication code generated based on a fog node random number corresponding to the fog node, a fog node identity in the aggregated data, a first timestamp, and a secret key of a lightweight block cipher, including:

[0278] MAC-based GW =GIFT(ID GW ||b1||TS GW ||K) Generate the control end message authentication code MAC GW , where ID GW is the fog node identity in the aggregated data, TS GW is the first timestamp, b1 is the fog node random number corresponding to the fog node;

[0279] Decrypting the encrypted power consumption data in the aggregated power consumption data based on the public key, the private key, and the super-incremental sequence, including:

[0280] Based on Dec(C)=((C λ modN 2 -1) / (g λ modN 2 -1))modN obtains the decrypted aggregated data Dec(C), where C is the encrypted power consumption data in the aggregated power consumption data;

[0281] Solution To obtain the l types of electricity consumption data collected by the i-th user end (m i1 ,m i2 ,…,m il ).

[0282] In one embodiment of the present disclosure, before receiving the aggregated data sent by the fog node, the method further includes:

[0283] Receiving fog node registration request information sent by the fog node, and parsing the fog node registration request information to obtain a fog node registration message authentication code, a fog node identity, and a second timestamp;

[0284] Generate a fog node verification message authentication code based on the fog node random number corresponding to the fog node, the fog node identity in the fog node registration request information, the second timestamp, and the secret key of the lightweight block cipher;

[0285] If the fog node verification message authentication code matches the fog node registration message authentication code, the fog node is registered and a fog node registration confirmation message is sent to the fog node;

[0286] Receive aggregated data sent by fog nodes, including:

[0287] Receive aggregated data sent by registered fog nodes.

[0288] In one embodiment of the present disclosure, a fog node verification message authentication code is generated based on a fog node random number corresponding to the fog node, a fog node identity in the fog node registration request information, a second timestamp, and a secret key of a lightweight block cipher, including:

[0289] Based on MAC′ GW =GIFT(ID′ GW ||b1||TS′ GW ||K) Generate fog node verification message authentication code MAC′ GW , where ID′ GWis the fog node identity in the fog node registration request information, b1 is the fog node random number corresponding to the fog node, TS′ GW is the second timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0290] In one embodiment of the present disclosure, before receiving the aggregated data sent by the fog node, the method further includes:

[0291] Receiving user terminal registration request information sent by the user terminal, and parsing the user terminal registration request information to obtain a user terminal registration message authentication code, a user terminal identity identifier, and a third timestamp;

[0292] Generate a user terminal verification message authentication code based on a user terminal random number corresponding to the user terminal, a user terminal identity in the user terminal registration request information, a third timestamp in the user terminal registration request information, and a secret key of the lightweight block cipher;

[0293] If the user terminal verification message authentication code matches the user terminal registration message authentication code, the user terminal is registered and a user terminal registration confirmation message is sent to the user terminal.

[0294] In one embodiment of the present disclosure, a user terminal verification message authentication code is generated based on a user terminal random number corresponding to the user terminal, a user terminal identity in the user terminal registration request information, a third timestamp in the user terminal registration request information, and a secret key of a lightweight block cipher, including:

[0295] MAC-based i =GIFT(ID i ||b2||TS i ||K) Generate a message authentication code MAC for user verification i , where ID i is the user terminal identity in the user terminal registration request information, b2 is the user terminal random number corresponding to the user terminal, TS i is the third timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0296] In a second aspect, an embodiment of the present disclosure provides a data aggregation method based on fog computing, the method is applied to a fog node, and the method includes:

[0297] Receive the fog node random number corresponding to the fog node and the secret key of the lightweight block cipher sent by the control end;

[0298] Receive power consumption data uploaded by the client, and aggregate the power consumption data to obtain aggregated power consumption data;

[0299] generating a fog node message authentication code based on a fog node random number corresponding to the fog node, a fog node identity of the fog node itself, a fourth timestamp of the current time, and a secret key of the lightweight block cipher;

[0300] Aggregate data including at least aggregated power consumption data, a fog node message authentication code, a fog node identity of the fog node itself, and a fourth timestamp is generated, and the aggregate data is sent to the control end.

[0301] In one embodiment of the present disclosure, a fog node message authentication code is generated based on a fog node random number corresponding to a fog node, a fog node identity of the fog node itself, a fourth timestamp of the current time, and a secret key of a lightweight block cipher, including:

[0302] MAC-based GW =GIFT(ID″ GW|| b1||TS″ GW ||K) Generate fog node message authentication code MAC″ GW , where ID″ GW is the fog node identity of the fog node itself, b1 is the fog node random number corresponding to the fog node, TS″ GW is the fourth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0303] In one embodiment of the present disclosure, before receiving the power consumption data uploaded by the client and aggregating the power consumption data, the method further includes:

[0304] Generate a fog node registration message authentication code based on the fog node random number corresponding to the fog node, the fog node identity of the fog node itself, the fifth timestamp of the current time, and the secret key of the lightweight block cipher;

[0305] Sending fog node registration request information including fog node registration message authentication code to the control end;

[0306] Receiving fog node registration confirmation information sent by the control end in response to the fog node registration request information;

[0307] Receive power consumption data uploaded by the client and aggregate the power consumption data, including:

[0308] In response to the fog node registration confirmation information, the power consumption data uploaded by the client is received and the power consumption data is aggregated.

[0309] In one embodiment of the present disclosure, a fog node registration message authentication code is generated based on a fog node random number corresponding to a fog node, a fog node identity of the fog node itself, a fifth timestamp of the current time, and a secret key of a lightweight block cipher, including:

[0310] Get MAC-basedGW =GIFT(ID″ GW ||b1||TS″′ GW ||K) generated fog node message authentication code MAC i , where ID″ GW is the fog node identity of the fog node itself, b1 is the fog node random number corresponding to the fog node, TS″′ GW is the fifth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0311] In a third aspect, an embodiment of the present disclosure provides a data aggregation method based on fog computing, which is applied to a user end and includes:

[0312] Receive the public key and super-incremental sequence sent by the control end;

[0313] Collecting electricity consumption data, and encrypting the aggregated electricity consumption data based on a public key and a super-increasing sequence to obtain encrypted electricity consumption data;

[0314] Send encrypted electricity usage data to fog nodes.

[0315] In one embodiment of the present disclosure, before collecting the electricity consumption data, the method further includes:

[0316] Receive the user-side random number and the secret key of the lightweight block cipher sent by the control end;

[0317] Generate a user registration message authentication code based on the user random number, the user identity of the user, the sixth timestamp of the current time, and the secret key of the lightweight block cipher;

[0318] Sending a user terminal registration request message including a user terminal registration message authentication code to the control terminal;

[0319] Receiving user terminal registration confirmation information sent by the control terminal in response to the user terminal registration request information;

[0320] Collect electricity consumption data, including:

[0321] In response to the user-side registration confirmation information, power consumption data is collected.

[0322] In one embodiment of the present disclosure, a user registration message authentication code is generated based on a user random number, a user identity of the user, a sixth timestamp of the current time, and a secret key of a lightweight block cipher, including:

[0323] Based on MAC′ i =GIFT(ID i ′||b2||TS i ′||K) Generate the user-side registration message authentication code MAC′i , where ID i ′ is the client's own client identity, b2 is the client random number corresponding to the client, TS i ′ is the sixth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

[0324] Fig. 9 A schematic diagram showing the structure of a computer system suitable for implementing the method according to an embodiment of the present disclosure is shown.

[0325] like Fig. 9 As shown, the computer system includes a processing unit, which can perform the various methods in the above-mentioned embodiments according to the program stored in the read-only memory (ROM) or the program loaded from the storage part into the random access memory (RAM). In the RAM, various programs and data required for the operation of the computer system are also stored. The processing unit, ROM and RAM are connected to each other through a bus. The input / output (I / O) interface is also connected to the bus.

[0326] The following components are connected to the I / O interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a LAN card, a modem, etc. The communication part performs a communication process via a network such as the Internet. The drive is also connected to the I / O interface as needed. Removable media, such as disks, optical disks, magneto-optical disks, semiconductor memories, etc., are installed on the drive as needed so that the computer program read therefrom is installed into the storage part as needed. Among them, the processing unit can be implemented as a processing unit such as a CPU, a GPU, a TPU, an FPGA, an NPU, etc.

[0327] In particular, according to an embodiment of the present disclosure, the method described above can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes a program code for executing the above method. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium.

[0328] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0329] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or programmable hardware. The units or modules described may also be set in a processor, and the names of these units or modules do not constitute limitations on the units or modules themselves in some cases.

[0330] As another aspect, the present disclosure further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the electronic device or computer system in the above embodiment; or a computer-readable storage medium that exists independently and is not assembled into a device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the method described in the present disclosure.

[0331] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.

Claims

1. A data aggregation method based on fog computing, characterized in that: The method is applied to a control end, and the method comprises: Generate public keys and corresponding private keys, super-increasing sequences, and lightweight block cipher keys; Sending the public key and the super-increasing sequence to the user terminal, and sending the fog node random number corresponding to the fog node and the secret key of the lightweight block cipher to the fog node; Receiving aggregated data sent by the fog node, and parsing the aggregated data to obtain aggregated power consumption data, a fog node message authentication code, a fog node identity, and a first timestamp obtained by the fog node based on the data sent by the user terminal; Obtain a control-end message authentication code generated based on a fog node random number corresponding to the fog node, a fog node identity in the aggregated data, the first timestamp, and a secret key of the lightweight block cipher; If the fog node message authentication code matches the control end message authentication code, the encrypted power usage data in the aggregated power usage data is decrypted based on the public key, the private key, and the super-incremental sequence.

2. The data aggregation method based on fog computing according to claim 1, characterized in that: The generating of the public key and the corresponding private key, the super-incremental sequence and the secret key of the lightweight block cipher comprises: Generate a public key (N, g) and the corresponding private key (λ, μ), a super-increasing sequence (a1, a2, … ,a l ) and the secret key K of the lightweight block cipher GIFT-COFB; The obtaining of a control end message authentication code generated based on a fog node random number corresponding to a fog node, a fog node identity in the aggregated data, the first timestamp, and a secret key of the lightweight block cipher includes: Based on MA GW =GIFT(ID GW ||b1||TS GW ||K) Generate the control end message authentication code MAC GW , where ID GW is the fog node identity in the aggregated data, TS GW is the first timestamp, b1 is the fog node random number corresponding to the fog node; The decrypting the encrypted power usage data in the aggregated power usage data based on the public key, the private key, and the super-incremental sequence includes: Based on Dec(C)=((C λ modN 2 -1) / (g λ mod N 2 -1))modN obtains decrypted aggregated data Dec(C), where C is the encrypted power consumption data in the aggregated power consumption data; Solution To obtain the l types of electricity consumption data collected by the i-th user end (m i1 ,m i2 ,…,m il ).

3. The data aggregation method based on fog computing according to claim 1, characterized in that: Before receiving the aggregated data sent by the fog node, the method further includes: Receiving fog node registration request information sent by the fog node, and parsing the fog node registration request information to obtain a fog node registration message authentication code, a fog node identity, and a second timestamp; Generate a fog node verification message authentication code based on a fog node random number corresponding to the fog node, a fog node identity in the fog node registration request information, the second timestamp, and a secret key of the lightweight block cipher; If the fog node verification message authentication code matches the fog node registration message authentication code, registering the fog node and sending fog node registration confirmation information to the fog node; The receiving the aggregated data sent by the fog node includes: Receive aggregated data sent by registered fog nodes.

4. The data aggregation method based on fog computing according to claim 3 is characterized in that: The generating a fog node verification message authentication code based on a fog node random number corresponding to the fog node, a fog node identity in the fog node registration request information, the second timestamp, and a secret key of the lightweight block cipher includes: Based on MAC′ GW =GIFT(ID′ GW ||b1||TS′ GW ||K) Generate fog node verification message authentication code MAC′ GW , where ID′ GW is the fog node identity in the fog node registration request information, b1 is the fog node random number corresponding to the fog node, TS′ GW is the second timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

5. The data aggregation method based on fog computing according to claim 1, characterized in that: Before receiving the aggregated data sent by the fog node, the method further includes: Receiving user terminal registration request information sent by the user terminal, and parsing the user terminal registration request information to obtain a user terminal registration message authentication code, a user terminal identity identifier, and a third timestamp; Generate a user terminal verification message authentication code based on a user terminal random number corresponding to the user terminal, a user terminal identity in the user terminal registration request information, a third timestamp in the user terminal registration request information, and a secret key of the lightweight block cipher; If the user terminal verification message authentication code matches the user terminal registration message authentication code, the user terminal is registered and user terminal registration confirmation information is sent to the user terminal.

6. The data aggregation method based on fog computing according to claim 5, characterized in that: The generating of a user terminal verification message authentication code based on a user terminal random number corresponding to the user terminal, a user terminal identity in the user terminal registration request information, a third timestamp in the user terminal registration request information, and a secret key of the lightweight block cipher comprises: MAC-based i =GIFT(ID i ||b2||TS i ||K) Generate a message authentication code MAC for user verification i , where ID i is the user terminal identity in the user terminal registration request information, b2 is the user terminal random number corresponding to the user terminal, TS i is the third timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

7. A data aggregation method based on fog computing, characterized in that: The method is applied to a fog node, and the method comprises: Receiving a fog node random number corresponding to the fog node and a secret key of a lightweight block cipher sent by a control terminal; Receiving power consumption data uploaded by a client, and aggregating the power consumption data to obtain aggregated power consumption data; generating a fog node message authentication code based on a fog node random number corresponding to the fog node, a fog node identity of the fog node itself, a fourth timestamp of the current time, and a secret key of the lightweight block cipher; Aggregate data including at least the aggregated power consumption data, the fog node message authentication code, the fog node identity of the fog node itself, and the fourth timestamp is generated, and the aggregated data is sent to the control end.

8. The data aggregation method based on fog computing according to claim 7, characterized in that: The generating a fog node message authentication code based on a fog node random number corresponding to the fog node, a fog node identity of the fog node itself, a fourth timestamp of the current time, and a secret key of the lightweight block cipher comprises: MAC-based GW =GIFT(ID″ GW ||b1||TS″ GW ||K) Generate fog node message authentication code MAC″ GW , where ID″ GW is the fog node identity of the fog node itself, b1 is the fog node random number corresponding to the fog node, TS″ GW is the fourth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

9. The data aggregation method based on fog computing according to claim 7, characterized in that: Before receiving the power consumption data uploaded by the client and aggregating the power consumption data, the method further includes: Generate a fog node registration message authentication code based on a fog node random number corresponding to the fog node, a fog node identity of the fog node itself, a fifth timestamp of the current time, and a secret key of the lightweight block cipher; Sending fog node registration request information including the fog node registration message authentication code to the control end; Receiving fog node registration confirmation information sent by the control end in response to the fog node registration request information; The receiving the power consumption data uploaded by the client and aggregating the power consumption data includes: In response to the fog node registration confirmation information, the power consumption data uploaded by the client is received and the power consumption data is aggregated.

10. The data aggregation method based on fog computing according to claim 9, characterized in that: The generating a fog node registration message authentication code based on a fog node random number corresponding to the fog node, a fog node identity of the fog node itself, a fifth timestamp of the current time, and a secret key of the lightweight block cipher comprises: Get MAC-based GW =GIFT(ID″ GW ||b1||TS″′ GW ||K) generated fog node message authentication code MAC i , where ID″ GW is the fog node identity of the fog node itself, b1 is the fog node random number corresponding to the fog node, TS″′ GW is the fifth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

11. A data aggregation method based on fog computing, characterized in that: The method is applied to a user terminal, and the method comprises: Receive the public key and super-incremental sequence sent by the control end; Collecting electricity usage data, and encrypting the aggregated electricity usage data based on the public key and the super-incremental sequence to obtain encrypted electricity usage data; The encrypted electricity usage data is sent to the fog node.

12. The data aggregation method based on fog computing according to claim 11, characterized in that: Before collecting the electricity consumption data, the method further includes: Receive the user-side random number and the secret key of the lightweight block cipher sent by the control end; Generate a user terminal registration message authentication code based on the user terminal random number, the user terminal identity of the user terminal itself, a sixth timestamp of the current time, and a secret key of the lightweight block cipher; Sending a user terminal registration request message including the user terminal registration message authentication code to the control terminal; Receiving user terminal registration confirmation information sent by the control terminal in response to the user terminal registration request information; The collecting of electricity consumption data includes: In response to the user-side registration confirmation information, the power usage data is collected.

13. The data aggregation method based on fog computing according to claim 12, characterized in that: The generating of the user terminal registration message authentication code based on the user terminal random number, the user terminal identity of the user terminal itself, the sixth timestamp of the current time and the secret key of the lightweight block cipher comprises: Based on MAC′ i =GIFT(ID′ i ||b2||TS′ i ||) Generate the user-side registration message authentication code MAC′ i , where ID′ i is the client identity of the client itself, b2 is the client random number corresponding to the client, TS′ i is the sixth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

14. A data aggregation device based on fog computing, characterized in that: The device is located at the control end and includes: A key acquisition module, configured to generate a public key and a corresponding private key, a super-incremental sequence, and a key for a lightweight block cipher; A secret key sending module is configured to send the public key and the super-incrementing sequence to the user terminal, and send a fog node random number corresponding to the fog node and a secret key of the lightweight block cipher to the fog node; A data parsing module is configured to receive aggregated data sent by the fog node and parse the aggregated data to obtain aggregated power consumption data, a fog node message authentication code, a fog node identity, and a first timestamp obtained by the fog node based on the data sent by the user terminal; A first authentication code acquisition module is configured to obtain a control end message authentication code generated based on a fog node random number corresponding to a fog node, a fog node identity in the aggregated data, the first timestamp, and a secret key of the lightweight block cipher; The data decryption module is configured to decrypt the encrypted power usage data in the aggregated power usage data based on the public key, the private key, and the super-incremental sequence if the fog node message authentication code matches the control end message authentication code.

15. The data aggregation device based on fog computing according to claim 14, characterized in that: The secret key acquisition module is specifically configured as follows: Generate a public key (N, g) and the corresponding private key (λ, μ), a super-increasing sequence (a1, a2, …, a l ) and the secret key K of the lightweight block cipher GIFT-COFB; The first authentication code acquisition module is specifically configured as follows: MAC-based GW =GIFT(ID GW ||b1||TS GW ||K) Generate the control end message authentication code MAC GW , where ID GW is the fog node identity in the aggregated data, TS GW is the first timestamp, b1 is the fog node random number corresponding to the fog node; The data decryption module is specifically configured as follows: Based on Dec(C)=((C λ modN 2 -1) / (g λ modN 2 -1))modN obtains decrypted aggregated data Dec(C), where C is the encrypted power consumption data in the aggregated power consumption data; Solution To obtain the l types of electricity consumption data collected by the i-th user end (m i1 ,m i2 ,…,m il ).

16. The data aggregation device based on fog computing according to claim 14, characterized in that: The apparatus further comprises a fog node registration module, configured to: Receiving fog node registration request information sent by the fog node, and parsing the fog node registration request information to obtain a fog node registration message authentication code, a fog node identity, and a second timestamp; Generate a fog node verification message authentication code based on a fog node random number corresponding to the fog node, a fog node identity in the fog node registration request information, the second timestamp, and a secret key of the lightweight block cipher; If the fog node verification message authentication code matches the fog node registration message authentication code, registering the fog node and sending fog node registration confirmation information to the fog node; The data parsing module is specifically configured as follows: Receive aggregated data sent by registered fog nodes.

17. The data aggregation device based on fog computing according to claim 16, characterized in that: The fog node registration module is specifically configured as follows: Based on MAC′ GW =GIFT(ID′ GW ||b1||TS′ GW ||K) Generate fog node verification message authentication code MAC′ GW , where ID′ GW is the fog node identity in the fog node registration request information, b1 is the fog node random number corresponding to the fog node, TS′ GW is the second timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

18. The data aggregation device based on fog computing according to claim 14, characterized in that: The device also includes a user terminal registration module, which is configured to: Receiving user terminal registration request information sent by the user terminal, and parsing the user terminal registration request information to obtain a user terminal registration message authentication code, a user terminal identity identifier, and a third timestamp; Generate a user terminal verification message authentication code based on a user terminal random number corresponding to the user terminal, a user terminal identity in the user terminal registration request information, a third timestamp in the user terminal registration request information, and a secret key of the lightweight block cipher; If the user terminal verification message authentication code matches the user terminal registration message authentication code, the user terminal is registered and user terminal registration confirmation information is sent to the user terminal.

19. The data aggregation device based on fog computing according to claim 18, characterized in that: The user-side registration module is specifically configured as follows: MAC-based i =GIFT(ID i ||b2||TS i ||K) Generate a message authentication code MAC for user verification i , where ID i is the user terminal identity in the user terminal registration request information, b2 is the user terminal random number corresponding to the user terminal, TS i is the third timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

20. A data aggregation device based on fog computing, characterized in that: The device is located in the fog node and includes: A key receiving module is configured to receive a fog node random number corresponding to the fog node and a key of a lightweight block cipher sent by a control terminal; A data aggregation module is configured to receive the power consumption data uploaded by the client and aggregate the power consumption data to obtain aggregated power consumption data; A second authentication code acquisition module is configured to generate a fog node message authentication code based on a fog node random number corresponding to the fog node, a fog node identity of the fog node itself, a fourth timestamp of the current time, and a secret key of the lightweight block cipher; The first data sending module is configured to generate aggregated data including at least the aggregated power consumption data, the fog node message authentication code, the fog node identity of the fog node itself and the fourth timestamp, and send the aggregated data to the control end.

21. The data aggregation device based on fog computing according to claim 20, characterized in that: The second authentication code acquisition module is specifically configured as follows: MAC-based GW =GIFT(ID″ GW ||b1||TS″ GW ||K) Generate fog node message authentication code MAC″ GW , where ID″ GW is the fog node identity of the fog node itself, b1 is the fog node random number corresponding to the fog node, TS″ GW is the fourth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

22. The data aggregation device based on fog computing according to claim 20, characterized in that: The device also includes a fog node registration request module, which is configured to: Generate a fog node registration message authentication code based on a fog node random number corresponding to the fog node, a fog node identity of the fog node itself, a fifth timestamp of the current time, and a secret key of the lightweight block cipher; Sending fog node registration request information including the fog node registration message authentication code to the control end; Receiving fog node registration confirmation information sent by the control end in response to the fog node registration request information; The data aggregation module is specifically configured as follows: In response to the fog node registration confirmation information, the power consumption data uploaded by the client is received and the power consumption data is aggregated.

23. The data aggregation device based on fog computing according to claim 22, characterized in that: The fog node request registration module is specifically configured as follows: Get MAC-based GW =GIFT(ID″ GW ||b1||TS″′ GW ||K) generated fog node message authentication code MAC i , where ID″ GW is the fog node identity of the fog node itself, b1 is the fog node random number corresponding to the fog node, TS″′ GW is the fifth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

24. A data aggregation device based on fog computing, characterized in that: The device is located at the user end and includes: A public key receiving module is configured to receive a public key and a super-incrementing sequence sent by a control terminal; a data collection module configured to collect power consumption data, and encrypt the aggregated power consumption data based on the public key and the super-incremental sequence to obtain encrypted power consumption data; The second data sending module is configured to send the encrypted electricity usage data to the fog node.

25. The data aggregation device based on fog computing according to claim 24, characterized in that: The device also includes a user-side registration request module, which is configured to: Receive the user-side random number and the secret key of the lightweight block cipher sent by the control end; Generate a user terminal registration message authentication code based on the user terminal random number, the user terminal identity of the user terminal itself, a sixth timestamp of the current time, and a secret key of the lightweight block cipher; Sending a user terminal registration request message including the user terminal registration message authentication code to the control terminal; Receiving user terminal registration confirmation information sent by the control terminal in response to the user terminal registration request information; The data acquisition module is specifically configured as follows: In response to the user-side registration confirmation information, the power usage data is collected.

26. The data aggregation device based on fog computing according to claim 25, characterized in that: The user-side registration request module is specifically configured as follows: Based on MAC′ i =GIFT(ID′ i ||b2||TS′ i ||K) Generate the user registration message authentication code MAC′ i , where ID′ i is the client identity of the client itself, b2 is the client random number corresponding to the client, TS′ i is the sixth timestamp, and K is the secret key of the lightweight block cipher GIFT-COFB.

27. A data aggregation system based on fog computing, characterized in that: The system includes a control end, a fog node and a user end. The control end includes the data aggregation device based on fog computing as described in any one of claims 14-19, the fog node includes the data aggregation device based on fog computing as described in any one of claims 20-23, and the user end includes the data aggregation device based on fog computing as described in any one of claims 24-26.

28. An electronic device, characterized in that: The method comprises a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps described in any one of claims 1 to 13.

29. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by a processor, the method steps of any one of claims 1-13 are implemented.

Citation Information

Patent Citations

  • System and method for network node authentication, reconfiguration and data transmission

    CN113259893A

  • Multi-dimensional privacy data aggregation method in smart power grid

    CN113691380A

  • Data maximum / minimum value aggregation method and system for privacy protection

    US20230318822A1