Multi-agent control method and system based on homomorphic encryption

By applying homomorphic encryption to signals in a multi-agent system, the problem of eavesdropping on multi-agent systems in public networks is solved, achieving end-to-end encrypted transmission and improving the system's security and stability.

CN121814291APending Publication Date: 2026-04-07GUANGZHOU UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Multi-agent systems are vulnerable to eavesdropping when interacting through public networks or cloud services, which can lead to data leaks or system instability.

Method used

Homomorphic encryption technology is used to encrypt the initial input signal and the desired output signal. The leader transmits the encrypted signal to the follower, who decrypts it locally and generates the actual output signal. Then, the encrypted signal is transmitted with neighboring followers and sent to the controller. The controller generates an updated input signal. The signal is encrypted throughout the entire process to avoid plaintext transmission.

Benefits of technology

It effectively improves the security of information transmission and interaction in multi-agent systems, prevents data eavesdropping, avoids system instability risks, and ensures the security and integrity of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121814291A_ABST
    Figure CN121814291A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-agent control method and system based on homomorphic encryption, and relates to the field of artificial intelligence, and the method comprises the steps: enabling a follower to receive an encrypted current input signal, an encrypted expected output signal and an encrypted current neighborhood output signal through iterative learning control, carrying out the decryption of the current input signal, and carrying out the decryption of the current neighborhood output signal; generating a first actual output signal, and calculating an error in combination with the expected output signal and the current neighborhood output signal; and when the maximum error of all followers is smaller than a preset threshold value, iteration is ended, otherwise, iteration is continued, a first actual output signal is encrypted and then sent to the neighborhood follower, an encrypted second actual output signal sent by the neighborhood follower is received, the encrypted signal is sent to the controller, and the controller sends back an encrypted update input signal. By implementing the method and the device, the problem that in the existing multi-agent consistency control, eavesdropping is easily caused during interaction through a public network or a cloud service is solved, and the security of information transmission and interaction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence, and in particular to a multi-agent control method and system based on homomorphic encryption. BACKGROUND

[0002] With the rapid development of artificial intelligence and distributed computing technology, multi-agent systems have become a key paradigm for solving complex problems. Through the interaction and cooperation of multiple autonomous agents, the system can efficiently handle dynamic tasks that single agents cannot complete, such as supply chain systems, collaborative decision-making, smart grid scheduling, etc. In complex dynamic scenarios, multi-agent systems significantly outperform traditional centralized solutions due to their decentralized architecture, robustness against local failures, efficient parallel processing capabilities, and topology.

[0003] In the study of multi-agent systems, breakthroughs in consensus control are of great significance in improving system dynamic performance, enhancing reliability and robustness. However, since information exchange between agents is usually done through public networks or cloud services, signal transmission and agent computation can cause potential security problems, such as attackers eavesdropping on control system data and maliciously disrupting system stable operation. SUMMARY

[0004] The embodiments of the present application provide a multi-agent control method and system based on homomorphic encryption, which can solve the problem of being vulnerable to eavesdropping when interacting through public networks or cloud services in existing multi-agent consensus control, effectively improving the security of system information transmission and interaction.

[0005] An embodiment of the present application provides a multi-agent control method based on homomorphic encryption, applicable to a follower cluster in a multi-agent control system, the multi-agent control system comprising a leader, a follower cluster, and a plurality of controllers; the follower cluster comprising a plurality of followers; each follower corresponding to a controller; The multi-agent control method comprises: setting an initial input signal for each follower and encrypting to obtain an encrypted initial input signal; repeating the iterative learning control process to obtain a target output signal for each follower; The iterative learning control process comprises: for each follower, receiving an encrypted current input signal, an encrypted expected output signal, and an encrypted current neighborhood output signal, and decrypting to obtain a current input signal, an expected output signal, and a current neighborhood output signal; wherein the encrypted current input signal is the encrypted initial input signal at the beginning; the encrypted expected output signal is obtained by the leader encrypting the obtained expected output signal and sending it out; and the encrypted current neighborhood output signal is zero at the beginning; execute the current input signal to generate a first actual output signal; calculate an error according to the first actual output signal, the expected output signal and the current neighborhood output signal; if the maximum error of all followers is less than a preset threshold, take the first actual output signal of each follower as the corresponding target output signal, otherwise, after homomorphic encryption of the first actual output signal, send the encrypted first actual output signal to the neighborhood follower, and receive the encrypted second actual output signal sent by the neighborhood follower; send the encrypted first actual output signal, the encrypted second actual output signal and the encrypted expected output signal to the corresponding controller to make the controller generate and send back the encrypted update input signal; take the encrypted update input signal and the encrypted second actual output signal as the encrypted current input signal and the encrypted current neighborhood output signal when executing the iterative learning control process next time.

[0006] Further, the encrypted expected output signal is sent out by the leader after encryption of the obtained expected output signal, comprising: the leader obtains the expected output signal; set the total number of quantized bits and the number of decimal places after quantization; determine the corresponding quantization function and mapping function based on the total number of quantized bits and the number of decimal places after quantization; quantize the expected output signal into rational numbers through the quantization function to obtain a set of rational numbers; map the set of rational numbers to integers through the mapping function to obtain a first set of integers; randomly select two prime numbers that meet the preset condition, multiply the two prime numbers to obtain a public key; the preset condition includes that the product of the two prime numbers and the product of each minus 1 has no common factor other than 1; select integers that are coprime with the public key and less than the public key as a set of random numbers, randomly select one as a random number in the set of random numbers, and encrypt each first integer in the first set of integers according to the public key and the random number to obtain the encrypted expected output signal.

[0007] Further, according to the public key and the random number, each first integer in the first set of integers is encrypted to obtain the encrypted expected output signal, comprising: According to the public key and the random number, each first integer in the first set of integers is encrypted to obtain the encrypted expected output signal, comprising: ; wherein, represents the encrypted expected output signal, represents an encryption function based on the public key , is a public key, represents an expected output signal, represents a first integer after quantization mapping, is a mapping function, and respectively represent total bits after quantization and decimal bits after quantization, is a random integer selected from a random number set.

[0008] Further, the total bits after quantization and the decimal bits after quantization are set, including: a plurality of encryption parameter candidate combinations are set; each encryption parameter candidate combination includes: a candidate total bit after quantization, and a candidate decimal bit after quantization; for each encryption parameter candidate combination, the expected output signal is quantized into a rational number based on the encryption parameter candidate combination to obtain quantization data; encryption parameter candidate combinations that meet the encryption condition, the quantization upper bound coverage condition and the quantization lower bound coverage condition are set as encryption parameter target combinations; wherein the quantization upper bound coverage condition is that the maximum value of the quantization data is greater than the maximum value of the expected output signal; the quantization lower bound coverage condition is that the minimum value of the quantization data is less than the minimum value of the expected output signal; all encryption parameter target combinations are sorted in ascending order according to the candidate total bits, and in the same candidate total bits, the encryption parameter target combinations of the same candidate total bits are sorted in descending order according to the candidate decimal bits to obtain a candidate combination sequence; the total bits after quantization and the decimal bits after quantization are determined according to the first encryption parameter candidate combination in the candidate combination sequence.

[0009] Further, the current input signal, the expected output signal and the current neighborhood output signal are decrypted, including: the private key is determined according to the least common multiple of the two prime numbers minus 1 in the public key; the encrypted current input signal is decrypted and calculated according to the private key to obtain a second integer set; the second integer set is inversely mapped to obtain the current input signal; the encrypted expected output signal is decrypted and calculated according to the private key to obtain a third integer set; the third integer set is inversely mapped to obtain the expected output signal; the encrypted current neighborhood output signal is decrypted and calculated according to the private key to obtain a fourth integer set; the fourth integer set is inversely mapped to obtain the current neighborhood output signal.

[0010] Furthermore, the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal, and the encrypted desired output signal are sent to the corresponding controller, so that the controller generates and sends back the encrypted updated input signal, including: The encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal, and the encrypted desired output signal are sent to the corresponding controller, so that the controller can generate an encrypted updated input signal by iteratively learning the control law through the encrypted version based on the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal, and the encrypted desired output signal. Send the encrypted update input signal back to the corresponding follower; The encrypted version of the iterative learning control law includes: ; in, Indicates the first The first follower in the The encrypted current input signal during the next iteration of learning control. Indicates the first The first follower in the The encrypted current input signal during the next iteration of learning control, i.e., the first... The first follower in the The encrypted update input signal during the next iteration of learning control. Indicates the relationship with the first A set of neighboring followers with connectivity relationships. Index representing the neighborhood follower, Indicates the first The first follower in the The quantized value of the first actual output signal after encryption during the next iteration of learning control. Indicates the first The neighborhood follower in the 1st The quantized value of the encrypted second actual output signal during the next iteration of learning control. Indicates the first The learning gain of each follower Represents the elements of the adjacency matrix. This represents the desired output signal after encryption. Indicates the first A binary variable representing the connection between followers and leaders. Indicates the first Each follower can directly obtain the expected output. Indicates the first A follower cannot directly obtain the expected output.

[0011] Further, after obtaining the target output signal of each follower, the method further comprises: visualizing the target output signal and the expected output signal of each follower.

[0012] Based on the above-mentioned method embodiment, the application further provides a system embodiment, comprising: a leader, a follower cluster and a plurality of controllers; the follower cluster comprises a plurality of followers; each follower corresponds to a controller; the leader, configured to encrypt a preset expected output signal to obtain an encrypted expected output signal; and send the encrypted expected output signal to the followers; the follower cluster, configured to set an initial input signal of each follower and encrypt the initial input signal to obtain an encrypted initial input signal; and repeatedly execute an iterative learning control process to obtain a target output signal of each follower; the iterative learning control process comprises: for each follower, receiving an encrypted current input signal, an encrypted expected output signal and an encrypted current neighborhood output signal, and decrypting the signals to obtain a current input signal, an expected output signal and a current neighborhood output signal; wherein the encrypted current input signal is the encrypted initial input signal at the beginning; the encrypted current neighborhood output signal is zero at the beginning; executing the current input signal to generate a first actual output signal; calculating an error according to the first actual output signal, the expected output signal and the current neighborhood output signal; in the case that the maximum error of all followers is less than a preset threshold, taking the first actual output signal of each follower as the corresponding target output signal, otherwise, homomorphically encrypting the first actual output signal, sending the encrypted first actual output signal to a neighborhood follower, and receiving an encrypted second actual output signal sent by the neighborhood follower; inputting the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal and the encrypted expected output signal into the corresponding controller; receiving an encrypted updated input signal sent back by the controller; taking the encrypted updated input signal and the encrypted second actual output signal as the encrypted current input signal and the encrypted current neighborhood output signal in the next execution of the iterative learning control process; each controller, configured to, after receiving the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal and the encrypted expected output signal sent by the follower, generate an encrypted updated input signal according to the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal and the encrypted expected output signal; and send the encrypted updated input signal back to the follower.

[0013] Further, the multi-agent control system based on homomorphic encryption further comprises: a visualization module. a visualizing module configured to visualize the target output signal and the expected output signal of each follower.

[0014] Further, the encrypted expected output signal is sent by the leader after encrypting the obtained expected output signal, comprising: the leader obtains the expected output signal; setting the total number of quantized bits and the number of decimal places after quantization; determining the corresponding quantization function and mapping function based on the total number of quantized bits and the number of decimal places after quantization; quantizing the expected output signal into a rational number through the quantization function to obtain a set of rational numbers; mapping the set of rational numbers into integers through the mapping function to obtain a first set of integers; randomly selecting two prime numbers satisfying a preset condition, multiplying the two prime numbers to obtain a public key; the preset condition includes that the product of the two prime numbers and the product of each minus 1 does not have any common factor other than 1; selecting integers coprime with the public key and less than the public key as a set of random numbers, randomly selecting a random number from the set of random numbers, and encrypting each first integer in the first set of integers according to the public key and the random number to obtain the encrypted expected output signal.

[0015] Compared with the prior art, the beneficial effects of the embodiments of the present application are: The leader of the present application first encrypts the initial input signal and the expected output signal and then sends them, avoiding the transmission of core data in plaintext form in the public network; after receiving the encrypted current input signal, the encrypted expected output signal and the encrypted current neighborhood output signal, the follower decrypts them locally and controls itself to generate the first actual output signal, which is transmitted to the neighborhood follower after homomorphic encryption, and receives the encrypted second actual output signal returned by the neighborhood follower, and then sends the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal and the encrypted expected output signal to the corresponding controller, which generates the encrypted update input signal based on these encrypted information and returns it, and the follower takes the encrypted update input signal as the encrypted current input signal for the next iteration. In the whole transmission process, all link signals are encrypted and interacted, so even in an open transmission environment such as a public network or a cloud service, an attacker cannot obtain effective and interpretable system data, which blocks the possibility of data eavesdropping, solves the problem that the existing multi-agent consistency control is vulnerable to eavesdropping when interacting through a public network or a cloud service, effectively improves the security of system information transmission and interaction, and avoids the risk of system instability caused by data leakage or malicious tampering. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 is a flowchart of a method for multi-agent control based on homomorphic encryption according to an embodiment of the present application; Figure 2 is a structural diagram of a multi-agent control system based on homomorphic encryption according to an embodiment of the present application; Figure 3 is a flowchart of a homomorphic encryption process according to an embodiment of the present application; Figure 4 is a flowchart of a homomorphic decryption process according to an embodiment of the present application; Figure 5 is a flowchart of a controller signal interaction process according to an embodiment of the present application; Figure 6 is a communication topology diagram of a multi-agent system composed of five small quadcopters according to an embodiment of the present application; Figure 7 is a visualization graph of the output signal of the leader and the agents at the 20th iteration according to an embodiment of the present application; Figure 8 is a visualization graph of the output signal of the leader and the agents at the 60th iteration according to an embodiment of the present application; Figure 9 is a visualization graph of the encrypted output signal of the agents at the 20th iteration according to an embodiment of the present application; Figure 10 is a visualization graph of the encrypted output signal of the agents at the 60th iteration according to an embodiment of the present application; Figure 11 is a visualization graph of the expected output signal of the leader and its encrypted version according to an embodiment of the present application; Figure 12 is a visualization graph of the number of iterations and the average tracking error of the agents according to an embodiment of the present application. DETAILED DESCRIPTION

[0017] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the protection scope of the present application.

[0018] In the description of the present application, it should be understood that the terms “first”, “second” are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features.

[0019] like Figure 1 As shown, to address the vulnerability of existing multi-agent consensus control systems to eavesdropping during interactions via public networks or cloud services, one embodiment of this invention provides a multi-agent control method based on homomorphic encryption, applicable to follower clusters in multi-agent control systems, such as... Figure 2 As shown, the multi-agent control system includes: a leader, a cluster of followers, and several controllers; the cluster of followers includes several followers; each follower corresponds to one controller.

[0020] It should be noted that, Figure 2 The diagram uses two followers and two corresponding controllers, which is only a simplified example of the interaction logic of a multi-agent control system. The number of followers and controllers shown in the diagram is not a limitation on the scope of application of this invention. In actual applications, this invention supports a follower cluster containing any number of followers, and each follower is configured with an independent controller.

[0021] The present invention provides a multi-agent control method based on homomorphic encryption, which includes at least the following steps: Step S1: Set the initial input signal for each follower and encrypt it to obtain the encrypted initial input signal; For step S1, in the multi-agent control system of the present invention, the dynamic behavior of the leader can be described as follows: ; No. The dynamic behavior of a follower can be described as follows: ; in, Index representing the number of iterations, , Indicates the total number of iterations. Indicates a time index. Indicates the desired output signal. This indicates the state corresponding to the desired output signal. This represents the input corresponding to the desired output signal. Indicates the index of the follower. , Indicates the total number of followers. , and They represent the first The first follower The actual input, state, and output of each iteration. Indicates the first The aggregate vector consisting of the actual inputs of all followers at the next iteration. , Indicates the first The aggregate vector consisting of the states of all followers at the next iteration. , Indicates the first The aggregate vector consisting of the outputs of all followers at the next iteration. , , , and The coefficient matrix represents the dynamic behavior model of leaders. , , , , , , and Indicates the first The coefficients of a follower dynamic behavior model.

[0022] To describe the interaction between the leader and followers, the multi-agent control system is modeled as a graph (G) consisting of a set of vertices (V) and a set of edges (E), i.e., G = (V, E). The set of vertices (V) represents the multiple agents in the system, with each vertex representing an agent, i.e., a follower. The set of edges (E) represents the interaction relationships between agents, with each edge connecting two vertices, indicating some form of communication or influence between the corresponding agents.

[0023] For the first in the figure A vertex, its neighborhood Refers to the vertex The set of all directly connected vertices, i.e. For a person with A graph with vertices, adjacency matrix It is The matrix. In a directed graph, if from vertex... To the top If there are edges, then the matrix The Line number Column elements ;otherwise, Laplace matrix It is an important matrix in graph theory, and it is defined as ,in, It is a degree matrix. It is an adjacency matrix. Degree matrix. It is a diagonal matrix, and its diagonal elements are... Represents vertices The degree of the vertex. The number of adjacent edges. Therefore, the Laplace matrix. The element definition is: if , , otherwise, .

[0024] Before starting the iterative learning control process, each follower locally configures an initial input signal and performs a homomorphic encryption operation on the initial input signal through an internal encryptor to obtain an encrypted initial input signal. Specifically: As shown in Figure 3 , the initial input signal is plaintext, and the homomorphic encryption process includes quantization, mapping, and encryption, ultimately obtaining ciphertext, i.e., the encrypted initial input signal.

[0025] Since the initial input signal (plaintext) is usually a floating-point number, it is difficult to directly adapt to the operation requirements of homomorphic encryption, so it needs to be quantized first: first set the total number of quantized bits and the number of decimal places after quantization , define a set of signed fixed-point rational numbers with base 2 based on these two bits: ; Where, represents the mathematical symbol of the rational number set, represents an element in the set , i.e., a specific quantized rational number, and represent the total number of quantized bits and the number of decimal places after quantization, are natural numbers and satisfy ; it can be found that the range of the set is ~ , and the resolution is , therefore, the number of decimal places after quantization should be as large as possible, so that the error between the quantized value and the original value is as small as possible; represents the bit index, is a binary number, taking the value 0 or 1, representing the value of the th bit, represents the set , represents the set , is the highest bit, i.e., the sign bit, which is a special bit that does not participate in summation but is placed in front as a sign bit, equal to 0 represents an integer, equal to 1 represents a negative number.

[0026] Thus, through the quantization function , the initial input signal, which is plaintext, is mapped to ​In the set, the corresponding rational number is obtained, and the quantization function is specifically expressed as follows: ; wherein, represents the rational number after quantization and the absolute error of the plaintext ; represents the plaintext of the initial input signal; represents the fixed-point rational number closest to the real number .

[0027] Since the encryption operation needs to be completed in the integer set, and the quantized plaintext can only ensure that it is a rational number, a mapping function is defined to map the quantized rational number to an integer, and the mapping function is specifically expressed as follows: ; wherein, represents the integer set, represents the value range of the mapping function, and the integer set with a value range between , and represents the modulo operation.

[0028] After the processing of the mapping function, the scaled value of is limited in the range of , to ensure that the result is an integer that meets the bit requirement, and is required to ensure one-to-one mapping, to adapt to the subsequent integer operation requirements of encryption.

[0029] Two large prime numbers and are randomly selected, and the product of the two prime numbers and the product of each minus 1 do not have any common factor other than 1. This condition corresponds to the mathematical coprime relationship, which is formally expressed as: ; wherein, represents the greatest common divisor.

[0030] Based on the selected prime numbers and , the key pair of the homomorphic encryption system is established. Specifically, the product of the two prime numbers is taken as the public key, which is used for subsequent encryption operations on the plaintext; at the same time, the least common multiple of and is taken as the private key, i.e. ; wherein, represents the private key, ​This indicates finding the least common multiple. It's important to note that the private key must be stored confidentially for use in the subsequent decryption process.

[0031] From the set of integers Randomly select an integer , as a random number, where, It is less than And with The set of coprime divisors, which also serves as the set of random numbers. Representative model The set of integers, This means that the set contains only items related to the public key. Coprime integers, selected random numbers Only when this condition is met can the decryption process correctly recover the quantized value of the original plaintext, avoiding decryption distortion or information loss.

[0032] For any plaintext to be encrypted, the specific formula for the encryption operation is as follows: ; in, Indicates the encryption function. In this embodiment, the plaintext to be encrypted is represented as follows: It is an integer that has undergone quantization mapping. It is an operation term based on the public key and the first integer to be encrypted. It is an operation term based on random integers and public keys, through modulo... The operation restricts the result to a reasonable numerical range, ensuring the validity and security of the encrypted result.

[0033] Therefore, corresponding to the initial input signal, the encryption operation is as follows: ; in, Indicates the first The initial input signal encrypted by the follower Indicates the first The initial input signal of a follower This represents the random integer used to encrypt the initial input signal. .

[0034] Step S2: Repeat the iterative learning control process to obtain the target output signal for each follower; Specifically, the iterative learning control process includes steps S21 to S24: Step S21: receiving, for each follower, the encrypted current input signal, the encrypted expected output signal and the encrypted current neighborhood output signal, and decrypting to obtain the current input signal, the expected output signal and the current neighborhood output signal; wherein the encrypted current input signal is the encrypted initial input signal at the initial time; the encrypted expected output signal is sent by the leader after encrypting the acquired expected output signal; and the encrypted current neighborhood output signal is zero at the initial time; In a preferred embodiment, the encrypted expected output signal is sent by the leader after encrypting the acquired expected output signal, comprising: The leader acquires the expected output signal; Setting the total number of quantized bits and the number of decimal places after quantization; Based on the total number of quantized bits and the number of decimal places after quantization, determining the corresponding quantization function and mapping function; Quantizing the expected output signal into a rational number through the quantization function to obtain a set of rational numbers; Mapping the set of rational numbers into integers through the mapping function to obtain a first set of integers; Randomly selecting two prime numbers that meet the preset conditions, multiplying the two prime numbers to obtain a public key; the preset conditions include that the product of the two prime numbers and the product of each minus 1 do not have any common factor other than 1; Selecting integers that are coprime with the public key and less than the public key as a set of random numbers, randomly selecting a random number from the set of random numbers, and encrypting each first integer in the first set of integers according to the public key and the random number to obtain the encrypted expected output signal.

[0035] In a preferred embodiment, the encrypted expected output signal is obtained by encrypting each first integer in the first set of integers according to the public key and the random number, comprising: Encrypting each first integer in the first set of integers according to the public key and the random number through the following formula to obtain the encrypted expected output signal; ; Wherein, represents the encrypted expected output signal, represents an encryption function based on the public key , is the public key, represents the expected output signal, represents the first integer after quantization mapping, is the mapping function, and are the total number of quantized bits and the number of decimal places after quantization, respectively, is a random integer selected from the set of random numbers.

[0036] In a preferred embodiment, decryption to obtain the current input signal, the desired output signal, and the current neighborhood output signal includes: The private key is determined by the least common multiple of the two prime numbers in the public key minus 1. The encrypted current input signal is decrypted using the private key to obtain the second set of integers. The current input signal is obtained by performing an inverse mapping on the second set of integers. The encrypted desired output signal is decrypted using the private key to obtain the third set of integers. The desired output signal is obtained by inverse mapping of the third set of integers; The encrypted current neighborhood output signal is decrypted using the private key to obtain the fourth set of integers. The inverse mapping of the fourth set of integers is used to obtain the output signal of the current neighborhood.

[0037] For step S21, throughout the entire iterative learning control process: First, the leader sets the desired output signal. Then, the desired output signal is homomorphically encrypted using an internal encryptor to obtain the encrypted desired output signal. Specifically: Similar to the homomorphic encryption process of the initial input signal, the desired output signal is plaintext. The homomorphic encryption process includes quantization, mapping and encryption, and finally obtains ciphertext, which is the encrypted desired output signal.

[0038] Through quantization function Mapping the plaintext of the desired output signal to Within the set, we obtain the corresponding rational numbers and quantization functions. Specifically, it is expressed as follows: ; in, Represents rational numbers after quantization With plain text The absolute error, The plaintext representing the desired output signal; Indicates the search for real numbers The nearest fixed point rational number .

[0039] After mapping function The processing will The scaled values ​​are limited to Within the range, ensure the result is an integer that meets the digit requirement, and at the same time, require... This ensures a one-to-one mapping and adapts to subsequent encrypted integer operation requirements.

[0040] From the set of integers Randomly select an integer , as a random number. It is less than And with The set of coprime divisors, which also serves as the set of random numbers. Representative model The set of integers, This means that the set contains only items related to the public key. Coprime integers, selected random numbers Only when this condition is met can the decryption process correctly recover the quantized value of the original plaintext, avoiding decryption distortion or information loss.

[0041] Therefore, for the desired output signal, the encryption operation is specifically as follows: ; in, This represents the desired output signal after encryption. Indicates based on public key encryption function, For public key, Indicates the desired output signal. Represents the first integer after quantization mapping. For mapping functions, and These represent the total number of digits after quantization and the number of decimal places after quantization, respectively. Represents a random number.

[0042] After internal encryption, the leader sends the encrypted desired output signal directly to followers with direct connections. Followers without direct connections communicate with the leader indirectly through other followers in the system. The entire signal transmission process is based on an encrypted secure communication channel. Encrypted transmission avoids the risk of signal theft or tampering in public networks or multi-agent interaction links, thereby improving the communication security of the multi-agent control system.

[0043] For the A follower receives the encrypted current input signal, the encrypted expected output signal and the encrypted current neighborhood output signal. It should be noted that the reception of the signals is determined by the communication topology, and only when there is a direct connection between the follower and the leader, the follower can receive the encrypted expected output signal sent by the leader, and when there is no direct connection between the follower and the leader, the follower cannot receive the encrypted expected output signal sent by the leader, at this time, the encrypted expected output signal is empty; Similarly, only when the follower has a neighborhood follower, the follower can receive the encrypted current neighborhood output signal sent by the neighborhood follower, and when the follower has no neighborhood follower, at this time, the encrypted current neighborhood output signal is empty.

[0044] The follower decrypts the encrypted current input signal , the encrypted expected output signal and the encrypted current neighborhood output signal by the internal decrypter to obtain the corresponding current input signal and the expected output signal and the current neighborhood output signal . Specifically: As shown in Figure 4 , the process of homomorphic decryption includes decryption and inverse mapping two processes, and finally the decrypted plaintext is obtained.

[0045] For any ciphertext , the ciphertext is decrypted by the decryption function, and the decryption function is specifically represented as follows: ; Wherein, represents the ciphertext to be decrypted, represents the decryption function, represents the modular inverse of the private key , that is .

[0046] Through the above decryption operation, the encrypted current input signal is restored to the second integer set, the encrypted expected output signal is restored to the third integer set, and the encrypted current neighborhood output signal is restored to the fourth integer set.

[0047] Then, the decrypted integer set is converted into a quantized data set by the inverse mapping function, and the inverse mapping function is specifically represented as follows: ; Wherein, represents the decrypted integer, , it is easy to get .

[0048] Through the above inverse mapping operation, the second integer set, the third integer set and the fourth integer set are inversely mapped respectively, and the quantization values of the original signal before encryption, that is, the quantization value of the current input signal, the quantization value of the expected output signal and the quantization value of the current neighborhood output signal are obtained.

[0049] It should be noted that when the iterative learning control process is performed for the first time, the encrypted current input signal is the encrypted initial input signal sent by the leader.

[0050] In addition, regarding the selection of the encryption parameter , it can be manually configured depending on experience. Generally, in order to reduce the error between the original signal and its quantized signal, the number of bits in the decimal part is generally not less than 8 bits, that is, the original signal and its corresponding quantized signal can be kept basically consistent. The quantization bit number can also be adaptively determined in the following manner. In a preferred embodiment, the total number of quantized bits and the number of decimal bits after quantization are set, including: a plurality of encryption parameter candidate combinations are set; each encryption parameter candidate combination includes a candidate total number of quantized bits and a candidate number of decimal bits after quantization; for each encryption parameter candidate combination, the expected output signal is quantized into a rational number based on the encryption parameter candidate combination to obtain quantization data; encryption parameter candidate combinations that meet the quantization upper bound coverage condition, the quantization lower bound coverage condition and the preset encryption condition are taken as encryption parameter target combinations; the quantization upper bound coverage condition is that the maximum value of the quantization data is greater than the maximum value of the expected output signal; the quantization lower bound coverage condition is that the minimum value of the quantization data is less than the minimum value of the expected output signal; all encryption parameter target combinations are sorted in ascending order according to the candidate total number of bits, and the encryption parameter target combinations of the same candidate total number of bits are sorted in descending order according to the candidate number of decimal bits under the condition of the same candidate total number of bits to obtain a candidate combination sequence; the total number of quantized bits and the number of decimal bits after quantization are determined according to the first encryption parameter candidate combination in the candidate combination sequence.

[0051] In an embodiment of the present application, encryption parameter candidate combinations are first constructed, a plurality of encryption parameter candidate combinations are pre-set, each combination contains a candidate total number of quantized bits and a candidate number of decimal bits after quantization .

[0052] Each candidate combination is verified for quantization, and for each encryption parameter candidate combination, based on the and According to the quantization operation, the expected output signal is quantized into a rational number to obtain quantization data under the combination.

[0053] Subsequently, the target combination meeting the condition is screened from all candidate combinations, and the combination meeting the quantization upper bound coverage condition, the quantization lower bound coverage condition and the preset encryption condition at the same time is screened as an encryption parameter target combination from all candidate combinations. Specifically, the quantization upper bound coverage condition is that the maximum value of the quantization data is greater than the maximum value of the expected output signal. The quantization lower bound coverage condition is that the minimum value of the quantization data is less than the minimum value of the expected output signal. The preset encryption condition is: ; wherein, represents the total number of followers, represents the output component of each follower.

[0054] Finally, all encryption parameter target combinations are sorted in ascending order according to the quantized candidate total number of bits Because the larger the encryption public key is, the greater the encryption operation complexity will be, so smaller is preferred; if there are combinations with the same , they are sorted in descending order according to the quantized candidate decimal number of bits , the larger the quantization resolution is, the smaller the error between the quantization value and the original value will be. After sorting, the first combination in the candidate combination sequence is selected, and the candidate total number of bits and the candidate decimal number of bits contained in the combination are the final determined quantized total number of bits and the quantized decimal number of bits .

[0055] Step S22: Perform the current input signal to generate a first actual output signal. For step S22, each follower in the multi-agent control system transmits the decrypted current input signal to the control module in itself, and the control module takes the current input signal as a control instruction to perform corresponding control actions, and finally generates and obtains the first actual output signal reflecting the actual control effect of itself.

[0056] Step S23: Calculate the error according to the first actual output signal, the expected output signal and the current neighborhood output signal. For step S23, after each follower generates the first actual output signal, an internal error calculation module is called to calculate the difference between the first actual output signal and the expected output signal as the error in the current control period for the followers that have a direct connection with the leader, to measure the gap between the current output and the expected output of each follower; for the followers that do not have a direct connection with the leader, the difference between the first actual output signal and the current neighborhood output signal is calculated as the error in the current control period, to measure the gap between the current output and the collaborative consistency state of the outputs of other followers in the neighborhood.

[0057] The subsequent iterative learning control adjusts the input signal in the next round based on the error, gradually reduces the output deviation of each follower, and promotes the output of the entire system to converge to the expected output, so as to ultimately realize the output consistency of multiple followers.

[0058] Step S24: If the maximum error of all followers is less than the preset threshold, the first actual output signal of each follower is taken as the corresponding target output signal, otherwise, the first actual output signal is homomorphically encrypted, and the encrypted first actual output signal is sent to the neighborhood followers, and the encrypted second actual output signal sent by the neighborhood followers is received; the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal and the encrypted expected output signal are sent to the corresponding controller, so that the controller generates and sends back the encrypted updated input signal; the encrypted updated input signal and the encrypted second actual output signal are taken as the encrypted current input signal and the encrypted current neighborhood output signal in the next execution of the iterative learning control process.

[0059] For step S24, after all followers complete error calculation, the system selects the maximum error from the errors of all followers, and judges whether the maximum error is less than the preset threshold. If the maximum error is less than the preset threshold, it means that the deviation of the first actual output signal of each follower from the expected output signal is within an acceptable range, and the consistency control goal of the multi-agent system has been initially achieved. At this time, the first actual output signal of each follower is directly taken as the corresponding target output signal, and the current control process is completed.

[0060] If the maximum error is greater than or equal to the preset threshold, it means that the control effect of the system has not yet reached the standard, and the next round of iterative optimization needs to be started. Before starting the next round of iterative optimization, each follower homomorphically encrypts its first actual output signal, and sends the encrypted first actual output signal to its neighborhood followers, i.e. other followers in the multi-agent control system that have a direct connection. At the same time, the encrypted second actual output signal, i.e. the actual output signal of the neighborhood follower, sent by the neighborhood follower is received.

[0061] Subsequently, the follower will send the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal, and the encrypted desired output signal to the corresponding controller. The entire transmission process uses the system's encrypted secure communication link, ensuring both the synchronous transmission efficiency of multi-dimensional signals and the continuation of communication security protection throughout the entire process.

[0062] In a preferred embodiment, the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal, and the encrypted desired output signal are sent to the corresponding controller, so that the controller generates and sends back the encrypted updated input signal, including: The encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal, and the encrypted desired output signal are sent to the corresponding controller, so that the controller can generate an encrypted updated input signal by iteratively learning the control law through the encrypted version based on the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal, and the encrypted desired output signal. Send the encrypted update input signal back to the corresponding follower; The encrypted version of the iterative learning control law includes: ; in, Indicates the first The first follower in the The encrypted current input signal during the next iteration of learning control. Indicates the first The first follower in the The encrypted current input signal during the next iteration of learning control, i.e., the first... The first follower in the The encrypted update input signal during the next iteration of learning control. Indicates the relationship with the first A set of neighboring followers with connectivity relationships. Index representing the neighboring follower, Indicates the first The first follower in the The quantized value of the first actual output signal after encryption during the next iteration of learning control. Indicates the first The neighborhood follower in the 1st The quantized value of the encrypted second actual output signal during the next iteration of learning control. Indicates the first The learning gain of each follower Represents the elements of the adjacency matrix. This represents the desired output signal after encryption. Indicates the first A binary variable representing the connection between followers and leaders. Indicates the first Each follower can directly obtain the expected output. Indicates the first A follower cannot directly obtain the expected output.

[0063] In one embodiment of the present invention, such as Figure 5 As shown, after receiving the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal, and the encrypted desired output signal, the controller calls the preset encrypted version of the iterative learning control law to optimize the input signal. Finally, it generates an encrypted updated input signal adapted to the follower and sends it back to the corresponding follower through the original communication link. The follower receives the encrypted updated input signal sent back by the controller and uses the encrypted updated input signal and the encrypted second actual output signal as the encrypted current input signal and the encrypted current neighborhood output signal for the next execution of the iterative learning control process, and enters a new round of control, error calculation and other processes until the maximum error of all followers meets the preset threshold requirement.

[0064] Next, the derivation process of the iterative learning control law of the encrypted version of this invention will be explained in detail: First, design the unencrypted version of the iterative learning control law and its corresponding convergence condition; Assumption 1: There exists an input This makes the desired output A directed spanning tree exists with the root node as its root. Assumption 2: Each agent's initial state is zero in each iteration, i.e. ; Assumption 3: Direct Transmission Matrix Not zero.

[0065] Based on the above three assumptions, we further define five key variables: Define followers With the leader's Tracking error: ; Define followers With neighboring follower j's first Tracking error: ; Define followers The Sub-quantization bias: ; Define followers With the leader's Tracking error after sub-quantization: ; Define followers With neighboring follower j's first Tracking error after sub-quantization: ; The unencrypted version of the iterative learning control law is designed as follows: ; The convergence condition is: ; in, Indicates the first The quantified actual output of each follower Indicates the first The actual quantized output of each follower, after decryption, yields an output equal to the quantized value of the corresponding input. Indicates the first The learning gain of each follower Indicates the relationship with the first A set of neighboring followers with connectivity relationships. Represents the elements of the adjacency matrix. Indicates the first A binary variable representing the connection between followers and leaders. Indicates the first Each follower can directly obtain the expected output. Indicates the first A follower cannot directly obtain the expected output. Represents the connection matrix, Represents the learning gain matrix. Represents a non-zero constant matrix. Represents the Laplace matrix, yes 3D identity matrix yes 3D identity matrix , , .

[0066] By replacing plaintext variables with encrypted variables and utilizing the operational properties of homomorphic encryption, algebraic operations in the unencrypted domain are mapped to legal operations in the encrypted domain, thereby transforming the unencrypted version of the iterative learning control law into the encrypted version. ; in, Indicates the first the encrypted current input signal of the the encrypted current input signal of the the encrypted current input signal of the the encrypted current input signal of the the encrypted current input signal of the the encrypted current input signal of the the encrypted current input signal of the denotes the index of the neighbor follower, the encrypted first actual output signal of the the encrypted first actual output signal of the the encrypted first actual output signal of the the encrypted second actual output signal of the the encrypted second actual output signal of the the learning gain of the the set of neighbor followers having a connection relationship with the the element of the adjacency matrix, the encrypted expected output signal, the binary variable of the connection relationship between the the encrypted expected output signal, the encrypted expected output signal, the encrypted expected output signal, the encrypted expected output signal, the encrypted expected output signal, the encrypted expected output signal, the encrypted expected output signal. For the followers who can directly obtain the expected output of the leader, the error about the leader is directly calculated, the tracking error is continuously reduced through iteration, and finally the consistent trajectory tracking is realized. For the followers who cannot directly obtain the expected output of the leader, the error about the leader is not directly calculated, but through cooperation with the neighbors, the control goal of the follower is to make its output consistent with the output of the neighbors. The information of the leader is transmitted from the followers who can directly obtain the information to all followers through the topological structure of the network in the form of a baton, so that the whole network reaches a consensus with the trajectory of the leader as the goal.

[0067] In a preferred embodiment, after obtaining the target output signal of each follower, the method further comprises:

[0068] visualizing the target output signal and the expected output signal of each follower.

[0069] ​In an embodiment of the present application, in order to intuitively present the control effect and consistency convergence state of the multi-agent control system, the target output signal of each follower, i.e. the actual output result after final convergence, and the expected output signal of the leader are visually compared by means of a visualization tool, so as to intuitively verify the degree of achievement of the multi-agent consistency control.

[0070] It should be noted that the visualized data is not limited to the target output signal and the expected output signal, and other encrypted data in the system can also be visualized after decryption and conversion into readable plaintext.

[0071] For the multi-agent control system, the present application uses an iterative learning control algorithm to judge the error of each iteration output, and when the error does not meet the preset error value, the output of each system is iterated until the error meets the preset error value, and then the iteration is stopped; at the same time, a homomorphic encryption algorithm is introduced to encrypt the information transmitted in the network or cloud service, so as to achieve the purpose of protecting information privacy.

[0072] As shown in Figure 6 , taking five small quadcopters as an example, one of the quadcopters is marked as "0" as the leader, and the other four quadcopters are marked as "1", "2", "3" and "4" as followers, and the arrow direction represents the direction of signal flow, and the information transmission between two agents is through network transmission, and the trajectory of the leader, i.e. the expected output signal, is set as , the encryption parameter is selected as , , the key modulus length is 32 bits, and the learning gain matrix is , in order to facilitate simulation, the initial state of the 1-4 agents is set to 0, and the related parameters are set as follows: The convergence condition is met: ; The encryption condition is met: ; As shown in Figure 7 , Figure 8 , at the 20th iteration output, the multi-agent control system has not completely converged to the expected output. With the increase of the number of iterations, at the 60th iteration, the multi-agent control system basically converges to the expected output. Figure 9 Corresponding to the 20th iteration output, the encrypted version of the output information of each agent (i.e. the follower); Figure 10 Corresponding to the 60th iteration output, the encrypted version of the output information of each agent. As is apparent from Figure 9 and Figure 10No original real information can be seen, the privacy of the signal is protected, and the effectiveness of the encrypted version of the iterative learning control law proposed in the application is proved. Figure 11 is the encrypted version of the expected output and the expected output, and obviously, no original expected output real information can be seen; Figure 12 is the relationship between the number of iterations and the average tracking error of the agent, and it is not difficult to see that when the 50th iteration is reached, the error tends to zero, which further illustrates the effectiveness and reliability of the iterative learning control proposed in the application.

[0073] On the basis of the above-mentioned method embodiment, corresponding system embodiments are provided; An embodiment of the application provides a multi-agent control system based on homomorphic encryption, comprising a leader, a follower cluster and a plurality of controllers; the follower cluster comprises a plurality of followers; each follower corresponds to a controller; The leader is used for encrypting a preset expected output signal to obtain an encrypted expected output signal; and the encrypted expected output signal is sent to the follower; The follower cluster is used for setting an initial input signal of each follower and encrypting the initial input signal to obtain an encrypted initial input signal; and an iterative learning control process is repeatedly executed to obtain a target output signal of each follower; the iterative learning control process comprises the following steps: for each follower, receiving an encrypted current input signal, an encrypted expected output signal and an encrypted current neighborhood output signal, and decrypting the signals to obtain a current input signal, an expected output signal and a current neighborhood output signal; wherein the encrypted current input signal is the encrypted initial input signal at the beginning; the encrypted current neighborhood output signal is zero at the beginning; a first actual output signal is generated by executing the current input signal; an error is calculated according to the first actual output signal, the expected output signal and the current neighborhood output signal; in the case that the maximum error of all followers is less than a preset threshold, the first actual output signal of each follower is taken as the corresponding target output signal, otherwise, the first actual output signal is homomorphically encrypted, and the encrypted first actual output signal is sent to the neighborhood follower, and an encrypted second actual output signal sent by the neighborhood follower is received; the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal and the encrypted expected output signal are input into the corresponding controller; an encrypted updated input signal sent back by the controller is received; and the encrypted updated input signal and the encrypted second actual output signal are taken as the encrypted current input signal and the encrypted current neighborhood output signal in the next execution of the iterative learning control process. each controller, configured to generate an encrypted updated input signal according to the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal and the encrypted expected output signal after receiving the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal and the encrypted expected output signal sent by the follower; and send the encrypted updated input signal back to the follower.

[0074] In a preferred embodiment, the multi-agent control system based on homomorphic encryption further comprises a visualization module. The visualization module is configured to visualize the target output signal and the expected output signal of each follower.

[0075] In a preferred embodiment, the encrypted expected output signal is sent by the leader after encrypting the obtained expected output signal, comprising: The leader obtains the expected output signal. setting the total number of quantized bits and the number of decimal places after quantization; determining the corresponding quantization function and mapping function based on the total number of quantized bits and the number of decimal places after quantization; quantizing the expected output signal into a rational number through the quantization function to obtain a set of rational numbers; mapping the set of rational numbers into integers through the mapping function to obtain a first set of integers; randomly selecting two prime numbers satisfying a preset condition, multiplying the two prime numbers to obtain a public key; the preset condition includes that there is no common factor other than 1 between the product of the two prime numbers and the product of each minus 1; selecting integers coprime with the public key and smaller than the public key as a set of random numbers, randomly selecting a random number from the set of random numbers, and encrypting each first integer in the first set of integers according to the public key and the random number to obtain the encrypted expected output signal.

[0076] It can be understood that the above system item embodiments correspond to the method item embodiments of the present application, and can realize the multi-agent control method based on homomorphic encryption provided by any one of the above method item embodiments.

[0077] It should be noted that the system embodiments described above are only schematic, and some or all of the modules can be selected to achieve the purpose of the embodiment. In addition, in the system embodiment provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which can be realized as one or more communication buses or signal lines. Those skilled in the art can understand and implement without creative labor.

[0078] The above is the preferred embodiment of the present application, it should be pointed out that, for those skilled in the art, without departing from the principles of the present application, can also make a number of improvements and refinements, these improvements and refinements are also considered to be within the scope of the present application.

Claims

1. A multi-agent control method based on homomorphic encryption, characterized in that, A follower cluster is applicable to a multi-agent control system, wherein the multi-agent control system further includes: a leader and several controllers; the follower cluster includes several followers; each follower corresponds to one controller; The multi-agent control method includes: Set the initial input signal for each follower and encrypt it to obtain the encrypted initial input signal; Repeat the iterative learning control process to obtain the target output signal for each follower; The iterative learning control process includes: for each follower, receiving the encrypted current input signal, the encrypted desired output signal, and the encrypted current neighborhood output signal, and decrypting them to obtain the current input signal, the desired output signal, and the current neighborhood output signal; wherein, initially, the encrypted current input signal is the encrypted initial input signal; the encrypted desired output signal is transmitted by the leader after encrypting the acquired desired output signal; initially, the encrypted current neighborhood output signal is zero; Execute the current input signal to generate the first actual output signal; Calculate the error based on the first actual output signal, the expected output signal, and the current neighboring output signal; If the maximum error of all followers is less than a preset threshold, the first actual output signal of each follower is used as the corresponding target output signal. Otherwise, after homomorphically encrypting the first actual output signal, the encrypted first actual output signal is sent to the neighboring followers, and the encrypted second actual output signal sent by the neighboring followers is received. The encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal, and the encrypted expected output signal are sent to the corresponding controller so that the controller generates and sends back the encrypted updated input signal. The encrypted updated input signal and the encrypted second actual output signal are used as the encrypted current input signal and the encrypted current neighboring output signal for the next execution of the iterative learning control process.

2. The multi-agent control method based on homomorphic encryption according to claim 1, characterized in that, The encrypted desired output signal is transmitted by the leader after encrypting the acquired desired output signal, including: Leaders obtain the desired output signals; Set the total number of bits after quantization and the number of decimal places after quantization; Based on the total number of bits and the number of decimal places after quantization, determine the corresponding quantization function and mapping function; The desired output signal is quantized into rational numbers using a quantization function, resulting in a set of rational numbers. By mapping the set of rational numbers to integers using a mapping function, we obtain the first set of integers; Two prime numbers that satisfy a preset condition are randomly selected, and the two prime numbers are multiplied to obtain the public key; the preset condition includes: there is no common factor other than 1 between the product of the two prime numbers and the product of each prime number minus 1. Select integers that are coprime to the public key and less than the public key as a set of random numbers. Randomly select a random number from the set of random numbers. Then, encrypt each integer in the first set of integers according to the public key and the random number to obtain the encrypted desired output signal.

3. The multi-agent control method based on homomorphic encryption according to claim 2, characterized in that, The first integer in the first set of integers is encrypted using the public key and a random number to obtain the desired encrypted output signal, including: Based on the public key and random number, each first integer in the first set of integers is encrypted using the following formula to obtain the desired encrypted output signal; ; in, This represents the desired output signal after encryption. Indicates based on public key encryption function, For public key, Indicates the desired output signal. Represents the first integer after quantization mapping. For mapping functions, and These represent the total number of digits after quantization and the number of decimal places after quantization, respectively. It is a random integer selected from a set of random numbers.

4. The multi-agent control method based on homomorphic encryption according to claim 2, characterized in that, Set the total number of digits and the number of decimal places after quantization, including: Several candidate combinations of encryption parameters are set; each candidate combination of encryption parameters includes: the total number of candidate bits after quantization, and the number of candidate decimal places after quantization; For each candidate combination of encryption parameters, the desired output signal is quantized into a rational number based on the candidate combination of encryption parameters to obtain quantized data; Candidate combinations of encryption parameters that meet the upper bound coverage condition, the lower bound coverage condition, and the preset encryption condition are used as target combinations of encryption parameters; wherein, the upper bound coverage condition is that the maximum value of the quantized data is greater than the maximum value of the desired output signal; the lower bound coverage condition is that the minimum value of the quantized data is less than the minimum value of the desired output signal. Sort all candidate encryption parameter target combinations in ascending order according to the total number of candidate bits. If the candidate total number of candidate bits is the same, sort the candidate encryption parameter target combinations with the same total number of candidate bits in descending order according to the number of candidate decimal places to obtain a candidate combination sequence. Based on the first candidate encryption parameter combination in the candidate combination sequence, determine the total number of quantized bits and the number of quantized decimal places.

5. The multi-agent control method based on homomorphic encryption according to claim 2, characterized in that, Decryption yields the current input signal, the desired output signal, and the current neighborhood output signal, including: The private key is determined by the least common multiple of the two prime numbers in the public key minus 1. The encrypted current input signal is decrypted using the private key to obtain the second set of integers. The current input signal is obtained by performing an inverse mapping on the second set of integers. The encrypted desired output signal is decrypted using the private key to obtain the third set of integers. The desired output signal is obtained by inverse mapping of the third set of integers; The encrypted current neighborhood output signal is decrypted using the private key to obtain the fourth set of integers. The inverse mapping of the fourth set of integers is used to obtain the output signal of the current neighborhood.

6. The multi-agent control method based on homomorphic encryption according to claim 3, characterized in that, The encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal, and the encrypted desired output signal are sent to the corresponding controller, so that the controller generates and sends back the encrypted updated input signal, including: The encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal, and the encrypted desired output signal are sent to the corresponding controller, so that the controller can generate an encrypted updated input signal by iteratively learning the control law through the encrypted version based on the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal, and the encrypted desired output signal. Send the encrypted update input signal back to the corresponding follower; The iterative learning control law of the encrypted version includes: ; in, Indicates the first The first follower in the The encrypted current input signal during the next iteration of learning control. Indicates the first The first follower in the The encrypted current input signal during the next iteration of learning control, i.e., the first... The first follower in the The encrypted update input signal during the next iteration of learning control. Indicates the relationship with the first A set of neighboring followers with connectivity relationships. Index representing the neighborhood follower, Indicates the first The first follower in the The quantized value of the first actual output signal after encryption during the next iteration of learning control. Indicates the first The neighborhood follower in the 1st The quantized value of the encrypted second actual output signal during the next iteration of learning control. Indicates the first The learning gain of each follower Represents the elements of the adjacency matrix. This represents the desired output signal after encryption. Indicates the first A binary variable representing the connection between followers and leaders. Indicates the first Each follower can directly obtain the expected output. Indicates the first A follower cannot directly obtain the expected output.

7. The multi-agent control method based on homomorphic encryption according to claim 1, characterized in that, After obtaining the target output signal for each follower, the following is also included: Visualize the target output signal and the desired output signal for each follower.

8. A multi-agent control system based on homomorphic encryption, characterized in that, include: A leader, a cluster of followers, and several controllers; the cluster of followers includes several followers; each follower corresponds to one controller; The leader is used to encrypt a preset desired output signal to obtain an encrypted desired output signal; and to send the encrypted desired output signal to the follower. The follower cluster is used to set the initial input signal for each follower and encrypt it to obtain the encrypted initial input signal; Repeat the iterative learning control process to obtain the target output signal for each follower; The iterative learning control process includes: for each follower, receiving the encrypted current input signal, the encrypted desired output signal, and the encrypted current neighborhood output signal, and decrypting them to obtain the current input signal, the desired output signal, and the current neighborhood output signal; wherein, initially, the encrypted current input signal is the encrypted initial input signal; initially, the encrypted current neighborhood output signal is zero; executing the current input signal to generate a first actual output signal; calculating the error based on the first actual output signal, the desired output signal, and the current neighborhood output signal; and, if the maximum error of all followers is less than a preset threshold, setting the first actual output signal of each follower... The signal is used as the corresponding target output signal; otherwise, after homomorphically encrypting the first actual output signal, the encrypted first actual output signal is sent to the neighboring follower, and the encrypted second actual output signal sent by the neighboring follower is received; the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal, and the encrypted desired output signal are input to the corresponding controller; the encrypted update input signal sent back by the controller is received; the encrypted update input signal and the encrypted second actual output signal are used as the encrypted current input signal and the encrypted current neighboring output signal for the next execution of the iterative learning control process; Each controller is configured to, upon receiving the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal, and the encrypted desired output signal sent by the follower, generate an encrypted update input signal based on the encrypted current input signal, the encrypted first actual output signal, the encrypted second actual output signal, and the encrypted desired output signal; and send the encrypted update input signal back to the follower.

9. The multi-agent control system based on homomorphic encryption according to claim 8, characterized in that, Also includes: Visualization module; The visualization module is used to visualize the target output signal and the desired output signal of each follower.

10. The multi-agent control system based on homomorphic encryption according to claim 8, characterized in that, The encrypted desired output signal is transmitted by the leader after encrypting the acquired desired output signal, including: Leaders obtain the desired output signals; Set the total number of bits after quantization and the number of decimal places after quantization; Based on the total number of bits and the number of decimal places after quantization, determine the corresponding quantization function and mapping function; The desired output signal is quantized into rational numbers using a quantization function, resulting in a set of rational numbers. By mapping the set of rational numbers to integers using a mapping function, we obtain the first set of integers; Two prime numbers that satisfy a preset condition are randomly selected, and the two prime numbers are multiplied to obtain the public key; the preset condition includes: there is no common factor other than 1 between the product of the two prime numbers and the product of each prime number minus 1. Select integers that are coprime to the public key and less than the public key as a set of random numbers. Randomly select a random number from the set of random numbers. Then, encrypt each integer in the first set of integers according to the public key and the random number to obtain the encrypted desired output signal.