Motor cloud control method, device, equipment and medium based on homomorphic encryption
By adopting homomorphic encryption technology in cloud control systems, secure encrypted transmission and precise calculation of data are achieved, solving the problems of insufficient data security and accuracy in existing cloud control systems and improving control effects and data privacy.
Patent Information
- Application Number
- CN202211154518.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-09-21
AI Technical Summary
Existing cloud control systems have problems with low security and poor accuracy in data storage and computing, resulting in poor control effects.
This motor cloud control method, based on homomorphic encryption, ensures data security and accuracy by transmitting encrypted ciphertext between the cloud controller and the offline controller. This involves generating a public-private key pair on the offline side, uploading the public key to the cloud for encryption calculations, and decrypting it on the offline side to achieve encrypted control of the motor armature parameters.
It improves the security and accuracy of data transmission, enhances the control effect of the cloud controller on the motor armature, and ensures the privacy of data and the security of the cloud control system.
Smart Images

Figure CN115664713B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor design technology, and in particular to a motor cloud control method, device, equipment and medium based on homomorphic encryption. Background Art
[0002] With the development of the Internet, the requirements for data storage, data computing, etc. are constantly increasing. However, traditional control systems have weak information processing capabilities and low intelligence levels. Therefore, reality requires control systems to have more powerful and intelligent information interaction capabilities. The emergence and application of cloud computing just meet the current needs for data storage and data computing. In modern production, cloud computing is increasingly being used in complex control algorithms to realize cloud control of intelligent manufacturing systems to meet the current requirements for data storage and data computing.
[0003] However, cloud control systems that use cloud computing to apply complex control algorithms are still in the initial stage of development. There are still problems in data storage and calculation, such as lack of data storage security and low data calculation accuracy, which also leads to poor control effects of existing cloud control systems. Summary of the Invention
[0004] The main purpose of the present invention is to propose a motor cloud control method, device, equipment and medium based on homomorphic encryption, aiming to improve the control effect of the cloud controller.
[0005] To achieve the above objectives, the present invention provides a motor cloud control method based on homomorphic encryption, wherein the motor cloud control method based on homomorphic encryption is applied to a cloud controller, wherein the cloud controller is data-connected to an offline controller, and the method comprises:
[0006] Obtaining a public key and its corresponding public key ciphertext from the offline end controller;
[0007] Based on the preset cloud encryption rules, the public key and the public key ciphertext are encrypted and calculated to determine the corresponding encrypted ciphertext;
[0008] The encrypted ciphertext is sent to the offline controller to implement encrypted control of the parameters of the motor armature by the cloud controller.
[0009] Preferably, the step of performing encryption calculation on the public key and public key ciphertext based on a preset cloud encryption rule to determine the corresponding encrypted ciphertext includes:
[0010] Selecting a first preset control parameter, a second preset control parameter, an expected motor output value, and an expected motor output change value;
[0011] Encrypting the motor expected output value and the motor expected output change value according to the public key to determine the motor expected output ciphertext and the expected output change ciphertext;
[0012] The public key ciphertext is encrypted according to the first preset control parameter, the second preset control parameter, the motor expected output ciphertext and the expected output change ciphertext to determine the corresponding encrypted ciphertext.
[0013] Preferably, the encrypted ciphertext includes: a first encrypted ciphertext and a second encrypted ciphertext, and the step of encrypting the public key ciphertext according to the first preset control parameter, the second preset control parameter, the motor expected output ciphertext, and the expected output change ciphertext to determine the corresponding encrypted ciphertext includes:
[0014] Calculating a preset difference between the expected output value of the motor and the motor speed at the first moment according to a public key ciphertext containing the motor speed at a first moment and the motor speed increment at a second moment, and determining a corresponding first difference ciphertext;
[0015] and determining a corresponding second difference ciphertext by performing a preset difference calculation between the calculated motor expected output change value and the motor speed increment at the second moment;
[0016] Based on a preset encryption formula, the first preset control parameter and the second preset control parameter are added to the first difference ciphertext and the second difference ciphertext respectively, and a preset encryption calculation is performed to determine the corresponding first encrypted ciphertext and second encrypted ciphertext.
[0017] To achieve the above purpose, the present invention also provides a motor cloud control method based on homomorphic encryption, which is applied to an offline controller, wherein the offline controller is data-connected to a cloud controller, and the method includes:
[0018] Generate a public-private key pair based on a preset homomorphic encryption algorithm, determine a public key ciphertext corresponding to a public key in the public-private key pair, and send the public key in the public-private key pair and its corresponding public key ciphertext to the cloud controller;
[0019] Receiving an encrypted ciphertext encrypted by the cloud controller, wherein the encrypted ciphertext is obtained by encrypting and calculating the public key in the public-private key pair and its corresponding public key ciphertext;
[0020] The encrypted ciphertext is decrypted according to the private key in the public-private key pair, and the control voltage for updating the speed of the current motor armature is determined based on a preset voltage calculation formula.
[0021] Preferably, the steps of generating a public-private key pair based on a preset homomorphic encryption algorithm, determining a public key ciphertext corresponding to a public key in the public-private key pair, and sending the public key in the public-private key pair and its corresponding public key ciphertext to the cloud controller include:
[0022] Generating a public-private key pair based on the Paillier algorithm, and saving the private key of the public-private key pair to the offline controller, wherein the public-private key pair includes a public key and a private key;
[0023] Sampling the current motor speed to obtain the motor speed at the first moment and the motor speed increment at the second moment within a preset time period;
[0024] Encrypting the motor speed increments at the first moment and the second moment based on the Paillier algorithm to generate corresponding public key ciphertext;
[0025] The public key of the public-private key pair and its corresponding public key ciphertext are sent to the cloud controller.
[0026] Preferably, the step of decrypting the encrypted ciphertext according to the private key in the public-private key pair and determining the control voltage for updating the speed of the current motor armature based on a preset voltage calculation formula includes:
[0027] Obtaining a third preset control parameter and a fourth preset control parameter;
[0028] Substituting the third preset control parameter and the fourth preset control parameter into the first encrypted ciphertext and the second encrypted ciphertext in the encrypted ciphertext for decryption calculation, respectively, to determine the corresponding first voltage control parameter and the second voltage control parameter;
[0029] Based on the voltage calculation formula, the first voltage control parameter and the second voltage control parameter are calculated to determine the control voltage for updating the speed of the current motor armature.
[0030] In addition, to achieve the above-mentioned purpose, an embodiment of the present invention further provides a motor cloud control device, the motor cloud control device comprising:
[0031] A first receiving module, configured to obtain a public key and its corresponding public key ciphertext from the offline end controller;
[0032] A cloud encryption module, configured to perform encryption calculation on the public key and the public key ciphertext based on a preset cloud encryption rule to determine a corresponding encrypted ciphertext;
[0033] The first sending module is used to send the encrypted ciphertext to the offline controller to implement encrypted control of the parameters of the motor armature by the cloud controller.
[0034] Preferably, the cloud encryption module includes:
[0035] Selecting a first preset control parameter, a second preset control parameter, an expected motor output value, and an expected motor output change value;
[0036] Encrypting the motor expected output value and the motor expected output change value according to the public key to determine the motor expected output ciphertext and the expected output change ciphertext;
[0037] The public key ciphertext is encrypted according to the first preset control parameter, the second preset control parameter, the motor expected output ciphertext and the expected output change ciphertext to determine the corresponding encrypted ciphertext.
[0038] Preferably, the cloud encryption module further includes:
[0039] Calculating a preset difference between the expected output value of the motor and the motor speed at the first moment according to a public key ciphertext containing the motor speed at a first moment and the motor speed increment at a second moment, and determining a corresponding first difference ciphertext;
[0040] and determining a corresponding second difference ciphertext by performing a preset difference calculation between the calculated motor expected output change value and the motor speed increment at the second moment;
[0041] Based on a preset encryption formula, the first preset control parameter and the second preset control parameter are added to the first difference ciphertext and the second difference ciphertext respectively, and a preset encryption calculation is performed to determine the corresponding first encrypted ciphertext and second encrypted ciphertext.
[0042] Preferably, the motor cloud control device further includes:
[0043] A key pair generation module is used to generate a public-private key pair based on a preset homomorphic encryption algorithm, determine the public key ciphertext corresponding to the public key in the public-private key pair, and send the public key in the public-private key pair and its corresponding public key ciphertext to the cloud controller;
[0044] A second receiving module is configured to receive the encrypted ciphertext encrypted by the cloud controller, where the encrypted ciphertext is obtained by encrypting the public key in the public-private key pair and its corresponding public key ciphertext;
[0045] The local decryption module is used to decrypt the encrypted ciphertext according to the private key in the public-private key pair, and determine the control voltage for updating the speed of the current motor armature based on a preset voltage calculation formula.
[0046] Preferably, the key pair generation module includes:
[0047] Generating a public-private key pair based on the Paillier algorithm, and saving the private key of the public-private key pair to the offline controller, wherein the public-private key pair includes a public key and a private key;
[0048] Sampling the current motor speed to obtain the motor speed at the first moment and the motor speed increment at the second moment within a preset time period;
[0049] Encrypting the motor speed increments at the first moment and the second moment based on the Paillier algorithm to generate corresponding public key ciphertext;
[0050] The public key of the public-private key pair and its corresponding public key ciphertext are sent to the cloud controller.
[0051] Preferably, the local decryption module includes:
[0052] Obtaining a third preset control parameter and a fourth preset control parameter;
[0053] Substituting the third preset control parameter and the fourth preset control parameter into the first encrypted ciphertext and the second encrypted ciphertext in the encrypted ciphertext for decryption calculation, respectively, to determine the corresponding first voltage control parameter and the second voltage control parameter;
[0054] Based on the voltage calculation formula, the first voltage control parameter and the second voltage control parameter are calculated to determine the control voltage for updating the speed of the current motor armature.
[0055] In addition, to achieve the above-mentioned purpose, an embodiment of the present invention also proposes a device, which includes a memory, a processor, and a motor cloud control program stored in the memory and runnable on the processor. The motor cloud control program is executed by the processor to implement the steps of the motor cloud control method based on homomorphic encryption as described above.
[0056] In addition, to achieve the above-mentioned purpose, the present invention also provides a medium, which is a computer-readable storage medium, and a motor cloud control program is stored on the computer-readable storage medium. When the motor cloud control program is executed by the processor, the steps of the motor cloud control method based on homomorphic encryption as described above are implemented.
[0057] The present invention proposes a motor cloud control method, apparatus, device, and medium based on homomorphic encryption. The motor cloud control method based on homomorphic encryption is applied to a cloud controller and includes: obtaining a public key and its corresponding public key ciphertext from the offline controller; performing encryption calculations on the public key and public key ciphertext based on preset cloud encryption rules to determine the corresponding encrypted ciphertext; and sending the encrypted ciphertext to the offline controller to implement encrypted parameter control of the motor armature by the cloud controller. The motor cloud control method based on homomorphic encryption is also applied to the offline controller and includes: generating a public-private key pair based on a preset homomorphic encryption algorithm, determining the public key ciphertext corresponding to the public key in the public-private key pair, and sending the public key in the public-private key pair and its corresponding public key ciphertext to the cloud controller; receiving the encrypted ciphertext encrypted by the cloud controller, the encrypted ciphertext being obtained by performing encryption calculations on the public key in the public-private key pair and its corresponding public key ciphertext; decrypting the encrypted ciphertext using the private key in the public-private key pair, and determining the control voltage for updating the current motor armature speed based on a preset voltage calculation formula.
[0058] The present invention improves the accuracy of data by uploading the public key of the public-private key pair generated by the offline controller to the cloud controller and encrypting the operation data of the current motor armature through homomorphic encryption. In addition, the public key is uploaded to the cloud for encryption, and the private key is not uploaded to the cloud. The encrypted ciphertext after cloud encryption is decrypted in the offline controller, thereby ensuring the privacy of the operation data corresponding to the rotation operation of the current motor armature and improving the security of cloud control to a certain extent. Therefore, the control effect of the cloud control system on the motor armature is optimized. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 Schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the motor cloud control method based on homomorphic encryption of the present invention;
[0060] Figure 2 This is a flow chart of the first embodiment of the motor cloud control method based on homomorphic encryption of the present invention;
[0061] Figure 3 This is a timing flow diagram of the first embodiment of the motor cloud control method based on homomorphic encryption of the present invention;
[0062] Figure 4 This is a flow chart of a second embodiment of a motor cloud control method based on homomorphic encryption according to the present invention;
[0063] Figure 5 This is a sub-flow diagram of step S23 in the second embodiment of the motor cloud control method based on homomorphic encryption of the present invention;
[0064] Figure 6 This is a flow chart of the third embodiment of the motor cloud control method based on homomorphic encryption of the present invention;
[0065] Figure 7 This is a flow chart of a fourth embodiment of a motor cloud control method based on homomorphic encryption according to the present invention;
[0066] Figure 8 This is a flow chart of another implementation method of the fourth embodiment of the motor cloud control method based on homomorphic encryption of the present invention;
[0067] Figure 9 Schematic diagram of a specific flow chart of the fifth embodiment of the motor cloud control method based on homomorphic encryption of the present invention;
[0068] Figure 10 This is a schematic diagram of the functional modules of the motor cloud control device of the motor cloud control method based on homomorphic encryption of the present invention.
[0069] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0070] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0071] Specifically, refer to Figure 1 , Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the motor cloud control method based on homomorphic encryption of the present invention.
[0072] like Figure 1 As shown, the device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0073] like Figure 1As shown, memory 1005, a computer storage medium, may include an operating system, a network communication module, a user interface module, and a motor cloud control program. The operating system manages and controls device hardware and software resources, supporting the operation of the motor cloud control program and other software or programs. The network communication module manages and controls the network interface 1002. The user interface 1003 is primarily used for data communication with the client. The network interface 1004 is primarily used to establish a communication connection with the server. The processor 1001 can be used to call the motor cloud control program stored in memory 1005.
[0074] When the motor cloud control program stored in the memory 1005 is executed by the processor, the following steps are implemented:
[0075] Obtaining a public key and its corresponding public key ciphertext from the offline end controller;
[0076] Based on the preset cloud encryption rules, the public key and the public key ciphertext are encrypted and calculated to determine the corresponding encrypted ciphertext;
[0077] The encrypted ciphertext is sent to the offline controller to implement encrypted control of the parameters of the motor armature by the cloud controller.
[0078] Furthermore, when the motor cloud control program stored in the memory 1005 is executed by the processor, the following steps are also implemented:
[0079] Selecting a first preset control parameter, a second preset control parameter, an expected motor output value, and an expected motor output change value;
[0080] Encrypting the motor expected output value and the motor expected output change value according to the public key to determine the motor expected output ciphertext and the expected output change ciphertext;
[0081] The public key ciphertext is encrypted according to the first preset control parameter, the second preset control parameter, the motor expected output ciphertext and the expected output change ciphertext to determine the corresponding encrypted ciphertext graph.
[0082] Furthermore, when the motor cloud control program stored in the memory 1005 is executed by the processor, the following steps are also implemented:
[0083] Calculating a preset difference between the expected output value of the motor and the motor speed at the first moment according to a public key ciphertext containing the motor speed at a first moment and the motor speed increment at a second moment, and determining a corresponding first difference ciphertext;
[0084] and determining a corresponding second difference ciphertext by performing a preset difference calculation between the calculated motor expected output change value and the motor speed increment at the second moment;
[0085] Based on a preset encryption formula, the first preset control parameter and the second preset control parameter are added to the first difference ciphertext and the second difference ciphertext respectively, and a preset encryption calculation is performed to determine the corresponding first encrypted ciphertext and second encrypted ciphertext.
[0086] Furthermore, when the motor cloud control program stored in the memory 1005 is executed by the processor, the following steps are also implemented:
[0087] Generate a public-private key pair based on a preset homomorphic encryption algorithm, determine a public key ciphertext corresponding to a public key in the public-private key pair, and send the public key in the public-private key pair and its corresponding public key ciphertext to the cloud controller;
[0088] Receiving an encrypted ciphertext encrypted by the cloud controller, wherein the encrypted ciphertext is obtained by encrypting and calculating the public key in the public-private key pair and its corresponding public key ciphertext;
[0089] The encrypted ciphertext is decrypted according to the private key in the public-private key pair, and the control voltage for updating the speed of the current motor armature is determined based on a preset voltage calculation formula.
[0090] Furthermore, when the motor cloud control program stored in the memory 1005 is executed by the processor, the following steps are also implemented:
[0091] Generating a public-private key pair based on the Paillier algorithm, and saving the private key of the public-private key pair to the offline controller, wherein the public-private key pair includes a public key and a private key;
[0092] Sampling the current motor speed to obtain the motor speed at the first moment and the motor speed increment at the second moment within a preset time period;
[0093] Encrypting the motor speed increments at the first moment and the second moment based on the Paillier algorithm to generate corresponding public key ciphertext;
[0094] The public key of the public-private key pair and its corresponding public key ciphertext are sent to the cloud controller.
[0095] Furthermore, when the motor cloud control program stored in the memory 1005 is executed by the processor, the following steps are also implemented:
[0096] Obtaining a third preset control parameter and a fourth preset control parameter;
[0097] Substituting the third preset control parameter and the fourth preset control parameter into the first encrypted ciphertext and the second encrypted ciphertext in the encrypted ciphertext for decryption calculation, respectively, to determine the corresponding first voltage control parameter and the second voltage control parameter;
[0098] Based on the voltage calculation formula, the first voltage control parameter and the second voltage control parameter are calculated to determine the control voltage for updating the speed of the current motor armature.
[0099] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0100] To better understand the above technical solutions, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. Instead, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0101] Based on the above terminal device architecture but not limited to the above architecture, an embodiment of the motor cloud control method based on homomorphic encryption of the present invention is proposed.
[0102] Specifically, refer to Figure 2 , Figure 2 This is a flow chart of a first embodiment of a motor cloud control method based on homomorphic encryption according to the present invention. The motor cloud control method based on homomorphic encryption is applied to a cloud controller, including:
[0103] Step S10, obtaining a public key and its corresponding public key ciphertext from the offline end controller;
[0104] Step S20: performing encryption calculation on the public key and the public key ciphertext based on a preset cloud encryption rule to determine the corresponding encrypted ciphertext;
[0105] Step S30: Send the encrypted ciphertext to the offline controller to implement encrypted control of the motor armature parameters by the cloud controller.
[0106] The embodiment of the present application is applied to a cloud-side controller. Based on the public key and its corresponding public key ciphertext obtained from the offline-side controller, a preset encryption calculation is performed in the cloud, the corresponding encrypted ciphertext is determined, and the encrypted ciphertext is returned to the offline-side controller to realize parameter encryption control of the motor armature rotation operation.
[0107] The following describes each step in detail:
[0108] Step S10, obtaining a public key and its corresponding public key ciphertext from the offline end controller;
[0109] In a specific embodiment, the cloud controller will receive the public key and the corresponding public key ciphertext from the offline controller. The above public key is generated in the offline controller. Specifically, the public key can be generated by randomly generating a corresponding public-private key pair based on the homomorphic encryption Paillier algorithm, and the public-private key pair contains a public key and a corresponding private key. The public key will be uploaded from the offline controller to the cloud controller as a target parameter to perform confidential calculations on the current state parameters of the motor; and the private key will be saved in a preset location of the offline controller and not uploaded to the cloud controller.
[0110] Furthermore, the public key ciphertext generated by the offline controller can be obtained by sampling the rotation speed of the current motor armature to determine the state parameters of the current motor armature, and based on the state parameters of the motor armature, performing preliminary encryption of the state parameters by the offline controller according to the public key in the above public-private key pair to obtain the public key ciphertext corresponding to the public key.
[0111] Step S20: performing encryption calculation on the public key and the public key ciphertext based on a preset cloud encryption rule to determine a corresponding encrypted ciphertext;
[0112] In a specific embodiment, the cloud controller receives the above-mentioned public key and the public key ciphertext corresponding to the public key generated by the offline controller, and performs cloud-based encryption on the public key and its corresponding public key ciphertext to obtain the corresponding encrypted ciphertext. Specifically, the method of performing cloud-based encryption on the public key and its corresponding public key ciphertext can be through the encryption control parameters pre-generated by the cloud controller and the optimal reference output pre-determined by the cloud controller. Based on the encryption control parameters and the optimal reference output, the public key and the public key ciphertext are encrypted and calculated according to the preset cloud-based encryption rules to obtain the corresponding encrypted ciphertext.
[0113] Furthermore, the encrypted ciphertext is obtained by calculating the pre-generated encryption control parameters and the optimal reference output predetermined by the cloud controller, which is determined by the cloud through the predetermined motor rotation simulation parameters, wherein the optimal reference output can be the ideal speed value for the current armature motor rotation operation determined in the cloud.
[0114] Step S30: Send the encrypted ciphertext to the offline controller to implement encrypted control of the motor armature parameters by the cloud controller.
[0115] In a specific embodiment, the encrypted ciphertext generated in the cloud is returned to the offline controller, and a preset decryption calculation is performed on the encrypted ciphertext based on the private key stored in the offline controller to achieve voltage control of the current motor armature, wherein the voltage control of the motor armature is based on the encrypted state parameters of the motor armature.
[0116] Reference Figure 3 , Figure 3 This is a schematic diagram of the specific process sequence of this embodiment. Specifically, the k generated by the offline controller p and E((-y,-Δy),k p ) is uploaded to the cloud controller, and after a series of cloud encryption rules are performed for encryption calculation, the corresponding encrypted ciphertext E(K2(y d -y)), E(K4(Δy d -Δy)), and returns the encrypted ciphertext to the offline controller to perform decryption calculation and obtain the corresponding ideal state parameters K1K2(y d -y), K3K4(Δy d -Δy), and the motor armature is controlled based on the ideal state parameter.
[0117] This embodiment uses the homomorphic encryption Paillier algorithm to generate a public-private key pair, thereby ensuring the security of data transmission through the cloud, and transmits the public key in the above public-private key pair to the cloud controller for encryption, and the offline controller decrypts it based on the private key of the public-private key pair, so that the cloud controller does not know the true state of the current motor armature, and the motor armature cannot know the reference output applied by the cloud controller. Under this premise, the cloud controller is controlled, which improves the security of data transmission, and at the same time improves the efficiency of homomorphic encryption transmission, and improves the real-time control effect of the cloud and offline controllers.
[0118] Furthermore, based on the first embodiment of the motor cloud control method based on homomorphic encryption in the embodiment of the present application, a second embodiment of the motor cloud control method based on homomorphic encryption in the embodiment of the present application is proposed.
[0119] The difference between the second embodiment of the motor cloud control method based on homomorphic encryption and the first embodiment of the motor cloud control method based on homomorphic encryption is that this embodiment is a refinement of step S20, "based on the preset cloud encryption rules, encrypting the public key and the public key ciphertext to determine the corresponding encrypted ciphertext". Figure 4 , specifically including:
[0120] Step S21, selecting a first preset control parameter, a second preset control parameter, an expected motor output value, and an expected motor output change value;
[0121] Step S22, encrypting the motor expected output value and the motor expected output change value according to the public key to determine the motor expected output ciphertext and the expected output change ciphertext;
[0122] Step S23 , encrypting the public key ciphertext according to the first preset control parameter, the second preset control parameter, the motor expected output ciphertext, and the expected output change ciphertext to determine a corresponding encrypted ciphertext.
[0123] This embodiment determines the ideal parameters for the current motor to operate by selecting the expected output value and the expected output change value of the motor in the cloud controller, and based on the preset encryption algorithm of the cloud controller, performs a preset encryption calculation on the expected output value and the expected output change value of the motor according to the pre-selected first preset control parameters and the second preset control parameters to determine the corresponding encrypted ciphertext.
[0124] The following describes each step in detail:
[0125] Step S21, selecting a first preset control parameter, a second preset control parameter, an expected motor output value, and an expected motor output change value;
[0126] In a specific embodiment, the above-mentioned expected motor output value and expected motor output change value refer to the fact that when the current motor armature is operating, the state parameters of the motor armature have an ideal threshold value, that is, the motor speed at which the motor armature rotates can be an ideal state value, and the above-mentioned ideal state value of the motor armature is the optimal reference output value obtained through the cloud controller. Specifically, the above-mentioned expected motor output value can be the ideal motor speed of the motor armature, and the expected output change value can be the ideal change trend and speed change value of the motor armature.
[0127] Furthermore, the above-mentioned first preset control parameter and second preset control parameter are control parameters preset by the cloud controller, which are used to realize cloud control of the motor armature, wherein the first preset control parameter and the second preset control parameter are K2 and K4 respectively.
[0128] Specifically, the first preset control parameter and the second preset control parameter are K2 and K4 respectively, and the motor expected output value and the motor expected output change value are y d , Δy d .
[0129] Step S22, encrypting the motor expected output value and the motor expected output change value according to the public key to determine the motor expected output ciphertext and the expected output change ciphertext;
[0130] In one embodiment, the public-private key pair including the public key is (k p ,k s ), where the public key is k p , the private key is k s , according to the above k p For the above motor expected output value and motor expected output change value y d, Δy d Encryption is performed to obtain the motor expected output ciphertext and the expected output change ciphertext E(y corresponding to the above motor expected output value and motor expected output change value) d ) and E(Δy d ).
[0131] Step S23 , encrypting the public key ciphertext according to the first preset control parameter, the second preset control parameter, the motor expected output ciphertext, and the expected output change ciphertext to determine a corresponding encrypted ciphertext.
[0132] Further, refer to Figure 5 , step S23 specifically includes:
[0133] Step S231, calculating a preset difference between the expected output value of the motor and the motor speed at the first moment according to the public key ciphertext containing the motor speed at the first moment and the motor speed increment at the second moment, and determining a corresponding first difference ciphertext;
[0134] Step S232, determining a corresponding second difference ciphertext by performing a preset difference calculation between the calculated motor expected output change value and the motor speed increment at the second moment;
[0135] Furthermore, the public key ciphertext also includes the motor speed at the first moment and the motor speed increment y and Δy at the second moment. The expected output value of the motor and the expected output change value of the motor are y and Δy, respectively. d , Δy d The preset difference calculation (y) is performed with the motor speed increment y and Δy at the first moment and the motor speed increment y at the second moment. d -y) and (Δy d -Δy), and the corresponding first difference ciphertext and second difference ciphertext E(y d -y) and E(Δy d -Δy).
[0136] Step S233: Based on a preset encryption formula, the first preset control parameter and the second preset control parameter are added to the first difference ciphertext and the second difference ciphertext respectively, and a preset encryption calculation is performed to determine the corresponding first encrypted ciphertext and second encrypted ciphertext.
[0137] In a specific embodiment, based on a preset encryption formula and The first difference ciphertext and the second difference ciphertext E(y d -y) and E(Δy d -Δy) to perform encryption calculation, and determine the corresponding first encrypted ciphertext and second encrypted ciphertext E(K2(y d-y)) and E(K4(Δy d -Δy)).
[0138] This embodiment obtains the optimal reference output value through the cloud controller, and implements cloud-side encryption of the ideal execution parameters determined by the cloud controller for the motor armature, so that the cloud controller can control the cloud controller without knowing the actual state of the current motor armature, thereby improving the security of data transmission, and at the same time improving the efficiency of homomorphic encryption transmission, thereby improving the real-time control effect of the cloud and offline controllers.
[0139] Furthermore, based on the first and second embodiments of the motor cloud control method based on homomorphic encryption of the embodiments of the present application, a third embodiment of the motor cloud control method based on homomorphic encryption of the embodiments of the present application is proposed.
[0140] The difference between the third embodiment of the motor cloud control method based on homomorphic encryption and the first, second and third embodiments of the motor cloud control method based on homomorphic encryption is that the motor cloud control method based on homomorphic encryption in this embodiment is applied to the offline end controller, referring to Figure 6 , specifically including:
[0141] Step T10: Generate a public-private key pair based on a preset homomorphic encryption algorithm, determine the public key ciphertext corresponding to the public key in the public-private key pair, and send the public key in the public-private key pair and its corresponding public key ciphertext to the cloud controller;
[0142] Step T20, receiving the encrypted ciphertext encrypted by the cloud controller, wherein the encrypted ciphertext is obtained by encrypting the public key in the public-private key pair and its corresponding public key ciphertext;
[0143] Step T30: decrypt the encrypted ciphertext according to the private key in the public-private key pair, and determine the control voltage for updating the speed of the current motor armature based on a preset voltage calculation formula.
[0144] The following describes each step in detail:
[0145] Step T10: Generate a public-private key pair based on a preset homomorphic encryption algorithm, determine the public key ciphertext corresponding to the public key in the public-private key pair, and send the public key in the public-private key pair and its corresponding public key ciphertext to the cloud controller;
[0146] In a specific embodiment, the offline controller randomly generates a public-private key pair (k p ,k s ), where the public key is k p , the private key is k s, the method of randomly generating a public-private key pair based on the preset homomorphic encryption Paillier algorithm can be: 1. Randomly select two large prime numbers p and q, satisfying gcd(pq, (p-1)(q-1)) = 1, and satisfying that p and q are equal in length; 2. Calculate n = pq and λ = lcm(p-1, q-1), where lcm represents the least common multiple; 3. Randomly select an integer g∈Zn2 * (You can also set g = n + 1); 4. Define the L function: L(x) = x-1n, calculate μ = (L(gλmod n2))-1modn; 5. Determine the public-private key pair: public key, (n, g), private key, (λ, μ).
[0147] Furthermore, based on the public key in the above-mentioned public-private key pair, the corresponding public key ciphertext is determined. The public key ciphertext can be obtained by sampling the rotation speed of the current motor armature to determine the state parameters of the current motor armature, and based on the state parameters of the motor armature, the state parameters are preliminarily encrypted by the offline controller according to the public key in the above-mentioned public-private key pair to obtain the public key ciphertext corresponding to the public key.
[0148] Step T20, receiving the encrypted ciphertext encrypted by the cloud controller, wherein the encrypted ciphertext is obtained by encrypting the public key in the public-private key pair and its corresponding public key ciphertext;
[0149] Step T30: decrypt the encrypted ciphertext according to the private key in the public-private key pair, and determine the control voltage for updating the speed of the current motor armature based on a preset voltage calculation formula.
[0150] In a specific embodiment, the public key and public key ciphertext are encrypted and calculated according to the preset cloud encryption rules to obtain the corresponding encrypted ciphertext, and the encrypted ciphertext generated by the cloud is returned to the offline controller. The encrypted ciphertext is decrypted and calculated based on the private key stored in the offline controller to achieve voltage control of the current motor armature.
[0151] In this embodiment, the offline controller generates a private key based on the preset homomorphic encryption Paillier algorithm, and obtains the encrypted ciphertext encrypted in the cloud for decryption by the offline controller, thereby realizing voltage control of the motor armature, so that the offline controller does not know the execution parameters implemented by the cloud for the current motor armature, realizing the transmission of offline controller data, improving the security of data transmission, and at the same time improving the efficiency of homomorphic encryption transmission, and improving the real-time control effect of the cloud and offline controllers.
[0152] Furthermore, based on the first, second and third embodiments of the motor cloud control method based on homomorphic encryption of the embodiments of the present application, a fourth embodiment of the motor cloud control method based on homomorphic encryption of the embodiments of the present application is proposed.
[0153] The fourth embodiment of the motor cloud control method based on homomorphic encryption is different from the first, second and third embodiments of the motor cloud control method based on homomorphic encryption in that this embodiment is a refinement of step T10, "generating a public-private key pair based on a preset homomorphic encryption algorithm, determining the public key ciphertext corresponding to the public key in the public-private key pair, and sending the public key in the public-private key pair and its corresponding public key ciphertext to the cloud controller", with reference to Figure 7 , specifically including:
[0154] Step T11: generating a public-private key pair based on the Paillier algorithm, and saving the private key of the public-private key pair to the offline controller, wherein the public-private key pair includes a public key and a private key;
[0155] In a specific embodiment, the offline controller randomly generates a public-private key pair (k p ,k s ), where the public key is k p , the private key is k s , and the above public key k p Sent to the cloud controller, the private key k s Stored in the offline controller.
[0156] Step T12, sampling the current motor speed to obtain the motor speed at the first moment and the motor speed increment at the second moment within a preset time period;
[0157] Furthermore, by sampling the current motor speed of the motor armature, the current motor speed of the motor armature is set to the motor speed y at the first moment, and by performing a preset difference calculation Δy=y-y' between the motor speed y at the first moment and the motor speed y' of the motor armature at the previous moment, the speed difference between the current motor speed and the motor speed at the previous moment is determined, that is, the motor speed increment Δy at the second moment, wherein the motor speed at the first moment and the motor speed increment at the second moment are y and Δy respectively.
[0158] Step T13: Encrypting the motor speed at the first moment and the motor speed increment at the second moment based on the Paillier algorithm to generate corresponding public key ciphertext;
[0159] Furthermore, the motor speed increments y and Δy at the first moment and the second moment are calculated based on the public key k generated by the offline controller. p Perform the preset encryption calculation to generate the corresponding public key ciphertext E((-y,-Δy),k p ).
[0160] Step T14: Send the public key of the public-private key pair and its corresponding public key ciphertext to the cloud controller.
[0161] Further, refer to Figure 8 This embodiment further includes a refinement of step T30, "decrypting the encrypted ciphertext according to the private key in the public-private key pair, and determining the control voltage for updating the speed of the current motor armature based on a preset voltage calculation formula," specifically including:
[0162] Step T31, obtaining a third preset control parameter and a fourth preset control parameter;
[0163] Step T32: Substituting the third preset control parameter and the fourth preset control parameter into the first encrypted ciphertext and the second encrypted ciphertext, respectively, to perform decryption calculations to determine the corresponding first voltage control parameter and second voltage control parameter, respectively;
[0164] In a specific embodiment, the offline controller performs a decryption calculation on the encrypted ciphertext generated by the cloud controller, wherein the encrypted ciphertext includes a first encrypted ciphertext and a second encrypted ciphertext, namely, E(K2(y d -y)) and E(K4(Δy d -Δy)), specifically, the way in which the offline end controller performs decryption calculation on the encrypted ciphertext can be that after the offline end controller obtains the corresponding third preset control parameter and fourth preset control parameter, the third preset control parameter and the fourth preset control parameter are respectively decrypted and calculated with the above-mentioned first encrypted ciphertext and second encrypted ciphertext to determine the corresponding first voltage control parameter and second voltage control parameter.
[0165] The third preset control parameter and the fourth preset control parameter are K1 and K3 respectively, and the first voltage control parameter and the second voltage control parameter are K1K2 (y d -y) and K3K4(Δy obtained by decryption calculation through K3 d -Δy), that is, the first voltage control parameter and the second voltage control parameter are:
[0166] K1K2(y d -y) and K3K4(Δy d -Δy).
[0167] Step T33: Calculate the first voltage control parameter and the second voltage control parameter based on the voltage calculation formula to determine the control voltage for updating the speed of the current motor armature.
[0168] Furthermore, the first voltage control parameter and the second voltage control parameter K1K2 (y d -y) and K3K4(Δy d -Δy) Input the preset voltage calculation formula u=K1K2(yd -y)+K3K4(Δy d -Δy), calculate the control voltage for the current motor armature to update the speed, and realize the electrical control of the DC motor system through the control voltage.
[0169] In this embodiment, the offline controller generates a private key based on the preset homomorphic encryption Paillier algorithm, and obtains the encrypted ciphertext encrypted in the cloud for decryption by the offline controller, thereby realizing voltage control of the motor armature, so that the offline controller does not know the execution parameters implemented by the cloud for the current motor armature, realizing the transmission of offline controller data, improving the security of data transmission, and at the same time improving the efficiency of homomorphic encryption transmission, and improving the real-time control effect of the cloud and offline controllers.
[0170] Furthermore, based on the first and third embodiments of the motor cloud control method based on homomorphic encryption in the embodiment of the present application, a fifth embodiment of the motor cloud control method based on homomorphic encryption in the embodiment of the present application is proposed. This embodiment realizes the data connection between the cloud controller and the offline controller. Figure 9 , Figure 9 This is a schematic diagram of the specific process of cloud encryption control in this embodiment.
[0171] As a specific embodiment, the offline controller sets k p ,E((-y,-Δy),k p ) is uploaded to the cloud controller, and the cloud controller calculates the corresponding encrypted ciphertext E(K2(y d -y)) and E(K4(Δy d -Δy)), and returns the encrypted ciphertext of the cloud controller to the offline controller. The offline controller decrypts the encrypted ciphertext returned by the cloud controller and calculates the input voltage of the motor armature to update the motor speed.
[0172] This embodiment addresses the control problem of a DC motor model and innovatively designs a motor cloud control based on homomorphic encryption. This method can fully utilize the cloud for control while ensuring data accuracy and protecting the user's model and data.
[0173] In addition, the embodiment of the present invention also proposes a motor cloud control device, referring to Figure 10 , Figure 10 This is a functional module diagram of the motor cloud control device involved in the embodiment of the motor cloud control method based on homomorphic encryption of the present invention. Figure 10 As shown, the motor cloud control device includes:
[0174] A first receiving module 10 is configured to obtain a public key and its corresponding public key ciphertext from the offline controller;
[0175] The cloud encryption module 20 is used to perform encryption calculation on the public key and the public key ciphertext based on a preset cloud encryption rule to determine the corresponding encrypted ciphertext;
[0176] The first sending module 30 is used to send the encrypted ciphertext to the offline controller to implement encrypted control of the parameters of the motor armature by the cloud controller.
[0177] Preferably, the cloud encryption module includes:
[0178] A first parameter selection unit is used to select a first preset control parameter, a second preset control parameter, an expected motor output value, and an expected motor output change value;
[0179] A parameter encryption unit, configured to encrypt the motor expected output value and the motor expected output change value according to the public key, and determine the motor expected output ciphertext and the expected output change ciphertext;
[0180] The encrypted ciphertext determining unit is configured to encrypt the public key ciphertext according to the first preset control parameter, the second preset control parameter, the motor expected output ciphertext, and the expected output change ciphertext, and determine the corresponding encrypted ciphertext.
[0181] Preferably, the cloud encryption module further includes:
[0182] a first difference calculation unit, configured to calculate a preset difference between the expected output value of the motor and the motor speed at the first moment according to a public key ciphertext containing the motor speed at the first moment and the motor speed increment at the second moment, and determine a corresponding first difference ciphertext;
[0183] a second difference calculation unit, configured to determine a corresponding second difference ciphertext by performing a preset difference calculation on the calculated expected output change value of the motor and the motor speed increment at the second moment;
[0184] A control parameter calculation unit is used to add the first preset control parameter and the second preset control parameter to the first difference ciphertext and the second difference ciphertext respectively based on a preset encryption formula, perform a preset encryption calculation, and determine the corresponding first encrypted ciphertext and second encrypted ciphertext.
[0185] Preferably, the motor cloud control device further includes:
[0186] A key pair generation module 40 is configured to generate a public-private key pair based on a preset homomorphic encryption algorithm, determine a public key ciphertext corresponding to a public key in the public-private key pair, and send the public key in the public-private key pair and its corresponding public key ciphertext to the cloud controller;
[0187] A second receiving module 50 is configured to receive the encrypted ciphertext encrypted by the cloud controller, wherein the encrypted ciphertext is obtained by encrypting the public key in the public-private key pair and its corresponding public key ciphertext;
[0188] The local decryption module 60 is used to decrypt the encrypted ciphertext according to the private key in the public-private key pair, and determine the control voltage for updating the speed of the current motor armature based on a preset voltage calculation formula.
[0189] Preferably, the key pair generation module includes:
[0190] a homomorphic key generation unit, configured to generate a public-private key pair based on the Paillier algorithm, and save the private key of the public-private key pair to an offline controller, wherein the public-private key pair includes a public key and a private key;
[0191] A motor speed sampling unit, configured to sample the current motor speed and obtain the motor speed at a first moment and the motor speed increment at a second moment within a preset time period;
[0192] A public key ciphertext generation unit, configured to encrypt the motor speed at the first moment and the motor speed increment at the second moment based on the Paillier algorithm to generate corresponding public key ciphertext;
[0193] The data cloud transmission unit is used to send the public key of the public-private key pair and its corresponding public key ciphertext to the cloud controller.
[0194] Preferably, the local decryption module includes:
[0195] A second parameter acquisition module, used to acquire a third preset control parameter and a fourth preset control parameter;
[0196] a voltage control parameter determination unit, configured to substitute the third preset control parameter and the fourth preset control parameter into the first encrypted ciphertext and the second encrypted ciphertext in the encrypted ciphertext, respectively, to perform decryption calculations, and determine the corresponding first voltage control parameter and the second voltage control parameter, respectively;
[0197] The motor armature control unit is used to calculate the first voltage control parameter and the second voltage control parameter based on the voltage calculation formula to determine the control voltage for updating the current speed of the motor armature.
[0198] The principles and implementation process of logistics transportation implemented in this embodiment can be referred to the above embodiments and will not be described in detail here.
[0199] In addition, an embodiment of the present invention also proposes a device, which includes a memory, a processor, and a motor cloud control program stored in the memory and runnable on the processor. When the motor cloud control program is executed by the processor, the steps of the motor cloud control method based on homomorphic encryption as described in the above embodiment are implemented.
[0200] In addition, to achieve the above-mentioned purpose, the present invention also provides a medium, which is a computer-readable storage medium, and a motor cloud control program is stored on the computer-readable storage medium. When the motor cloud control program is executed by the processor, the steps of the motor cloud control method based on homomorphic encryption as described above are implemented.
[0201] Since the motor cloud control program adopts all the technical solutions of all the aforementioned embodiments when executed by the processor, it has at least all the beneficial effects brought by all the technical solutions of all the aforementioned embodiments, which will not be described one by one here.
[0202] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.
[0203] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0204] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0205] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A motor cloud control method based on homomorphic encryption, characterized in that: The method is applied to a cloud controller, which is data-connected to an offline controller, and includes: Obtaining a public key and its corresponding public key ciphertext from the offline end controller, wherein the public key ciphertext is generated by encrypting the motor speed at a first moment and the motor speed increment at a second moment within a preset time period; Based on the preset cloud encryption rules, the public key and the public key ciphertext are encrypted and calculated to determine the corresponding encrypted ciphertext; Sending the encrypted ciphertext to the offline controller to implement encrypted control of the motor armature parameters by the cloud controller; The step of performing encryption calculation on the public key and the public key ciphertext based on a preset cloud encryption rule to determine the corresponding encrypted ciphertext includes: Selecting a first preset control parameter, a second preset control parameter, an expected motor output value, and an expected motor output change value; encrypting the expected motor output value and the expected motor output change value according to the public key to determine an expected motor output ciphertext and an expected output change ciphertext; encrypting the public key ciphertext according to the first preset control parameter, the second preset control parameter, the expected motor output ciphertext, and the expected output change ciphertext to determine a corresponding encrypted ciphertext, wherein the encrypted ciphertext includes: a first encrypted ciphertext and a second encrypted ciphertext; According to the ciphertext containing the motor speed at the first moment and the second moment motor speed increment ciphertext The public key ciphertext of the motor is expected to output the ciphertext The motor speed ciphertext at the first moment Perform the preset difference calculation to determine the corresponding first difference ciphertext ; And by changing the ciphertext to the expected output and the motor speed increment ciphertext at the second moment Perform the preset difference calculation to determine the corresponding second difference ciphertext ; Based on preset encryption formula and , add the first preset control parameter K2 and the second preset control parameter K4 to the first difference ciphertext and the second difference ciphertext , perform the preset encryption calculation and determine the corresponding first encrypted ciphertext and the second encrypted ciphertext .
2. A motor cloud control method based on homomorphic encryption, characterized in that: The method is applied to an offline controller, which is data-connected to a cloud controller, and includes: Generate a public-private key pair based on a preset homomorphic encryption algorithm, determine a public key ciphertext corresponding to a public key in the public-private key pair, and send the public key in the public-private key pair and its corresponding public key ciphertext to the cloud controller, wherein the public key ciphertext is generated by encrypting the motor speed at a first moment and the motor speed increment at a second moment within a preset time period; Receive the encrypted ciphertext after the cloud controller encrypts it, wherein the encryption calculation step of the encrypted ciphertext includes: selecting a first preset control parameter, a second preset control parameter, an expected motor output value, and an expected motor output change value; encrypting the expected motor output value and the expected motor output change value according to the public key, and determining the motor expected output ciphertext and the expected output change ciphertext; encrypting the public key ciphertext according to the first preset control parameter, the second preset control parameter, the expected motor output ciphertext, and the expected output change ciphertext, and determining the corresponding encrypted ciphertext, wherein the encrypted ciphertext includes: a first encrypted ciphertext and a second encrypted ciphertext; specifically: according to the ciphertext containing the motor speed at the first moment and the second moment motor speed increment ciphertext The public key ciphertext of the motor is expected to output the ciphertext The motor speed ciphertext at the first moment Perform the preset difference calculation to determine the corresponding first difference ciphertext ; And by changing the ciphertext to the expected output and the motor speed increment ciphertext at the second moment Perform the preset difference calculation to determine the corresponding second difference ciphertext ; Based on the preset encryption formula and , add the first preset control parameter K2 and the second preset control parameter K4 to the first difference ciphertext and the second difference ciphertext , perform the preset encryption calculation and determine the corresponding first encrypted ciphertext and the second encrypted ciphertext ; Decrypting the encrypted ciphertext according to the private key in the public-private key pair, and determining the control voltage for updating the speed of the current motor armature based on a preset voltage calculation formula; Wherein, the third preset control parameter K1 and the fourth preset control parameter K3 are obtained; the third preset control parameter K1 and the fourth preset control parameter K3 are respectively substituted into the first encrypted ciphertext in the encrypted ciphertext and the second encrypted ciphertext Perform decryption calculations to determine the corresponding first voltage control parameters and the second voltage control parameter ; Based on the voltage calculation formula , the first voltage control parameter and the second voltage control parameter Calculate and determine the control voltage u for updating the current motor armature speed.
3. The motor cloud control method based on homomorphic encryption according to claim 2, characterized in that: The steps of generating a public-private key pair based on a preset homomorphic encryption algorithm, determining a public key ciphertext corresponding to a public key in the public-private key pair, and sending the public key in the public-private key pair and its corresponding public key ciphertext to the cloud controller include: Generate a public-private key pair based on the Paillier algorithm, and save the private key of the public-private key pair to the offline controller, wherein the public-private key pair includes a public key and a private key; Sampling the current motor speed to obtain the motor speed at the first moment and the motor speed increment at the second moment within a preset time period; Encrypting the motor speed increments at the first moment and the second moment based on the Paillier algorithm to generate corresponding public key ciphertext; The public key of the public-private key pair and its corresponding public key ciphertext are sent to the cloud controller.
4. A motor cloud control device, characterized in that: The motor cloud control device includes: A first receiving module is configured to obtain a public key and its corresponding public key ciphertext from an offline controller, wherein the public key ciphertext is generated by encrypting the motor speed at a first moment and the motor speed increment at a second moment within a preset time period; A cloud encryption module, configured to perform encryption calculation on the public key and the public key ciphertext based on a preset cloud encryption rule to determine a corresponding encrypted ciphertext; A first sending module, configured to send the encrypted ciphertext to the offline controller, so as to implement encrypted control of the motor armature parameters by the cloud controller; The cloud encryption module is used to select a first preset control parameter, a second preset control parameter, an expected motor output value, and an expected motor output change value; encrypt the expected motor output value and the expected motor output change value according to the public key to determine the motor expected output ciphertext and the expected output change ciphertext; encrypt the public key ciphertext according to the first preset control parameter, the second preset control parameter, the motor expected output ciphertext, and the expected output change ciphertext to determine the corresponding encrypted ciphertext, wherein the encrypted ciphertext includes: a first encrypted ciphertext and a second encrypted ciphertext; according to the ciphertext containing the motor speed at the first moment and the second moment motor speed increment ciphertext The public key ciphertext of the motor is expected to output the ciphertext The motor speed ciphertext at the first moment Perform the preset difference calculation to determine the corresponding first difference ciphertext ; and by changing the ciphertext to the expected output and the motor speed increment ciphertext at the second moment Perform the preset difference calculation to determine the corresponding second difference ciphertext ; Based on the preset encryption formula and , add the first preset control parameter K2 and the second preset control parameter K4 to the first difference ciphertext and the second difference ciphertext , perform the preset encryption calculation and determine the corresponding first encrypted ciphertext and the second encrypted ciphertext .
5. The motor cloud control device according to claim 4, further comprising: a key pair generation module, configured to generate a public-private key pair based on a preset homomorphic encryption algorithm, determine a public key ciphertext corresponding to a public key in the public-private key pair, and send the public key in the public-private key pair and its corresponding public key ciphertext to the cloud controller, wherein the public key ciphertext is generated by encrypting the motor speed at a first moment and the motor speed increment at a second moment within a preset time period; The second receiving module is used to receive the encrypted ciphertext encrypted by the cloud controller, wherein the encryption calculation steps of the encrypted ciphertext include: selecting a first preset control parameter, a second preset control parameter, an expected motor output value, and an expected motor output change value; encrypting the expected motor output value and the expected motor output change value according to the public key to determine the motor expected output ciphertext and the expected output change ciphertext; encrypting the public key ciphertext according to the first preset control parameter, the second preset control parameter, the expected motor output ciphertext, and the expected output change ciphertext to determine the corresponding encrypted ciphertext, wherein the encrypted ciphertext includes: a first encrypted ciphertext and a second encrypted ciphertext; specifically: according to the ciphertext containing the motor speed at the first moment and the second moment motor speed increment ciphertext The public key ciphertext of the motor is expected to output the ciphertext The motor speed ciphertext at the first moment Perform the preset difference calculation to determine the corresponding first difference ciphertext ; and by changing the ciphertext to the expected output and the motor speed increment ciphertext at the second moment Perform the preset difference calculation to determine the corresponding second difference ciphertext ; Based on the preset encryption formula and , add the first preset control parameter K2 and the second preset control parameter K4 to the first difference ciphertext and the second difference ciphertext , perform the preset encryption calculation and determine the corresponding first encrypted ciphertext and the second encrypted ciphertext ; A local decryption module is used to decrypt the encrypted ciphertext according to the private key in the public-private key pair, and determine the control voltage for the current motor armature to update the speed based on a preset voltage calculation formula, wherein the third preset control parameter K1 and the fourth preset control parameter K3 are obtained; the third preset control parameter K1 and the fourth preset control parameter K3 are respectively substituted into the first encrypted ciphertext in the encrypted ciphertext and the second encrypted ciphertext Perform decryption calculations to determine the corresponding first voltage control parameters and the second voltage control parameter ; Based on the voltage calculation formula , the first voltage control parameter and the second voltage control parameter Calculate and determine the control voltage u for updating the current motor armature speed.
6. A motor cloud control device, characterized in that: The device includes a memory, a processor, and a motor cloud control program stored in the memory and executable on the processor. When the motor cloud control program is executed by the processor, the motor cloud control method based on homomorphic encryption according to any one of claims 1 to 3 is implemented.
7. A medium, which is a computer-readable storage medium, characterized in that: The computer-readable storage medium stores a motor cloud control program, which, when executed by a processor, implements the steps of the motor cloud control method based on homomorphic encryption according to any one of claims 1 to 3.
Citation Information
Patent Citations
Fully homomorphic encryption method for single ciphertext homomorphic operation
CN107294698A