Distributed matrix security computing method and system for unbalanced edge computing resources
By inequality blocking and encryption processing of the matrix in the edge computing environment and assigning tasks according to the computing power of the edge server, the problem of inefficiency caused by equal division of computing tasks is solved, and the security and privacy of data are guaranteed in the resource imbalance environment, and efficient distributed matrix multiplication calculation is realized.
Patent Information
- Application Number
- CN202510361297.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-26
AI Technical Summary
In edge computing environments, equal division of computing tasks leads to inefficiency and lacks data security, especially in scenarios where computing resources are imbalanced.
The distributed matrix security calculation method with unbalanced edge computing resources is adopted, and the matrix is blocked inequality through the client, sub-matrix blocks of different sizes are generated, and sub-matrix blocks are encrypted using the permutation matrix and perturbation matrix generated by the key generation center. Then, the encryption subtask is allocated according to the computing power of the edge server, distributed calculations are performed, and correctness verification and decryption are performed on the client, and the calculation results are finally obtained.
It realizes uneven division of computing tasks in an environment of resource imbalance, fully utilizes the distributed computing advantages of edge servers, ensures the security and privacy of data, and ensures the correctness of calculation results.
Smart Images

Figure CN119892503A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data security technology, and more specifically to a distributed matrix security computing method and system for unbalanced edge computing resources. Background Art
[0002] As a distributed computing architecture, edge computing can perform distributed computing tasks on many edge devices, effectively solving the problems of insufficient terminal computing resources and over-concentration of cloud computing tasks, and forming a cloud-edge-end collaborative computing system between cloud devices, edge devices, and terminal devices. In some edge computing scenarios, the computing resources of edge computing devices are unbalanced, and computing tasks of different sizes need to be allocated according to the computing resources of edge computing devices of different sizes, so as to obtain more efficient computing efficiency.
[0003] Distributed edge computing can decompose complex computing tasks and assign small-scale computing subtasks to multiple edge devices for simultaneous computing, thereby effectively improving the efficiency of completing complex computing tasks. In the field of machine learning, various data are usually organized in the form of matrices. Therefore, matrix multiplication is widely used in various algorithms such as data clustering and data dimensionality reduction. For example, the calculation of principal component analysis of image data and the calculation of fully connected layers in convolutional neural networks all involve large-scale matrix multiplication operations. However, the time complexity of matrix multiplication operations is , and large-scale matrix multiplication operations bring great computing burden to users. The application of distributed edge computing has become a reliable method to improve the efficiency of matrix multiplication calculations.
[0004] At present, existing matrix distributed computing solutions all divide computing tasks equally, with each server performing computing tasks of the same scale. However, in edge computing scenarios with unbalanced computing resources, a slow edge server may slow down the progress of the entire computing. At the same time, when distributed computing delegates computing tasks to various edge servers, untrusted edge servers may snoop on user data and privacy, leading to the leakage of user data information. Therefore, it is necessary to encrypt data on the client side so that the edge server can perform calculations in a ciphertext state.
[0005] In summary, how to divide computing tasks unequally, assign computing tasks of different sizes to servers based on computing capabilities, and protect the confidentiality and privacy of data during distributed computing are issues that technical personnel in this field urgently need to solve. Summary of the invention
[0006] In view of this, the present invention provides a distributed matrix security computing method and system for unbalanced edge computing resources, which can solve the problem of low efficiency and lack of data security caused by equal division of computing tasks in an edge computing environment.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] In a first aspect, an embodiment of the present invention provides a distributed matrix security computing method for unbalanced edge computing resources, comprising the following steps:
[0009] S10, the client divides the two original matrices to be calculated into unequal blocks to generate corresponding multiple sub-matrix blocks;
[0010] S20, the key generation center generates a permutation matrix and a perturbation matrix as encryption keys, and sends them to the client;
[0011] S30, the client uses the encryption key to encrypt the plurality of sub-matrix blocks to generate corresponding encrypted sub-matrices;
[0012] S40, allocating encryption subtasks of different sizes corresponding to the encryption submatrices to corresponding edge servers according to the computing capabilities of the multiple edge servers;
[0013] S50, each edge server performs distributed computing on the encrypted matrix, generates an encrypted intermediate result and returns it to the client;
[0014] S60: The client verifies the correctness of the encrypted intermediate result, identifies malicious servers and removes them;
[0015] S70: The client decrypts and concatenates the encrypted intermediate results that have passed the verification to obtain the calculation results of the final two original matrices.
[0016] Furthermore, the unequal block division in step S10 is:
[0017] According to the dimension of the original matrix and the computing power of the edge server, the matrix is divided into sub-matrix blocks of different sizes, and the block dimension is positively correlated with the computing power of the server.
[0018] Furthermore, the unequal blocking in step S10 further includes: when the matrix block sizes do not match, filling zero vectors in the smaller matrix to make its dimension match that of the larger matrix.
[0019] Furthermore, in step S20:
[0020] Permutation matrix generation method: by permutation function and Kronecker function generate;
[0021] The perturbation matrix is generated by: Let the perturbation matrix ,in , , R represents a real number set, x represents the number of rows of the plaintext data matrix, y represents the number of columns of the plaintext data matrix, and v and w are both non-zero vectors, set the security parameters , the vector elements are Randomly selected within the range.
[0022] Furthermore, the encryption process in step S30 includes:
[0023] Sequentially permuting rows or columns of a submatrix block by using a permutation matrix;
[0024] The perturbation matrix is used to add random noise to the sub-matrix block to generate the obfuscated encrypted sub-matrix.
[0025] Furthermore, the distributed computing in step S50 divides the matrix into sub-matrices of inconsistent sizes, optimizes the computing path through unequal block division, and reduces redundant computing of the edge server.
[0026] Furthermore, the correctness verification in step S60 includes:
[0027] The client constructs a verification vector and performs linear operations on the returned results;
[0028] By comparing the operation result with the expected value, if they do not match, it is determined that the edge server corresponding to the returned result is malicious.
[0029] Furthermore, the decryption and splicing in step S70 includes:
[0030] The random noise of the received encrypted intermediate result is removed to obtain the final calculation result.
[0031] In a second aspect, an embodiment of the present invention further provides a distributed matrix security computing system for unbalanced edge computing resources, applying a distributed matrix security computing method based on unbalanced edge computing resources as described in any embodiment of the first aspect, including:
[0032] The client is used to perform matrix segmentation, encryption, task allocation, verification and decryption operations;
[0033] The key generation center is used to generate a permutation matrix and a perturbation matrix as encryption keys and send them to the client;
[0034] The edge server is used to receive the encryption subtasks sent by the client, perform distributed computing, generate encrypted intermediate results and return them to the client.
[0035] It can be seen from the above technical solution that compared with the prior art, the present invention has the following advantages:
[0036] The present invention targets edge computing scenarios with unbalanced computing resources, divides computing tasks unequally according to computing resources of different scales of edge servers, and gives full play to the advantages of distributed computing of multiple edge servers. By designing effective blinding of matrices and distributed secure computing, data is encrypted on the client side to ensure the security and privacy of user data; at the same time, it supports the verification of the correctness of the returned results to ensure the correctness of the calculation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0038] Figure 1 A flow chart of the distributed matrix security computing method for unbalanced edge computing resources provided by the present invention.
[0039] Figure 2 Schematic diagram of a distributed matrix secure computing system for unbalanced edge computing resources provided by the present invention. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] The embodiment of the present invention discloses a distributed matrix security computing method for unbalanced edge computing resources, involving multiple parties such as a client, an edge server, and a key generation center, wherein:
[0042] 1) Client: The computing power is relatively weak, but there is a need to calculate large-scale matrix multiplication. The computing task needs to be divided into subtasks and then delegated to multiple edge servers for calculation. At the same time, the original plaintext matrix data needs to be encrypted, the correctness of the returned ciphertext result needs to be verified, and the plaintext result needs to be decrypted.
[0043] 2) Edge servers: Multiple edge servers with different computing capabilities. Edge servers with more computing resources undertake larger-scale computing tasks. At the same time, edge servers may be malicious and may snoop on users' private data or return incorrect computing results.
[0044] 3) Key Generation Center: Generates keys used by clients for encryption and decryption, and sends them securely to clients.
[0045] Reference Figure 1 As shown, the following steps are included:
[0046] S10, the client divides the two original matrices to be calculated into unequal blocks to generate corresponding multiple sub-matrix blocks;
[0047] Among them, the non-equal partitioning divides the matrix into sub-matrix blocks of different sizes according to the dimension of the original matrix and the computing power difference of the edge server, and the dimension of the block is positively correlated with the computing power of the server. When the matrix block size does not match, zero vectors are filled in the smaller matrix to make its dimension match that of the larger matrix.
[0048] For example, users can manually set the scale parameters of matrix partitioning based on the dimensions of the original matrix and the computing power of the edge server. , thereby manually setting the block size according to the actual computing power of the server.
[0049] S20, the key generation center generates a permutation matrix and a perturbation matrix as encryption keys, and sends them to the client;
[0050] S30, the client uses the encryption key to encrypt the plurality of sub-matrix blocks to generate a corresponding encrypted sub-matrix; for example, the rows or columns of the sub-matrix blocks are sequentially permuted by a permutation matrix; random noise is then added to the sub-matrix blocks by a perturbation matrix to achieve blinding of the data and generate an obfuscated encrypted sub-matrix. In this way, even if the edge server sees the encrypted data, it cannot obtain the original information.
[0051] S40, allocating encryption subtasks of different sizes corresponding to the encryption submatrices to corresponding edge servers according to the computing capabilities of the multiple edge servers;
[0052] S50, each edge server performs distributed computing on the encrypted matrix, generates an encrypted intermediate result and returns it to the client; the edge server divides the matrix into sub-matrices of inconsistent sizes, optimizes the computing path by non-equal block division, and reduces redundant computing of the edge server.
[0053] S60, the client verifies the correctness of the encrypted intermediate result, identifies malicious servers and removes them; in this step, the client constructs a verification vector to perform linear operations on the returned results; by comparing whether the operation results match the expected values, when they do not match, it is determined that the edge server corresponding to the returned result is malicious.
[0054] S70: The client decrypts and concatenates the encrypted intermediate results that have passed the verification to obtain the final calculation results of the two original matrices. For example, random noise is removed from the received encrypted intermediate results to obtain the final result.
[0055] The present invention realizes the distributed secure computing of matrix multiplication based on the matrix blinding algorithm and distributed computing architecture. The solution supports the unequal division of computing tasks in a resource imbalance environment, giving full play to the advantages of distributed computing of edge servers with different computing capabilities, and has scalability and flexibility; the solution ensures the data security in the edge server computing process by adding interference items to the original matrix of the client for encryption; and supports the client to verify the returned calculation results, ensuring the availability of data.
[0056] Among them, blinding is the key technology to ensure data security in the present invention. It converts the original data into an incomprehensible ciphertext matrix by adding interference items to the plaintext matrix and performing row and column permutations, thereby preventing malicious servers from snooping on user data.
[0057] The following is an example of a distributed secure computing solution for matrix multiplication in an edge computing scenario using one client and seven edge servers. Figure 2 The specific embodiments of the present invention are described below.
[0058] 1) The two large matrices that need to be multiplied are and , where R represents a real number set, m represents the number of rows of matrix A, n represents the number of columns of matrix A and the number of rows of matrix B, and s represents the number of columns of matrix B. A and B are partitioned unbalancedly. , .
[0059] in:
[0060] a) and , and ;
[0061] b) and , and .
[0062] 2) Through the designed algorithm, Perform addition and subtraction operations. During the operation, if the dimensions of the two matrices are different, fill the smaller matrix with zero vectors. For example: when the number of rows or columns of a submatrix is smaller than that of other submatrices, it is regarded as a smaller matrix and filled with zero vectors to expand it to the same dimension as the largest submatrix (i.e., the larger matrix) to ensure that addition and subtraction operations and matrix multiplication can be performed correctly in subsequent calculations. Specifically:
[0063] a) .
[0064] b) .
[0065] c) .
[0066] d) .
[0067] e) .
[0068] in:
[0069] a) yes Fill with zero vector,
[0070] b) yes fill with zero vector;
[0071] c) yes Fill with zero vector,
[0072] d) yes Fill with a zero vector.
[0073] The purpose of padding is to allow matrices with smaller dimensions to be added or subtracted from matrices with larger dimensions. There are 10 matrices in total.
[0074] 3) K (key generation center) generates a permutation matrix according to the designed algorithm and the perturbation matrix as a key.
[0075] A. Use the permutation function and Kronecker function Generate a permutation matrix:
[0076] a) For a collection , permutation function is a bijective function from S to itself that rearranges all the elements of S into another order.
[0077] b) Kronecker function The role of is when the variable Output 1 if they are equal, otherwise output 0. A sparse orthogonal permutation matrix can be constructed.
[0078] B. Perturbation Matrix The way to generate is ,in , , and v and w are both non-zero vectors, the vector elements are Randomly selected from the range of . .
[0079] CK communicates via a secure channel and Send to .
[0080] 4) After receiving the key, add disturbance terms to the plaintext matrix and perturb the matrix rows or columns according to the designed encryption algorithm, and use the key pair A total of 14 matrices are encrypted, and the encrypted matrices are The specific encryption algorithm is:
[0081] a) .
[0082] b) .
[0083] c) .
[0084] d) .
[0085] e) .
[0086] f) .
[0087] g) .
[0088] Send the encrypted matrix to 7 (Edge Server).
[0089] 5) Operate the matrix and get the result: . It is assumed that , , The computing power is stronger and needs to undertake more computing tasks. Specifically:
[0090] a) take over ,calculate ;
[0091] b) take over ,calculate ;
[0092] c) take over ,calculate ;
[0093] d) take over ,calculate ;
[0094] e) take over ,calculate ;
[0095] f) take over ,calculate ;
[0096] g) take over ,calculate ;
[0097] The above 7 edge servers perform calculations simultaneously and obtain .
[0098] Then:
[0099] a) calculate ,in yes Fill with zero vector, yes fill with zero vector;
[0100] b) calculate ,in yes Fill with zero vector, yes fill with zero vector;
[0101] c) calculate , .
[0102] The above three edge servers perform calculations simultaneously and obtain , and return the calculation result to .
[0103] 6) The result is verified by the designed algorithm, and the result is received after the verification is passed. Can know Which of the servers are malicious and add them to the blacklist.
[0104] The specific approach is:
[0105] Constructing a 0-1 vector ,calculate:
[0106] a) ;
[0107] b) ;
[0108] c) ;
[0109] d) .
[0110] in, and from and Pad with zero vector.
[0111] if , the client receives the returned result; otherwise, the client rejects the returned result and can find out the malicious And blacklisted.
[0112] The above verification process is repeated t times, and t=20 can usually be set to ensure the correctness of the verification result.
[0113] 7) right The designed decryption algorithm eliminates the disturbance terms in the ciphertext matrix and restores the row and column permutation of the ciphertext matrix, and decrypts to obtain the final calculation result. The specific operation is: calculate:
[0114] a) .
[0115] b) .
[0116] c) .
[0117] d) .
[0118] in, and yes and Filled with zero vectors, is from Intercepted from and is from and Intercepted from and is from and Intercepted from .
[0119] Depend on Get the final result of matrix multiplication .
[0120] Compared with the prior art, the present invention has the following beneficial effects:
[0121] (1) The present invention distributes computing tasks unequally based on the different computing capabilities of each edge server. Tasks can be divided according to actual needs to form subtasks of different sizes for unbalanced computing power, giving full play to the distributed computing advantages of edge servers in an environment with unbalanced resources.
[0122] (2) The present invention encrypts data through lightweight operations such as sparse matrix multiplication and vector-matrix multiplication to ensure data security and privacy; at the same time, a scheme for verifying the returned results is designed to ensure the correctness of the data.
[0123] (3) In a distributed edge computing scenario with unbalanced resources, the present invention proposes a method for unequally partitioning a matrix. By slicing and filling sub-matrices, the Strassen matrix multiplication operation can be implemented using sub-matrices of inconsistent sizes, thereby improving the distributed computing efficiency of the edge computing server and avoiding resource waste due to the mismatch between the computing task scale and the server computing power.
[0124] Based on the same inventive concept, Figure 2 As shown, the present invention also provides a distributed matrix security computing system for unbalanced edge computing resources, and applies the distributed matrix security computing method based on unbalanced edge computing resources as in the above embodiment, including:
[0125] The client is used to perform matrix segmentation, encryption, task allocation, verification and decryption operations;
[0126] The key generation center is used to generate a permutation matrix and a perturbation matrix as encryption keys and send them to the client;
[0127] The edge server is used to receive the encryption subtasks sent by the client, perform distributed computing, generate encrypted intermediate results and return them to the client.
[0128] Among them, the client, edge server and key generation center work together to realize efficient distributed matrix multiplication calculation under data encryption protection, and ensure the correctness of the calculation results and data privacy.
[0129] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0130] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A distributed matrix secure computing method for unbalanced edge computing resources, characterized in that: The following steps are involved: S10, the client divides the two original matrices to be calculated into unequal blocks to generate corresponding multiple sub-matrix blocks; S20, the key generation center generates a permutation matrix and a perturbation matrix as encryption keys, and sends them to the client; S30, the client uses the encryption key to encrypt the plurality of sub-matrix blocks to generate corresponding encrypted sub-matrices; S40, allocating encryption subtasks of different sizes corresponding to the encryption submatrices to corresponding edge servers according to the computing capabilities of the multiple edge servers; S50, each edge server performs distributed computing on the encrypted matrix, generates an encrypted intermediate result and returns it to the client; S60: The client verifies the correctness of the encrypted intermediate result, identifies malicious servers and removes them; S70: The client decrypts and concatenates the verified encrypted intermediate results to obtain the calculation results of the final two original matrices.
2. The distributed matrix secure computing method for unbalanced edge computing resources according to claim 1, characterized in that: The unequal block division in step S10 is: According to the dimension of the original matrix and the computing power of the edge server, the matrix is divided into sub-matrix blocks of different sizes, and the block dimension is positively correlated with the computing power of the server.
3. The distributed matrix secure computing method for unbalanced edge computing resources according to claim 1, characterized in that: The unequal blocking in step S10 further includes: when the matrix block sizes do not match, filling zero vectors in the smaller matrix to make its dimension match that of the larger matrix.
4. The distributed matrix secure computing method for unbalanced edge computing resources according to claim 1, characterized in that: In step S20: Permutation matrix generation method: by permutation function and Kronecker function generate; The perturbation matrix is generated by: Let the perturbation matrix ,in , , R represents a real number set, x represents the number of rows of the plaintext data matrix, y represents the number of columns of the plaintext data matrix, and v and w are both non-zero vectors, set the security parameters , the vector elements are Randomly selected within the range.
5. The distributed matrix secure computing method for unbalanced edge computing resources according to claim 1, characterized in that: The encryption process in step S30 includes: Sequentially permuting rows or columns of a submatrix block by using a permutation matrix; The perturbation matrix is used to add random noise to the sub-matrix block to generate the obfuscated encrypted sub-matrix.
6. The distributed matrix secure computing method for unbalanced edge computing resources according to claim 1, characterized in that: The distributed computing in step S50 divides the matrix into sub-matrices of inconsistent sizes, optimizes the computing path through unequal block division, and reduces redundant computing of edge servers.
7. The distributed matrix secure computing method for unbalanced edge computing resources according to claim 1, characterized in that: The correctness verification in step S60 includes: The client constructs a verification vector and performs linear operations on the returned results; By comparing the operation result with the expected value, if they do not match, it is determined that the edge server corresponding to the returned result is malicious.
8. The distributed matrix secure computing method for unbalanced edge computing resources according to claim 1, characterized in that: The decryption and splicing in step S70 include: The random noise of the received encrypted intermediate result is removed to obtain the final calculation result.
9. A distributed matrix secure computing system for unbalanced edge computing resources, characterized in that: A distributed matrix security computing method using unbalanced edge computing resources as described in any one of claims 1 to 8, comprising: The client is used to perform matrix segmentation, encryption, task allocation, verification and decryption operations; The key generation center is used to generate a permutation matrix and a perturbation matrix as encryption keys and send them to the client; The edge server is used to receive the encryption subtasks sent by the client, perform distributed computing, generate encrypted intermediate results and return them to the client.
Citation Information
Patent Citations
Block chain-based rendering method, related equipment and system
CN110119315A
Task management method and device based on edge computing
CN111475276A
Privacy protection method based on edge computing
CN114417414A
Beam forming method for vehicle network edge calculation based on reinforcement learning
CN116801273A
Multi-server matrix multiplication verifiable calculation implementation method and system based on double encryption
CN117494156A