Methods, devices, equipment and media for monitoring the secure transmission of data in federated learning

By collecting and analyzing the runtime logs and communication traffic of federated learning algorithms, and using finite automata to verify the consistency between actual and expected behaviors, the problem of the inability to effectively detect security risks in federated learning operations in existing technologies is solved, and dynamic real-time monitoring and early warning of data security are realized.

CN119363404BActive Publication Date: 2026-01-06CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies cannot effectively detect security risks in federated learning operations. Static detection relies on manual inspection, which requires high expertise and is time-consuming. Dynamic detection cannot determine the flow of encrypted data, making it difficult to identify data leakage risks.

Method used

By collecting runtime logs and communication traffic during the training process of federated learning algorithms, analyzing computation and transmission behaviors, and using finite automata to verify the consistency between actual behavior and algorithm definitions, data transmission can be stopped in a timely manner and security warnings can be output.

Benefits of technology

It enables dynamic, real-time monitoring of the operational status of federated learning services, ensuring data security and preventing data leaks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363404B_ABST
    Figure CN119363404B_ABST
Patent Text Reader

Abstract

This application relates to the field of data security technology, and in particular to a method, apparatus, device, and medium for monitoring data security transmission in federated learning. It addresses the problem of ineffective monitoring of security risks in federated learning operations in related technologies. The method involves: collecting runtime logs and communication traffic during the training process of a federated learning algorithm; parsing the runtime logs and communication traffic to obtain first data representing the computational behavior during algorithm training and second data representing the transmission behavior during algorithm training; and using a finite automaton to verify the consistency between the actual behavior during training and the expected behavior defined by the algorithm, wherein the input of the finite automaton represents the expected computational behavior of the algorithm, and the state represents the expected transmission behavior of the algorithm. This enables dynamic and real-time detection of whether the running state of the federated learning operation is consistent with the algorithm definition, thereby ensuring the security of the federated learning operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data security technology, and in particular to a method, apparatus, equipment and medium for monitoring the secure transmission of data in federated learning. Background Technology

[0002] Since its inception, federated learning has achieved rapid development due to its distributed structure and privacy-preserving advantages. Vertical federated learning systems are a distributed robot learning technology. Their core idea is that when multiple data sources participate in model training, there is no need for raw data transfer. Instead, participating nodes jointly train the model only by exchanging intermediate model parameters, thus ensuring data privacy and data sharing.

[0003] In practical applications, the operation of vertical federated learning relies on a federated learning platform. The data security of participant nodes is affected not only by the federated learning algorithm but also by factors such as algorithm implementation, communication framework, and platform engineering. If the federated learning platform harbors hidden security risks that go undetected, it will inevitably threaten the data security of the data source provider during federated learning operations. Related technologies primarily employ the following two methods to determine data leakage:

[0004] Method 1: Code Review. This method is a static check, mainly using manual inspection to verify whether the implementation of the federated learning algorithm is consistent with the algorithm definition; however, code review requires a high level of professional ability from the reviewers and requires a significant investment of time, making it difficult to apply to federated learning systems that integrate technologies such as machine learning, cryptography, and software engineering.

[0005] Method 2: Anomaly detection based on user entity behavior analysis. This method is a dynamic detection approach, using information such as user operation logs, data transmission logs, and network access logs to detect abnormal behavior. However, in federated learning systems, data flow is automatically controlled by the program; users are only responsible for creating model configuration information, and the data transmitted in between is mostly in encrypted form. Network traffic makes it difficult to directly determine data leakage. Therefore, Method 2 cannot effectively detect security risks in federated learning operations. Summary of the Invention

[0006] This application provides a data security transmission monitoring method, apparatus, device, and medium for federated learning, which dynamically and in real time detects whether the operation status of federated learning services is consistent with the algorithm definition, thereby ensuring the data security of federated learning services.

[0007] The specific technical solutions provided in this application are as follows:

[0008] In a first aspect, embodiments of this application provide a method for monitoring the secure transmission of data in federated learning, including:

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

[0010] The operation log is parsed to obtain first data characterizing the computational behavior during the algorithm training process, and the communication traffic is parsed to obtain second data characterizing the transmission behavior during the algorithm training process.

[0011] 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 computational behavior of the algorithm, and the state is used to characterize the expected transmission behavior of the algorithm.

[0012] If the verification fails, data transmission will be stopped and a security warning will be issued.

[0013] In some possible implementations, the second data includes the actual data object and the actual transmission direction. Then, the step of verifying the consistency between the actual behavior during training and the expected behavior defined by the algorithm, based on the first data and the second data and utilizing a finite automata, includes:

[0014] Using the finite automaton, after determining that the actual computational behavior represented by the first data is consistent with the expected computational behavior, the current state of the finite automaton is determined based on the state transition table, and the expected state is transitioned to after reading the input corresponding to the actual computational behavior.

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

[0016] If the verification is successful and the expected transmission direction is outward, then 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 determined whether the actual data object and the expected data object are consistent.

[0017] Once consistency is confirmed, the verification is deemed successful.

[0018] If an inconsistency is identified, the verification is deemed unsuccessful.

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

[0020] The following methods are used to determine whether the actual computational behavior of the first data representation is consistent with the expected computational behavior:

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

[0022] Based on the verification rules and the third actual data characteristics of the input data object, the second expected data characteristics of the output data object are determined;

[0023] Match the second expected data features with the second actual data features;

[0024] If a match is found, it is determined that the actual computational behavior represented by the first data is consistent with the expected computational behavior;

[0025] If there is a mismatch, it is determined that the actual computational behavior represented by the first data is inconsistent with the expected computational 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 which it transitions after reading the input corresponding to the actual computational action, includes:

[0027] From the state transition set, query the current state of the finite automaton, and the state to which it transitions after reading the input corresponding to the actual computational behavior;

[0028] Determine the state retrieved from the state transition set, and identify the retrieved state as the expected state.

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

[0030] If a state is found in the state transition table and the found state represents the end of training, then the verification is passed.

[0031] If no state is found in the state transition table, the verification is deemed unsuccessful.

[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, then the verification is deemed to have failed.

[0033] In some possible implementations, parsing the runtime logs to obtain first data characterizing the computational behavior during the algorithm training process includes:

[0034] Extract keywords representing actual computational behavior from the runtime logs;

[0035] Based on the keywords and the relationship between each input and the keywords, the inputs corresponding to the keywords are determined, wherein each input is an input in the input set associated with the finite automaton, including input data objects and output data objects;

[0036] Based on the operation log, the number of samples and feature dimensions of the output data objects included in the input are counted to obtain the second actual data features of the output data objects 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 of the communication traffic to obtain second data characterizing the transmission behavior during the algorithm training process includes:

[0039] The communication traffic is parsed, and the actual data objects and actual transmission directions are identified from the parsed data.

[0040] Based on the communication traffic, the number of samples and feature dimensions of the actual data object are counted to obtain the 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] Secondly, embodiments of this application provide a data security transmission monitoring device for federated learning, comprising:

[0043] The data acquisition module is used to collect runtime logs and communication traffic during the training process of the federated learning algorithm.

[0044] The data analysis module is used to parse the running logs to obtain first data characterizing the computational behavior during the algorithm training process, and to parse the communication traffic to obtain second data characterizing the transmission behavior during the algorithm training process.

[0045] The verification module is used to verify the consistency between the actual behavior during the training process and the expected behavior defined by the algorithm, based on the first data and the second data and using a finite automaton. 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 stop data transmission and output a security warning if the verification fails.

[0047] In some possible implementations, the second data includes the actual data object and the actual transmission direction, then the verification module is specifically used for:

[0048] Using the finite automaton, after determining that the actual computational behavior represented by the first data is consistent with the expected computational behavior, the current state of the finite automaton is determined based on the state transition table, and the expected state is transitioned to after reading the input corresponding to the actual computational behavior.

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

[0050] If the verification is successful and the expected transmission direction is outward, then 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 determined whether the actual data object and the expected data object are consistent.

[0051] Once consistency is confirmed, the verification is deemed successful.

[0052] If an inconsistency is identified, the verification is deemed unsuccessful.

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

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

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

[0056] Based on the verification rules and the third actual data characteristics of the input data object, the second expected data characteristics of the output data object are determined;

[0057] Match the second expected data features with the second actual data features;

[0058] If a match is found, it is determined that the actual computational behavior represented by the first data is consistent with the expected computational behavior;

[0059] If there is a mismatch, it is determined that the actual computational behavior represented by the first data is inconsistent with the expected computational behavior.

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

[0061] From the state transition set, query the current state of the finite automaton, and the state to which it transitions after reading the input corresponding to the actual computational behavior;

[0062] Determine the state retrieved from the state transition set, and identify the retrieved state as the expected state.

[0063] In some possible implementations, the verification module is also used for:

[0064] If a state is found in the state transition table and the found state represents the end of training, then the verification is passed.

[0065] If no state is found in the state transition table, the verification is deemed unsuccessful.

[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, then the verification is deemed to have failed.

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

[0068] Extract keywords representing actual computational behavior from the runtime logs;

[0069] Based on the keywords and the relationship between each input and the keywords, the inputs corresponding to the keywords are determined, wherein each input is an input in the input set associated with the finite automaton, including input data objects and output data objects;

[0070] Based on the operation log, the number of samples and feature dimensions of the output data objects included in the input are counted to obtain the second actual data features of the output data objects 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 for:

[0073] The communication traffic is parsed, and the actual data objects and actual transmission directions are identified from the parsed data.

[0074] Based on the communication traffic, the number of samples and feature dimensions of the actual data object are counted to obtain the 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] Thirdly, embodiments of this application provide an electronic device, including:

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

[0078] A processor for executing a computer program or instructions in the memory such that the method described in any of the first aspects above is performed.

[0079] Fourthly, embodiments of this application provide a computer-readable storage medium that, when instructions in the storage medium are executed by a processor, enables the processor to perform any of the methods described in the first aspect above.

[0080] Fifthly, embodiments of this application provide a computer program product, the computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform any of the methods described in the first aspect above.

[0081] In this embodiment, the running logs and communication traffic during the training process of the federated learning algorithm are collected; the running logs and communication traffic are parsed to obtain first data representing the computational behavior during the algorithm training process and second data representing the transmission behavior during the algorithm training process; then, based on the first and 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 represent the expected computational behavior of the algorithm, and the state is used to represent the expected transmission behavior of the algorithm; in this way, when it is determined that the verification fails, data transmission can be stopped 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. Attached Figure Description

[0082] Figure 1 This is a flowchart illustrating a data security transmission monitoring method for federated learning, as described in an embodiment of this application.

[0083] Figure 2 This is a flowchart illustrating a method for obtaining actual computational behavior in an embodiment of this application;

[0084] Figure 3 This is a flowchart illustrating a method for obtaining actual transmission behavior in an embodiment of this application;

[0085] Figure 4 This is a flowchart of a method for verifying the consistency between actual behavior and expected behavior in an embodiment of this application.

[0086] Figure 5 This is a flowchart illustrating the consistency verification between actual and expected computational behavior in an embodiment of this application.

[0087] Figure 6 This is a flowchart illustrating how a finite automaton is used to obtain a desired state in an embodiment of this application.

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

[0089] Figure 8 This is a schematic diagram illustrating the implementation logic of a vertical federated linear regression algorithm in an embodiment of this application.

[0090] Figure 9 This is a schematic diagram of a data security transmission monitoring scenario for federated learning on the task initiator side, as described in an embodiment of this application.

[0091] Figure 10 This is a schematic diagram of a state transition diagram in an embodiment of this application;

[0092] Figure 11 This is a flowchart illustrating the specific processing of a data security transmission monitoring method for federated learning in an embodiment of this application.

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

[0094] Figure 13 This is a schematic diagram of the physical architecture of an electronic device according to an embodiment of this application. Detailed Implementation

[0095] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0096] To help those skilled in the art better understand the technical solutions of this application, some terms used in the embodiments of this application are explained below.

[0097] (1) In the embodiments of this application, the term "and / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the related objects before and after are in an "or" relationship.

[0098] (2) In the embodiments of this application, the term "finite automata" is also known as a sequential machine, which is a conceptual model used to simulate the computation and acceptance of 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 a quintuple (S FL , Σ FL f FL s0, Z FL ) is defined, where Σ FL It is an input set, where each element is called an input, representing the input that the automatic mechanism can accept. FL It is a finite set of states, where each element is called a state; f FL It is a state transition function that describes the transition relationship between states. s0 is a unique initial state, s0∈S FL Z FL It is a termination state, representing the state in which the automaton stops accepting input.

[0100] (3) In the embodiments of this application, the full English name of the term "Vertical Federated Learning" is Vertical Federated Learning (VFL), which is a machine learning framework designed to solve the data silo problem while protecting data privacy and security. In Vertical Federated Learning, multiple participant nodes jointly train a machine learning model while retaining their own private data. The datasets of these participant nodes overlap in terms of user samples, but differ in terms of feature space, that is, they have different feature information about the same user.

[0101] (4) The terms “first,” “second,” “third,” etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in sequences other than those illustrated or described herein.

[0102] Common data leakage prevention methods in related technologies include static detection and dynamic detection. Static detection mainly refers to code review, which primarily uses manual checks to verify whether the implementation of the federated learning algorithm is consistent with the algorithm definition. However, code review requires a high level of expertise from the verifiers and demands a significant time investment, making it difficult to apply to federated learning systems that integrate machine learning, cryptography, and software engineering technologies. Dynamic detection is mostly based on user behavior analysis and is more often used for data leakage scenarios caused by user behavior. However, in federated learning systems, data flow is automatically controlled by the program, and users are only responsible for creating model configuration information. Furthermore, the data transmitted in between is mostly in encrypted form, making it difficult to directly determine data leakage from network traffic. Therefore, it cannot effectively detect security risks in federated learning operations.

[0103] In view of this, in order to address the problem that related technologies cannot effectively detect security risks in federated learning services, this application provides a data security transmission monitoring method for federated learning. This method involves collecting runtime logs and communication traffic during the training process of the federated learning algorithm; parsing the runtime logs and communication traffic to obtain first data representing the computational behavior during algorithm training and second data representing the transmission behavior during algorithm training; then, based on the first and second data, using a finite automaton, verifying the consistency between the actual behavior during training and the expected behavior defined by the algorithm, wherein the input of the finite automaton is used to represent the expected computational behavior of the algorithm, and the state is used to represent the expected transmission behavior of the algorithm; thus, when it is determined that the verification fails, data transmission can be stopped in a timely manner and a security warning can be output, achieving 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.

[0104] In this application, the above method can be applied to electronic devices, which can be any device located on the same network as the host running the federated learning service, such as smart terminals, smart mobile terminals, tablet computers, laptops, smart handheld devices, personal computers (PCs), computers, smart screens, personal digital assistants (PDAs), servers, etc.

[0105] The preferred embodiments of this application will be further described in detail below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only for illustration and explanation of this application and are not intended to limit this application. Furthermore, the embodiments of this application and the features in the embodiments can be combined with each other without conflict.

[0106] Federated learning algorithms typically have a fixed processing flow, while finite automata can be used for pattern recognition and sequence recognition. Therefore, in this application, computational behavior and transmission behavior are regarded as the input and state of a finite automaton, respectively. In this way, by using a finite automaton to perform a single sequence recognition, the algorithm flow and data transmission can be jointly verified. This allows for timely responses to be made when the actual behavior during the training process of the federated learning algorithm is inconsistent with the expected behavior defined by the algorithm, thus ensuring data security.

[0107] Specifically, the finite automata used in this application are defined as follows: In this application, the federated learning algorithm is decomposed according to computational behavior and transmission behavior, and the computational behavior is summarized into the input set of the finite automata, denoted as Σ. FL The input set includes multiple inputs, each representing the expected computational behavior of the federated learning algorithm, and can be formally represented as {input identifier ε, input data object [obj0,obj1,…], output data object [obj0,obj1,…]}; the transmission behavior is summarized into a set of states of a finite automaton, denoted as S. FL The state set includes multiple states, each representing the expected transmission behavior of the federated learning algorithm. It can be formally represented 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's training task, representing the waiting for participant nodes to load their own feature data; the final state (denoted as Z...)... FL This indicates the end of the training task or an unexpected termination status.

[0108] After defining the finite automata associated with the federated learning algorithm, participating nodes can collect runtime logs and communication traffic during the training process of the federated learning algorithm. By parsing the collected runtime logs and communication traffic, they can obtain the actual behavior during the algorithm training process. The runtime logs can reflect the actual computation behavior, and the communication traffic can reflect the actual transmission behavior. By detecting the consistency between the actual computation behavior and the expected computation behavior, as well as the consistency between the actual transmission behavior and the expected transmission behavior, the system can monitor whether there are security risks in the implementation method, communication framework, and platform engineering of the federated learning system. This allows for timely detection of risks, timely suspension of data transmission, and output of security warnings to ensure the security of federated learning operations.

[0109] See Figure 1 As shown in the figure, this application provides a method for monitoring the secure transmission of data in federated learning. The specific process of this method is as follows:

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

[0111] In this application, during step 100, runtime logs and communication traffic during the training process of the federated learning algorithm are collected using relevant data acquisition methods. Specifically, for each runtime log / communication traffic instance collected, the behavioral data corresponding to that runtime log / communication traffic is parsed using the method described in step 110, such as the first data representing the computational behavior during subsequent algorithm training and the second data representing the transmission behavior during algorithm training.

[0112] Step 110: Analyze the running log to obtain the first data representing the computational behavior during the algorithm training process, and analyze the communication traffic to obtain the second data representing the transmission behavior during the algorithm training process.

[0113] In some embodiments of this application, when parsing the runtime log in step 110 to obtain the first data representing the computational behavior during the training of the algorithm, see [reference]. Figure 2 As shown, the corresponding function can be achieved by performing the following steps:

[0114] Step 200: Parse the keywords that characterize the actual computation behavior from the runtime log.

[0115] In some embodiments of this application, the running log reflects the actual computation behavior and contains keywords of the computation behavior. Therefore, when executing step 200, the running log is parsed to extract the keywords that characterize the actual computation behavior.

[0116] Step 210: Based on the keywords and the relationship between each input and the keywords, determine the inputs corresponding to the keywords. Each input is an input in the input set associated with the finite automaton, including input data objects and output data objects.

[0117] In some embodiments of this application, each input of the finite automaton represents an expected computational behavior. The actual computational behavior reflected in the operation log can be obtained from the operation log. Then, when executing step 210, the input related to the operation log can be obtained based on the keyword and the relationship between each input and the keyword. In this way, according to the keyword in the operation log, the actual computational behavior represented by the operation log is mapped to the input of the finite automaton. Based on the relationship between the two, the function of pattern recognition by finite automaton is realized to monitor the actual computational behavior.

[0118] Step 220: Based on the running log, count the number of samples and feature dimensions of the output data objects included in the input to obtain the second actual data features of the output data objects included in the input.

[0119] In this application, during step 220, the data features of the output data objects included in the input can be obtained by statistically analyzing the number of samples and the feature dimensions. For ease of distinction, these data features are referred to as the second actual data features. In actual operation, the intermediate parameters calculated in the federated learning algorithm, such as features, are often represented by vectors / tensors. Here, the feature dimension represents the dimension of the vector / tensor.

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

[0121] In some embodiments of this application, after executing steps 200 to 220, the actual computational behavior reflected by the running log can be represented by the running log, the output data object included in the input, and the second actual data feature, i.e., executing step 230 to obtain the first data corresponding to the running log.

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

[0123] In some embodiments of this application, when performing step 110 to parse communication traffic and obtain second data representing the transmission behavior during the training of the algorithm, see [reference]. Figure 3 As shown, the corresponding function can be achieved by performing the following steps:

[0124] Step 300: Analyze the communication traffic and identify the actual data objects and actual transmission direction from the parsed data.

[0125] In some embodiments of this application, communication traffic reflects actual transmission behavior. Therefore, when performing step 300, by parsing the communication traffic and identifying the data object in the parsed data, the actual data object transmitted by the communication traffic and the actual transmission direction of the actual data object, such as outward transmission or internal transmission and traffic flow between internal models, can be obtained.

[0126] Step 310: Based on communication traffic, count the number of samples and feature dimensions of the actual data objects to obtain the first actual data features of the actual data objects.

[0127] In some embodiments of this application, after the actual data object is identified in step 300, the data characteristics of the actual data object can be obtained by statistically analyzing the number of samples and feature dimensions based on communication traffic. For ease of distinction, the data characteristics here are referred to as the first actual data characteristics.

[0128] Step 320: The transmission time, actual data object, and actual transmission direction of the communication traffic, as well as the first actual data characteristics, are determined as the second data.

[0129] In some embodiments of this application, after executing steps 300 to 310, the actual transmission behavior reflected by the communication traffic can be represented by the transmission time, actual data object, actual transmission object and first actual data feature of the communication traffic, that is, executing step 320 to obtain the second data corresponding to the communication traffic.

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

[0131] In specific implementation, after obtaining the aforementioned first data, the first data is stored in array P in chronological order. Similarly, after obtaining the aforementioned second data, the second data is stored in array Q in chronological order, so that the finite automaton can perform consistency verification on the first data and the second data in chronological order.

[0132] Step 120: Based on the first data and the second data, use a finite automaton to verify the consistency between the actual behavior during the training process and the expected behavior defined by the algorithm. 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 this application, when performing step 120, refer to... Figure 4 As shown, the consistency between the actual behavior represented by each data point and the expected behavior defined by the algorithm can be verified by performing the following steps:

[0134] Step 1201: Using a finite automaton, after determining that the actual computational behavior represented by the first data is consistent with the expected computational behavior, determine the current state of the finite automaton based on the state transition table, and then transition to the expected state after reading in the input corresponding to the actual computational behavior.

[0135] In some embodiments of this application, the first data also includes an associated input identifier. Therefore, before performing step 1201, refer to... Figure 5 As shown, the actual computational behavior of the first data representation is first determined to be consistent with the expected computational behavior in the following way:

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

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

[0138] Optionally, each verification rule is associated with a computational behavior, which 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: Based on the verification rules and the third actual data characteristics of the input data object, determine the second expected data characteristics of the output data object.

[0140] In some embodiments of this application, when performing step 510, the expected data features of the output data object are determined based on the third actual data features of the input data object and the verification rules obtained in step 500. For ease of distinction, these are referred to here as the second expected data features.

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

[0142] In specific implementation, if the sample size and feature dimensions are used to reflect the data characteristics, then when executing step 520, the sample size in the second expected data characteristics can be compared with the sample size in the second actual data characteristics, and the feature dimensions in the second expected data characteristics can be compared with the feature dimensions in the second actual data characteristics. If both are consistent, i.e. they match, then step 530 is executed; if at least one of them is inconsistent, i.e. both are inconsistent, or any one is inconsistent, i.e. they do not match, then step 540 is executed.

[0143] Step 530: If a match is found, then it is determined that the actual computational behavior of the first data representation is consistent with the expected computational behavior.

[0144] Step 540: If there is no match, it is determined that the actual computational behavior of the first data representation is inconsistent with the expected computational behavior.

[0145] Thus, by executing steps 500 to 550, it can be determined whether the actual computational behavior of the first data representation is consistent with the expected computational behavior, and if it is determined to be consistent, step 1201 is executed.

[0146] In some embodiments of this application, when performing step 1201, refer to... Figure 6 As shown, the specific steps to be performed are, but are not limited to, the following:

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

[0148] Step 610: Determine the state retrieved from the state transition set and identify the retrieved state as the expected state.

[0149] In this embodiment of the application, if it is determined that a state is found from the state transition set, it means that the finite automaton accepts the input. Then, the found state is the expected state, and the current state of the finite automaton is updated with the expected state.

[0150] In other embodiments, if a state is found in the state transition table, and the found state representation ends the training, i.e., the aforementioned Z... FL If so, the verification is confirmed.

[0151] In some other embodiments, if no state is found in the state transition table, it means that the finite automaton does not accept the input, and the verification is determined to have failed, and step 130 is executed.

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

[0153] In some embodiments of this application, when performing 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 this 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 further it is determined whether the expected transmission behavior is outward transmission. When it is determined that it is outward transmission, the subsequent step 1203 is executed.

[0155] In other embodiments, if at least one of the two is inconsistent, i.e. both are inconsistent, or either 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. In this case, the expected state representation continues to be trained, and if it is determined that the actual transmission behavior of the algorithm is inconsistent with the expected transmission behavior, then it is determined that the verification has failed, and subsequent step 130 is executed.

[0156] Step 1203: If the verification is successful and the expected transmission direction is outward, then 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 and the expected data object are consistent.

[0157] In some embodiments of this application, if step 1202 is executed and it is determined that the verification is passed, that is, the actual transmission behavior during the training process is consistent with the expected transmission behavior defined by the algorithm, it is further determined whether the expected transmission direction is outward transmission. If yes, then step 1203 is executed; otherwise, the verification of the next piece of first data continues.

[0158] In this application, in order to ensure the security of the data transmitted externally, step 1203 is performed to check the content of the data transmitted externally. Specifically, when performing step 1203, based on the first actual data characteristics of the actual data object and the first expected data characteristics of the expected data object, it is detected whether the actual data object and the expected data object are consistent. If they are consistent, step 1204 is performed; if they are inconsistent, step 1205 is performed.

[0159] Step 1204: If consistency is confirmed, verify the data.

[0160] Step 1205: If an inconsistency is found, the verification is deemed unsuccessful.

[0161] In this application, after step 1205 determines that the verification has failed, step 130 is executed to stop data transmission and output a security warning in order to avoid data leakage.

[0162] Step 130: If the verification fails, stop the data transmission and output a security warning.

[0163] Thus, the data security transmission monitoring method for federated learning in this application can construct a finite automaton for the federated learning algorithm, treating computation and transmission behaviors as input and state in the finite automaton, respectively. Through a single sequence recognition, joint verification of the algorithm flow and data transmission can be achieved. At the same time, by combining algorithm behavior sequence detection and data transmission content verification, the method relies on the reduction capability of the finite automaton to detect whether the occurrence sequence between behaviors is abnormal, and uses the defined verification rules for externally transmitted data objects to complete the verification of the transmitted content, thereby ensuring the data security of federated learning services.

[0164] The method of this application will be described in detail below with specific embodiments. It should be noted that the following are only examples. This method is not limited to the federated learning business scenario 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: A longitudinal federated linear regression algorithm with a coordinator.

[0166] Longitudinal federated linear regression aggregates diverse feature data from multiple participant nodes using shared samples to jointly train a linear model. The participant nodes in this federated learning algorithm have three roles: the task initiator (guest), the data provider (host), and the coordinator (arbiter). Figure 7 As shown. The task initiator possesses some characteristic X. g And task tag information Y g The data provider only provides feature X. h The coordinator does not contain any sample data; it is only responsible for creating the key and encrypting / decrypting intermediate data. The implementation logic of the entire longitudinal federated linear regression algorithm is as follows: Figure 8 As shown.

[0167] In this embodiment, the participating nodes determine the corresponding finite automaton's state transition function (table) (denoted as f) based on the algorithm definition executed by their respective roles in the federated learning algorithm. FL That is, the next data transmission behavior is obtained based on the previous data transmission behavior and the current calculation behavior.

[0168] In this application, the expected transmission behavior defined by the algorithm corresponds to state s. i This includes the expected data object to be transmitted and the expected transmission direction; correspondingly, the expected computational behavior defined by the algorithm corresponds to ε. j It includes the expected computation name (input identifier), input data object and output data object, where i and j are the sequence numbers.

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

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

[0171] T FLThis is used to record verification rules for the output data objects of computational behavior, where the key is the input identifier ε, and the corresponding value element is formally represented as [output data object obj, verification rule rule]. When defining verification rules, verification rules for the data features (or attributes) of obj are generated based on the attributes of the input data object and the content of the computational behavior. In some embodiments of this application, the verification rules mainly focus on attributes such as the number of samples and feature dimensions, comparing the actual data object transmitted with the input data object in its computation process. For example, in a longitudinal linear model, the number of samples for training gradients should be consistent with the number of samples for training features, and the feature dimension of the training gradient should be consistent with the weight dimension.

[0172] The following section details the implementation process for monitoring the secure data transmission of federated learning services for the guest side, such as... Figure 9 As shown, any terminal on the guest side of the task initiator can execute the aforementioned method to monitor the running status of the host running the federated learning service on the guest side of the task initiator in real time. Similar implementation methods can be used for other participant nodes that are conducting federated learning services, which will not be described in detail here.

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

[0174] Based on the algorithm definition of the longitudinal federated learning algorithm, the important intermediate data objects involved in the algorithm's processing are identified, including but not limited to: model parameters w. g Sample features x g Sample label y g The guest encrypted forward value [[forward] g The host encrypts the forward value. h Encryption deviation [[ρ]] i Encryption gradient Parameter update value Δw g .

[0175] According to the algorithm definition of federated learning, based on the aforementioned important intermediate data objects, the following is generated: Figure 10 The state transition diagram structure is used to determine the internal elements of the finite automaton on the guest side of the task initiator, 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 Overview

[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 table above, s0 represents the initial state; Z FL The state is terminated.

[0184] Then, determine dictionary D. FL Important intermediate data objects in the process, including D FL It stores all data objects involved in computation and transmission, used for inferring expected data object information in the transmission state. That is, D FL The expected data object (i.e., model parameters w) stores the aforementioned key intermediate data objects. g Sample features x g Sample label y g The guest encrypted forward value [[forward] g The host encrypts the forward value. h Encryption deviation [[ρ]] i Encryption gradient Parameter update value Δw g ).

[0185] In practice, the sample size, feature dimensions, and data type of the aforementioned data objects are updated based on the actual collected dynamic information (such as runtime logs). It should be noted that while the algorithm definition typically identifies an expected data object, its specific data characteristics are strongly correlated with the features of the original data used in the actual training process. Therefore, during actual detection, the dictionary D needs to be adjusted based on the specific characteristics of the actually collected data. FL The data characteristics of the data objects in the data are visualized.

[0186] Furthermore, determine the dictionary T. FL The system includes verification rules for data objects transmitted externally, used to verify data objects transmitted to external systems. These rules are shown in the table below.

[0187] Table 4 Verification Rules for Data Objects Transmitted Externally

[0188]

[0189]

[0190] After determining the above basic information, in the specific implementation, the running logs and communication traffic during the algorithm training process are continuously collected. Based on the running logs and communication traffic, the actual running behavior is analyzed to obtain and record the array P of the computation behavior sequence and the array Q of the transmission behavior sequence.

[0191] Optionally, when parsing the runtime log, keywords representing the actual computation behavior are parsed out and mapped to the inputs in the input set. At the same time, the second actual feature data of the output data object (i.e. the calculated data object) is recorded, such as the number of samples and feature dimensions. The actual computation behavior is recorded in array P, where the elements in array P can be represented 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, transmission direction, and first actual data features of the actual data object corresponding to the transmitted content are recorded, such as the number of samples and feature dimension. The elements in array Q can be represented in the form of (transmission time, actual data object obj, actual transmission direction (host, in), number of samples n, feature dimension d).

[0193] The following section details the algorithm consistency verification process.

[0194] According to the aforementioned method, in some embodiments of this application, the contents of the collected arrays P and Q can be input into a finite automaton for verification at once, see reference. Figure 11 As shown, the specific steps include, but are not limited to, the following:

[0195] Step 1101: Retrieve the first data item (time) from array P. p ,ε i ,obj p ,n p ,d p ).

[0196] Step 1102: Based on the input identifier ε i Obtain the input identifier ε i The corresponding verification rule is denoted as T. FL [ε i [rule].

[0197] Step 1103: Based on verification rule T FL [ε i [rule] and the third actual data characteristics of the input data object included in the first data, determine the second expected data characteristics 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 practice, based on the number of samples and feature dimensions in the second expected data features, the output data object obj included in the first data is examined. p The second actual data feature, namely n p ,d p Whether the expectation is met, i.e., whether the number of samples in the second expected data feature matches the number of output data objects obj. p n p Consistency, and whether the feature dimensions in the second expected data features match the output data object obj. p d p If all are consistent, proceed to step 1105 and record (obj). p ,n p ,d p ) to dictionary D FL If there is no consistency, i.e., all are inconsistent, or any one is inconsistent, then proceed to step 1111: determine that the verification has failed and exit the verification process.

[0200] Step 1105: If consistent, determine the current state s of the finite automaton based on the state transition table. i 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 proceed to step 1106 and update the current state, i.e., f. FL (s i ,ε i ) = s i+1 ,like Then proceed to step 1111: If the verification fails, exit the verification process.

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

[0202] Step 1107: Retrieve the first second data item (time) from array Q. q ,obj q direct q ,n q ,d q ), compare s i+1Expected data objects s i+1 .obj and expected transmission direction s i+1 .direct, and the actual data object obj included in the second data. q and actual transmission direction direct q To verify the consistency between the two.

[0203] Step 1108: If s i+1 .obj = obj q and s i+1 .direct = direct q Then determine the expected transmission direction s i+ 1. Is `direct` an outward transmission? If yes, proceed to step 1109; otherwise, proceed to step s. i+1 .obj ≠ obj q and / or s i+1 .direct ≠ direct q Then proceed to step 1101.

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

[0205] Step 1109: If s i+1 If .direct is used for external transmission, then the actual data object obj is verified. q Is it related to D? FL If the data features in [obj] are inconsistent, proceed to step 1111: Determine if the verification fails. If they are consistent, proceed to step 1110: Determine if the verification passes, and return to step 1101.

[0206] In this embodiment of the application, when verifying the computational behavior, it is determined whether the data object is valid. If valid, the data characteristics of the data object are recorded in D. FL Then, it determines whether the corresponding input is accepted by the finite automaton; afterwards, it checks whether the transmission state direction is consistent. If consistent, it determines whether the data characteristics (or attribute information) of the actual data object being sent match D. FL Whether the data characteristics of the data objects in the data are consistent is important. Here, because the computation definitely occurs before the transmission, and the data transmitted is mostly determined by the computation, therefore, D FL The data object being sent must contain attribute information. Therefore, when executing step 1109, the data characteristics (or attribute information) of the actual data object being sent are directly compared with D. FLThe key is whether the data characteristics of the data objects in the data are consistent.

[0207] Taking data features including sample size and feature dimensions as an example, then, when executing step 1109, compare it with the actual data object obj. q The number of samples and D FL Are the sample sizes in [obj] consistent? And, compare them with the actual data object obj. q Feature dimensions and D FL Are the feature dimensions in [obj] consistent to represent the actual data object obj? q Consistency verification with the expected data object.

[0208] In some embodiments, after determining that the verification has failed, data transmission is stopped and a security warning is output to ensure data security during the algorithm training process.

[0209] Based on the same inventive concept, see [reference] Figure 12 As shown in the figure, this application provides a data security transmission monitoring device for federated learning, comprising:

[0210] The acquisition module 1210 is used to collect the running logs and communication traffic during the training process of the federated learning algorithm;

[0211] The data analysis module 1220 is used to parse the running log to obtain first data characterizing the computational behavior during the algorithm training process, and to parse the communication traffic to obtain second data characterizing the transmission behavior during the algorithm training process.

[0212] The verification module 1230 is used to verify the consistency between the actual behavior during the training process and the expected behavior defined by the algorithm, based on the first data and the second data and using a finite automaton. 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 stop data transmission and output a security warning if the verification is determined to have failed.

[0214] In some possible implementations, the second data includes the actual data object and the actual transmission direction, then the verification module 1230 is specifically used for:

[0215] Using the finite automaton, after determining that the actual computational behavior represented by the first data is consistent with the expected computational behavior, the current state of the finite automaton is determined based on the state transition table, and the expected state is transitioned to after reading the input corresponding to the actual computational behavior.

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

[0217] If the verification is successful and the expected transmission direction is outward, then 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 determined whether the actual data object and the expected data object are consistent.

[0218] Once consistency is confirmed, the verification is deemed successful.

[0219] If an inconsistency is identified, the verification is deemed unsuccessful.

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

[0221] The verification module 1230 is specifically used to determine whether the actual computational behavior represented by the first data is consistent with the expected computational behavior by means of the following method:

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

[0223] Based on the verification rules and the third actual data characteristics of the input data object, the second expected data characteristics of the output data object are determined;

[0224] Match the second expected data features with the second actual data features;

[0225] If a match is found, it is determined that the actual computational behavior represented by the first data is consistent with the expected computational behavior;

[0226] If there is a mismatch, it is determined that the actual computational behavior represented by the first data is inconsistent with the expected computational behavior.

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

[0228] From the state transition set, query the current state of the finite automaton, and the state to which it transitions after reading the input corresponding to the actual computational behavior;

[0229] Determine the state retrieved from the state transition set, and identify the retrieved state as the expected state.

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

[0231] If a state is found in the state transition table and the found state represents the end of training, then the verification is passed.

[0232] If no state is found in the state transition table, the verification is deemed unsuccessful.

[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, then the verification is deemed to have failed.

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

[0235] Extract keywords representing actual computational behavior from the runtime logs;

[0236] Based on the keywords and the relationship between each input and the keywords, the inputs corresponding to the keywords are determined, wherein each input is an input in the input set associated with the finite automaton, including input data objects and output data objects;

[0237] Based on the operation log, the number of samples and feature dimensions of the output data objects included in the input are counted to obtain the second actual data features of the output data objects 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 for:

[0240] The communication traffic is parsed, and the actual data objects and actual transmission directions are identified from the parsed data.

[0241] Based on the communication traffic, the number of samples and feature dimensions of the actual data object are counted to obtain the 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 Figure 13 As shown, this application provides an electronic device that can implement the aforementioned data security transmission monitoring method for federated learning. (Refer to...) Figure 13 The electronic device includes:

[0244] At least one processor 131 and a memory 132 connected to at least one processor 131. In this embodiment, the specific connection medium between the processor 131 and the memory 132 is not limited. Figure 13 The example shown is the connection between processor 131 and memory 132 via bus 130. Bus 130 is... Figure 13 The connections between other components are indicated by thick lines and are for illustrative purposes only, not as limiting information. Bus 130 can be divided into address bus, data bus, control bus, etc., for ease of representation. Figure 13 The term is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. Alternatively, the processor 131 can also be called a controller; there is no restriction on the name.

[0245] In this embodiment, memory 132 stores instructions executable by at least one processor 131. By executing the instructions stored in memory 132, at least one processor 131 can perform the data security transmission monitoring method for federated learning discussed above. Processor 131 can implement the function of an access node selection device.

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

[0247] Processor 131 can be a general-purpose processor, such as a Central Processing Unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the federated learning data security transmission monitoring method disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0248] Memory 132, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 132 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 132 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 132 may also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0249] By designing and programming the processor 131, the code corresponding to the methods described in the foregoing embodiments can be embedded into the chip, enabling the chip to execute the steps of the methods described in the foregoing embodiments during operation. How to design and program the processor 131 is a technique well-known to those skilled in the art and will not be elaborated upon here.

[0250] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium that, when instructions in the storage medium are executed by a processor, enables the processor to perform any of the methods described in the above embodiments.

[0251] In some possible implementations, various aspects of the federated learning data security transmission monitoring method provided in this application can also be implemented in the form of a program product, which includes program code that, when the program product is run on a device, causes the device to perform the steps of the methods described above according to the various exemplary embodiments of this application.

[0252] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0253] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.

[0254] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more processes in a flowchart and / or one or more blocks in a block diagram.

[0255] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more blocks in the block diagram.

[0256] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for monitoring secure transmission of data in federated learning, the method comprising: The method comprises: collecting running logs and communication traffic in a federated learning algorithm training process; parsing the running logs to obtain first data representing actual computing behavior in the algorithm training process, and parsing the communication traffic to obtain second data representing actual transmission behavior in the algorithm training process, wherein the first data comprises completion time of computing behavior, associated input identifier, input data object and output data object in the running logs, and second actual data features of the output data object, the input identifier is determined based on keywords representing actual computing behavior parsed from the running logs, and the second actual data features are obtained based on the running logs by counting sample quantity and feature dimension of the output data object included in the input; the second data comprises transmission time, actual data object and actual transmission direction of the communication traffic, and first actual data features of the actual data object, the first actual data features are obtained based on the communication traffic by counting sample quantity and feature dimension of the actual data object; based on the first data and the second data, verifying consistency between actual behavior in the training process and expected behavior defined by the algorithm using a finite automaton, wherein the input of the finite automaton is used to represent the expected computing behavior of the algorithm, the state is used to represent the expected transmission behavior of the algorithm, and the verification of consistency comprises at least one of the following: verification of consistency between the actual computing behavior and the expected computing behavior, verification of consistency between the actual transmission behavior and the expected transmission behavior, and verification of consistency between the actual data object and the expected data object when the expected transmission direction of the expected data object in the expected transmission behavior is outward transmission; if it is determined that the verification fails, the data transmission is stopped and a security warning is output.

2. The method of claim 1, wherein, The method of verifying, based on the first data and the second data, consistency between actual behavior in the training process and expected behavior defined by the algorithm using a finite automaton comprises: determining, using the finite automaton, that the actual computing behavior represented by the first data is consistent with the expected computing behavior, and then determining the current state of the finite automaton based on a state transition table after reading in the input corresponding to the actual computing behavior to the expected state; if the expected state represents continuing training, verifying consistency between the actual transmission behavior and the expected transmission behavior based on the expected transmission direction of the expected data object associated with the expected state, and the actual data object and actual transmission direction; if it is determined that the verification passes, and the expected transmission direction is outward transmission, detecting whether the actual data object is consistent with the expected data object based on the first actual data features of the actual data object and the first expected data features of the expected data object; if it is determined that the actual data object is consistent with the expected data object, it is determined that the verification passes; if it is determined that the actual data object is not consistent with the expected data object, it is determined that the verification fails.

3. The method of claim 2, wherein, The method of determining whether the actual computing behavior represented by the first data is consistent with the expected computing behavior comprises: determining, from a set of verification rules determined according to an algorithm definition of the algorithm, a verification rule corresponding to the input identifier; determining a second expected data feature of the output data object based on the verification rule and a third actual data feature of the input data object; matching the second expected data feature with the second actual data feature; if the matching is successful, determining that the actual calculation behavior of the first data feature is consistent with the expected calculation behavior; if the matching is unsuccessful, determining that the actual calculation behavior of the first data feature is inconsistent with the expected calculation behavior.

4. The method of claim 2, wherein, The determination of the current state of the finite automaton and the expected state to which the current state is transferred after reading the input corresponding to the actual calculation behavior based on the state transition table comprises: querying, from the state transition set, a state to which the current state of the finite automaton is transferred after reading the input corresponding to the actual calculation behavior; determining the queried state from the state transition set and determining the queried state as the expected state.

5. The method of claim 2, wherein, The method further comprises: if the queried state from the state transition table represents the end of the training, determining that the verification is passed; if the queried state from the state transition table is not found, determining that the verification is not passed; if the expected state represents the continuation of the training and it is determined that the actual transmission behavior is inconsistent with the expected transmission behavior, determining that the verification is not passed.

6. The method of any one of claims 1-5, wherein, The analysis of the running log to obtain the first data representing the actual calculation behavior in the training process of the algorithm comprises: parsing a keyword representing the actual calculation behavior from the running log; determining an input corresponding to the keyword based on the keyword and a relationship between each input and the keyword, wherein the 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 running log, counting a sample quantity and a 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; determining the completion time of the calculation behavior in the running log, the input identifier of the input, the input data object and the output data object included in the input, and the second actual data feature as the first data.

7. The method of any one of claims 1-5, wherein, The analysis of the communication traffic to obtain the second data representing the actual transmission behavior in the training process of the algorithm comprises: analyzing the communication traffic and identifying the actual data object and the actual transmission direction from the analyzed data; based on the communication traffic, counting a sample quantity and a feature dimension of the actual data object to obtain a first actual data feature of the actual data object; determining the transmission time of the communication traffic, the actual data object and the actual transmission direction, and the first actual data feature as the second data. 8.A data security transmission monitoring apparatus of federated learning, characterized in that, comprises: a collection module configured to collect a running log and communication traffic in a training process of a federated learning algorithm; The data analysis module is configured to analyze the running log to obtain first data representing actual computing behavior in the algorithm training process, and analyze the communication traffic to obtain second data representing actual transmission behavior in the algorithm training process. The first data includes completion time of computing behavior, associated input identifier, input data object, and output data object in the running log, and second actual data features of the output data object. The input identifier is determined based on keywords representing actual computing behavior parsed from the running log. The second actual data features are obtained based on the running log, sample quantity, and feature dimension of the output data object included in the input. The second data includes transmission time of the communication traffic, actual data object, and actual transmission direction, and first actual data features of the actual data object. The first actual data features are obtained based on the communication traffic, sample quantity, and feature dimension of the actual data object. The verification module is configured to verify, based on the first data and the second data, consistency between actual behavior in the training process and expected behavior defined by the algorithm using a finite automaton. The input of the finite automaton is configured to represent expected computing behavior of the algorithm, and the state is configured to represent expected transmission behavior of the algorithm. The verification of consistency includes at least one of the following: verification of consistency between the actual computing behavior and the expected computing behavior, verification of consistency between the actual transmission behavior and the expected transmission behavior, and verification of consistency between the actual data object and the expected data object when the expected transmission direction of the expected data object in the expected transmission behavior is outward transmission. The processing module is configured to, if it is determined that the verification fails, suspend data transmission and output a security warning.

9. An electronic device, comprising: The memory is configured to store computer programs or instructions. The processor is configured to execute the computer programs or instructions in the memory, so that the method in any one of claims 1-7 is executed. When the instructions in the storage medium are executed by the processor, the processor can execute the method in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, ​

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