Federal learning data security transmission monitoring method and device, equipment and medium

By collecting and analyzing the operating logs and communication traffic of the federal learning algorithm, the limited self -motivation verification behavior consistency is used to solve the problem that it is difficult to detect the security risks of federal learning business in existing technologies, and the dynamic and real -time safety monitoring of the federal learning business is realized.

CN119363404AActive Publication Date: 2025-01-24CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411449193.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-01-24
Estimated Expiration
2044-10-16

AI Technical Summary

Technical Problem

It is difficult for the prior art to effectively detect security risks in federated learning services, especially when data flow is automatically controlled by programs and users are only responsible for creating model configuration information.

Method used

By collecting the running logs and communication traffic during the training process of the federated learning algorithm, the data representing the computing behavior and transmission behavior during the training process of the algorithm are analyzed and obtained. The finite automaton is used to verify the consistency between the actual behavior and the expected behavior defined by the algorithm. If it is inconsistent, Stop data transmission and output security warning.

Benefits of technology

It realizes whether the operating status of the federal learning business is consistent with the definition of algorithms to ensure the security of the federal learning business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363404A_ABST
    Figure CN119363404A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data security, in particular to a data security transmission monitoring method and device for federated learning, equipment and a medium, and is used for solving the problem that security risks in federated learning business cannot be effectively monitored in related technologies. The method comprises the following steps: collecting operation logs and communication traffic in a federal learning algorithm training process; analyzing the operation log and the communication flow to obtain first data representing a calculation behavior in an algorithm training process and second data representing a transmission behavior in the algorithm training process; based on the first data and the second data, the consistency of actual behaviors in the training process and expected behaviors defined by the algorithm is verified through a finite automaton, input of the finite automaton is used for representing expected calculation behaviors of the algorithm, and the state of the finite automaton is used for representing expected transmission behaviors of the algorithm; therefore, whether the operation state of the federated learning service is consistent with the algorithm definition or not is dynamically detected in real time, so that the safety of the federated learning service is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data security technology, and in particular to a method, device, equipment and medium for monitoring data security transmission of federated learning. Background Art

[0002] Since its birth, federated learning has achieved rapid development with its advantages of distributed structure and privacy security. The vertical federated learning system is a distributed robot learning technology. Its core idea is that when multiple data sources participate in model training, there is no need to transfer original data. The nodes of each participant only conduct joint model training through the interaction of model intermediate parameters, thereby ensuring data privacy security and data sharing.

[0003] In actual applications, the business development of vertical federated learning relies on the federated learning platform. In addition to being affected by the federated learning algorithm, the data security of the participant nodes is also related to factors such as algorithm implementation, communication framework, and platform engineering. If there are hidden security risks on the federated learning platform and they are not identified, the data security of the data source provider will inevitably be threatened when conducting federated learning business. There are two main ways to determine data leakage in related technologies:

[0004] Method 1: Code review. This method belongs to static detection, which mainly uses manual inspection to verify whether the implementation of the federated learning algorithm is consistent with the algorithm definition; however, code review requires high professional ability of the verification personnel and requires a lot of time, which is difficult to apply to the federated learning system that integrates machine learning, cryptography, software engineering and other technologies.

[0005] Method 2: Abnormal behavior detection based on user entity behavior analysis. This method is a dynamic detection method that detects abnormal behavior by collecting and analyzing user operation logs, data transmission logs, network access logs and other information; however, in the federated learning system, data flow is automatically controlled by the program, and the user is only responsible for creating model configuration information. In addition, the data transmitted in the middle is mostly in ciphertext form, and it is difficult to directly determine data leakage through network traffic. Therefore, method 2 cannot effectively detect security risks in federated learning services. Summary of the invention

[0006] The embodiments of the present application provide a method, apparatus, device and medium for monitoring the secure transmission of federated learning data, which are used to dynamically and real-time detect whether the operating status of the federated learning service is consistent with the algorithm definition, thereby ensuring the data security of the federated learning service.

[0007] The specific technical solutions provided by the embodiments of this application are as follows:

[0008] In a first aspect, an embodiment of the present application provides a method for monitoring data security transmission of federated learning, including:

[0009] Collect operation logs and communication traffic during the training process of federated learning algorithms;

[0010] Parsing the operation log to obtain first data representing the computing behavior during the algorithm training process, and parsing the communication traffic to obtain second data representing the transmission behavior during the algorithm training process;

[0011] Based on the first data and the second data, using a finite automaton, verifying the consistency between the actual behavior in the training process and the expected behavior defined by the algorithm, wherein the input of the finite automaton is used to characterize the expected computational behavior of the algorithm, and the state is used to characterize the expected transmission behavior of the algorithm;

[0012] If it is determined that the verification fails, data transmission is terminated and a security warning is output.

[0013] In some possible implementations, the second data includes an actual data object and an actual transmission direction, and the verifying, based on the first data and the second data, using a finite automaton, the consistency between the actual behavior in the training process and the expected behavior defined by the algorithm includes:

[0014] After determining, using the finite automaton, that the actual computing behavior represented by the first data is consistent with the expected computing behavior, determining, based on a state transition table, the current state of the finite automaton and the expected state to which it is transferred after reading the input corresponding to the actual computing behavior;

[0015] If the expected state representation continues to be trained, then based on the expected transmission direction of the expected data object associated with the expected state, and the actual data object and the actual transmission direction, the consistency of the actual transmission behavior during the training process with the expected transmission behavior defined by the algorithm is verified;

[0016] If it is determined that the verification is passed and the expected transmission direction is outward transmission, based on the first actual data feature of the actual data object and the first expected data feature of the expected data object, detecting whether the actual data object is consistent with the expected data object;

[0017] When the two parties are determined to be consistent, the verification is determined to have been passed;

[0018] When an inconsistency is determined, it is determined that the verification has failed.

[0019] In some possible implementations, the first data includes an associated input identifier, an input data object, and an output data object, and a second actual data feature of the output data object;

[0020] Determine whether the actual computing behavior represented by the first data is consistent with the expected computing behavior by:

[0021] Obtaining a verification rule corresponding to the input identifier from a verification rule set determined according to an algorithm definition of the algorithm;

[0022] determining a second expected data characteristic of the output data object based on the verification rule and a third actual data characteristic of the input data object;

[0023] matching the second expected data feature with the second actual data feature;

[0024] If they match, determining that the actual computing behavior represented by the first data is consistent with the expected computing behavior;

[0025] If they do not match, it is determined that the actual computing behavior represented by the first data is inconsistent with the expected computing behavior.

[0026] In some possible implementations, determining the current state of the finite automaton based on the state transition table, and the expected state to be transferred to after reading the input corresponding to the actual computing behavior, includes:

[0027] querying the current state of the finite automaton from the state transition set, and the state to which it is transferred after reading the input corresponding to the actual computing behavior;

[0028] Determine that a state is queried from the state transfer set, and determine the queried state as the expected state.

[0029] In some possible implementations, the method further includes:

[0030] If the state is found from the state transition table, and the found state indicates that the training is finished, it is determined that the verification is passed;

[0031] If no status is found from the status transfer table, it is determined that the verification has not been passed.

[0032] If the expected state representation continues to be trained, and it is determined that the actual transmission behavior is inconsistent with the expected transmission behavior, it is determined that the verification has not passed.

[0033] In some possible implementations, parsing the operation log to obtain first data characterizing a computing behavior during the algorithm training process includes:

[0034] Parsing keywords representing actual computing behaviors from the operation log;

[0035] Based on the keyword and the relationship between each input and the keyword, determine the input corresponding to the keyword, wherein each input is an input in an input set associated with the finite automaton, including an input data object and an output data object;

[0036] Based on the operation log, counting the sample quantity and feature dimension of the output data object included in the input to obtain a second actual data feature of the output data object included in the input;

[0037] The completion time of the calculation behavior in the operation log, the output data object included in the input, and the second actual data feature are determined as the first data.

[0038] In some possible implementations, the parsing the communication traffic to obtain second data characterizing transmission behavior during the algorithm training process includes:

[0039] Parsing the communication traffic, and identifying the actual data object and the actual transmission direction from the parsed data;

[0040] Based on the communication traffic, counting the number of samples and the feature dimension of the actual data object to obtain a first actual data feature of the actual data object;

[0041] The transmission time of the communication traffic, the actual data object and the actual transmission direction, and the first actual data feature are determined as the second data.

[0042] In a second aspect, an embodiment of the present application provides a data security transmission monitoring device for federated learning, comprising:

[0043] The collection module is used to collect the operation logs and communication traffic during the training process of the federated learning algorithm;

[0044] A data analysis module, configured to parse the operation log to obtain first data representing the computing behavior during the algorithm training process, and to parse the communication traffic to obtain second data representing the transmission behavior during the algorithm training process;

[0045] a verification module, configured to verify the consistency of the actual behavior in the training process with the expected behavior defined by the algorithm using a finite automaton based on the first data and the second data, wherein the input of the finite automaton is used to characterize the expected computational behavior of the algorithm, and the state is used to characterize the expected transmission behavior of the algorithm;

[0046] The processing module is used to terminate data transmission and output a safety warning if it is determined that the verification has not been passed.

[0047] In some possible implementations, the second data includes an actual data object and an actual transmission direction, and the verification module is specifically configured to:

[0048] After determining, using the finite automaton, that the actual computing behavior represented by the first data is consistent with the expected computing behavior, determining, based on a state transition table, the current state of the finite automaton and the expected state to which it is transferred after reading the input corresponding to the actual computing behavior;

[0049] If the expected state representation continues to be trained, then based on the expected transmission direction of the expected data object associated with the expected state, and the actual data object and the actual transmission direction, the consistency of the actual transmission behavior during the training process with the expected transmission behavior defined by the algorithm is verified;

[0050] If it is determined that the verification is passed and the expected transmission direction is outward transmission, based on the first actual data feature of the actual data object and the first expected data feature of the expected data object, detecting whether the actual data object is consistent with the expected data object;

[0051] When the two parties are determined to be consistent, the verification is determined to have been passed;

[0052] When an inconsistency is determined, it is determined that the verification has failed.

[0053] In some possible implementations, the first data includes an associated input identifier, an input data object, and an output data object, and a second actual data feature of the output data object;

[0054] The verification module is specifically used to determine whether the actual computing behavior represented by the first data is consistent with the expected computing behavior in the following manner:

[0055] Obtaining a verification rule corresponding to the input identifier from a verification rule set determined according to an algorithm definition of the algorithm;

[0056] determining a second expected data characteristic of the output data object based on the verification rule and a third actual data characteristic of the input data object;

[0057] matching the second expected data feature with the second actual data feature;

[0058] If they match, determining that the actual computing behavior represented by the first data is consistent with the expected computing behavior;

[0059] If they do not match, it is determined that the actual computing behavior represented by the first data is inconsistent with the expected computing behavior.

[0060] In some possible implementations, the verification module is specifically used to:

[0061] querying the current state of the finite automaton from the state transition set, and the state to which it is transferred after reading the input corresponding to the actual computing behavior;

[0062] Determine that a state is queried from the state transfer set, and determine the queried state as the expected state.

[0063] In some possible implementations, the verification module is further configured to:

[0064] If the state is found from the state transition table, and the found state indicates that the training is finished, it is determined that the verification is passed;

[0065] If no status is found from the status transfer table, it is determined that the verification has not been passed.

[0066] If the expected state representation continues to be trained, and it is determined that the actual transmission behavior is inconsistent with the expected transmission behavior, it is determined that the verification has not passed.

[0067] In some possible implementations, the data analysis module is specifically used to:

[0068] Parsing keywords representing actual computing behaviors from the operation log;

[0069] Based on the keyword and the relationship between each input and the keyword, determine the input corresponding to the keyword, wherein each input is an input in an input set associated with the finite automaton, including an input data object and an output data object;

[0070] Based on the operation log, counting the sample quantity and feature dimension of the output data object included in the input to obtain a second actual data feature of the output data object included in the input;

[0071] The completion time of the calculation behavior in the operation log, the output data object included in the input, and the second actual data feature are determined as the first data.

[0072] In some possible implementations, the data analysis module is specifically used to:

[0073] Parsing the communication traffic, and identifying the actual data object and the actual transmission direction from the parsed data;

[0074] Based on the communication traffic, counting the number of samples and the feature dimension of the actual data object to obtain a first actual data feature of the actual data object;

[0075] The transmission time of the communication traffic, the actual data object and the actual transmission direction, and the first actual data feature are determined as the second data.

[0076] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0077] Memory, used to store computer programs or instructions;

[0078] A processor is used to execute the computer program or instructions in the memory so that any method described in the first aspect above is executed.

[0079] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. When instructions in the storage medium are executed by a processor, the processor is enabled to execute any method described in the first aspect above.

[0080] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, when the computer program code is run on a computer, enables the computer to execute any method as described in the first aspect above.

[0081] In an embodiment of the present application, operation logs and communication traffic are collected during the training process of a federated learning algorithm; the operation logs and communication traffic are parsed to obtain first data characterizing the computing behavior during the algorithm training process and second data characterizing the transmission behavior during the algorithm training process; then, based on the first data and the second data, a finite automaton is used to verify the consistency between the actual behavior during the training process and the expected behavior defined by the algorithm, wherein the input of the finite automaton is used to characterize the expected computing behavior of the algorithm, and the state is used to characterize the expected transmission behavior of the algorithm; in this way, when it is determined that the verification has not been passed, the data transmission can be terminated in time and a security warning can be output, so as to realize dynamic and real-time detection of whether the running status of the federated learning service is consistent with the algorithm definition, thereby ensuring the security of the federated learning service. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 This is a flow chart of a method for monitoring data security transmission of federated learning in an embodiment of the present application;

[0083] Figure 2 This is a flow chart of a method for obtaining actual computing behavior in an embodiment of the present application;

[0084] Figure 3 This is a flow chart of a method for obtaining actual transmission behavior in an embodiment of the present application;

[0085] Figure 4 This is a flow chart of a method for verifying the consistency between actual behavior and expected behavior in an embodiment of the present application;

[0086] Figure 5 This is a flow chart of verifying the consistency between an actual computing behavior and an expected computing behavior in an embodiment of the present application;

[0087] Figure 6 This is a flow chart of using a finite automaton to obtain an expected state in an embodiment of the present application;

[0088] Figure 7 This is a schematic diagram of the architecture between the nodes of each participant participating in the training of the federated learning algorithm in an embodiment of the present application;

[0089] Figure 8 It is a logic diagram for realizing the entire longitudinal federated linear regression algorithm in an embodiment of the present application;

[0090] Fig. 9 A schematic diagram of a data security transmission monitoring scenario of federated learning on the task initiator side in an embodiment of the present application;

[0091] Fig.10 This is a schematic diagram of a state transition diagram in an embodiment of the present application;

[0092] Fig.11 This is a specific processing flow chart of a data security transmission monitoring method for federated learning in an embodiment of the present application;

[0093] Fig.12 This is a schematic diagram of the logical architecture of a data security transmission monitoring device for federated learning in an embodiment of the present application;

[0094] Fig.13 It is a schematic diagram of the physical structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0095] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0096] In order to help those skilled in the art to better understand the technical solution of the present application, some terms in the embodiments of the present application are explained below.

[0097] (1) In the embodiments of the present application, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0098] (2) In the embodiments of the present application, the term "finite automata" is also called a sequential machine, which is a conceptual model used to simulate calculations and accept character strings. It is one of the basic models in automata theory and is widely used in lexical analysis, pattern recognition, natural language processing and other fields.

[0099] A finite automaton G consists of five tuples (S FL ,Σ FL , f FL ,s0,Z FL ) definition, where Σ FL is an input set, each element of which is called an input, representing the input that the automaton can accept. FL is a finite state set, each element of which is called a state; f FL is a state transition function that describes the transition relationship between states. s0 is a unique initial state, s0∈S FL , Z FL is the terminal state, representing the state where the automaton stops accepting input.

[0100] (3) The term "vertical federated learning" in the embodiments of the present application is called Vertical Federated Learning (VFL for short), which is a machine learning framework that aims to solve the data island problem while protecting the privacy and security of data. In vertical federated learning, multiple participant nodes jointly train a machine learning model while retaining their own private data. The data sets of these participant nodes overlap in user samples, but differ in feature space, that is, they have different feature information about the same user.

[0101] (4) The terms "first", "second", "third", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in sequences other than those illustrated or described herein.

[0102] Commonly used data leakage prevention methods in related technologies include static detection and dynamic detection. Among them, static detection mostly refers to code review, that is, it mainly uses manual inspection to verify whether the implementation of the federated learning algorithm is consistent with the algorithm definition; but code review requires high professional ability of the verification personnel and requires a lot of time, and it is difficult to apply to the federated learning system that integrates machine learning, cryptography and software engineering technologies; while dynamic detection is mostly based on user entity behavior analysis and is more used in data leakage scenarios caused by user behavior; but in the federated learning system, data flow is automatically controlled by the program, and the user is only responsible for creating model configuration information, and the data transmitted in the middle is mostly in ciphertext form, and it is difficult to directly judge data leakage based on network traffic. Therefore, it is impossible to effectively detect security risks in the federated learning business.

[0103] In view of this, in order to solve the problem that the relevant technology cannot effectively detect the security risks in the federated learning business, the embodiment of the present application provides a data security transmission monitoring method for federated learning, by collecting the operation logs and communication traffic during the training process of the federated learning algorithm; parsing the operation logs and communication traffic to obtain the first data representing the computing behavior during the algorithm training process, and the second data representing the transmission behavior during the algorithm training process; then, based on the first data and the second data, using a finite automaton, verify the consistency between the actual behavior in the training process and the expected behavior defined by the algorithm, wherein the input of the finite automaton is used to characterize the expected computing behavior of the algorithm, and the state is used to characterize the expected transmission behavior of the algorithm; in this way, when it is determined that the verification has not passed, the data transmission can be terminated in time and a security warning can be output, so as to realize dynamic and real-time detection of whether the running status of the federated learning business is consistent with the algorithm definition, thereby ensuring the security of the federated learning business.

[0104] In the present application, the above method can be applied to electronic devices, which can be any device in this end that is located in the same network as the host running the federated learning service, such as a smart terminal, a smart mobile terminal, a tablet computer, a laptop computer, a smart handheld device, a personal computer (Personal Computer, PC), a computer, a smart screen, a personal digital assistant (Personal Digital Assistant, PDA), a server, etc.

[0105] The preferred implementation modes of the present application are further described in detail below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application, and the embodiments of the present application and the features in the embodiments may be combined with each other if there is no conflict.

[0106] Federated learning algorithms usually have a fixed-mode processing flow, and finite automata can be used for pattern recognition and sequence recognition. Therefore, in this application, the computing behavior and transmission behavior are regarded as the input and state of the finite automaton respectively. In this way, by using the finite automaton through a sequence recognition, the algorithm process and data transmission can be jointly verified, so that when the actual behavior during the training of the federated learning algorithm is monitored to be inconsistent with the expected behavior defined by the algorithm, a timely response can be made to ensure data security.

[0107] Specifically, the finite automaton used in this application is defined as follows: In this application, the federated learning algorithm is split according to the computational behavior and the transmission behavior, and the computational behavior is summarized as the input set of the finite automaton, denoted as Σ FL , where the input set includes multiple inputs, each of which represents the expected computational behavior of the federated learning algorithm, which can be formally expressed as {input identifier ε, input data object [obj0, obj1, …], output data object [obj0, obj1, …]}; the transmission behavior is summarized as the state set of a finite automaton, denoted by S FL , where the state set includes multiple states, each of which represents the expected transmission behavior of the federated learning algorithm, which can be formally expressed as {state identifier s, data object obj, transmission direction direct}. The initial state of the finite automaton (denoted as s0) is the starting state of the federated learning algorithm training task, indicating that it is waiting for the participant node to load its own feature data; the terminal state (denoted as Z FL ) indicates the training task end status or unexpected termination status, etc.

[0108] After defining the finite automaton associated with the federated learning algorithm, the participant nodes can collect the operation logs and communication traffic during the training process of the federated learning algorithm and parse the collected operation logs and communication traffic to obtain the actual behavior during the algorithm training process. The operation logs can reflect the actual computing behavior, and the communication traffic can reflect the actual transmission behavior. By detecting the consistency between the actual computing behavior and the expected computing behavior, and the consistency between the actual transmission behavior and the expected transmission behavior, it is possible to monitor whether there are security risks in the implementation method, communication framework, and platform engineering of the federated learning system, so as to timely monitor the risks, terminate data transmission in time, and output security warnings to ensure the security of the federated learning business.

[0109] See also Figure 1 As shown, the embodiment of the present application provides a method for monitoring data security transmission of federated learning, and the specific process of the method is as follows:

[0110] Step 100: Collect the operation logs and communication traffic during the training process of the federated learning algorithm.

[0111] In the present application, when executing step 100, the operation log and communication flow in the training process of the federated learning algorithm are collected through relevant data collection methods. Specifically, each time an operation log / communication flow is collected, the method in step 110 is adopted to parse and obtain the behavior data corresponding to the operation log / communication flow, such as the first data representing the calculation behavior in the subsequent algorithm training process, and the second data representing the transmission behavior in the algorithm training process.

[0112] Step 110: parse the operation log to obtain first data representing the computing behavior during the algorithm training process, and parse the communication traffic to obtain second data representing the transmission behavior during the algorithm training process.

[0113] In some embodiments of the present application, when the parsing operation log in step 110 is executed to obtain the first data representing the computing behavior during the algorithm training process, refer to Figure 2 As shown, the corresponding functions can be realized by executing the following steps:

[0114] Step 200: parse the operation log to obtain keywords that represent actual computing behavior.

[0115] In some embodiments of the present application, the operation log reflects the actual computing behavior, and the operation log contains keywords of the computing behavior. Therefore, when executing step 200, the operation log is parsed to parse out the keywords representing the actual computing behavior.

[0116] Step 210: Based on the keyword and the relationship between each input and the keyword, determine the input corresponding to the keyword, wherein each input is an input in an input set associated with a finite automaton, including an input data object and an output data object.

[0117] In some embodiments of the present application, each input of the finite automaton represents an expected computing behavior, and the actual computing behavior reflected by the running log can be obtained from the running log. Then, when executing step 210, the input related to the running log can be obtained based on the keyword and the relationship between each input and the keyword. In this way, the actual computing behavior represented by the running log is corresponded to the input of the finite automaton based on the keywords in the running log. Based on the connection between the two, the monitoring of the actual computing behavior is realized with the help of the pattern recognition function of the finite automaton.

[0118] Step 220: Based on the operation log, count the sample quantity and feature dimension of the output data object included in the input to obtain the second actual data feature of the output data object included in the input.

[0119] In the present application, when executing step 220, the data features of the output data object included in the input can be obtained by counting the number of samples and the feature dimension. For the convenience of distinction, the data features here are recorded as the second actual data features. In actual operation, the intermediate parameters calculated in the federated learning algorithm, such as features, are mostly represented by vectors / tensors, and the feature dimension here represents the dimension of the vector / tensor.

[0120] Step 230: The completion time of the calculation behavior in the operation log, the output data object included in the input, and the second actual data feature are determined as the first data.

[0121] In some embodiments of the present application, after executing steps 200 to 220, the operation log, the output data object included in the input, and the second actual data feature can be used to represent the actual computing behavior reflected by the operation log, that is, execute step 230 to obtain the first data corresponding to the operation log.

[0122] Optionally, in some embodiments of the present application, the first data can be formally expressed as (completion time time, calculation behavior ε, output result object obj, sample number n, feature dimension d).

[0123] In some embodiments of the present application, when parsing the communication traffic in step 110 to obtain the second data representing the transmission behavior during the algorithm training process, refer to Figure 3 As shown, the corresponding functions can be realized by executing the following steps:

[0124] Step 300: parse the communication traffic, and identify the actual data object and the actual transmission direction from the parsed data.

[0125] In some embodiments of the present application, the communication traffic reflects the actual transmission behavior. Therefore, when executing step 300, the communication traffic is parsed and the data object is identified on the parsed data, so that the actual data object transmitted by the communication traffic can be obtained, as well as the actual transmission direction of the actual data object, such as outward transmission, or internal transmission and traffic flow between internal models.

[0126] Step 310: Based on the communication traffic, count the sample quantity and feature dimension of the actual data object to obtain the first actual data feature of the actual data object.

[0127] In some embodiments of the present application, after executing step 300 to identify the actual data object, based on the communication traffic, the data features of the actual data object can be obtained by counting the number of samples and the feature dimension. For ease of distinction, the data features here are recorded as the first actual data features.

[0128] Step 320: Determine the transmission time, actual data object and actual transmission direction of the communication traffic, as well as the first actual data feature, as the second data.

[0129] In some embodiments of the present application, after executing steps 300 to 310, the transmission time, actual data objects, actual transmission objects and first actual data characteristics of the communication traffic can be used to represent the actual transmission behavior reflected by the communication traffic, that is, execute step 320 to obtain the second data corresponding to the communication traffic.

[0130] Optionally, in some embodiments of the present application, the second data can be formally expressed as (transmission time time, transmission data object obj, transmission direction (host, in), number of samples n, feature dimension d).

[0131] In a specific implementation, after obtaining the aforementioned first data, the first data is stored in array P in chronological order. Correspondingly, after obtaining the aforementioned second data, the second data is stored in array Q in chronological order, so that the finite automaton can verify the consistency of the first data and the second data in sequence based on time.

[0132] Step 120: Based on the first data and the second data, using a finite automaton, verify the consistency between the actual behavior during the training process and the expected behavior defined by the algorithm, wherein the input of the finite automaton is used to characterize the expected computational behavior of the algorithm, and the state is used to characterize the expected transmission behavior of the algorithm.

[0133] In some embodiments of the present application, when executing step 120, refer to Figure 4 As shown, the consistency between the actual behavior represented by each piece of data and the expected behavior defined by the algorithm can be verified by executing the following steps:

[0134] Step 1201: After using a finite automaton to determine that the actual computing behavior represented by the first data is consistent with the expected computing behavior, the current state of the finite automaton is determined based on a state transition table, and the expected state is transferred to after reading the input corresponding to the actual computing behavior.

[0135] In some embodiments of the present application, the first data also includes an associated input identifier. Therefore, before executing step 1201, refer to Figure 5 As shown, first determine whether the actual computing behavior represented by the first data is consistent with the expected computing behavior by the following method:

[0136] Step 500: Obtain the verification rule corresponding to the input identifier from the verification rule set determined according to the algorithm definition of the algorithm.

[0137] In some embodiments of the present application, the verification rule set includes at least one verification rule, each verification rule is constructed according to the algorithm definition of the algorithm, and in implementation, based on the third actual data features of the input data object, the verification rules for attributes such as the feature quantity and feature dimension of the current object to be verified are updated.

[0138] Optionally, each verification rule is associated with a calculation behavior, and the calculation behavior can be represented by its associated input identifier. Then, when executing step 500, the corresponding verification rule can be obtained based on the input identifier.

[0139] Step 510: Determine a second expected data feature of the output data object based on the verification rule and the third actual data feature of the input data object.

[0140] In some embodiments of the present application, when executing step 510, based on the third actual data feature of the input data object and the verification rule obtained in step 500, the expected data feature of the output data object is determined, and for ease of distinction, it is recorded here as the second expected data feature.

[0141] Step 520: Match the second expected data feature with the second actual data feature.

[0142] In a specific implementation, if the data features are reflected in the form of sample quantity and feature dimension, then when executing step 520, the sample quantity in the second expected data feature can be compared with the sample quantity in the second actual data feature, and the feature dimension in the second expected data feature can be compared with the feature dimension in the second actual data feature. If both are consistent, that is, they match, then step 530 is executed; if at least one of the two is inconsistent: both are inconsistent, or any one is inconsistent, that is, they do not match, then step 540 is executed.

[0143] Step 530: If there is a match, determining that the actual computing behavior represented by the first data is consistent with the expected computing behavior.

[0144] Step 540: If there is no match, determining that the actual computing behavior represented by the first data is inconsistent with the expected computing behavior.

[0145] In this way, by executing steps 500 to 550, it is possible to determine whether the actual computing behavior represented by the first data is consistent with the expected computing behavior, and when it is determined to be consistent, step 1201 is executed.

[0146] In some embodiments of the present application, when executing step 1201, refer to Figure 6 As shown, the specific steps are but not limited to the following:

[0147] Step 600: query the current state of the finite automaton from the state transition set, and the state to which it is transferred after reading the input corresponding to the actual computational behavior;

[0148] Step 610: Determine the state queried from the state transfer set, and determine the queried state as the expected state.

[0149] In the embodiment of the present application, if it is determined that a state is queried from the state transfer set, it means that the finite automaton accepts the input, then the queried state is the expected state, and the current state of the finite automaton is updated with the expected state.

[0150] In some other embodiments, if a state is found from the state transition table, and the found state indicates the end of training, that is, the aforementioned Z FL , it is confirmed that it has passed the verification.

[0151] In some further embodiments, if no state is found from the state transition table, it means that the finite automaton does not accept the input, and it is determined that the verification fails, and step 130 is executed.

[0152] Step 1202: If the expected state representation continues to be trained, based on the expected data objects and expected transmission directions associated with the expected state, as well as the actual data objects and actual transmission directions, the consistency of the actual transmission behavior during the training process with the expected transmission behavior defined by the algorithm is verified.

[0153] In some embodiments of the present application, when executing step 1202, if the expected state representation continues to be trained, the expected data object associated with the expected state is compared with the actual data object, and the expected transmission direction is compared with the actual transmission direction to verify the consistency between the actual transmission behavior during the training process and the expected transmission behavior defined by the algorithm.

[0154] In some embodiments of the present application, if both are consistent, it is determined that the actual transmission behavior during the training process is consistent with the expected transmission behavior defined by the algorithm, that is, it is determined that the verification is passed, and it is further determined whether the expected transmission behavior is outward transmission, and when it is determined to be outward transmission, the subsequent step 1203 is executed.

[0155] In other embodiments, if at least one of the two is inconsistent, that is, both are inconsistent, or any one is inconsistent, then it is determined that the actual transmission behavior during the training process is inconsistent with the expected transmission behavior defined by the algorithm. At this time, the expected state representation continues to be trained, and it is determined that the actual transmission behavior of the algorithm is inconsistent with the expected transmission behavior, then it is determined that it has not passed the verification, and the subsequent step 130 is executed.

[0156] Step 1203: If it is determined that the verification has passed and the expected transmission direction is outward transmission, based on the first actual data feature of the actual data object and the first expected data feature of the expected data object, detect whether the actual data object is consistent with the expected data object.

[0157] In some embodiments of the present application, if step 1202 is executed, it is determined that the verification has passed, that is, the actual transmission behavior during the training process is consistent with the expected transmission behavior defined by the algorithm, and it is further determined whether the expected transmission direction is outward transmission. If so, step 1203 is executed. If not, the next first data is verified.

[0158] In the present application, in order to ensure the security of data transmitted outward, step 1203 is executed to check the content of the data transmitted outward. Specifically, when executing step 1203, based on the first actual data feature of the actual data object and the first expected data feature of the expected data object, it is detected whether the actual data object is consistent with the expected data object. If they are consistent, step 1204 is executed; if they are inconsistent, step 1205 is executed.

[0159] Step 1204: When consistency is determined, determine that verification has passed.

[0160] Step 1205: When it is determined that there is inconsistency, it is determined that the verification has not passed.

[0161] In the present application, after executing step 1205 and determining that the verification has not passed, step 130 is executed to terminate the data transmission and output a security warning to avoid data leakage.

[0162] Step 130: If it is determined that the verification fails, the data transmission is terminated and a security warning is output.

[0163] In this way, through the data security transmission monitoring method of federated learning in this application, a finite automaton for the federated learning algorithm can be constructed, and the computing behavior and transmission behavior can be regarded as the input and state in the finite automaton respectively. Through a single sequence recognition, the joint verification of the algorithm process and data transmission can be realized; at the same time, the algorithm behavior sequence detection and data transmission content verification are combined, relying on the specification capability of the finite automaton to detect whether the occurrence sequence between behaviors is abnormal, and the verification of the transmission content is completed with the help of the defined external transmission data object verification rules, thereby ensuring the data security of the federated learning business.

[0164] The method of the present application is described in detail using a specific embodiment below. It should be noted that the following is only an example, and the method is not limited to the federated learning business scenarios defined by the algorithm of the federated learning algorithm, but can also be applied to the training process monitoring of other algorithms with the same or similar models as the federated learning algorithm.

[0165] Example: Vertical federated linear regression algorithm based on a coordinator.

[0166] Vertical federated linear regression is to aggregate different feature data of different parties for common samples among multiple participant nodes and jointly train a linear model. There are three types of participant nodes participating in the training of the federated learning algorithm, namely, the task initiator guest, the data provider host and the coordinator arbiter, such as Figure 7 As shown. The task initiator has some characteristics X g And task tag information Y g , the data provider only provides feature X h The coordinator does not contain any sample data and is only responsible for creating keys and encrypting and decrypting intermediate data. The implementation logic of the entire vertical federated linear regression algorithm is as follows: Figure 8 shown.

[0167] In the embodiment of the present application, the participant node determines the state transition function (table) of the corresponding finite automaton (denoted as f FL ), that is, the next data transmission behavior is obtained according to the previous data transmission behavior and the current calculation behavior.

[0168] In this application, the expected transmission behavior defined by the algorithm corresponds to the state s i , including the expected data object and the expected transmission direction; correspondingly, the expected computational behavior defined by the algorithm corresponds to ε j , including the expected calculation name (input identifier), input data object and output data object, where i and j are serial numbers respectively.

[0169] Before actually training the algorithm, determine the important intermediate data objects in the calculation process of the federated learning algorithm and the verification rules for externally transmitted data based on the algorithm definition.

[0170] Specifically, according to the algorithm definition, the important intermediate data objects are determined, and the determined important intermediate data objects are recorded in the dictionary D FL , each element in the dictionary can be formally represented as {object name obj: [sample number n, feature dimension d]}, where the sample number and feature dimension of each object will be updated according to the actual detected data object information.

[0171] T FLUsed to record the verification rules of the output data object of the calculation behavior, where the key name is the input identifier ε, and the corresponding value element is formally expressed as [output data object obj, verification rule rule]. When defining the verification rules, the verification rules for the data features (or attributes) of obj are generated according to the properties of the calculated input data object and the content of the calculation behavior. In some embodiments of the present application, the verification rules mainly focus on attributes such as the number of samples and feature dimensions, and compare the actual data object transmitted with the input data object in its calculation process. For example, in the longitudinal linear model, the number of samples of the training gradient should be consistent with the number of samples of the training features, and the feature dimension of the training gradient should be consistent with the weight dimension.

[0172] The following describes in detail the implementation process of data security transmission monitoring for guest federated learning services, such as Fig. 9 As shown, any terminal on the guest side of the task initiator executes the aforementioned method to monitor in real time the operating status of the host running the federated learning service on the guest side of the task initiator. Similar implementation methods can be adopted for other participant nodes performing the federated learning service, which will not be repeated here.

[0173] First, generate the finite automaton structure to which the participant node (such as the aforementioned task initiator guest) belongs.

[0174] According to the algorithm definition of the vertical federated learning algorithm, analyze and determine the important intermediate data objects involved in the algorithm processing process, including but not limited to: model parameters w g , sample features x g , sample label y g , the guest encrypts the forward value [[forward g ]], the host encrypts the forward value [[forward h ]], encryption bias [[ρ i ]], Encrypted Gradient Parameter update value Δw g .

[0175] According to the algorithm definition of the federated learning algorithm, based on the aforementioned important intermediate data objects, the following is generated: Fig.10 The state transition diagram structure is determined, and the internal element content of the finite automaton on the guest side of the task initiator is determined, as shown in Tables 1 to 3 below:

[0176] Table 1 State set S FL surface

[0177]

[0178] Table 2 Input set Σ FL surface

[0179]

[0180]

[0181] Table 3 State transition table f FL At a Glance

[0182] <![CDATA[f FL ]]> <![CDATA[ε0]]> <![CDATA[ε1]]> <![CDATA[ε2]]> <![CDATA[ε3]]> <![CDATA[ε4]]> <![CDATA[ε5]]> <![CDATA[ε6]]> <![CDATA[s0]]> <![CDATA[s1]]> <![CDATA[s1]]> <![CDATA[s2]]> <![CDATA[s2]]> <![CDATA[s3]]> <![CDATA[s3]]> <![CDATA[s4]]> <![CDATA[s4]]> <![CDATA[s5]]> <![CDATA[s5]]> <![CDATA[Z FL ]]> <![CDATA[s2]]> <![CDATA[Z FL ]]>

[0183] In the above table, s0 is the initial state; Z FL The status is terminated.

[0184] Then, determine the dictionary D FL The important intermediate data objects in FL All data objects involved in the calculation and transmission are stored in D, which is used to infer the expected data object information in the transmission state. FL The expected data objects (i.e., model parameters w g , sample features x g , sample label y g , the guest encrypts the forward value [[forward g ]], the host encrypts the forward value [[forward h ]], encryption bias [[ρ i ]], Encrypted Gradient Parameter update value Δw g ).

[0185] In the specific implementation, the sample quantity, feature dimension, data type and other information of the above data object are updated according to the dynamic information actually collected (such as operation log). It should be noted that, usually according to the algorithm definition, it can be obtained that there is an expected data object here, but its specific data features are strongly related to the features of the original data used in the actual training process. Therefore, when actually testing, the above dictionary D needs to be updated according to the specific features of the actually collected data. FL The data characteristics of the data objects in the data object are visualized.

[0186] Further, determine the dictionary T FL The rules for verifying data objects transmitted externally are as follows:

[0187] Table 4 Verification rules for outbound data transmission

[0188]

[0189]

[0190] After determining the above basic information, in the specific implementation, the operation logs and communication traffic during the algorithm training process are continuously collected. According to the operation logs and communication traffic, the actual operation behavior is analyzed, and the array P of the calculation behavior sequence and the array Q of the transmission behavior sequence are obtained and recorded.

[0191] Optionally, when parsing the run log, parse out keywords that characterize the actual computing behavior, and correspond the keywords to the inputs in the input set, and record the second actual feature data of the output data object (i.e., the calculated data object) at the same time, such as the second actual feature data including the number of samples and feature dimensions, etc., and record the actual computing behavior in an array P, where the elements in the array P can be expressed in the form of (completion time time, input identifier ε, output data object obj, number of samples n, feature dimension d).

[0192] Optionally, when parsing communication traffic, the time corresponding to the transmission content, the transmission direction, and the first actual data characteristics of the actual data object, such as the number of samples and the characteristic dimension, are recorded. The elements in the array Q can be expressed in the form of (transmission time time, actual data object obj, actual transmission direction (host, in), number of samples n, characteristic dimension d).

[0193] The contents of algorithm consistency verification are described in detail below.

[0194] According to the above method, in some embodiments of the present application, the contents of the collected arrays P and Q can be input into a finite automaton for verification at one time, see Fig.11 The specific steps include but are not limited to the following:

[0195] Step 1101: Take the first data (time p ,ε i ,obj p ,n p ,d p ).

[0196] Step 1102: According to the input identifier ε i , get the input identifier ε i The corresponding verification rule is denoted as T FL [ε i ][rule].

[0197] Step 1103: Based on the verification rule T FL [ε i ][rule] and the third actual data characteristic of the input data object included in the first data, determine the second expected data characteristic of the output data object included in the first data.

[0198] Step 1104: Match the second expected data feature with the second actual data feature of the output data object included in the first data.

[0199] In a specific implementation, based on the number of samples and feature dimensions in the second expected data feature, the output data object obj included in the first data is checked. p The second actual data feature, namely n p ,d p Whether it meets expectations, that is, whether the number of samples in the second expected data feature is the same as the output data object obj p n p Is consistent with the output data object obj? p D p If they are consistent, then execute step 1105 and record (obj p ,n p ,d p ) to dictionary D FL If they are inconsistent, that is, all are inconsistent, or any one is inconsistent, then execute step 1111: determine that the verification has not passed and exit the verification.

[0200] Step 1105: If they are consistent, determine the current state s of the finite automaton based on the state transition table. i Whether to accept input ε i If f FL (s i ,ε i )∈S FL , that is, the current state s of the finite automaton i Accept input ε i , then execute step 1106 and update the current state, i.e., f FL (s i ,ε i )=s i+1 ,like Then execute step 1111: determine that the verification has not passed and exit the verification.

[0201] Step 1106: Determine whether s i+1 =Z FL ; If so, that is, the termination state is reached, then execute step 1110: determine whether the verification has passed; if not, execute step 1107.

[0202] Step 1107: Get the first second data (time q ,obj q ,direct q ,n q ,d q ), compare s i+1Expected data objects in s i+1 .obj and the expected transfer direction i+1 .direct, with the second data including the actual data object obj q and the actual transmission direction direct q , to verify the consistency of the two.

[0203] Step 1108: If s i+1 .obj=obj q and i+1 .direct=direct q , then determine the expected transmission direction s i+ 1. Is direct transmission outward? If so, execute step 1109. If not, s i+1 .obj≠obj q and / or i+1 .direct≠direct q , then execute step 1101.

[0204] Among them, in determining s i+1 .obj=obj q and i+1 .direct=direct q When the two are confirmed to be consistent, they pass the verification.

[0205] Step 1109: If s i+1 .direct is for outward transmission, then the actual data object obj is verified q Whether with D FL Are the data features in [obj] consistent? If not, execute step 1111: determine that the verification has not passed. If consistent, execute step 1110: determine that the verification has passed, and return to execute step 1101.

[0206] In the embodiment of the present application, when verifying the computing behavior, it is determined whether the data object is legal. If it is legal, the data features of the data object are recorded in D FL Then, it is determined whether the corresponding input is accepted by the finite automaton; then, it is detected whether the transmission state direction is consistent. If it is consistent, it is determined that the data characteristics (or attribute information) of the actual data object sent are consistent with D FL Whether the data characteristics of the data objects in the D are consistent. Here, because the calculation behavior must occur before the transmission behavior, the data transmitted by the transmission behavior is mostly determined by the calculation behavior. Therefore, D FL The attribute information of the data object currently being sent must be stored in D. Therefore, when executing step 1109, the data characteristics (or attribute information) of the actual data object being sent are directly determined to be different from those of D. FLIt only needs to check whether the data characteristics of the data objects in the data are consistent.

[0207] Still taking the data features including the number of samples and the feature dimension as an example, then, when executing step 1109, comparing the actual data object obj q The sample size and D FL Whether the number of samples in [obj] is consistent, and compared with the actual data object obj q The characteristic dimension of D FL Whether the feature dimensions in [obj] are consistent to realize the actual data object obj q Verification of consistency with expected data objects.

[0208] In some embodiments, after it is determined that the verification has not passed, the data transmission is terminated and a security warning is output to ensure data security during the algorithm training process.

[0209] Based on the same inventive concept, see Fig.12 As shown, in an embodiment of the present application, a data security transmission monitoring device for federated learning is provided, comprising:

[0210] The collection module 1210 is used to collect the operation log and communication traffic during the training process of the federated learning algorithm;

[0211] A data analysis module 1220 is used to parse the operation log to obtain first data representing the computing behavior during the algorithm training process, and to parse the communication traffic to obtain second data representing the transmission behavior during the algorithm training process;

[0212] A verification module 1230, configured to verify the consistency of the actual behavior during the training process with the expected behavior defined by the algorithm using a finite automaton based on the first data and the second data, wherein the input of the finite automaton is used to characterize the expected computational behavior of the algorithm, and the state is used to characterize the expected transmission behavior of the algorithm;

[0213] The processing module 1240 is used to terminate the data transmission and output a security warning if it is determined that the verification fails.

[0214] In some possible implementations, the second data includes an actual data object and an actual transmission direction, and the verification module 1230 is specifically configured to:

[0215] After determining, using the finite automaton, that the actual computing behavior represented by the first data is consistent with the expected computing behavior, determining, based on a state transition table, the current state of the finite automaton and the expected state to which it is transferred after reading the input corresponding to the actual computing behavior;

[0216] If the expected state representation continues to be trained, then based on the expected transmission direction of the expected data object associated with the expected state, and the actual data object and the actual transmission direction, the consistency of the actual transmission behavior during the training process with the expected transmission behavior defined by the algorithm is verified;

[0217] If it is determined that the verification is passed and the expected transmission direction is outward transmission, based on the first actual data feature of the actual data object and the first expected data feature of the expected data object, detecting whether the actual data object is consistent with the expected data object;

[0218] When the two parties are determined to be consistent, the verification is determined to have been passed;

[0219] When an inconsistency is determined, it is determined that the verification has failed.

[0220] In some possible implementations, the first data includes an associated input identifier, an input data object, and an output data object, and a second actual data feature of the output data object;

[0221] The verification module 1230 is specifically used to determine whether the actual computing behavior represented by the first data is consistent with the expected computing behavior in the following manner:

[0222] Obtaining a verification rule corresponding to the input identifier from a verification rule set determined according to an algorithm definition of the algorithm;

[0223] determining a second expected data characteristic of the output data object based on the verification rule and a third actual data characteristic of the input data object;

[0224] matching the second expected data feature with the second actual data feature;

[0225] If they match, determining that the actual computing behavior represented by the first data is consistent with the expected computing behavior;

[0226] If they do not match, it is determined that the actual computing behavior represented by the first data is inconsistent with the expected computing behavior.

[0227] In some possible implementations, the verification module 1230 is specifically used to:

[0228] querying the current state of the finite automaton from the state transition set, and the state to which it is transferred after reading the input corresponding to the actual computing behavior;

[0229] Determine that a state is queried from the state transfer set, and determine the queried state as the expected state.

[0230] In some possible implementations, the verification module 1230 is further configured to:

[0231] If the state is found from the state transition table, and the found state indicates that the training is finished, it is determined that the verification is passed;

[0232] If no status is found from the status transfer table, it is determined that the verification has not been passed.

[0233] If the expected state representation continues to be trained, and it is determined that the actual transmission behavior is inconsistent with the expected transmission behavior, it is determined that the verification has not passed.

[0234] In some possible implementations, the data analysis module 1220 is specifically used to:

[0235] Parsing keywords representing actual computing behaviors from the operation log;

[0236] Based on the keyword and the relationship between each input and the keyword, determine the input corresponding to the keyword, wherein each input is an input in an input set associated with the finite automaton, including an input data object and an output data object;

[0237] Based on the operation log, counting the sample quantity and feature dimension of the output data object included in the input to obtain a second actual data feature of the output data object included in the input;

[0238] The completion time of the calculation behavior in the operation log, the output data object included in the input, and the second actual data feature are determined as the first data.

[0239] In some possible implementations, the data analysis module 1220 is specifically used to:

[0240] Parsing the communication traffic, and identifying the actual data object and the actual transmission direction from the parsed data;

[0241] Based on the communication traffic, counting the number of samples and the feature dimension of the actual data object to obtain a first actual data feature of the actual data object;

[0242] The transmission time of the communication traffic, the actual data object and the actual transmission direction, and the first actual data feature are determined as the second data.

[0243] See also Fig.13 As shown, an electronic device is provided in an embodiment of the present application, which can implement the functions of the aforementioned federated learning data security transmission monitoring method, referring to Fig.13 , the electronic device comprises:

[0244] At least one processor 131, and a memory 132 connected to the at least one processor 131. The specific connection medium between the processor 131 and the memory 132 is not limited in the embodiment of the present application. Fig.13 In the example, the processor 131 and the memory 132 are connected via the bus 130. The bus 130 is Fig.13 The connections between other components are shown in bold lines, and are not intended to be limiting. The bus 130 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Fig.13 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 131 can also be called a controller, and there is no limitation on the name.

[0245] In the embodiment of the present application, the memory 132 stores instructions that can be executed by at least one processor 131. The at least one processor 131 can execute the data security transmission monitoring method of federated learning discussed above by executing the instructions stored in the memory 132. The processor 131 can implement the function of the access node selection device.

[0246] In one possible design, the processor 131 may include one or more processing units, and the processor 131 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 131. In some embodiments, the processor 131 and the memory 132 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.

[0247] The processor 131 can be a general-purpose processor, for example, a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the data security transmission monitoring method of the federated learning disclosed in the embodiments of the present application can be directly embodied as a hardware processor execution, or a combination of hardware and software modules in the processor.

[0248] The memory 132 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 132 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 132 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 132 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0249] By designing and programming the processor 131, the code corresponding to the method described in the above embodiment can be fixed into the chip, so that the chip can execute the steps of the method of the above embodiment when running. How to design and program the processor 131 is a technology well known to those skilled in the art and will not be described here.

[0250] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium. When instructions in the storage medium are executed by a processor, the processor is enabled to execute any one of the methods in the above embodiments.

[0251] In some possible implementations, various aspects of the data security transmission monitoring method for federated learning provided in the present application can also be implemented in the form of a program product, which includes a program code. When the program product is run on a device, the program code is used to enable the device to execute the steps of the method described above in this specification according to various exemplary embodiments of the present application.

[0252] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0253] The present application is described with reference to the flowchart and / or block diagram of the method, device (system), and computer program product according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the process and / or box in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.

[0254] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0255] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0256] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for monitoring data security transmission in federated learning, characterized in that: include: Collect operation logs and communication traffic during the training process of federated learning algorithms; Parsing the operation log to obtain first data representing the computing behavior during the algorithm training process, and parsing the communication traffic to obtain second data representing the transmission behavior during the algorithm training process; Based on the first data and the second data, using a finite automaton, verifying the consistency between the actual behavior in the training process and the expected behavior defined by the algorithm, wherein the input of the finite automaton is used to characterize the expected computational behavior of the algorithm, and the state is used to characterize the expected transmission behavior of the algorithm; If it is determined that the verification fails, data transmission is terminated and a security warning is output.

2. The method according to claim 1, characterized in that The second data includes an actual data object and an actual transmission direction, and the verification of the consistency between the actual behavior in the training process and the expected behavior defined by the algorithm using a finite automaton based on the first data and the second data includes: After determining, using the finite automaton, that the actual computing behavior represented by the first data is consistent with the expected computing behavior, determining, based on a state transition table, the current state of the finite automaton and the expected state to which it is transferred after reading the input corresponding to the actual computing behavior; If the expected state representation continues to be trained, then based on the expected transmission direction of the expected data object associated with the expected state, and the actual data object and the actual transmission direction, the consistency of the actual transmission behavior during the training process with the expected transmission behavior defined by the algorithm is verified; If it is determined that the verification is passed and the expected transmission direction is outward transmission, based on the first actual data feature of the actual data object and the first expected data feature of the expected data object, detecting whether the actual data object is consistent with the expected data object; When the consistency is confirmed, it is determined that the verification has been passed; When an inconsistency is determined, it is determined that the verification has failed.

3. The method according to claim 2, characterized in that The first data includes an associated input identifier, an input data object and an output data object, and a second actual data characteristic of the output data object; Determine whether the actual computing behavior represented by the first data is consistent with the expected computing behavior by: Obtaining a verification rule corresponding to the input identifier from a verification rule set determined according to an algorithm definition of the algorithm; determining a second expected data characteristic of the output data object based on the verification rule and a third actual data characteristic of the input data object; matching the second expected data feature with the second actual data feature; If they match, determining that the actual computing behavior represented by the first data is consistent with the expected computing behavior; If they do not match, it is determined that the actual computing behavior represented by the first data is inconsistent with the expected computing behavior.

4. The method according to claim 2, characterized in that The determining of the current state of the finite automaton based on the state transition table and the expected state to be transferred to after reading the input corresponding to the actual computing behavior includes: querying the current state of the finite automaton from the state transition set, and the state to which it is transferred after reading the input corresponding to the actual computing behavior; Determine that a state is queried from the state transfer set, and determine the queried state as the expected state.

5. The method according to claim 2, characterized in that The method further comprises: If the state is found from the state transition table, and the found state indicates that the training is finished, it is determined that the verification is passed; If no status is found in the status transfer table, it is determined that the verification has not been passed; If the expected state representation continues to be trained, and it is determined that the actual transmission behavior is inconsistent with the expected transmission behavior, it is determined that the verification has not passed.

6. The method according to any one of claims 1 to 5, characterized in that: The parsing of the operation log to obtain first data representing the computing behavior during the algorithm training process includes: Parsing keywords representing actual computing behaviors from the operation log; Based on the keyword and the relationship between each input and the keyword, determine the input corresponding to the keyword, wherein each input is an input in an input set associated with the finite automaton, including an input data object and an output data object; Based on the operation log, counting the sample quantity and feature dimension of the output data object included in the input to obtain a second actual data feature of the output data object included in the input; The completion time of the calculation behavior in the operation log, the output data object included in the input, and the second actual data feature are determined as the first data.

7. The method according to any one of claims 1 to 5, characterized in that: The parsing of the communication traffic to obtain second data characterizing the transmission behavior during the algorithm training process includes: Parsing the communication traffic, and identifying the actual data object and the actual transmission direction from the parsed data; Based on the communication traffic, counting the number of samples and the feature dimension of the actual data object to obtain a first actual data feature of the actual data object; The transmission time of the communication traffic, the actual data object and the actual transmission direction, and the first actual data feature are determined as the second data.

8. A data security transmission monitoring device for federated learning, characterized in that: include: The collection module is used to collect the operation logs and communication traffic during the training process of the federated learning algorithm; A data analysis module, configured to parse the operation log to obtain first data representing the computing behavior during the algorithm training process, and to parse the communication traffic to obtain second data representing the transmission behavior during the algorithm training process; a verification module, configured to verify the consistency of the actual behavior in the training process with the expected behavior defined by the algorithm using a finite automaton based on the first data and the second data, wherein the input of the finite automaton is used to characterize the expected computational behavior of the algorithm, and the state is used to characterize the expected transmission behavior of the algorithm; The processing module is used to terminate data transmission and output a safety warning if it is determined that the verification has not been passed.

9. An electronic device, characterized in that: include: Memory, used to store computer programs or instructions; A processor is used to execute the computer program or instructions in the memory so that the method according to any one of claims 1 to 7 is performed.

10. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor, the processor is enabled to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Security auditing method, device and system for federal learning execution process

    CN113704768A

  • Multi-domain DDoS attack detection method and device based on trusted federated learning

    CN115102763A

  • Federal learning-based quality inspection method and system, readable medium and electronic equipment

    CN115438735A

  • Data security transmission monitoring system and method based on AI federated learning

    CN118094640A

  • Systems and methods for federated model validation and data verification

    US20230229786A1