A method for deploying edge digital twins based on transfer learning
By optimizing edge digital twin deployment through transfer learning, the Kuhn-Munkres algorithm, and simulated annealing algorithm, the problem of insufficient data for IIoT devices in newly built factories was solved, and high-precision digital twin construction and load balancing were achieved, thereby improving the intelligent manufacturing capabilities of the Industrial Internet of Things.
Patent Information
- Application Number
- CN202410210145.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-26
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-02-26
AI Technical Summary
In the Industrial Internet of Things (IIoT), the lack of data for IIoT devices in newly built factories leads to low accuracy in digital twin modeling, and existing technologies make it difficult to achieve low-latency, high-precision digital twin deployment on edge networks.
A method for deploying edge digital twins is designed by combining transfer learning with the Kuhn-Munkres algorithm and simulated annealing algorithm. The source domain model is trained on the edge server of the existing factory, and the matching relationship between the edge server of the new factory and IIoT devices is optimized by using the KM algorithm and simulated annealing algorithm, so as to achieve efficient migration and deployment of the source domain model.
Building high-precision digital twins in new factories balances edge server load, reduces computing resource requirements, improves model accuracy, and enables rapid and accurate digital twin deployment.
Smart Images

Figure CN118070873B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial Internet of Things digital twins, and in particular to an edge digital twin deployment method based on transfer learning, a Kuhn-Munkres algorithm and a simulated annealing algorithm; specifically, to an edge digital twin deployment method based on transfer learning. Background Art
[0002] As a key application of the Internet of Things (IoT) in the manufacturing industry, the development of the Industrial Internet of Things (IIoT) promotes the transformation of the manufacturing industry to Industry 4.0. In the Industrial Internet of Things, servers connect a large number of mobile digital IIoT devices, production machinery and industrial IIoT equipment. IIoT equipment continuously generates rich data and information, enabling production personnel to monitor, maintain and analyze the system. The key to the development of the Industrial Internet of Things is to achieve dynamic perception of the industrial environment and real-time monitoring of production status. However, the large number of heterogeneous IIoT devices in the production workshop, complex industrial conditions and dynamically changing communication environment are important challenges on the road to this realization.
[0003] Digital twins are considered to be an effective tool to solve this problem. Digital twins are virtual mirrors of physical entities in the real world in digital space, reflecting the status and changes of physical entities in real time. Digital twins built based on historical information and real-time sensor data of IIoT devices accurately and comprehensively map the entire process of production and manufacturing, and present them to production personnel through visualization technologies such as AR and VR, and also build a system based on real-time data decision-making. By combining with artificial intelligence, digital twins also analyze historical information to predict the future behavior and status of production IIoT equipment, and then identify potential problems. Artificial intelligence also provides efficient analysis tools for digital twins and provides improvement suggestions for production managers, which helps to improve factory efficiency, reduce production costs, and enable industrial operations to be more efficient. In the automotive industry, digital twins of engines or automotive parts are built, combined with artificial intelligence to simulate and predict the performance of the car during operation, which provides a very effective tool for the rational design of the structure and components of the car. To build digital twins, many companies are committed to developing software platforms that support digital twins. Siemens has developed a platform called "MindSphere", which connects a large number of machines to the cloud platform and uses billions of data streams generated by IIoT devices to build digital twins in the cloud. Another digital twin platform is a platform called "ThingWorx" developed by IBM, which is dedicated to collecting data from the Industrial Internet of Things and the Internet of Things and presenting it to users with an intuitive user interface.
[0004] Maintaining a high degree of synchronization between digital twins and physical entities requires low-latency communication, so digital twins need to be deployed on edge servers that are located closer to IIoT devices. By integrating digital twins and edge intelligence, the Industrial Internet of Things ultimately achieves computing offloading, content caching, and resource sharing for IIoT devices. To deploy digital twins on edge networks, it is necessary to fully consider the communication and computing resources of edge networks and use limited edge resources to provide users with high-quality services. Due to the existence of transmission delays and computing delays, there are inevitable errors in the mapping between digital twins and physical entities, and the errors directly affect the performance of digital twins. Therefore, reasonably designing the mapping relationship between edge servers and IIoT devices to minimize latency is the key to reducing the virtual-to-real mapping error of digital twins and achieving reliable communication.
[0005] In addition to achieving low-latency communication, the operation of digital twins requires the support of high-precision source domain models and a large amount of operating data from IIoT devices. This condition is not met in some scenarios, such as changes in the operating environment of IIoT devices or the small amount of data themselves, resulting in low modeling accuracy of digital twins. Summary of the invention
[0006] In view of the shortcomings of the prior art described above, the present invention provides an edge digital twin deployment method based on transfer learning. Combining digital twin technology, transfer learning method, Kuhn-Munkres algorithm and simulated annealing algorithm, a edge digital twin deployment scheme assisted by transfer learning under the industrial Internet of Things is designed; edge digital twins are deployed for new factories that lack data, and a source domain model with higher accuracy is built for the digital twin while reducing system latency.
[0007] To achieve the above effects, the technical solution of the present invention is as follows:
[0008] The present invention provides an edge digital twin deployment method based on transfer learning, comprising the following steps:
[0009] Step 1: The IIoT device m in the newly built factory uploads the received data to the nearest edge server for model training, and obtains the accuracy of the source domain model obtained by the IIoT device m in each factory after model training using existing samples , the data is sent to each edge server in the existing factory, and the linear fitting migration method is used to obtain the accuracy of each IIoT device m on each source domain model , obtain the migration effect of each source domain model when migrating to each IIoT device m;
[0010] Step 2: Use the KM algorithm to match the edge servers of the new factory with the edge servers of the existing factory, and use the simulated annealing algorithm to match the edge servers in the new factory with the IIoT device m; each edge server in the new factory is matched with an edge server in the existing factory;
[0011] Step 3: Transfer the source domain model in the existing factory edge server to the corresponding new factory edge server;
[0012] Step 4: According to the matching relationship between the edge server and the IIoT device m, the IIoT device m is matched with the corresponding new factory edge server and the data is uploaded; the edge server in the new factory migrates the received source domain model to the matching IIoT device m and builds a source domain model for the IIoT device m;
[0013] Step 5: In the newly built factory, the edge server uses the source domain model and combines the data uploaded by the IIoT device m to build a digital twin for the matching IIoT device m.
[0014] Furthermore, the edge digital twin deployment method is divided into three parts:
[0015] The first part is the IIoT devices in the new factory and the new factory edge server n The matching between them is called the end-edge matching model; IIoT device m uploads its real-time communication data to the new factory edge server n New factory edge server n Utilize the data of IIoT device m to build and maintain a digital twin for IIoT device m;
[0016] The second part is the existing factory edge server l The matching between the edge server n and the new factory edge server is called the edge-to-edge matching model; the trained source domain model is selected from the existing factory edge server l and the source domain model is transmitted to the new factory edge server n;
[0017] The third part is model migration. After receiving the source domain model, the new factory edge server n uses transfer learning to migrate the received source domain model to each matching IIoT device m.
[0018] New factory deployment Edge servers and There are IIoT devices m, denoted as and ; In the existing factories there are Existing factory edge servers l , recorded as ;
[0019] The data sample of IIoT device m is recorded as , the existing factory edge server The source domain model in .
[0020] Furthermore, the end-edge matching model is: the new factory edge server n Match with IIoT device m, and the matching relationship is recorded as:
[0021] The match is a one-to-many match, where is a binary matching variable, when New Factory Edge Server When matching with IIoT device m New Factory Edge Server There is no match with IIoT device m; since an IIoT device m only matches one edge server, there is , ;
[0022] To balance the new factory edge server The workload between them, introduces Jain's fairness index as a new factory edge server Load balancing metrics:
[0023] in, Edge Server for New Factory The number of matched IIoT devices m, i.e. ; In the new factory, the new factory edge server The transmission rate between and IIoT device m is calculated by the following formula: in, is the transmission power of IIoT device m, IIoT devices and new factory edge servers The channel gain between is the Gaussian white noise power per Hz; D For bandwidth.
[0024] Furthermore, the edge-to-edge matching model is: the new factory edge server n and existing factory edge servers l The matching relationship is recorded as:
[0025] Edge-edge matching is a one-to-many matching where is a binary matching variable, when Existing factory edge servers and new factory edge servers Match, when Existing factory edge servers No and new factory edge servers Match; Since each new factory edge server n obtains the source domain model from an existing factory edge server, there is , ;
[0026] Existing factory edge servers and new factory edge servers The transmission rate between is calculated by the following formula: in, For existing factory edge servers The transmission power of For existing factory edge servers and new factory edge servers The channel gain between
[0027] Transfer learning model: Indicates that the source domain model Data samples migrated to edge IIoT devices The total migration effect of all IIoT devices m in the new factory It is expressed as the mean value of the migration effect of all IIoT devices m, and its calculation formula is: ;
[0028] The optimization equation for the new factory edge server n is expressed as: st ,if ,if in, represents the weight coefficient, S dev Represents a collection of IIoT devices m; constraints Ensure that an IIoT device m only matches one new factory edge server n; Constraint Ensure that the new factory edge server n only receives data from one existing factory edge server l Receive source domain model; Constraints Guarantee the existing factory edge server l Only transfer the source domain model to the edge servers in a limited number of new factories; Constraint Ensure that the accuracy of the migration network on the IIoT device m sample data is not lower than the preset threshold; Constraint Ensure that the transmission rate between the new factory edge server n and the IIoT device m is not lower than the preset threshold; constraint Guarantee the existing factory edge server l The transmission rate with the new factory edge server n is not lower than the preset threshold.
[0029] Furthermore, to solve the edge-edge matching , use KM algorithm to search for the optimal edge-edge matching ; Assume end-edge matching Known, the load balance ℬ is determined, the edge-to-edge matching problem is a one-to-many matching problem and the optimization goal is , convert the edge-edge matching model into the maximum complete matching problem of the bipartite graph, define the weight of the bipartite graph, and use the KM algorithm to solve the matching problem;
[0030] For the maximum complete matching of a bipartite graph, the definition is as follows: Definition 1: If the graph All vertices of are divided into two disjoint subsets , , and any edge ,have , then the graph It is called a bipartite graph and is denoted by ; respectively and are two disjoint sets of a bipartite graph; if the new factory edge server and existing factory edge servers Satisfy constraints , then the new factory edge server and existing factory edge servers There is an edge between , construct a bipartite graph ,in ;
[0031] Definition 2: Given a graph A subgraph of , if for any ,have , then it is called is a match; if the matching subgraph Each vertex of is matched with an edge, then the subgraph It is a picture A perfect match for If we set a weight for each edge of G The maximum complete matching problem is defined as finding a given graph A complete matching of , the sum of all edge weights of this complete matching is the largest.
[0032] Furthermore, in the optimization of the new factory edge server n, the collection Expand to matching vertex set { | , },choose Any vertex in is equivalent to selecting an existing factory edge server , matching vertex set Each vertex of is matched only once and each existing factory edge server l matches at most Second-rate;
[0033] The constructed bipartite graph becomes ,in
[0034]
[0035] ;
[0036] Each new factory edge server n matches, then the corresponding bipartite graph Perfect match of Each point in matches; each existing server corresponds vertices, can match at most times, so each complete match Corresponding to an edge-edge matching ; Define edge The weight is to put the new factory edge server Receive the source domain model The effect after transfer learning is calculated as follows:
[0037] Calculate the perfect match The sum of all edge weights is equivalent to the optimization objective , solve the bipartite graph The maximum complete matching problem is equivalent to solving the one-to-many matching problem in source domain model migration.
[0038] Further, solving the bipartite graph The maximum complete matching process is as follows: 1) Maintain a top label value for the vertices involved in the matching , matching vertex set and The initial top labels of all points in are equal to the minimum edge weight and zero respectively; 2) Start the search at the first vertex, ; respectively and Maintain search history and ; 3) Search for matches for the new factory edge server n and find the matching vertex set Satisfied And not in Existing factory edge servers in l , if the existing factory edge server Already and If the existing factory edge server Change to Matching attempt for point Search for a match, otherwise the existing factory edge server and Point Match; 4) If the new factory edge server If not all matches are found, modify the top value; calculate , To enable and Generate new satisfaction conditions The minimum non-zero value of the edge of All the top values of the points are decreased ,Will All the top values of the points are incremented ; 5) Reset search history and , return to step 2) and re-set the point Search for matches; until new factory edge server Match; 6) Order the new factory edge server n for The next point, and return to step 2) for point Search for matches until for A point.
[0039] Furthermore, in order to achieve the optimal server matching, the simulated annealing algorithm is introduced to search for the global optimal solution in the solution space; the search process is as follows: 1) Set the temperature Equal to initial temperature , and generate random initial solutions ;
[0040] 2) The solution for the current time t Applying perturbations to generate solutions ,untie There is a certain probability of acceptance, and the acceptance probability is calculated by the Metropolis criterion:
[0041] Step 2) Repeat Second-rate;
[0042] 3) Reduce the current temperature to , return to step 2 until the current temperature is lower than the termination temperature .
[0043] Furthermore, a transfer learning method is designed in combination with the Head2Toe algorithm, so that multiple IIoT devices m share a source domain model; when using the Head2Toe algorithm for model migration, the Head2Toe algorithm has the following advantages: and domain fitness Inversely proportional, where:
[0044] In the formula, Indicates the accuracy of transfer learning using linear fitting. represents the accuracy of training the source domain model from scratch using sample data from edge IIoT device m, Indicates the accuracy obtained by using the Head2Toe algorithm for transfer learning;
[0045] When using the Head2Toe algorithm for transfer learning, the advantages of the Head2Toe algorithm are: and domain fitness Inversely proportional, and Head2Toe algorithm has advantages Proportional to the accuracy of the transfer, so domain adaptation is used To measure the migration effect,
[0046]
[0047] Furthermore, the execution process of the transfer learning method is:
[0048] 1) New factory edge server Receive the source domain model , the source domain model The output of each layer is reduced in dimension and aggregated to obtain:
[0049] In the formula, is the source domain model All features learned;
[0050] 2) Edge server for new factory Matching IIoT devices Screening features; For input for IIoT devices Construct a linear layer of the source domain model, denoted as , adding group-lasso regularization as loss, using IIoT device m The training data is updated by stochastic gradient descent ;
[0051] After reaching the preset training rounds, use Representative features scores, select the highest score Features as IIoT devices v The effective features of ;
[0052] 3) The features in are linearly combined, and the weights are Using IIoT Devices The dataset is updated by stochastic gradient descent ; After the update is completed, the source domain model By executing Working with IIoT devices , This is the output of the transfer learning network;
[0053] 4) Repeat steps 2 and 3 until the new factory edge server Every IIoT device matched Train the corresponding weights ;
[0054] 5) Repeat step 4 until each new factory edge server completes model migration.
[0055] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0056] Use transfer learning to deploy edge digital twins for new factories that lack data. Use the KM algorithm and simulated annealing algorithm to design the source domain model transmission scheme and formulate the matching relationship between the new factory edge server and IIoT device m. Build a high-precision digital twin for IIoT device m on the new factory edge server and balance the load of the edge server in the new factory.
[0057] Based on the transfer learning of the Head2Toe algorithm, a linear layer of the source domain model is constructed for each IIoT device m. Multiple IIoT devices m share one source domain model, which reduces the demand for computing resources and saves server space. The migrated source domain model achieves a higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 It is a deployment scenario diagram of edge digital twins based on transfer learning in the industrial Internet of Things of the present invention;
[0059] Figure 2 It is a schematic diagram of data analysis using the source domain model and linear layer of the present invention. DETAILED DESCRIPTION
[0060] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art will easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention is also implemented or applied through other different specific embodiments. The details in this specification are also modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0061] It should be noted that the illustrations provided in the following embodiments are only used to schematically illustrate the basic concept of the present invention. Therefore, the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component are subject to arbitrary changes, and the component layout type can also be more complex.
[0062] Example
[0063] This embodiment proposes an edge digital twin deployment method based on transfer learning. Figure 1 and Figure 2 , including the following steps:
[0064] Step 1: The IIoT device m in the newly built factory uploads the received data to the nearest edge server for model training, and obtains the accuracy of the source domain model obtained by the IIoT device m in each factory after model training using existing samples , the data is sent to each edge server in the existing factory, and the linear fitting migration method is used to obtain the accuracy of each IIoT device m on each source domain model , obtain the migration effect of each source domain model when migrating to each IIoT device m;
[0065] Step 2: Use the KM algorithm to match the edge servers of the new factory with the edge servers of the existing factory, and use the simulated annealing algorithm to match the edge servers in the new factory with the IIoT device m. The KM algorithm and the simulated annealing algorithm are performed jointly to maximize the load balancing of the edge servers of the new factory and the migration effect of the source domain model.
[0066] Each edge server in the newly built factory is matched with an existing factory edge server, and the server data matched by each existing factory edge server does not exceed the maximum limit threshold; each IIoT device m in the newly built factory is matched with a corresponding edge server; after iterative solution, the optimal matching relationship between the new factory edge server and IIoT device m, and the source domain model transmission matching relationship between the new factory and the existing factory are obtained;
[0067] Step 3: Transfer the source domain model in the existing factory edge server to the corresponding new factory edge server;
[0068] Step 4: In the newly built factory, according to the matching relationship between the edge server and the IIoT device m, the IIoT device m is matched with the corresponding edge server of the new factory and the data is uploaded; the edge server in the newly built factory migrates the received source domain model to the matching IIoT device m and builds a source domain model for the IIoT device m;
[0069] Step 5: In the newly built factory, the edge server uses the source domain model and combines the data uploaded by the IIoT device m to build a digital twin for the matching IIoT device m.
[0070] As a preferred technical solution, in this embodiment, the edge digital twin deployment method is divided into three parts:
[0071] The first part is the IIoT devices in the new factory and the new factory edge server n The matching between them is called the end-edge matching model; IIoT device m uploads its real-time communication data to the new factory edge server n New factory edge server n The data of IIoT device m is used to build and maintain a digital twin for IIoT device m. The edge server uses transfer learning to build a source domain model for each matching IIoT device m to realize various functions of the digital twin.
[0072] The second part is the existing factory edge server l The matching between the edge server n and the new factory edge server is called the edge-to-edge matching model; the trained source domain model is selected from the existing factory edge server l, and the source domain model is transferred to the new factory edge server n. The transfer learning technology is used to extract knowledge from the trained source domain model to accelerate the training of the source domain model of the new factory IIoT device m;
[0073] The third part is model migration. After receiving the source domain model, the new factory edge server n uses transfer learning to migrate the received source domain model to each matching IIoT device m.
[0074] New factory deployment Edge servers and There are IIoT devices m, denoted as and ; In the existing factories there are Existing factory edge servers l , recorded as ;
[0075] Assume that the source domain model required by the IIoT device m and the source domain model of the edge server in the existing factory have the same functions, that is, the functions of the source domain model remain unchanged before and after migration; the data sample of the IIoT device m is recorded as , the existing factory edge server The source domain model in .
[0076] As a preferred technical solution, in this embodiment, the end-edge matching model is: in order to make the IIoT device m obtain the best service quality, the new factory edge server n Match with IIoT device m, and the matching relationship is recorded as:
[0077] The match is a one-to-many match, where is a binary matching variable, when Existing factory edge servers and new factory edge servers Match, when New Factory Edge Server There is no match with IIoT device m; since an IIoT device m only matches one edge server, there is , ;
[0078] In this embodiment, the transfer learning method is a Head2Toe-based transfer learning method.
[0079] To balance the new factory edge server The workload between them, introduces Jain's fairness index as a new factory edge server Load balancing metrics:
[0080] in, Edge Server for New Factory The number of matched IIoT devices m, i.e. ; In the new factory, the new factory edge server The transmission rate between and IIoT device m is calculated by the following formula: in, is the transmission power of IIoT device m, IIoT devices and new factory edge servers The channel gain between is the Gaussian white noise power per Hz; D For bandwidth.
[0081] As a preferred technical solution, in this embodiment, the edge-to-edge matching model is: the transmission model occupies server resources, so each edge server of the existing factory can send at most The edge server in the new factory transmits the source domain model, and each edge server in the new factory receives the source domain model from an existing factory edge server; the edge server in the new factory n and existing factory edge servers l The matching relationship is recorded as: Edge-edge matching is a one-to-many matching where is a binary matching variable, when New Factory Edge Server and IIoT devices Match, when Existing factory edge servers No and new factory edge servers Match; Since each new factory edge server n obtains the source domain model from an existing factory edge server, there is , ;
[0082] Between the existing factory and the new factory, the existing factory edge server and new factory edge servers The transmission rate between is calculated by the following formula: in, For existing factory edge servers The transmission power of For existing factory edge servers and new factory edge servers The channel gain between
[0083] Transfer learning model: Indicates that the source domain model Data samples migrated to edge IIoT devices The total migration effect ℱ of all IIoT devices m in the new factory is expressed as the average of the migration effects of all IIoT devices m, and its calculation formula is: ;
[0084] Optimization target model: The end-edge matching problem and the edge-edge matching problem are coupled with each other; on the one hand, matching the IIoT device m with the new factory edge server requires knowing the edge-edge matching relationship so as to know the source domain model obtained by the new factory edge server; on the other hand, solving the edge-edge matching relationship requires considering the matching relationship between the IIoT device m and the new factory edge server; in order to maintain the real-time performance of the digital twin, the communication rate between the IIoT device m and the new factory edge server should not be lower than the required value. Under this condition, the end-edge matching and edge-edge matching considerations enable the new factory edge server n to achieve load balancing as much as possible and maximize the overall effect of transfer learning. Therefore, the optimization equation of the new factory edge server n is expressed as: st ,if ,if in, represents the weight coefficient, Sdev represents the set of IIoT devices m; constraint Ensure that an IIoT device m only matches one new factory edge server n; Constraint Ensure that the new factory edge server n only receives data from one existing factory edge server l Receive source domain model; Constraints Guarantee the existing factory edge server l Only transfer the source domain model to the edge servers in a limited number of new factories; Constraint Ensure that the accuracy of the migration network on the IIoT device m sample data is not lower than the preset threshold; Constraint Ensure that the transmission rate between the new factory edge server n and the IIoT device m is not lower than the preset threshold; constraint Guarantee the existing factory edge server l The transmission rate with the new factory edge server n is not lower than the preset threshold.
[0085] As a preferred technical solution, in this embodiment, the KM algorithm: to solve the edge-edge matching , use KM algorithm to search for the optimal edge-edge matching , maximize the sum of matching weights when the number of matches is the largest; assuming end-edge matching It is known that the load balance ℬ is certain. Solve the edge-edge matching problem. The edge-edge matching problem is a one-to-many matching problem and the optimization target is ℱ. Convert the edge-edge matching model into the maximum complete matching problem of the bipartite graph, define the weight of the bipartite graph, and use the KM algorithm to solve the matching problem.
[0086] For the maximum complete matching of a bipartite graph, the definition is as follows: Definition 1: If the graph All vertices of are divided into two disjoint subsets , , and any edge ,have , then the graph It is called a bipartite graph and is denoted by ; respectively and are two disjoint sets of a bipartite graph; if the new factory edge server and existing factory edge servers Satisfy constraints , then the new factory edge server and existing factory edge servers There is an edge between , construct a bipartite graph ,in ;
[0087] Definition 2: Given a graph A subgraph of , if for any ,have , then it is called is a match; if the matching subgraph Each vertex of is matched with an edge, then the subgraph It is a picture A perfect match for If we set a weight for each edge of G The maximum complete matching problem is defined as finding a given graph A complete matching of , the sum of all edge weights of this complete matching is the largest.
[0088] As a preferred technical solution, in this embodiment, in the optimization of the new factory edge server n, each existing server does not exceed A new factory edge server n is selected; but in the bipartite graph G In matching, whether still The points in only match one vertex; therefore, the set Expand to matching vertex set { | , },choose Any vertex in is equivalent to selecting an existing factory edge server , matching vertex set Each vertex of is matched only once and each existing factory edge server l matches at most Second-rate;
[0089] The constructed bipartite graph becomes ,in
[0090]
[0091] ;
[0092] Each new factory edge server n matches, then the corresponding bipartite graph Perfect match of Each point in matches; each existing server corresponds vertices, can match at most times, so each complete match Corresponding to an edge-edge matching ; Define edge The weight is to put the new factory edge server Receive the source domain model The effect after transfer learning is calculated as follows:
[0093] Calculate the perfect match The sum of all edge weights is equivalent to the optimization objective , solve the bipartite graph The maximum complete matching problem is equivalent to solving the one-to-many matching problem in source domain model migration.
[0094] As a preferred technical solution, in this embodiment, solving the bipartite graph The maximum complete matching process is as follows: 1) Maintain a top label value for the vertices involved in the matching , matching vertex set and The initial top labels of all points in are equal to the minimum edge weight and zero respectively; 2) Start the search at the first vertex, ; respectively and Maintain search history and ; 3) Search for matches for the new factory edge server n and find the matching vertex set Satisfied And not in Existing factory edge servers in l , if the existing factory edge server Already and If the existing factory edge server Change to Matching attempt for point Search for a match, otherwise the existing factory edge server and Point Match; 4) If the new factory edge server If not all matches are found, modify the top value; calculate , To enable and Generate new satisfaction conditions The minimum non-zero value of the edge of All the top values of the points are decreased ,Will All the top values of the points are incremented ; 5) Reset search history and , return to step 2) and re-set the point Search for matches; until new factory edge server Match; 6) Order the new factory edge server n for The next point, and return to step 2) for point Search for matches until for A point.
[0095] As a preferred technical solution, in this embodiment, the simulated annealing algorithm (SA): given an end-edge matching In the case of , load balancing is obtained, and the KM algorithm (KMeans algorithm) is used to obtain edge-edge matching, and then the migration effect is calculated, and the optimization target value is calculated, which is recorded as In order to achieve the optimal server matching, the simulated annealing algorithm is introduced to search for the global optimal solution in the solution space; the search process is as follows: 1) Set the temperature Equal to initial temperature , and generate random initial solutions ;
[0096] 2) The solution for the current time t Applying perturbations to generate solutions ,untie There is a certain probability of acceptance, and the acceptance probability is calculated by the Metropolis criterion:
[0097] Step 2) Repeat Second-rate;
[0098] 3) Reduce the current temperature to , return to step 2 until the current temperature is lower than the termination temperature .
[0099] As a preferred technical solution, in this embodiment, the transfer learning algorithm: Due to the storage space and computing resources of the edge server, it is difficult to train and store a mature source domain model for each IIoT device m. Therefore, a transfer learning method is designed in combination with the Head2Toe algorithm, so that multiple IIoT devices m share a source domain model, which can achieve higher accuracy; the main idea of the Head2Toe algorithm is to find the neurons in the source domain model that have learned the features required for the migration target, and use the target domain data set to adjust the linear combination of the output of the neurons by back propagation;
[0100] Before solving end-edge matching and edge-edge matching, you need to know the migration effect When using the Head2Toe algorithm for model migration, the advantages of the Head2Toe algorithm are: and domain fitness Inversely proportional, where:
[0101] In the formula, Indicates the accuracy of transfer learning using linear fitting. represents the accuracy of training the source domain model from scratch using sample data from edge IIoT device m, Indicates the accuracy obtained by using the Head2Toe algorithm for transfer learning;
[0102] When using the Head2Toe algorithm for transfer learning, the advantages of the Head2Toe algorithm are: and domain fitness Inversely proportional, and Head2Toe algorithm has advantages Proportional to the accuracy of the transfer, so domain adaptation is used To measure the migration effect,
[0103]
[0104] As a preferred technical solution, in this embodiment, the execution process of the transfer learning method is:
[0105] 1) New factory edge server Receive the source domain model , the source domain model The output of each layer is reduced in dimension and aggregated to obtain:
[0106] In the formula, is the source domain model All features learned;
[0107] 2) Edge server for new factory Matching IIoT devices Screening features; For input for IIoT devices Construct a linear layer of the source domain model, denoted as , adding group-lasso regularization as loss, using IIoT devices The training data is updated by stochastic gradient descent ;
[0108] After reaching the preset training rounds, use Representative features scores, select the highest score Features as IIoT devices v The effective features of ;
[0109] 3) The features in are linearly combined, and the weights are Using IIoT Devices The dataset is updated by stochastic gradient descent ; After the update is completed, the source domain model By executing Working with IIoT devices , This is the output of the transfer learning network;
[0110] 4) Repeat steps 2 and 3 until the new factory edge server Every IIoT device matched Train the corresponding weights ;
[0111] 5) Repeat step 4 until each new factory edge server completes model migration.
[0112] In this embodiment, the established linear neural network is net=newlin(P,S, ID,LR), where P is the minimum and maximum matrix of input elements; S represents the number of neurons in the output layer; ID represents the input delay vector, which defaults to 0; LR represents the learning speed, which defaults to 0.01.
[0113] It should be noted that the attached Figure 1The edge digital twin deployment scenario diagram based on transfer learning in the industrial Internet of Things is shown in the figure. The scenarios are divided into new factories and existing factories. Each factory is divided into an edge server layer and an IIoT device m layer. In the new factory, each IIoT device m is matched with an edge server, and the digital twin of the IIoT device m is deployed on the edge server. However, the lack of data of the IIoT device m in the new factory makes it impossible to train a source domain model sufficient to support the operation of the digital twin, so transfer learning is needed to assist in building the source domain model. In the existing factory, the edge server has trained a very mature source domain model for the IIoT device m in a long period of operation. The model is transferred to the edge server n of the new factory and migrated to the IIoT device m. In a short period of time, a relatively complete source domain model is built for the IIoT device m.
[0114] Attached Figure 2 A schematic diagram of data analysis using the source domain model and the linear layer is shown in the figure. The working principle of the linear layer is shown in the figure. In the new factory edge server, each IIoT device m inputs data into the source domain model, selects valid features from all intermediate features of the source domain model, and inputs them into the linear layer belonging to the IIoT device m. The output result of the linear layer is fed back to the IIoT device m to perform the work task. On the same edge server, the edge server trains a linear layer for all matched IIoT devices m, and all linear layers share a source domain model, which enables the edge server to run the source domain models of multiple IIoT devices m under limited running memory.
[0115] (1) Regarding the deployment of edge digital twins in industrial IoT scenarios, the lack of IIoT device m data in new factories is considered. When there is a lack of data support, the functions of digital twins are weak, which hinders the realization of intelligent manufacturing. Therefore, mature source domain models are obtained from the existing factory edge servers and transferred to the new factory edge servers. Transfer learning technology is used to migrate the models to the production IIoT devices m, and high-precision models are built in a short time, providing powerful analysis tools for digital twins.
[0116] (2) When formulating the source domain model transmission plan, it is necessary to consider the type of IIoT device m matched by the edge server in the newly built factory. When selecting the matching edge server for the IIoT device m in the newly built factory, it is necessary to consider the source domain model accepted by the edge server. Therefore, these two problems are coupled with each other. In this regard, the KM algorithm is used to solve the problem of formulating the source domain model transmission plan, and the simulated annealing algorithm is combined to formulate the matching relationship between the edge server of the new factory and the IIoT device m. The results of the KM and simulated annealing algorithms ensure that the transmission rate of the communicating parties meets the delay requirements of the digital twin, so that the total accuracy of the source domain model migrated to the IIoT device m is maximized, and the edge server of the new factory can achieve load balancing as much as possible.
[0117] (3) Fine-tuning is a commonly used transfer learning method. This method trains a source domain model with different parameters for each target domain, which takes up a lot of time and space. Therefore, a transfer learning scheme is designed based on the Head2Toe algorithm. A linear layer is constructed for each IIoT device m, so that multiple IIoT devices m share a source domain model, which can achieve higher accuracy. This method greatly reduces the computing resources, training time and model space required for migration.
[0118] The technical problems to be solved by the present invention are:
[0119] 1. Digital twin technology; To realize intelligent manufacturing, production equipment needs to be equipped with a large number of sensors, machines need to achieve highly intelligent collaborative relationships, and production managers need to achieve real-time understanding, analysis, planning and management of all aspects of the manufacturing process; With the continuous expansion of the deployment scale of IIoT devices, the data flow of IIoT devices has exploded, and it presents the characteristics of multi-source heterogeneous and changeable industrial big data, which puts higher requirements on perceiving the industrial environment and realizing intelligent management; digital twin technology plays an important role in solving this problem; By collecting and analyzing past and present data, digital twins realize real-time representation of physical IIoT device entities, allowing managers to more clearly and comprehensively understand the real-time performance of production equipment, analyze production efficiency bottlenecks, and predict future resource requirements, thereby specifying the optimal production strategy;
[0120] 2. Transfer learning algorithm; In a newly built factory, there is only a small amount of data for the production IIoT device m, which makes it difficult to drive the edge server to build a digital twin; to solve this problem, transfer learning is introduced to deploy edge digital twins for IIoT devices m that lack data in the industrial Internet of Things scenario; in a factory that is already operating normally, a large number of edge servers are also deployed, and the servers maintain digital twins for IIoT devices m and source domain models that support the operation of twins; considering that the IIoT devices m between different factories are highly similar in their environment and status, the well-trained source domain models on the edge servers in the existing factories are transferred to the edge servers of the newly built factories, and the obtained source domain models are migrated to the IIoT devices m that lack data using the transfer learning algorithm; powerful source domain models are important tools for digital twins. Transfer learning accelerates the construction of source domain models, so that factories do not have to wait until the IIoT devices m run for a period of time to generate enough data to complete the deployment of digital twins;
[0121] 3. Kuhn-Munkres (KM) algorithm; by obtaining well-trained source domain models from edge servers in existing normal factories, the edge servers in the newly built factories use transfer learning to train a source domain model with high accuracy for the IIoT device m with scarce data. The source domain model supports the construction of the digital twin of the IIoT device m; since the sending model consumes the resources of the edge server, the number of targets that the sender can send is limited; therefore, the KM algorithm is used to reasonably configure the transmission relationship between the sender and the receiver of the source domain model, so that after the source domain model reaches the edge server n of the new factory, the migration effect on the sample data of the IIoT device m is optimal;
[0122] 4. Simulated annealing algorithm: The matching problem between the new factory edge server and IIoT device m, as well as the transmission matching problem between the senders and receivers of the source domain model are coupled with each other and need to be considered in a coordinated manner. The simulated annealing algorithm is used to search for the optimal edge server matching relationship, and the KM algorithm is combined to reasonably configure the transmission matching relationship. The two matching problems are jointly optimized to maximize the load balancing of the new factory edge server and optimize the migration effect.
[0123] Implementing the embodiments of the present invention has the following beneficial effects:
[0124] Transfer learning is a branch of machine learning that aims to expand the applicability of the model by transferring knowledge between the source domain and the target domain. By leveraging the similarities between IIoT devices m, source domain samples are extracted from IIoT devices m with sufficient data, and then source domain features are extracted. Transfer learning is used to apply the source domain features to the target IIoT device m that lacks data, and a high-precision source domain model is quickly built for the target IIoT device m, thereby realizing the deployment of digital twins in the absence of data.
[0125] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A method for deploying edge digital twins based on transfer learning, characterized in that: The following steps are involved: Step 1: The IIoT device m in the newly built factory uploads the received data to the nearest edge server for model training, and obtains the accuracy of the source domain model obtained by the IIoT device m in each factory after model training using existing samples , the data is sent to each edge server in the existing factory, and the linear fitting migration method is used to obtain the accuracy of each IIoT device m on each source domain model , further calculate the migration effect of each source domain model when migrating to each IIoT device m; Step 2: Use the KM algorithm to match the edge servers of the new factory with the edge servers of the existing factory, and use the simulated annealing algorithm to match the edge servers in the new factory with the IIoT device m; each edge server in the new factory is matched with an edge server in the existing factory; Step 3: Transfer the source domain model in the existing factory edge server to the corresponding new factory edge server; Step 4: According to the matching relationship between the edge server and the IIoT device m, match the IIoT device m with the corresponding new factory edge server and upload the data; The edge server in the newly built factory migrates the received source domain model to the matching IIoT device m and builds the source domain model for the IIoT device m; Step 5: The edge server uses the source domain model and combines the data uploaded by the IIoT device m to build a digital twin for the matching IIoT device m; The edge digital twin deployment method is divided into three parts: The first part is the IIoT devices in the new factory and the new factory edge server n The matching between them is called the end-edge matching model; IIoT device m uploads its real-time communication data to the new factory edge server n New factory edge server n Utilize the data of IIoT device m to build and maintain a digital twin for IIoT device m; wherein n represents a new factory edge server and l represents an existing factory edge server; The second part is the existing factory edge server l The matching between the edge server n and the new factory is called the edge-edge matching model; Select the trained source domain model from the existing factory edge server l and transfer the source domain model to the new factory edge server n; The third part is model migration. After receiving the source domain model, the new factory edge server n uses transfer learning to migrate the received source domain model to each matching IIoT device m. New factory deployment Edge servers and There are IIoT devices m, denoted as and ; In the existing factories there are Existing factory edge servers l , recorded as ; The data sample of IIoT device m is recorded as , the existing factory edge server The source domain model in .
2. The method according to claim 1, characterized in that The end-edge matching model is: the new factory edge server n Match with IIoT device m, and the matching relationship is recorded as: The match is a one-to-many match, where is a binary matching variable, when New Factory Edge Server When matching with IIoT device m New Factory Edge Server There is no match with IIoT device m; since an IIoT device m only matches one edge server, there is , ; To balance the new factory edge server The workload between them, introduces Jain's fairness index as a new factory edge server Load balancing metrics: in, Edge Server for New Factory The number of matched IIoT devices m, i.e. ; In the new factory, the new factory edge server The transmission rate between and IIoT device m is calculated by the following formula: in, is the transmission power of IIoT device m, IIoT devices and new factory edge servers The channel gain between is the Gaussian white noise power per Hz; For bandwidth.
3. The method according to claim 2, characterized in that The edge-to-edge matching model is: n and existing factory edge servers l The matching relationship is recorded as: Edge-edge matching is a one-to-many matching where is a binary matching variable, when Existing factory edge servers and new factory edge servers Match, when Existing factory edge servers No and new factory edge servers Match; Since each new factory edge server n obtains the source domain model from an existing factory edge server, there is , ; Existing factory edge servers and new factory edge servers The transmission rate between is calculated by the following formula: in, For existing factory edge servers The transmission power of For existing factory edge servers and new factory edge servers The channel gain between Transfer learning model: Indicates that the source domain model Data samples migrated to edge IIoT devices The total migration effect ℱ of all IIoT devices m in the new factory is expressed as the average of the migration effects of all IIoT devices m, and its calculation formula is: ; The optimization equation for the new factory edge server n is expressed as: s.t. ,if ,if in, represents the weight coefficient, S dev Represents a collection of IIoT devices m; constraints Ensure that an IIoT device m only matches one new factory edge server n; Constraint Ensure that the new factory edge server n only receives data from one existing factory edge server l Receive source domain model; Constraints Guarantee the existing factory edge server l Only transfer the source domain model to the edge servers in a limited number of new factories; Constraint Ensure that the accuracy of the migration network on the IIoT device m sample data is not lower than the preset threshold; Constraint Ensure that the transmission rate between the new factory edge server n and the IIoT device m is not lower than the preset threshold; constraint Guarantee the existing factory edge server l The transmission rate with the new factory edge server n is not lower than the preset threshold.
4. The method according to claim 3, characterized in that To solve edge-edge matching , use KM algorithm to search for the optimal edge-edge matching ; Assume end-edge matching Known, the load balance ℬ is determined, the edge-to-edge matching problem is a one-to-many matching problem and the optimization goal is , convert the edge-edge matching model into the maximum complete matching problem of the bipartite graph, define the weight of the bipartite graph, and use the KM algorithm to solve the matching problem; For the maximum complete matching of a bipartite graph, it is defined as follows: Definition 1: If a graph All vertices of are divided into two disjoint subsets , , and any edge ,have , then the graph It is called a bipartite graph and is denoted by ; Separate order and are two disjoint sets of a bipartite graph; if the new factory edge server and existing factory edge servers Satisfy constraints , then the new factory edge server and existing factory edge servers There is an edge between , construct a bipartite graph ,in ; Definition 2: Given a graph A subgraph of , if for any ,have , then it is called is a match; if the matching subgraph Each vertex of is matched with an edge, then the subgraph It is a picture A perfect match for If we set a weight for each edge of G The maximum complete matching problem is defined as finding a given graph A complete matching of , the sum of all edge weights of this complete matching is the largest.
5. The method according to claim 4, characterized in that In the optimization of the new factory edge server n, the collection Expand to matching vertex set { | , },choose Any vertex in is equivalent to selecting an existing factory edge server , matching vertex set Each vertex of is matched only once and each existing factory edge server l matches at most Second-rate; The constructed bipartite graph becomes ,in ; Each new factory edge server n matches, then the corresponding bipartite graph Perfect match of middle Each point matches; each existing server corresponds vertices, can match at most times, so each complete match Corresponding to an edge-edge matching ; Defining Edges The weight is to put the new factory edge server Receive the source domain model The effect after transfer learning is calculated as follows: Calculate the perfect match The sum of all edge weights is equivalent to the optimization objective , solve the bipartite graph The maximum complete matching problem is equivalent to solving the one-to-many matching problem in source domain model migration.
6. The method according to claim 5, characterized in that Solving bipartite graphs The maximum complete matching process is: 1) Maintain a top label value for the vertices involved in the matching , matching vertex set and The initial top label values of all points in are equal to the minimum edge weight and zero respectively; 2) From Start the search at the first vertex, ; respectively and Maintain search history and ; 3) Search for matches for the new factory edge server n and find the matching vertex set Satisfied And not in Existing factory edge servers in l , if the existing factory edge server Already and If the existing factory edge server Change to Matching attempt for point Search for a match, otherwise the existing factory edge server and Point match; 4) If the new factory edge server If not all matches are found, modify the top value; calculate , To enable and Generate new satisfaction conditions The minimum non-zero value of the edge of All the top values of the points are decreased ,Will All the top values of the points are incremented ; 5) Reset search history and , return to step 2) and re-set the point Search for matches; until new factory edge server match; 6) New factory edge server n for The next point, and return to step 2) for point Search for matches until for A point.
7. The method according to claim 6, characterized in that In order to achieve the best server matching, the simulated annealing algorithm is introduced to search for the global optimal solution in the solution space; the search process is as follows: 1) Set the temperature Equal to initial temperature , and generate random initial solutions ; 2) The solution for the current time t Applying perturbations to generate solutions ,untie There is a certain probability of acceptance, and the acceptance probability is calculated by the Metropolis criterion: Step 2) Repeat Second-rate; 3) Reduce the current temperature to , return to step 2 until the current temperature is lower than the termination temperature .
8. The method according to claim 7, characterized in that Combined with the Head2Toe algorithm, a transfer learning method is designed to enable multiple IIoT devices m to share a source domain model; when using the Head2Toe algorithm for model migration, the Head2Toe algorithm has the following advantages: and domain fitness Inversely proportional, where: In the formula, Indicates the accuracy of transfer learning using linear fitting. represents the accuracy of training the source domain model from scratch using sample data from edge IIoT device m, Indicates the accuracy obtained by using the Head2Toe algorithm for transfer learning; When using the Head2Toe algorithm for transfer learning, the advantages of the Head2Toe algorithm are: and domain fitness Inversely proportional, and Head2Toe algorithm has advantages Proportional to the accuracy of the transfer, so domain adaptation is used To measure the migration effect, 9. The method according to claim 8, characterized in that The execution process of the transfer learning method is as follows: 1) New factory edge server Receive the source domain model , the source domain model The output of each layer is reduced in dimension and aggregated to obtain: In the formula, is the source domain model All features learned; 2) Edge server for new factory Matching IIoT devices Screening features; by For input for IIoT devices Construct a linear layer of the source domain model, denoted as , add group-lasso regularization as loss, and use the training data of IIoT device m to update it through stochastic gradient descent method ; After reaching the preset training rounds, use Representative features scores, select the highest score Features as IIoT devices v The effective features of ; 3) The features in are linearly combined, and the weights are Using IIoT Devices The dataset is updated by stochastic gradient descent ; After the update is completed, the source domain model By executing Working with IIoT devices , This is the output of the transfer learning network; 4) Repeat steps 2) and 3) until the new factory edge server is Every IIoT device matched Train the corresponding weights ; 5) Repeat step 4) until each new factory edge server n completes model migration.
