Personalized federal learning method for pipeline instrument flow chart

Through personalized federated learning methods, integrating and mapping pipeline instrument flow chart standards for each enterprise, and using object detection and text recognition models to build a knowledge graph, it solves the problem of difficult to take into account data privacy and personalized standards adaptability in the existing technology, and achieves efficient model training and generalization capabilities.

CN119992286APending Publication Date: 2025-05-13CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510089744.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

It is difficult for the prior art to establish a pipeline instrument flowchart model that adapts to the personalized standards of different enterprises while ensuring data privacy.

Method used

Using a personalized federated learning method for pipeline instrument flow charts, the local legend standards are sent to the central server through the client node, the legend standards of each client are integrated and mapped, the object detection and text recognition models are used to identify the text in the drawing, the knowledge graph is built, and the knowledge graph embedding model is trained under the federated learning framework.

Benefits of technology

It realizes model training that adapts to the personalized standards of different enterprises while ensuring data privacy, and improves the generalization ability of the model and its performance ability in single enterprise standard task scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119992286A_ABST
    Figure CN119992286A_ABST
Patent Text Reader

Abstract

The invention provides a personalized federal learning method for a pipeline instrument flow chart. When a PID drawing is used for knowledge graph model training, the problems of insufficient local training data and inconsistent joint training standards are often encountered, and the generalization ability and the individuation ability of the model are influenced. The method comprises the following steps: establishing a mapping relation between a local PID legend standard and a global PID legend standard by introducing a federated learning framework; constructing a triple by using the extracted knowledge corresponding PID legend standard by using a target detection and character recognition technology, and forming a local knowledge graph and a global knowledge graph; a federal learning method is used for training a knowledge completion model and a knowledge embedding model, drawing data from different enterprises are fully utilized, and the generalization ability of the models is improved while the privacy of the drawing data is protected; personalized training is carried out based on a federal training result, so that the extracted knowledge is ensured to benefit from other node data, and meanwhile, the personalized requirements of each enterprise are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of federated learning, and in particular relates to a personalized federated learning method for pipeline instrument flow charts. Background Art

[0002] In engineering design, the Piping and Instrumentation Diagram (PID) is an important drawing data that describes how pipelines, valves, instruments and other equipment are connected and interact. When designing a new project, it is necessary to reuse historical drawings, use target detection and knowledge graph technology to model, and extract knowledge from the piping and instrumentation diagram. However, it is usually difficult for a single enterprise to accumulate enough PID diagram data and establish a model with broad adaptability. Traditional solutions gather PID diagram databases from multiple companies for centralized training.

[0003] However, this approach has two flaws. First, the PID diagram contains the core design information of the enterprise, which is a commercial secret and cannot be directly shared with a third party for centralized training. Second, the pipeline instrument flow charts of different enterprises follow different standards, but the centralized training standards are unified and cannot fully meet personalized needs. In the prior art, there is no model training method for pipeline instrument flow charts that can ensure data privacy and adapt to the personalized standards of each enterprise. Summary of the invention

[0004] In view of the above problems, the present invention provides a personalized federated learning method for pipeline instrument flow charts, comprising the following steps:

[0005] S1, in the preparation phase, client node i sends the local legend standard D i L To the central server node; for each client node i, its local data set is recorded as D i ={{D i 1,…,D i j ,…,D i ni},D i L}, where D i j D i A drawing in i Indicates the number of drawings, D i L Specifies the client's local drawing dataset D i Graphic styles and corresponding text labels of the equipment, instruments, valves and pipelines involved;

[0006] S2, the central server node integrates the local legend standard D of each client L ={D 1 L ,…,D i L ,…,D N L}, respectively with the global legend standard D G Establish a mapping, obtain each client mapping table M = {M 1 ,…,M i ,…,M N}, M i Send back the corresponding client node i; the global legend standard D G It is the graphic style and corresponding text logo of equipment, instruments, valves and pipelines stipulated by the state or manually specified, and N is the number of clients;

[0007] S3, on each client node i, use the target detection model and the text recognition model to recognize the text in the drawing and obtain the recognition result; the recognition result includes equipment, instrument, valve, pipeline type, text and coordinates;

[0008] S4, on each client node i, based on each drawing D i j The recognition results are used to construct triples and saved as local knowledge graph K i jl , and according to the mapping table M i , replace K i l The equipment and pipeline information in the i jg ;

[0009] S5, entering the federated learning training phase, the server node first initializes the global knowledge graph embedding model W D and the global entity knowledge embedding vector E G , each client node initializes the local knowledge graph embedding model W i E ;

[0010] S6, the global model W D Send it to each client node to get the knowledge graph embedding model W of client i i D , refer to the mapping table M i , embedding the entity knowledge related to client i into the vector Send it to each client node;

[0011] S7, on client node i, using the global knowledge graph dataset K i g ={K i 1g ,…,K i jg ,…,K i nig}, train the local knowledge graph completion model W i E and the knowledge graph embedding model W i D , and obtain the entity knowledge embedding E i G and relational knowledge embedding R i G , E i G and W i D Delivered to the central server node; the knowledge is embedded in the set E i G and R i G , is the local knowledge graph completion model W i E Output:

[0012] S8, server node based on the model W of client nodes i E and entity knowledge embedding E i G , embedding and fusing the model and entity knowledge to obtain the global model W D and global knowledge embedding E G ;

[0013] S9, repeat the process from S6 to S8 until the global model converges;

[0014] S10, on each client node i, uses the local knowledge graph dataset K i l ={K i 1l ,…,K i jl ,…,K i nil}, in the global model W D and global knowledge embedding E G With the help of , personalized training of local knowledge graph completion model W i e and the knowledge graph embedding model W i d .

[0015] Preferably, the global legend standard D in step S2 G The construction process is:

[0016] Select the appropriate national legend standard D G , so that it can surrogate to the local legend standard set D of all clients L ={D 1 L ,…,D i L ,…,D N L}; If the legend set D L There is a legend in that cannot be mapped to the standard legend D G , it should be manually added to the standard legend D G middle.

[0017] Preferably, the construction process of each client mapping table M in step S2 is:

[0018] For each client i, the local legend standard D i L , get the text code of the legend, for each code name L , construct a mapping {name L :name G}, name G Yes D G The text code in; D i L The mapping of all legends in is recorded as mapping table M i , M of all clients i Constitute M.

[0019] Preferably, the local knowledge graph K in step S4 i jl The structural information is:

[0020] For each client i, the local knowledge graph K i jl , which constitutes a triple<h,r,t> Total S i e entity types and S i r types of relationships; h is the head node, t is the tail node, r is the relationship between the two, S i e That is, local legend standard D i L Types of equipment, valves and instruments in S i r That is, local legend standard D i LTypes of pipelines in.

[0021] Preferably, the global knowledge graph K in step S4 i jg The structural information is:

[0022] The global knowledge graph K of each client i i jg , which constitutes a triple<h,r,t> Total S e entity types and S r types of relationships; h is the head node, t is the tail node, r is the relationship between the two, S e That is, the global legend standard D G Types of equipment, valves and instruments in S r That is, the global legend standard D G Types of pipelines in.

[0023] Preferably, the local knowledge graph completion model W in step S7 i E Using graph convolutional neural network, local knowledge graph embedding model W i D Using the ConvE model, the graph convolutional neural network module can optimize the local entity knowledge embedding E in the knowledge graph. i G and relational knowledge embedding R i G , the ConvE model can be used for any possible triple<h,r,t> Scoring, capturing connections between entities and relations:

[0024] Client i’s local knowledge graph completion model W i E and the local knowledge graph embedding model W i D The specific training process is:

[0025] S71, the local drawing data D i ={{D i 1,…,D i j ,…,D i ni},D i L}Identified and mapped knowledge graph {K i jg} j=1,...,ni Merge to form a data set, and divide the training set and test set into a ratio of 7:3;

[0026] S72, each client initializes the local knowledge graph completion model Wi E and relational knowledge embedding R i G , receive the knowledge graph embedding model W from the server D and entity knowledge embedding E G , let the local knowledge graph embedding model W i D =W D , local entity knowledge embedding E i G =E G , the learning rate is set to 0.001, and the optimizer uses AdamW;

[0027] S73, perform t rounds of iterations, the iteration process is from S74 to S79;

[0028] S74, randomly select w knowledge graphs from the training set and merge them into a graph G;

[0029] S75, receiving W from the server D and E G , let W i D =W D , E i G =E G ;

[0030] S76, according to the graph structure indicated by graph G, use the local knowledge graph to complete the model W i E Update and save local entity knowledge embedding E i G and relational knowledge embedding R i G ;

[0031] S77, randomly select triples in graph G<h,r,t> As positive samples, randomly generate triples that do not exist in graph G<h’,r’,t’> As negative samples, the knowledge embeddings of the triplets are concatenated and input into the local knowledge graph embedding model W i D , obtain the probability prediction of the establishment of the triple;

[0032] S78, using the binary cross entropy loss function, calculates the loss for positive and negative samples separately and adds them together;

[0033] S79, calculate the model gradient, and use the AdamW optimizer to update and save the model W i E and W i D , upload W i D and Ei G to the server.

[0034] Preferably, the specific process of embedding and fusing the model and entity knowledge in step S8 is as follows:

[0035] S81, in each round of federated learning, the server receives local entity knowledge embedding W uploaded by N clients i D , calculate the global knowledge graph embedding model

[0036] S82, in each round of federated learning, the server receives the local knowledge graph embedding set E uploaded by N clients i G , Standard Legend D G Each entity in corresponds to a knowledge embedding e G , reversed from the mapping table M and e G Related client knowledge embedded i G YesN e , calculate the global knowledge graph embedding of the entity For standard illustration D G All entities in the same way are calculated to form the global knowledge graph embedding set E G ;

[0037] Preferably, the personalized knowledge completion model W in step S10 i e Using graph convolutional neural networks, personalized knowledge embedding model W i d Using the ConvE model, with W i E and W i D Stay consistent:

[0038] Personalized local knowledge graph completion model W for client i i e and the local knowledge graph embedding model W i d The specific training process is:

[0039] S101, the local drawing data D i ={{D i 1,…,D i j ,…,D i ni},D i L}Recognized local knowledge graph {K i jl} j=1,...,ni Merge to form a data set, and divide the training set and test set into a ratio of 7:3;

[0040] S102, each client randomly initializes a personalized knowledge completion model W i e , vector prediction model W i f , personalized entity knowledge embedding E i g and personalized relational knowledge embedding R i g ;W i f It consists of two layers of fully connected neural networks, with the input being the personalized entity knowledge embedding E i g , used to predict the global knowledge embedding E i G ; Personalized knowledge embedding model W i d Initialized to the federated learning training result W i D , the learning rate is set to 0.001, and the optimizer uses AdamW;

[0041] S103, perform Q rounds of iterations, the iteration process is from S104 to S109;

[0042] S104, randomly select w knowledge graphs from the training set and merge them into a graph G;

[0043] S105, according to the graph structure indicated by graph G, use W i e Update and save personalized entity knowledge embedding E i g and personalized relational knowledge embedding R i g ;

[0044] S106, randomly select triples in graph G<h,r,t> As positive samples, randomly generate triples that do not exist in graph G<h’,r’,t’> As negative samples, the knowledge embeddings of the triplets are concatenated and input into the local knowledge graph embedding model W i d , obtain the probability prediction of the establishment of the triple;

[0045] S107, using the binary cross entropy loss function, calculate the loss for positive and negative samples respectively and add them up to get the triple prediction loss L p ;

[0046] S108, E i gInput model W i f , using the input result and E i G Calculate the cosine similarity and get the global regularization loss Lλ;

[0047] S109, using the final loss L = L p +α*L λ Calculate the model gradient and update and save the model W using the AdamW optimizer i e , W i f and W i d .

[0048] Beneficial effects: Compared with the prior art, the present invention provides a model training method for pipeline instrument flow charts, which has the following beneficial effects:

[0049] 1. The traditional centralized training method requires multiple companies to share drawing data, which brings the risk of privacy leakage when it comes to core design information. The present invention introduces a federated learning framework to keep the data locally for processing, and only share model updates and embedding vectors. This method ensures the data privacy and security of the enterprise and avoids the leakage of sensitive information. At the same time, federated learning can realize collaborative training among different enterprises, make full use of data resources from multiple enterprises, and improve the generalization ability of the model.

[0050] 2. The design standards of pipeline instrument flow charts vary among different enterprises. Traditional methods usually use standardized legends in a unified manner, which cannot meet the personalized needs of enterprises. The present invention uses a mapping mechanism between global legend standards and local legend standards, and uses global legend standards to provide a basis for joint model training. At the same time, each enterprise can use the joint model to guide the local model and use local legend standards for personalized training, thus achieving a balance between standardization and personalization, so that the knowledge extraction results can adapt to the legend standards of a single enterprise, and improve the performance of the model in a single enterprise standard task scenario.

[0051] 3. The present invention innovatively applies graph convolutional neural network (GCN) and ConvE model to the field of knowledge extraction of pipeline instrument flow charts, which can perform efficient embedding learning and completion on the knowledge graph of the drawing. GCN can extract rich graph features from the structure of nodes and edges through multi-layer information transmission, and provide accurate node embedding and relationship embedding for knowledge graph completion; while the ConvE model captures the complex nonlinear interactions between entities and relationships through convolution operations, thereby improving the prediction ability of triples in the knowledge graph. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 A personalized federated learning model training flowchart for pipeline instrumentation flow charts constructed for the present invention.

[0053] Figure 2 The following are some examples of legends taken from two different PID legend standards.

[0054] Figure 3 This is the training flow chart of the federated learning proposed in the present invention.

[0055] Figure 4 This is a specific structural diagram of the personalized federated learning model proposed in the present invention. DETAILED DESCRIPTION

[0056] The invention will be further described below in conjunction with specific embodiments.

[0057] Embodiment 1:

[0058] The present invention is based on a specific pipeline instrument flow diagram (PID) diagram, combined with Figures 1 to 4 , the specific workflow of the model training method for pipeline instrument flow chart of the present invention is described:

[0059] S1, in the preparation phase, client node i sends the local legend standard D i L To the central server node; for each client node i, its local PID drawing data set is recorded as D i ={{D i 1,…,D i j ,…,D i ni},D i L}, where D i j D i A drawing in i Indicates the number of drawings, D i L Specifies the client's local drawing dataset D i Graphic styles and corresponding text labels of the equipment, instruments, valves and pipelines involved;

[0060] S2, the central server node integrates the local legend standard D of each client L ={D 1 L ,…,D i L ,…,D N L}, respectively with the global legend standard D G Establish a mapping, obtain each client mapping table M = {M1 ,…,M i ,…,M N}, M i Send back the corresponding client node i; the global legend standard D G It is the graphic style and corresponding text logo of equipment, instruments, valves and pipelines stipulated by the state or manually specified, and N is the number of clients;

[0061] like Figure 2 As shown, Figure 2 (a) and Figure 2 (b) is the PID legend standard held by the two clients, which contains different legends. The global legend standard D G The appropriate national legend standard should be selected G , try to make it surreptitiously projected to the local legend standard set D of all clients L ={D 1 L ,…,D i L ,…,D N L}, that is, D G Should include Figure 2 (a) and Figure 2 (b) All legend contents; due to Figure 2 (a) includes most Figure 2 The legend in (b) can be set Figure 2 (a) is the global legend standard D G ; If the legend set D L There are still legends in that cannot be mapped to the standard legend D G , then manually add it to the standard legend D G In Figure 2 (b) The legend in the dashed box does not exist in Figure 2 (a), so we set Figure 2 (a) is the global legend standard D G After that, you need to add the legend in the dotted box to D G middle;

[0062] For each client i, the local legend standard D i L , get the text code of the legend, for each code name L , construct a mapping {name L :name G}, name G Yes D G The text code in; D i L The mapping of all legends in is recorded as mapping table M i, M of all clients i constitute M; as in Figure 2 (a) and Figure 2 In (b), the legends in the oval boxes are the same, but the text codes are different, so set Figure 2 (a) is the global legend standard D G After that, Figure 2 (b) For the client corresponding to the standard, it is necessary to construct a mapping {"Tank":"Tank1"}.

[0063] S3, on each client node i, use the target detection model and the text recognition model to recognize the text in the drawing and obtain the recognition result; the recognition result includes equipment, instrument, valve, pipeline type, text and coordinates;

[0064] S4, on each client node i, based on each drawing D i j The recognition results are used to construct triples and saved as local knowledge graph K i jl , and according to the mapping table M i , replace K i l The equipment and pipeline information in the system is saved as the global knowledge graph K i jg ;

[0065] For each client i, the local knowledge graph K i jl , which constitutes a triple<h,r,t> Total S i e entity types and S i r types of relationships; h is the head node, t is the tail node, r is the relationship between the two, S i e That is, local legend standard D i L Types of equipment, valves and instruments in S i r That is, local legend standard D i L Types of pipelines in

[0066] The global knowledge graph K of each client i i jg , which constitutes a triple<h,r,t> Total S e entity types and S r types of relationships; h is the head node, t is the tail node, r is the relationship between the two, S e That is, the global legend standard D GTypes of equipment, valves and instruments in S r That is, the global legend standard D G Types of pipelines in.

[0067] S5, entering the federated learning training phase, the server node first initializes the global knowledge graph embedding model W D and the global entity knowledge embedding vector E G , each client node initializes the local knowledge graph embedding model W i E ;

[0068] S6, the global model W D Send it to each client node to get the knowledge graph embedding model W of client i i D , refer to the mapping table M i , embedding the entity knowledge related to client i into the vector Send it to each client node;

[0069] S7, on client node i, using the global knowledge graph dataset K i g ={K i 1g ,…,K i jg ,…,K i nig}, train the local knowledge graph completion model W i E and the knowledge graph embedding model W i D , and obtain the entity knowledge embedding E i G and relational knowledge embedding R i G , E i G and W i D Delivered to the central server node; the knowledge is embedded in the set E i G and R i G , is the local knowledge graph completion model W i E Output:

[0070] Local knowledge graph completion model W i E Using graph convolutional neural network, local knowledge graph embedding model W i D Use the ConvE model, such as Figure 3As shown in Figure 2, the graph convolutional neural network module can optimize the local entity knowledge embedding E in the knowledge graph. i G and relational knowledge embedding R i G , the ConvE model can be used for any possible triple<h,r,t> Scoring,captures the connections between entities and relations.

[0071] like Figure 3 As shown, the local knowledge graph completion model W of client i i E and the local knowledge graph embedding model W i D The specific training process is:

[0072] S71, the local drawing data D i ={{D i 1,…,D i j ,…,D i ni},D i L}Identified and mapped knowledge graph {K i jg} j=1,...,ni Merge to form a data set, and divide the training set and test set into a ratio of 7:3;

[0073] S72, each client initializes the local knowledge graph completion model W i E and relational knowledge embedding R i G , receive the knowledge graph embedding model W from the server D and entity knowledge embedding E G , let the local knowledge graph embedding model W i D =W D , local entity knowledge embedding E i G =E G , the learning rate is set to 0.001, and the optimizer uses AdamW;

[0074] S73, perform t rounds of iterations, the iteration process is from S74 to S79;

[0075] S74, randomly select w knowledge graphs from the training set and merge them into a graph G;

[0076] S75, receiving W from the server D and E G , let W i D =WD , E i G =E G ;

[0077] S76, according to the graph structure indicated by graph G, use the local knowledge graph to complete the model W i E Update and save local entity knowledge embedding E i G and relational knowledge embedding R i G ;

[0078] S77, randomly select triples in graph G<h,r,t> As positive samples, randomly generate triples that do not exist in graph G<h’,r’,t’> As negative samples, the knowledge embeddings of the triplets are concatenated and input into the local knowledge graph embedding model W i D , obtain the probability prediction of the establishment of the triple;

[0079] S78, using the binary cross entropy loss function, calculates the loss for positive and negative samples separately and adds them together;

[0080] S79, calculate the model gradient, and use the AdamW optimizer to update and save the model W i E and W i D , upload W i D and E i G to the server.

[0081] S8, server node based on the model W of client nodes i E and entity knowledge embedding E i G , embedding and fusion of model and entity knowledge to obtain the global model W D and global knowledge embedding E G ;

[0082] like Figure 3 As shown on the server side, the specific process of embedding and fusion of model and entity knowledge is as follows:

[0083] S81, in each round of federated learning, the server receives local entity knowledge embedding W uploaded by N clients i D , calculate the global knowledge graph embedding model

[0084] S82, in each round of federated learning, the server receives the local knowledge graph embedding set E uploaded by N clientsi G , Standard Legend D G Each entity in corresponds to a knowledge embedding e G , reversed from the mapping table M and e G Related client knowledge embedded i G YesN e , calculate the global knowledge graph embedding of the entity For standard illustration D G All entities in the same way are calculated to form the global knowledge graph embedding set E G ;

[0085] S9, repeat the process from S6 to S8 until the global model converges;

[0086] S10, on each client node i, uses the local knowledge graph dataset K i l ={K i 1l ,…,K i jl ,…,K i nil}, in the global model W D and global knowledge embedding E G With the help of , personalized training of local knowledge graph completion model W i e and the knowledge graph embedding model W i d ;

[0087] Personalized knowledge completion model W i e Using graph convolutional neural networks, personalized knowledge embedding model W i d Using the ConvE model, with W i E and W i D Stay consistent:

[0088] like Figure 4 As shown in the figure, the personalized local knowledge graph completion model W of client i i e and the local knowledge graph embedding model W i d The specific training process is:

[0089] S101, the local drawing data D i ={{D i 1,…,D i j ,…,Di ni},D i L}Recognized local knowledge graph {K i jl} j=1,...,ni Merge to form a data set, and divide the training set and test set into a ratio of 7:3;

[0090] S102, each client randomly initializes a personalized knowledge completion model W i e , vector prediction model W i f , personalized entity knowledge embedding E i g and personalized relational knowledge embedding R i g ;W i f It consists of two layers of fully connected neural networks, with the input being the personalized entity knowledge embedding E i g , used to predict the global knowledge embedding E i G ; Personalized knowledge embedding model W i d Initialized to the federated learning training result W i D , the learning rate is set to 0.001, and the optimizer uses AdamW;

[0091] S103, perform Q rounds of iterations, the iteration process is from S104 to S109;

[0092] S104, randomly select w knowledge graphs from the training set and merge them into a graph G;

[0093] S105, according to the graph structure indicated by graph G, use W i e Update and save personalized entity knowledge embedding E i g and personalized relational knowledge embedding R i g ;

[0094] S106, randomly select triples in graph G<h,r,t> As positive samples, randomly generate triples that do not exist in graph G<h’,r’,t’> As negative samples, the knowledge embeddings of the triplets are concatenated and input into the local knowledge graph embedding model W i d , obtain the probability prediction of the establishment of the triple;

[0095] S107, using the binary cross entropy loss function, calculate the loss for positive and negative samples respectively and add them up to get the triple prediction loss L p ;

[0096] S108, E i g Input model W i f , using the input result and E i G Calculate the cosine similarity and get the global regularization loss L λ ;

[0097] S109, using the final loss L = L p +α*L λ Calculate the model gradient and update and save the model W using the AdamW optimizer i e , W i f and W i d .

Claims

1. A personalized federated learning method for pipeline instrument flow charts, characterized in that: The following steps are involved: S1, in the preparation phase, client node i sends the local legend standard D i L To the central server node; for each client node i, its local data set is recorded as D i ={{D i 1,…,D i j ,…,D i ni },D i L }, where D i j D i A drawing in i Indicates the number of drawings, D i L Specifies the client's local drawing dataset D i Graphic styles and corresponding text labels of the equipment, instruments, valves and pipelines involved; S2, the central server node integrates the local legend standard D of each client L ={D 1 L ,…,D i L ,…,D N L }, respectively with the global legend standard D G Establish a mapping, obtain each client mapping table M = {M 1 ,…,M i ,…,M N }, M i Send back the corresponding client node i; the global legend standard D G It is the graphic style and corresponding text logo of equipment, instruments, valves and pipelines stipulated by the state or manually specified, and N is the number of clients; S3, on each client node i, use the target detection model and the text recognition model to recognize the text in the drawing and obtain the recognition result; the recognition result includes equipment, instrument, valve, pipeline type, text and coordinates; S4, on each client node i, based on each drawing D i j The recognition results are used to construct triples and saved as local knowledge graph K i jl , and according to the mapping table M i , replace K i l The equipment and pipeline information in the i jg ; S5, entering the federated learning training phase, the server node first initializes the global knowledge graph embedding model W D and the global entity knowledge embedding vector E G , each client node initializes the local knowledge graph embedding model W i E ; S6, the global model W D Send it to each client node to get the knowledge graph embedding model W of client i i D , refer to the mapping table M i , embedding the entity knowledge related to client i into the vector Send it to each client node; S7, on client node i, using the global knowledge graph dataset K i g ={K i 1g ,…,K i jg ,…,K i nig }, train the local knowledge graph completion model W i E and the knowledge graph embedding model W i D , and obtain the entity knowledge embedding E i G and relational knowledge embedding R i G , E i G and W i D Delivered to the central server node; the knowledge is embedded in the set E i G and R i G , is the local knowledge graph completion model W i E Output: S8, server node based on the model W of client nodes i E and entity knowledge embedding E i G , embedding and fusion of model and entity knowledge to obtain the global model W D and global knowledge embedding E G ; S9, repeat the process from S6 to S8 until the global model converges; S10, on each client node i, uses the local knowledge graph dataset K i l ={K i 1l ,…,K i jl ,…,K i nil }, in the global model W D and global knowledge embedding E G With the help of , personalized training of local knowledge graph completion model W i e and the knowledge graph embedding model W i d .

2. A personalized federated learning method for pipeline instrument flow charts as claimed in claim 1, characterized in that: The global legend standard D in step S2 G The construction process of each client mapping table M is: Select the appropriate national legend standard D G , so that it can surrogate to the local legend standard set D of all clients L ={D 1 L ,…,D i L ,…,D N L }; If the legend set D L There is a legend in that cannot be mapped to the standard legend D G , it should be manually added to the standard legend D G middle; For each client i, the local legend standard D i L , get the text code of the legend, for each code name L , construct a mapping {name L :name G }, name G Yes D G The text code in; D i L The mapping of all legends in is recorded as mapping table M i , M of all clients i Constitute M.

3. A personalized federated learning method for pipeline instrument flow diagrams as claimed in claim 1, characterized in that: The local knowledge graph K in step S4 i jl and the global knowledge graph K i jg The structural information is: For each client i, the local knowledge graph K i jl , which constitutes a triple<h,r,t> Total S i e entity types and S i r types of relationships; h is the head node, t is the tail node, r is the relationship between the two, S i e That is, local legend standard D i L Types of equipment, valves and instruments in S i r That is, local legend standard D i L Types of pipelines in The global knowledge graph K of each client i i jg , which constitutes a triple<h,r,t> Total S e entity types and S r types of relationships; h is the head node, t is the tail node, r is the relationship between the two, S e That is, the global legend standard D G Types of equipment, valves and instruments in S r That is, the global legend standard D G Types of pipelines in .

4. A personalized federated learning method for pipeline instrument flow diagrams as claimed in claim 1, characterized in that: The local knowledge graph completion model W in step S7 i E Using graph convolutional neural network, local knowledge graph embedding model W i D Using the ConvE model, the graph convolutional neural network module can optimize the local entity knowledge embedding E in the knowledge graph. i G and relational knowledge embedding R i G , the ConvE model can be used for any possible triple<h,r,t> Scoring, capturing connections between entities and relations: Client i’s local knowledge graph completion model W i E and the local knowledge graph embedding model W i D The specific training process is: S71, the local drawing data D i ={{D i 1,…,D i j ,…,D i ni },D i L }Identified and mapped knowledge graph {K i jg } j=1,...,ni Merge to form a data set, and divide the training set and test set into a ratio of 7:3; S72, each client initializes the local knowledge graph completion model W i E and relational knowledge embedding R i G , receive the knowledge graph embedding model W from the server D and entity knowledge embedding E G , let the local knowledge graph embedding model W i D =W D , local entity knowledge embedding E i G =E G , the learning rate is set to 0.001, and the optimizer uses AdamW; S73, perform t rounds of iterations, the iteration process is from S74 to S79; S74, randomly select w knowledge graphs from the training set and merge them into a graph G; S75, receiving W from the server D and E G , let W i D =W D , E i G =E G ; S76, according to the graph structure indicated by graph G, use the local knowledge graph to complete the model W i E Update and save local entity knowledge embedding E i G and relational knowledge embedding R i G ; S77, randomly select triples in graph G<h,r,t> As positive samples, randomly generate triples that do not exist in graph G<h’,r’,t’> As negative samples, the knowledge embeddings of the triplets are concatenated and input into the local knowledge graph embedding model W i D , obtain the probability prediction of the establishment of the triple; S78, using the binary cross entropy loss function, calculates the loss for positive and negative samples separately and adds them together; S79, calculate the model gradient, and use the AdamW optimizer to update and save the model W i E and W i D , upload W i D and E i G to the server.

5. The personalized federated learning method for pipeline instrument flow diagrams according to claim 1, characterized in that: The specific process of embedding and fusing the model and entity knowledge in step S8 is as follows: S81, in each round of federated learning, the server receives local entity knowledge embedding W uploaded by N clients i D , calculate the global knowledge graph embedding model S82, in each round of federated learning, the server receives the local knowledge graph embedding set E uploaded by N clients i G , Standard Legend D G Each entity in corresponds to a knowledge embedding e G , reversed from the mapping table M and e G Related client knowledge embedded i G YesN e , calculate the global knowledge graph embedding of the entity For standard illustration D G All entities in the same way are calculated to form the global knowledge graph embedding set E G .

6. A personalized federated learning method for pipeline instrument flow diagrams as claimed in claim 1, characterized in that: The personalized knowledge completion model W in step S10 i e Using graph convolutional neural networks, personalized knowledge embedding model W i d Using the ConvE model, with W i E and W i D Stay consistent: Client i’s personalized local knowledge graph completion model W i e and the local knowledge graph embedding model W i d The specific training process is: S101, the local drawing data D i ={{D i 1,…,D i j ,…,D i ni },D i L }Recognized local knowledge graph {K i jl } j=1,...,ni Merge to form a data set, and divide the training set and test set into a ratio of 7:3; S102, each client randomly initializes a personalized knowledge completion model W i e , vector prediction model W i f , personalized entity knowledge embedding E i g and personalized relational knowledge embedding R i g ;W i f It consists of two layers of fully connected neural networks, with the input being the personalized entity knowledge embedding E i g , used to predict the global knowledge embedding E i G ; Personalized knowledge embedding model W i d Initialized to the federated learning training result W i D , the learning rate is set to 0.001, and the optimizer uses AdamW; S103, perform Q rounds of iterations, the iteration process is from S104 to S109; S104, randomly select w knowledge graphs from the training set and merge them into a graph G; S105, according to the graph structure indicated by graph G, use W i e Update and save personalized entity knowledge embedding E i g and personalized relational knowledge embedding R i g ; S106, randomly select triples in graph G<h,r,t> As positive samples, randomly generate triples that do not exist in graph G<h’,r’,t’> As negative samples, the knowledge embeddings of the triplets are concatenated and input into the local knowledge graph embedding model W i d , obtain the probability prediction of the establishment of the triple; S107, using the binary cross entropy loss function, calculate the loss for positive and negative samples respectively and add them up to get the triple prediction loss L p ; S108, E i g Input model W i f , using the input result and E i G Calculate the cosine similarity and get the global regularization loss Lλ; S109, using the final loss L = L p +α*L λ Calculate the model gradient and update and save the model W using the AdamW optimizer i e , W i f and W i d .

Citation Information

Cited By

  • Building construction safety monitoring method and system based on artificial intelligence

    CN120746803A

  • An artificial intelligence-based construction safety monitoring method and system

    CN120746803B

  • Material whole-course tracing method based on federal learning and knowledge graph

    CN122114972A

  • A Material Traceability Method Based on Federated Learning and Knowledge Graphs

    CN122114972B