Method and device for constructing collaborative architecture
Through large language models, analyzing federated learning requirements and event logs are constructed to build clear multi-node collaboration relationships and workflows, which solves the problems of unclear collaboration relationships and complex workflows in federated learning, improves efficiency and model performance, and promotes its in-depth analysis of collaborative relationships and complex workflows. Applications in data privacy protection and cross-node collaboration.
Patent Information
- Application Number
- CN202411208941.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-08-30
AI Technical Summary
In federated learning, the multi-node collaboration relationship is unclear and the collaborative workflow is complex, resulting in low efficiency and poor model performance, making it difficult to widely use in practice.
Through a large language model, analyze the federated learning requirements and event logs described by natural language, build clear multi-node collaboration relationships and collaboration workflows, thereby obtaining a clear collaboration architecture and improving the efficiency and model performance of federated learning.
It realizes efficient federated learning, improves model performance and application popularity, and fully utilizes the potential of federated learning in data privacy protection and cross-node collaboration.
Smart Images

Figure CN119204255A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine learning technology, and in particular to a method and device for constructing a collaborative architecture. Background Art
[0002] Federated Learning is a distributed machine learning technology that allows models to be trained on multiple nodes (such as mobile phones, servers and other devices) without directly exchanging data. Since the original data does not need to leave the local device, federated learning can protect the privacy and security of the data and reduce the risk of data leakage.
[0003] Furthermore, federated learning allows individual nodes to jointly train models without sharing original data. Combining the diversity of data from different nodes can help build more comprehensive and accurate models. The distributed nature of federated learning also complies with data protection regulations and helps enhance compliance in data processing.
[0004] However, the current technology does not clearly define the collaborative relationship among multiple nodes in federated learning. In addition, the collaborative workflow in federated learning is complex, which makes it difficult for multiple nodes involved in federated learning to effectively collaborate during data sharing and model updating. This makes federated learning inefficient and the performance of the model obtained by federated learning poor. Summary of the invention
[0005] Based on the above problems, the present application provides a method and device for constructing a collaborative architecture, which can construct a clear multi-node collaborative relationship and collaborative workflow, and obtain a clear collaborative architecture, so as to facilitate efficient federated learning based on the construction of a clear collaborative architecture, thereby improving the efficiency of federated learning and the performance of the model obtained by federated learning.
[0006] The embodiments of the present application disclose the following technical solutions:
[0007] In a first aspect, the present application provides a method for constructing a collaborative architecture, comprising:
[0008] Obtaining federated learning requirements described in natural language and federated learning event logs; the federated learning requirements include all technical and business requirements involved in the federated learning;
[0009] Obtaining the multi-node collaborative relationship of the federated learning based on the federated learning requirements described in the natural language through a first large language model; the first large language model is a large language model that receives the collaborative relationship definition in advance;
[0010] Obtaining the collaborative workflow of the federated learning based on the federated learning event log through a second large language model; the second large language model is a large language model that pre-receives a nested relationship definition and a nested relationship analysis example;
[0011] Based on the multi-node collaboration relationship and the collaboration workflow, a collaboration framework for federated learning is obtained.
[0012] Optionally, the collaboration relationship definition includes: a restriction condition definition, a collaboration strategy definition, a state list definition, a state transition rule definition, and an entity authority definition; the first language model is obtained in the following manner:
[0013] The restriction definition, the collaboration strategy definition, the state list definition, the state transition rule definition and the entity authority definition are respectively input into the large language model in the form of their corresponding templates to obtain a first large language model.
[0014] Optionally, obtaining the multi-node collaboration relationship of the federated learning based on the federated learning requirements described in the natural language through the first language model includes:
[0015] The federated learning requirements described in natural language are input into the first large language model so that the first large language model can analyze the federated learning requirements described in natural language and obtain the target information in the federated learning requirements; and according to the target information, and the templates corresponding to the constraint definition, the collaboration strategy definition, the state list definition, the state transition definition and the entity authority definition, respectively, the multi-node collaboration relationship of the federated learning is obtained and output; the target information is information related to the collaboration relationship definition.
[0016] Optionally, the second largest language model is obtained in the following manner:
[0017] Inputting a nested relationship definition into a large language model; wherein the nested relationship definition includes a concept and a representation of a nested relationship, wherein the concept of the nested relationship is that the nested relationship represents a calling relationship between a parent process and a child process;
[0018] A federated learning analysis example is input into the large language model to obtain a second large language model; wherein the federated learning analysis example includes: an event log example and a nested relationship example corresponding to the event log example.
[0019] Optionally, when the second largest language model is a multimodal large language model, the federated learning analysis example also includes: a nested relationship tree example corresponding to the event log example.
[0020] Optionally, obtaining the collaborative workflow of the federated learning based on the federated learning event log by using the second largest language model includes:
[0021] Inputting the federated learning event log into the second largest language model, so that the second largest language model analyzes the federated learning event log, obtains and outputs a nested relationship corresponding to the federated learning event log;
[0022] Based on the nested relationship corresponding to the federated learning event log, a collaborative workflow corresponding to the federated learning is obtained by arranging.
[0023] Optionally, the method further includes: obtaining a target federated learning event of the federated learning, wherein the target federated learning event is a federated learning event that requires collaborative workflow sequencing;
[0024] The inputting the federated learning event log into the second largest language model so that the second largest language model analyzes the federated learning event log, obtains and outputs a nested relationship corresponding to the federated learning event log, including:
[0025] Inputting the federated learning event log and the target federated learning event into the second largest language model, so that the second largest language model analyzes the target federated learning event in the federated learning event log, obtains and outputs a nested relationship between the target federated learning events;
[0026] The step of arranging the collaborative workflow corresponding to the federated learning based on the nested relationship corresponding to the federated learning event log includes:
[0027] Based on the nested relationship between the target federated learning events, a collaborative workflow corresponding to the federated learning is arranged.
[0028] Optionally, the federated learning event log is obtained in the following manner:
[0029] Get local event logs of multiple nodes in federated learning;
[0030] The events in the local event logs of the multiple nodes are sorted in chronological order to obtain corresponding federated learning event logs.
[0031] In a second aspect, the present application provides a device for constructing a collaborative architecture, characterized by comprising:
[0032] A federated data acquisition module, used to acquire federated learning requirements described in natural language and federated learning event logs; the federated learning requirements include all technical and business requirements involved in the federated learning;
[0033] A collaboration relationship building module, used to obtain a multi-node collaboration relationship of the federated learning based on the federated learning requirements described in the natural language through a first large language model; the first large language model is a large language model that receives the collaboration relationship definition in advance;
[0034] A collaborative workflow construction module, configured to obtain a collaborative workflow of the federated learning based on the federated learning event log by using a second large language model; the second large language model is a large language model that pre-receives a nested relationship definition and a nested relationship analysis example;
[0035] A collaborative architecture building module is used to obtain the collaborative framework of the federated learning based on the multi-node collaborative relationship and the collaborative workflow.
[0036] Optionally, a collaborative relationship building module is specifically used to input the federated learning needs described in natural language into the first language model, so that the first language model can analyze the federated learning needs described in natural language and obtain the target information in the federated learning needs; and based on the target information, as well as the templates corresponding to the constraint definition, collaborative strategy definition, state list definition, state transfer definition and entity authority definition, obtain and output the multi-node collaborative relationship of federated learning.
[0037] Optionally, a collaborative workflow construction module is specifically used to input the federated learning event log into the second largest language model so that the second largest language model can analyze the federated learning event log, obtain and output the nested relationship corresponding to the federated learning event log; based on the nested relationship corresponding to the federated learning event log, the collaborative workflow corresponding to the federated learning is arranged.
[0038] Optionally, the federated data acquisition module is also used to acquire target federated learning events of federated learning;
[0039] The collaborative workflow construction module is specifically used to input the federated learning event log and the target federated learning event into the second largest language model, so that the second largest language model can analyze the target federated learning event in the federated learning event log, obtain and output the nested relationship between the target federated learning events; based on the nested relationship between the target federated learning events, the collaborative workflow corresponding to the federated learning is arranged.
[0040] Compared with the prior art, this application has the following beneficial effects: by using the semantic understanding and analysis capabilities of a large language model, the federated learning requirements and federated learning event logs are parsed / analyzed to build a clear multi-node collaboration relationship and collaboration workflow, thereby obtaining a collaborative architecture for federated learning. Since the multi-node collaboration relationship and collaboration workflow in the collaborative architecture are clear, efficient federated learning can be achieved based on the collaborative architecture, thereby improving the efficiency of federated learning and the performance of the model obtained by federated learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0042] Figure 1 A flowchart of a method for constructing a collaborative architecture provided in an embodiment of the present application;
[0043] Figure 2 An example diagram of an event log example provided in an embodiment of the present application;
[0044] Figure 3 An example diagram of a nested relationship tree provided in an embodiment of the present application;
[0045] Figure 4 An example diagram of a collaborative workflow provided in an embodiment of the present application;
[0046] Figure 5 A schematic diagram of the structure of a collaborative architecture construction device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In federated learning, multi-node collaboration refers to the cooperation mode between different nodes participating in the federated learning process. The multi-node collaboration in federated learning ensures that different nodes can work together effectively to achieve the common goal of training high-quality machine learning models. Due to trust issues between nodes and the heterogeneity of data in each node, federated learning has the problem of complex multi-node collaboration. Collaborative workflow refers to how multiple nodes work together to complete the federated learning process under federated learning. However, federated learning involves multiple links such as data isolation, model training, and model aggregation between multiple nodes, which makes the collaborative workflow of federated learning complex.
[0048] The current technology does not clearly define the collaborative relationship among multiple nodes involved in federated learning. In addition, the collaborative workflow in federated learning is complex, which makes it difficult for multiple nodes involved in federated learning to effectively collaborate during data sharing and model updating. This makes federated learning inefficient and the performance of the model obtained by federated learning poor.
[0049] Furthermore, due to the low efficiency of federated learning and the poor performance of the models obtained by federated learning, federated learning is difficult to be widely used in practice (i.e., the application penetration rate is low), which limits the potential of federated learning in protecting data privacy and cross-node collaboration.
[0050] The present application provides a method for constructing a collaborative architecture, including: obtaining federated learning requirements described in natural language and federated learning event logs; obtaining a multi-node collaborative relationship of federated learning based on the federated learning requirements described in natural language through a first large language model; obtaining a collaborative workflow of federated learning based on the federated learning event log through a second large language model; obtaining a collaborative architecture of federated learning based on multi-node collaborative relationships and collaborative workflows. The embodiment of the present application utilizes the semantic understanding and analysis capabilities of a large language model to parse / analyze federated learning requirements and federated learning event logs to construct clear multi-node collaborative relationships and collaborative workflows, thereby obtaining a collaborative architecture of federated learning. Since the multi-node collaborative relationships and collaborative workflows in the collaborative architecture are clear, efficient federated learning can be achieved based on the collaborative architecture, thereby improving the efficiency of federated learning and the performance of the model obtained by federated learning.
[0051] Furthermore, due to the improvement in the efficiency of federated learning and the performance of the models obtained by federated learning, it is possible to increase the popularity of federated learning in practice, thereby making it possible to give full play to the ability of federated learning in protecting data privacy and cross-node collaboration.
[0052] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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.
[0053] Embodiment 1:
[0054] Combine the following Figure 1-Figure 4 , a method for constructing a collaborative architecture provided in an embodiment of the present application is introduced in detail.
[0055] like Figure 1 As shown, a method for constructing a collaborative architecture provided in an embodiment of the present application includes the following steps:
[0056] S101. Obtain federated learning requirements described in natural language and federated learning event logs.
[0057] Among them, the federated learning needs described in natural language refer to the use of natural language (such as Chinese, English, etc.) to express federated learning needs.
[0058] Federated learning requirements include all technical and business requirements involved in federated learning. Specifically, the technical requirements involved in federated learning include: data requirements (such as data format, data volume, data quality, etc.), model requirements (such as model type, model performance, etc.), training requirements (such as training algorithm, training frequency, etc.), communication requirements (such as communication protocol, communication frequency, etc.), computing resources (such as hardware requirements, storage requirements, etc.), etc.; business requirements include: business goals, nodes (i.e. participants), incentive mechanisms, cooperation models, compliance, etc.
[0059] Among them, the federated learning event log is a time series data that records various federated learning events that occur during the federated learning process. It usually contains key information about the execution process of federated learning, such as the start, completion, and state change time of the federated learning event. Exemplarily, the federated learning event log includes: event name, event status, timestamp, etc.
[0060] In a possible implementation, the federated learning event log is obtained in the following manner: obtaining local event logs of multiple nodes in the federated learning; sorting the time in the local time logs of the multiple nodes in chronological order to obtain the corresponding federated learning event log.
[0061] Specifically, after obtaining the local event logs of multiple nodes in the federated learning, the local event logs of all nodes are merged into a list or data structure; all events are sorted in the order of timestamps to ensure that the events are arranged in chronological order, and the corresponding federated learning event logs are obtained.
[0062] S102. Through the first language model, based on the federated learning requirements described in natural language, a multi-node collaborative relationship of federated learning is obtained.
[0063] The first large language model is a large language model that receives the collaborative relationship definition in advance.
[0064] Large Language Model (LLM) is a large-scale pre-trained language model that can generate high-quality natural language text by training on a large amount of text data. Large language models can not only generate natural language text, but also capture complex patterns and semantic structures in language, deeply understand the meaning of language text, and handle various language tasks.
[0065] Specifically, the first large language model is obtained in the following manner: the collaboration relationship definition is input into the large language model to obtain the first large language model.
[0066] The collaborative relationship definition includes: constraint definition, collaborative strategy definition, state list definition, state transition rule definition, and entity authority definition. That is, the constraint definition, collaborative strategy definition, state list definition, state transition rule definition, and entity authority definition are input into the large language model to obtain the first large language model.
[0067] The constraint definition is used to define the name and format of the content included in the constraint; the collaboration strategy definition is used to define the name and format of the content included in the collaboration strategy; the state list definition is used to define the name and format of the content included in the state list; the state transition rule definition is used to define the name and format of the content included in the state transition rule; the entity permission definition is used to define the name and format of the content included in the entity permission.
[0068] In a possible implementation, the constraint definition, collaboration strategy definition, state list definition, state transition rule definition and entity authority definition are respectively input into the large language model in the form of their corresponding templates to obtain a first large language model.
[0069] For ease of understanding, the templates corresponding to the collaboration relationship definition are introduced below with reference to Tables 1 to 5. The form of the template corresponding to the collaboration relationship is explained using a table as an example.
[0070] The following is an example of introducing the template corresponding to the restricted condition definition in conjunction with Table 1.
[0071] Table 1
[0072]
[0073] The template corresponding to the constraint definition is shown in Table 1, which defines the constraints including: initiator list, initiator group list, completer list, completer group list, maximum number of rotations and rejection strategy; as well as the format types of various constraints.
[0074] Among them, the initiator list (initiator) includes: the node (participant) responsible for initiating the federated learning task; the initiator group list (initiatorGroup) includes: the node group responsible for initiating the federated learning task. Specifically, only the node in the initiator list or the node whose group belongs to the group in the initiator group list can initiate the federated learning task.
[0075] The completer list (completer) includes nodes (participants) responsible for completing the federated learning task; the completer group list (completeGroup) includes node groups that complete the federated learning task. Specifically, only nodes in the completer list or nodes in the group in the completer group list can complete the federated learning task.
[0076] The format of the above initiator list, initiator group list, completer list, and completer group list is a JSON formatted array. JSON (JavaScript Object Notation) is a lightweight data exchange format that is easy for people to read and write, and is also easy for machines to parse and generate. A JSON formatted array is an ordered set of values, generally surrounded by square brackets, and the values are separated by commas. For example, "initiator": ["init_user1", "init_user2"].
[0077] Among them, the maximum number of turns (maxTurns) indicates the maximum upper limit of the number of federated learning task transfers, that is, the maximum number of turns refers to the maximum upper limit of the number of times the model parameters are transferred between nodes during the entire training process of the federated learning task. Specifically, when the maximum number of turns is -1, it means that there is no limit on the number of federated learning task transfers.
[0078] Among them, the rejection strategy (rejectStrategy) represents the action triggered when the federated learning task reaches a certain boundary condition. The boundary condition can be exceeding the maximum number of rotations, reaching the deadline or other preset conditions. Specifically, there are three types of rejection strategies, namely warning (WARNING), exception (EXCEPTION) and ignore (IGNORE). Warning (WARNING) means that when the federated learning task reaches a certain boundary condition, a warning message is issued but the federated learning task continues to be executed; exception (EXCEPTION) means that when the federated learning task reaches a certain boundary condition, an exception message is issued and the execution of the federated learning task is stopped; IGNORE means that when the federated learning task reaches a certain boundary condition, the boundary condition is ignored and no record is made. And the format corresponding to the rejection strategy is an enumeration, that is, you can select one from warning, exception and ignore. For example, "rejectStrategy": "WARNING".
[0079] The following is an example of the template corresponding to the protocol policy definition, combined with Table 2.
[0080] Table 2
[0081]
[0082] The template corresponding to the collaboration strategy definition is shown in Table 2, which defines the collaboration strategy including: source user / group, whether group-level configuration is used, delivery method, target collaborator list, target collaboration group list, target adaptation method, intra-group delivery method, message notification configuration, and format types of various collaboration strategies.
[0083] The source user / group (SourceId) includes the ID of the node / node group in the current federated learning task where the collaboration strategy is effective. Specifically, when the ID of the current collaboration node or node group of the federated learning task is the ID in the source user / group, the collaboration strategy is effective.
[0084] Among them, whether the group-level configuration (isGroup) indicates whether the collaboration strategy works for the group. And the format corresponding to whether the group-level configuration is a Boolean value, and the Boolean value can only take one of two values: true (True) or false (False). Specifically, when whether the group-level configuration is true (True), the protocol strategy applies to the entire group; when whether the group-level configuration is false (False), the protocol strategy only applies to a single node.
[0085] Among them, the transmission method (transmitType) indicates the transmission method of federated learning tasks or model parameters between nodes, and the transmission methods include: delivery (DELIVER), claim (CLAIM) and assignment (ASSIGN). Among them, delivery (DELIVER) means that the initiator sends the task or model parameters directly to the designated participant; claim (CLAIM) means that the participant actively requests the initiator to obtain the task or model parameters; assignment (ASSIGN) means that the initiator sends the task or model parameters to the participant in a specific adaptation method.
[0086] It should be noted that the initiator refers to the node that initiates the federated learning task, such as the scheduler or central processor of the federated learning task; the participant refers to the node that participates in the federated learning task, such as the client that owns the local data set.
[0087] The target collaborator list (targetCoopers) includes: nodes (participants) that can receive federated learning tasks or model parameters; the target collaboration group list (targetCoopGroups) includes: node groups (participant groups) that can receive federated learning tasks or model parameters. Specifically, in the above transfer method, the transfer target (participant) should be in the target collaborator list, or the group where the transfer target (participant) is located should be in the target collaboration group list.
[0088] Among them, the target adaptation method (adaptType) indicates that the transmission method is the adaptation method used to send the task or model to the participant when assigning, that is, the initiator sends the task or model parameters to the participant according to the target adaptation method. Specifically, the target adaptation methods include: engine built-in random adaptation (random) and optimization algorithm adaptation (betterFit). Engine built-in random adaptation means that the initiator randomly sends the task or model parameters to the participant; optimization algorithm adaptation means that the initiator sends the task or model parameters to the appropriate participant according to the optimization algorithm.
[0089] Among them, the inner transmission mode (innerTransmitType) is used to indicate the transmission mode of federated learning tasks or model parameters within the group when the group-level configuration takes effect.
[0090] Among them, the message notification configuration (notice) represents the notification information triggered after the task or model parameters are passed.
[0091] The following is an example of introducing the template corresponding to the state list definition in conjunction with Table 3.
[0092] Table 3
[0093]
[0094] The template corresponding to the state list definition is shown in Table 3, which defines that the state list includes: entity initial state, entity final state, state value and state description, where the state value and state description can be called state unit configuration. In federated learning, an entity represents a node in federated learning.
[0095] Among them, the entity initial status (initialStatus) represents the initialization status of the node when the federated learning task is just initiated.
[0096] Among them, the entity final status (finalStatus) represents the final status of the node after the federated learning task is completed.
[0097] The status unit configuration represents the single status information of the entity, including the status value (status) and the status description (text). The status value (status) represents the unique identification of the status, such as: identifier or code; the status description (text) represents the detailed text description of the status, which is also the display information of the status on the page.
[0098] It should be noted that, generally, an entity will be configured with multiple state unit configurations.
[0099] The following describes in detail the template corresponding to the state transition rule definition in conjunction with Table 4.
[0100] Table 4
[0101]
[0102] The template corresponding to the state transition rule definition is shown in Table 4, which defines the state transition rule including: current state, transition action, and target state.
[0103] Among them, the current state (currentStatus) indicates the current state of the entity; the transfer action (action) indicates the action / operation that triggers the state transfer, that is, the transfer action can trigger the transfer of the current state to the target state; the target state (targetStatus) indicates the new state of the entity after the state transfer.
[0104] Specifically, when a federated learning task or model parameter is passed, the state transfer of the associated entity occurs, and the state transfer rules of each entity are connected to each other to form a finite state machine. And the current state and target state in the state transfer rule need to be pre-set in the state list.
[0105] The following is a detailed introduction to the template corresponding to the entity permission definition in conjunction with Table 5.
[0106] Table 5
[0107]
[0108] The template corresponding to the entity permission definition is shown in Table 5, which defines the entity permissions including: source user / group, whether group-level configuration and permission value.
[0109] The source user / group (SourceId) includes the ID of the node / node group where the entity permission takes effect. Specifically, when the ID of the current collaborative node or node group of the federated learning task is the ID in the source user / group, the entity permission takes effect.
[0110] Among them, whether it is group-level configuration (isGroup) indicates whether the permission definition is effective for the group.
[0111] The permission value (permission) indicates the entity permission possessed by the source user / group.
[0112] Specifically, the format of the permission value is "collaboration moment: operation permission". The collaboration moment includes before collaboration, during collaboration, and after collaboration. Before collaboration refers to the node not yet joining the collaboration chain of the federated learning task, and its permission value is expressed as beforeCoop; during collaboration refers to the node being the current execution node of the federated learning task, and its permission value is expressed as cooping; after collaboration refers to when the node joins the collaboration chain after passing the federated learning task, and its permission value is expressed as afterCoop. Operation permissions include: read permission (read), write permission (write), execute permission (execute), delete permission (delete), etc. Exemplarily, the permission value corresponding to having write permission during collaboration is "cooping:write".
[0113] The above combined with Tables 1 to 5 introduces the templates corresponding to the collaborative relationship definition by way of example. Exemplarily, the first large language model is obtained by inputting the templates corresponding to the collaborative relationship definition shown in Tables 1 to 5 into the large language model.
[0114] In a possible implementation, a federated learning demand described in natural language is input into a first large language model; the first large language model analyzes the federated learning demand described in natural language to obtain target information in the federated learning demand; the first large language model constructs and outputs a multi-node collaborative relationship of federated learning based on the target information and templates corresponding to constraint definition, collaboration strategy definition, state list definition, state transition definition and entity authority definition, so as to obtain a multi-node collaborative relationship of federated learning.
[0115] The embodiments of the present application utilize the semantic understanding and analysis capabilities of a large language model to conduct an in-depth analysis of federated learning needs, and construct an accurate and clear collaborative relationship based on the pre-input collaborative relationship definition, thereby clearly representing the complex collaborative relationship between federated learning nodes.
[0116] S103. Using the second language model and based on the federated learning event log, obtain the collaborative workflow of federated learning.
[0117] Among them, the second largest language model is a large language model that pre-receives nested relationship definitions and a full set of relationship analysis examples.
[0118] Specifically, the second largest language model is obtained in the following manner: inputting the nested relationship definition into the large language model; and inputting the federated learning analysis example into the large language model to obtain the second largest language model.
[0119] The nested relationship definition includes the concept and representation method of the nested relationship. Entering the nested relationship definition into the large language model is used to define / tell the large language model what the nested relationship is and how the nested relationship should be represented.
[0120] The definition of a nested relationship is that a nested relationship represents a calling relationship between a parent process and a child process, that is, a nested relationship represents that a process (parent process) can contain or call other processes (child processes) to form a hierarchical structure. Exemplarily, after the nested relationship definition is input into the large language model, the large language model can know from the nested relationship definition that in the event log, when the life cycle of a process from "Start" to "Complete" contains one or more complete trajectories of other processes, it is determined that a process (parent process) and other processes (child processes) are in a nested relationship.
[0121] The representation of nested relationship: If event a nests event b, that is, event a is the parent process and event b is the child process, it is expressed as a<-b.
[0122] The federated learning analysis examples include event log examples and nested relationship examples corresponding to the event log examples. The federated learning analysis examples are input into the large language model to define / inform how to apply these federated learning definitions in specific situations. Furthermore, the federated learning analysis examples are derived from real federated learning projects or virtual data sets, showing how to obtain the nested relationships between events from the federated learning event logs.
[0123] For ease of understanding, the following Figure 2 The following is an example of an event log example and its corresponding nested relationship.
[0124] like Figure 2 The event log example shown includes event identifiers, such as event name, event number, etc. The life cycle includes two types: the start (Start) of the event and the end (Complete) of the event. The timestamp records the specific time point when each event occurs, such as the timestamp corresponding to the start of the event and the timestamp corresponding to the end of the event.
[0125] like Figure 2 The event log example shown includes 8 events, namely: event A, event B, event C, event D, event E, event F, event G and event H. The order of arrangement in the event log example is based on the timestamp corresponding to the life cycle of each event, and is sorted in chronological order. For example, the time domain from the life cycle "Start" to the life cycle "Complete" of event B includes the life cycle "Start" to the life cycle "Complete" of event E, and the life cycle "Start" to the life cycle "Complete" of event F, so event B nests event E and event F, recorded as B<-E; B<-F.
[0126] and Figure 2 The nested relationship example corresponding to the time log example shown is: B<-E; B<-F; C<-G; C<-H. That is, event B nests event E; event B nests event F; event C nests event G and event C nests event H.
[0127] In a possible implementation, when the second largest language model is a multimodal large language model, the federated learning analysis example also includes: a nested relationship tree example corresponding to the event log example.
[0128] Among them, the multimodal large language model is a large-scale pre-trained model that can process multiple types of data. It can understand and generate information in multiple modes such as text, images, audio, etc. Therefore, for the multimodal large language model, you can input the nested relationship tree example corresponding to the event log example, so that the second largest language model can output the nested relationship tree corresponding to the federated learning log.
[0129] For ease of understanding, the following Figure 3 Let's take a look at the nested relationship tree example. Figure 3 The nested relationship tree example shown is Figure 2 Example of a nested tree for the event log example shown.
[0130] like Figure 3 As shown, the nested relationship tree example indicates that event B nests event E and event F, and event C nests event G and event H.
[0131] Further, if Figure 3 The nested relationship tree example shown can be expressed by formula (1).
[0132] Tree(W)=root, Node(B), Node(C), f (1)
[0133] Where W represents Figure 2 The event log example shown in FIG. 1 is a diagram of an event log in which root represents a root node set, and Node represents a root node set of child nodes. f is a mapping of a root node to its child node set, thereby forming a tree structure. Specifically, root = {A, B, C, D}, Node (B) = {E, F}, Node (C) = {G, H}.
[0134] In one possible implementation, the federated learning event log is input into the second largest language model; the second largest language model analyzes the federated learning event log to obtain and output the nested relationship corresponding to the federated learning event log; based on the nested relationship corresponding to the learning log, the nested relationship is arranged to obtain the collaborative workflow corresponding to the federated learning.
[0135] Furthermore, when the second largest language model is a multimodal large language model, the second largest language model analyzes the federated learning event log and can also obtain and output the nested relationship tree corresponding to the federated learning event log; based on the nested relationship tree corresponding to the nested relationship learning log, the collaborative workflow corresponding to the federated learning is arranged.
[0136] In a possible implementation, while obtaining the federated learning requirements described in natural language and the federated learning event log, the target federated learning event of the federated learning can also be obtained; the target federated learning event is the federated learning event that needs to be sorted for the collaborative workflow. Then the federated learning event log and the target federated learning event are input into the second largest language model; the second largest language model analyzes the target federated learning event in the federated learning event log, obtains and outputs the nested relationship between the target federated learning events, so as to obtain a collaborative workflow that only includes the target federated learning event in the subsequent step.
[0137] It should be noted that when the target federated learning event is not obtained, all federated learning events in the default federated learning event log need to be sorted by collaborative workflow.
[0138] For ease of understanding, the following Figure 4 (a) and (b) in the figure illustrate the collaborative workflow obtained by example, both based on Figure 2 The nested relationship or Figure 3 The nested relationship tree shown results in a collaborative workflow.
[0139] like Figure 4 The collaborative workflow shown in (a) is when the target federated learning event is not obtained, that is, all federated learning events in the default federated learning event log need to be sorted by the collaborative workflow. Figure 4 The collaborative workflow shown in (a) includes all federated learning events in the event log.
[0140] like Figure 4 In the collaborative workflow shown in (b), the target federated learning events obtained are event A, event C, event D, event G and event H. At this time, the collaborative workflow obtained only includes the target federated learning events in the event log.
[0141] In the embodiment of the present application, the language understanding and task decomposition capabilities of the large language model are used to parse the federated learning event log in the federated learning to obtain a clear nested relationship between events, thereby obtaining a clear collaborative workflow. While obtaining a clear collaborative workflow, the complexity of the collaborative workflow is also reduced.
[0142] S104. Based on the multi-node collaborative relationship and collaborative workflow, a collaborative architecture of federated learning is obtained.
[0143] Specifically, the collaborative architecture of federated learning can guide the federated learning system (i.e., each node) to perform efficient federated learning, thereby improving the efficiency of federated learning and the performance of the model obtained by federated learning.
[0144] The embodiment of the present application provides a method for constructing a collaborative architecture, including: obtaining federated learning requirements described in natural language and federated learning event logs; obtaining a multi-node collaborative relationship of federated learning based on the federated learning requirements described in natural language through a first large language model; obtaining a collaborative workflow of federated learning based on the federated learning event log through a second large language model; obtaining a collaborative architecture of federated learning based on multi-node collaborative relationships and collaborative workflows. The embodiment of the present application utilizes the semantic understanding and analysis capabilities of a large language model to parse / analyze federated learning requirements and federated learning event logs to construct clear multi-node collaborative relationships and collaborative workflows, thereby obtaining a collaborative architecture of federated learning. Since the multi-node collaborative relationships and collaborative workflows in the collaborative architecture are clear, efficient federated learning can be achieved based on the collaborative architecture, thereby improving the efficiency of federated learning and the performance of the model obtained by federated learning.
[0145] Furthermore, due to the improvement in the efficiency of federated learning and the performance of the models obtained by federated learning, it is possible to increase the popularity of federated learning in practice, thereby making it possible to give full play to the ability of federated learning in protecting data privacy and cross-node collaboration.
[0146] Embodiment 2:
[0147] Combine the following Figure 5 , a device for constructing a collaborative architecture provided in an embodiment of the present application is introduced in detail.
[0148] like Figure 5 As shown, a device for constructing a collaborative architecture provided in an embodiment of the present application includes the following modules:
[0149] A federated data acquisition module 501 is used to acquire federated learning requirements described in natural language and federated learning event logs; the federated learning requirements include all technical and business requirements involved in federated learning;
[0150] A collaboration relationship building module 502 is used to obtain a multi-node collaboration relationship of federated learning based on the federated learning requirements described in natural language through the first language model;
[0151] A collaborative workflow construction module 503 is used to obtain a collaborative workflow of federated learning based on the federated learning event log by using the second language model;
[0152] The collaborative architecture building module 504 is used to obtain a collaborative framework for federated learning based on multi-node collaborative relationships and collaborative workflows.
[0153] In one possible implementation, the collaboration relationship construction module 502 is specifically used to input the federated learning needs described in natural language into the first large language model, so that the first large language model can analyze the federated learning needs described in natural language and obtain the target information in the federated learning needs; and based on the target information, and the templates corresponding to the constraint definition, collaboration strategy definition, state list definition, state transfer definition and entity authority definition, obtain and output the multi-node collaboration relationship of federated learning.
[0154] In one possible implementation, the collaborative workflow construction module 503 is specifically used to input the federated learning event log into the second largest language model so that the second largest language model can analyze the federated learning event log, obtain and output the nested relationship corresponding to the federated learning event log; based on the nested relationship corresponding to the federated learning event log, arrange the collaborative workflow corresponding to the federated learning.
[0155] In one possible implementation, the federated data acquisition module 501 is also used to obtain the target federated learning events of the federated learning; the collaborative workflow construction module 503 is specifically used to input the federated learning event log and the target federated learning event into the second largest language model, so that the second largest language model can analyze the target federated learning events in the federated learning event log, obtain and output the nested relationship between the target federated learning events; based on the nested relationship between the target federated learning events, the collaborative workflow corresponding to the federated learning is arranged.
[0156] The embodiment of the present application provides a device for constructing a collaborative architecture, including: a federated data acquisition module 501, which is used to obtain the federated learning requirements described in natural language and the federated learning event log; the federated learning requirements include all technical and business requirements involved in federated learning; a collaborative relationship construction module 502, which is used to obtain the multi-node collaborative relationship of federated learning based on the federated learning requirements described in natural language through the first large language model; a collaborative workflow construction module 503, which is used to obtain the collaborative workflow of federated learning based on the federated learning event log through the second large language model; a collaborative architecture construction module 504, which is used to obtain the collaborative framework of federated learning based on the multi-node collaborative relationship and collaborative workflow. The embodiment of the present application utilizes the semantic understanding and analysis capabilities of the large language model to parse / analyze the federated learning requirements and the federated learning event log to construct a clear multi-node collaborative relationship and collaborative workflow, thereby obtaining a collaborative architecture for federated learning. Since the multi-node collaborative relationship and collaborative workflow in the collaborative architecture are clear, efficient federated learning can be achieved based on the collaborative architecture, thereby improving the efficiency of federated learning and the performance of the model obtained by federated learning.
[0157] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the method and device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The method and device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0158] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for constructing a collaborative architecture, characterized in that: include: Obtain federated learning requirements described in natural language and federated learning event logs; The federated learning requirements include all technical and business requirements involved in the federated learning; Obtaining the multi-node collaborative relationship of the federated learning based on the federated learning requirements described in the natural language through a first large language model; the first large language model is a large language model that receives the collaborative relationship definition in advance; Obtaining the collaborative workflow of the federated learning based on the federated learning event log through a second large language model; the second large language model is a large language model that pre-receives a nested relationship definition and a nested relationship analysis example; Based on the multi-node collaboration relationship and the collaboration workflow, a collaboration framework for federated learning is obtained.
2. The method according to claim 1, characterized in that The collaboration relationship definition includes: restriction definition, collaboration strategy definition, state list definition, state transition rule definition, and entity authority definition; the first language model is obtained in the following way: The restriction definition, the collaboration strategy definition, the state list definition, the state transition rule definition and the entity authority definition are respectively input into the large language model in the form of their corresponding templates to obtain a first large language model.
3. The method according to claim 2, characterized in that The method of obtaining a multi-node collaborative relationship of the federated learning based on the federated learning requirements described in the natural language through the first language model includes: The federated learning requirements described in natural language are input into the first large language model so that the first large language model can analyze the federated learning requirements described in natural language and obtain the target information in the federated learning requirements; and according to the target information, and the templates corresponding to the constraint definition, the collaboration strategy definition, the state list definition, the state transition definition and the entity authority definition, respectively, the multi-node collaboration relationship of the federated learning is obtained and output; the target information is information related to the collaboration relationship definition.
4. The method according to claim 1, characterized in that: The second largest language model is obtained as follows: Inputting a nested relationship definition into a large language model; wherein the nested relationship definition includes a concept and a representation of a nested relationship, wherein the concept of the nested relationship is that the nested relationship represents a calling relationship between a parent process and a child process; A federated learning analysis example is input into the large language model to obtain a second large language model; wherein the federated learning analysis example includes: an event log example and a nested relationship example corresponding to the event log example.
5. The method according to claim 4, characterized in that When the second largest language model is a multimodal large language model, the federated learning analysis example further includes: a nested relationship tree example corresponding to the event log example.
6. The method according to any one of claims 4 or 5, characterized in that: The collaborative workflow of the federated learning is obtained based on the federated learning event log by using the second largest language model, including: Inputting the federated learning event log into the second largest language model, so that the second largest language model analyzes the federated learning event log, obtains and outputs a nested relationship corresponding to the federated learning event log; Based on the nested relationship corresponding to the federated learning event log, a collaborative workflow corresponding to the federated learning is arranged.
7. The method according to claim 6, characterized in that The method further comprises: Obtaining a target federated learning event for federated learning, where the target federated learning event is a federated learning event that requires collaborative workflow sequencing; The inputting the federated learning event log into the second largest language model so that the second largest language model analyzes the federated learning event log, obtains and outputs a nested relationship corresponding to the federated learning event log, including: Inputting the federated learning event log and the target federated learning event into the second largest language model, so that the second largest language model analyzes the target federated learning event in the federated learning event log, obtains and outputs a nested relationship between the target federated learning events; The step of arranging the collaborative workflow corresponding to the federated learning based on the nested relationship corresponding to the federated learning event log includes: Based on the nested relationship between the target federated learning events, a collaborative workflow corresponding to the federated learning is arranged.
8. The method according to claim 1, characterized in that The federated learning event log is obtained in the following way: Get local event logs of multiple nodes in federated learning; The events in the local event logs of the multiple nodes are sorted in chronological order to obtain corresponding federated learning event logs.
9. A device for constructing a collaborative architecture, characterized in that: include: A federated data acquisition module, used to acquire federated learning requirements described in natural language and federated learning event logs; the federated learning requirements include all technical and business requirements involved in the federated learning; A collaboration relationship building module, used to obtain a multi-node collaboration relationship of the federated learning based on the federated learning requirements described in the natural language through a first large language model; the first large language model is a large language model that receives the collaboration relationship definition in advance; A collaborative workflow construction module, configured to obtain a collaborative workflow of the federated learning based on the federated learning event log by using a second large language model; the second large language model is a large language model that pre-receives a nested relationship definition and a nested relationship analysis example; A collaborative architecture building module is used to obtain the collaborative framework of the federated learning based on the multi-node collaborative relationship and the collaborative workflow.
10. The device according to claim 9, characterized in that The collaboration relationship definition includes: restriction definition, collaboration strategy definition, state list definition, state transition rule definition, and entity authority definition; the first language model is obtained in the following way: The restriction definition, the collaboration strategy definition, the state list definition, the state transition rule definition and the entity authority definition are respectively input into the large language model in the form of their corresponding templates to obtain a first large language model.
Citation Information
Patent Citations
Cloud high-performance scientific calculation workflow design control system and user graphical interface
CN112162727A
Federal learning model generation method and device, computer equipment and storage medium
CN113435608A
Deepfake traceability system based on big data federated learning architecture
CN113723220A
Federal learning framework for electric power metering system
CN117669702A
Multi-dimensional data analysis method and system based on manufacturing industry value chain joint large model
CN118411035A
