Modeling Method and Device for Digital Twin Model
By selecting suitable industrial heterogeneous terminals for local training and updating global model parameters, the problem of low modeling efficiency and accuracy is solved, and the efficient and accurate modeling of digital twin models in industrial intelligent manufacturing scenarios is achieved.
Patent Information
- Application Number
- CN202411702540.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2024-08-30
- Filing Date
- 2024-11-26
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2044-11-26
AI Technical Summary
When building a digital twin model of industrial heterogeneous terminals, the existing technology does not fully consider the heterogeneous terminals, resulting in low modeling efficiency and low accuracy, and inherent backward effects and model outdated problems.
By obtaining the running characteristic data of heterogeneous terminals, selecting suitable training terminals for local training, and updating global model parameters asynchronously or synchronously during training, building a digital twin model.
The modeling efficiency and accuracy of the digital twin model are improved, ensuring that the model can quickly respond to dynamic environmental changes and enhance data consistency in virtual and real spaces.
Smart Images

Figure CN119623054B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of digital twin models, especially the modeling method and device of digital twin models. Background Art
[0002] A digital twin model refers to a virtual model created by simulating devices, systems, or processes in the physical world, which can comprehensively and accurately reflect various attributes and characteristics of physical entities.
[0003] In related technologies, data-driven technologies such as synchronous federated learning and asynchronous federated learning are used to build digital twin models.
[0004] However, related technologies do not fully consider the heterogeneity of various industrial heterogeneous terminals, and cannot select more suitable industrial heterogeneous terminals for model modeling from several industrial heterogeneous terminals. The modeling efficiency of its digital twin model needs to be improved; in addition, related technologies still have inherent lag effects and model obsolescence problems, which will lead to unbalanced training costs and model losses, and the modeling accuracy of its digital twin model needs to be improved. Summary of the Invention
[0005] Embodiments of this application provide a modeling method and device for digital twin models, which are used to improve the modeling efficiency and accuracy of digital twin models.
[0006] On the one hand, embodiments of this application provide a modeling method for digital twin models, and the method includes the following steps:
[0007] Obtain the operation characteristic data of several heterogeneous terminals;
[0008] According to the operation characteristic data of each of the heterogeneous terminals, select multiple of the heterogeneous terminals participating in local training from several of the heterogeneous terminals as training terminals;
[0009] Control each of the training terminals to perform local training, and asynchronously globally update or synchronously globally update the global model parameters of the digital twin model during local training;
[0010] If all of the training terminals have completed local training, then construct the digital twin model according to the global model parameters of the digital twin model.
[0011] On the other hand, embodiments of this application provide a modeling device for digital twin models, and the device includes:
[0012] An obtaining module, which is used to obtain the operation characteristic data of several heterogeneous terminals;
[0013] The first processing module is configured to select, according to the operation characteristic data of each of the heterogeneous terminals, multiple heterogeneous terminals participating in local training from among the several heterogeneous terminals as training terminals;
[0014] The second processing module is configured to control each of the training terminals to perform local training, and asynchronously globally update or synchronously globally update the global model parameters of the digital twin model during the local training;
[0015] The third processing module is configured to, if all the training terminals have completed local training, construct the digital twin model according to the global model parameters of the digital twin model.
[0016] According to the modeling method and device of the digital twin model of the present application, the heterogeneity of each heterogeneous terminal is characterized by the operation characteristic data of each heterogeneous terminal. Considering the heterogeneity of each heterogeneous terminal, heterogeneous terminals more suitable for digital twin model modeling are selected from among several heterogeneous terminals to participate in local training. In this way, the adaptation degree between the heterogeneous terminals and digital twin model modeling is improved, and the modeling efficiency of the digital twin model is increased; in addition, during the local training of each training terminal, the global model parameters of the digital twin model are asynchronously globally updated or synchronously globally updated to balance the training cost and model loss of the digital twin model. In this way, it can be ensured that the digital twin model can quickly respond to a dynamically variable environment, enhance the data consistency between the virtual and real spaces, and improve the modeling accuracy of the digital twin model.
[0017] Other features and advantages of the present application will be described in the following specification, and part of them will become obvious from the specification, or be understood by implementing the present application. The objectives and other advantages of the present application can be realized and obtained through the structures specifically pointed out in the specification, claims, and drawings. Description of the Drawings
[0018] Figure 1 is a flowchart of the modeling method of the digital twin model provided by the present application;
[0019] Figure 2 is a schematic diagram of the modeling method of the digital twin model provided by the present application;
[0020] Figure 3 is a structural diagram of the modeling device of the digital twin model provided by the present application. Detailed Embodiments
[0021] In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0022] The present application will be further described below in conjunction with the accompanying drawings of the specification and specific embodiments. The described embodiments should not be construed as limiting the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.
[0023] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0025] In the industrial intelligent manufacturing scenario, various industrial heterogeneous terminals are connected to the Industrial Internet of Things (IIoT). Through the industrial Internet of Things, the operation data of the industrial heterogeneous terminals can be collected in real time, and the digital twin model of the industrial heterogeneous terminals can be constructed by combining the operation data of the industrial heterogeneous terminals with Digital Twin (DT) technology. The digital twin model can reflect the operation state of the industrial heterogeneous terminals in real time and can extend applications such as real-time monitoring and fault detection. Exemplarily, the operation state of the industrial heterogeneous terminals can be obtained through the digital twin model, and then the preset fault detection model is used to detect the operation state of the industrial heterogeneous terminals to obtain a result for characterizing whether the industrial heterogeneous terminals are faulty. This is beneficial to reducing the fault risk of the industrial heterogeneous terminals and facilitating preventive equipment maintenance.
[0026] It should be noted that industrial heterogeneous terminals refer to industrial terminals with different structures or functions, and industrial heterogeneous terminals can be flexibly set according to actual industrial intelligent manufacturing. Exemplarily, industrial heterogeneous terminals can include numerically controlled machine tool equipment, industrial robot equipment, intelligent sensing and detection equipment, intelligent logistics equipment, intelligent casting equipment, intelligent stamping equipment, etc., but are not limited thereto. Among them, the intelligent sensing and detection equipment is configured with multiple sensors, which can collect various data in the production process in real time and transmit them to other terminals through a wireless network to achieve precise control of industrial intelligent manufacturing; the intelligent logistics equipment is configured with multiple radio frequency identification (RFID) modules, multiple automated guided vehicles (AGVs), and a controller, which can control the transportation of each automated guided vehicle through the controller in combination with multiple wireless radio modules to achieve rapid sorting, storage, and management of goods; the intelligent casting equipment is used for automated industrial casting, and the intelligent stamping equipment is used for automated industrial stamping.
[0027] It can be understood that industrial Internet of Things technology uses core Internet of Things technologies such as communication technology, cloud computing, and big data analysis to connect industrial devices, sensors, control systems, data acquisition devices, etc. through the Internet or local area network, so as to achieve interconnection and intelligent management of devices. In addition, the digital twin (DT) model precisely simulates devices, systems, or processes in the physical world through digital means to create a virtual model that exactly corresponds to it, and this virtual model can comprehensively and accurately reflect various attributes and characteristics of the physical entity.
[0028] Currently, the modeling method of the digital twin model of industrial heterogeneous terminals usually adopts a physical principle-based technology, a data-driven technology, or a combination of both. However, in complex industrial intelligent manufacturing scenarios, it is often required that the digital twin model can accurately represent the multi-dimensional characteristics of industrial heterogeneous terminals, and it is required to update the global model parameters of the digital twin model of industrial heterogeneous terminals in real time to ensure data consistency between the virtual and real spaces in industrial intelligent manufacturing. Therefore, the data-driven technology is more suitable for the construction of the digital twin model of industrial heterogeneous terminals.
[0029] When using the digital-driven technology to model the digital twin model of industrial heterogeneous terminals, due to the limited number of model parameters of the edge server in the industrial Internet of Things, a large number of industrial heterogeneous terminals often need to participate in the model modeling to improve the modeling efficiency. In this regard, federated learning in data-driven technology is widely used in the construction of the digital twin model of industrial heterogeneous terminals.
[0030] In the related art, a synchronous federated learning method or an asynchronous federated learning method is adopted to model the digital twin model of industrial heterogeneous terminals. However, on the one hand, the related art does not fully consider the heterogeneity of each industrial heterogeneous terminal and cannot select more suitable industrial heterogeneous terminals for model modeling from several industrial heterogeneous terminals, so the modeling efficiency of the digital twin model of industrial heterogeneous terminals needs to be improved; on the other hand, the related art still has inherent lag effects and model obsolescence problems, which will lead to unbalanced training costs and model losses, and the modeling accuracy of the digital twin model of industrial heterogeneous terminals needs to be improved.
[0031] In view of this, the embodiments of the present application provide a method and device for modeling a digital twin model, aiming to improve the modeling accuracy and modeling efficiency of the digital twin model of industrial heterogeneous terminals.
[0032] First, the implementation steps of the method for modeling the digital twin model provided by the present application will be elaborated in detail below with reference to the accompanying drawings.
[0033] The method for modeling the digital twin model provided by the embodiments of the present application can be applied to a terminal, can also be applied to a server, or can be software running on a terminal or a server, etc. The terminal can be a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto. The server can be an independent physical server, can also be a server cluster or a distributed system composed of multiple physical servers, or can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. In addition, the server can also be a node server in a blockchain network, but is not limited thereto. Among them, the blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms.
[0034] Refer to Figure 1 , Figure 1 which is a flowchart of the method for modeling the digital twin model provided by the present application. The method for modeling the digital twin model mainly includes the following steps S101 - S104:
[0035] S101, obtaining the operation characteristic data of several heterogeneous terminals;
[0036] S102, according to the operation characteristic data of each heterogeneous terminal, selecting multiple heterogeneous terminals participating in local training from several heterogeneous terminals as training terminals;
[0037] S103, control each training terminal to perform local training, and asynchronously or synchronously globally update the global model parameters of the digital twin model during local training;
[0038] S104, if all training terminals have completed local training, construct a digital twin model according to the global model parameters of the digital twin model.
[0039] In the embodiments of the present application, first, obtain the operation characteristic data of several heterogeneous terminals. The heterogeneous terminals refer to industrial heterogeneous terminals in the industrial intelligent manufacturing scenario, and the operation characteristic data of each heterogeneous terminal can characterize the heterogeneity of each heterogeneous terminal; then, according to the operation characteristic data of each heterogeneous terminal, select multiple heterogeneous terminals participating in local training from several heterogeneous terminals as training terminals; after that, control each training terminal to perform local training, and asynchronously or synchronously globally update the global model parameters of the digital twin model during local training; finally, when all training terminals have completed local training, construct a digital twin model according to the global model parameters of the digital twin model. The digital twin model refers to the digital twin model of industrial heterogeneous terminals in the industrial intelligent manufacturing scenario.
[0040] It can be seen that in the embodiments of the present application, the heterogeneity of each industrial heterogeneous terminal is characterized by the operation characteristic data of each industrial heterogeneous terminal in the industrial intelligent manufacturing scenario. Considering the heterogeneity of each industrial heterogeneous terminal, select industrial heterogeneous terminals that are more suitable for digital twin model modeling from several industrial heterogeneous terminals to participate in local training, so as to improve the adaptation degree between industrial heterogeneous terminals and digital twin model modeling, thereby improving the modeling efficiency of the digital twin model of industrial heterogeneous terminals; in addition, during the local training of each training terminal, asynchronously or synchronously globally update the global model parameters of the digital twin model to balance the training cost and model loss of the digital twin model, so as to ensure that the digital twin model can quickly respond to the dynamically variable environment in the industrial intelligent manufacturing scenario, enhance the data consistency between the virtual and real spaces in industrial intelligent manufacturing, and improve the modeling accuracy of the digital twin model of industrial heterogeneous terminals.
[0041] In the above step S101, obtain the operation characteristic data of several industrial heterogeneous terminals in the industrial intelligent manufacturing scenario, and the operation characteristic data of each industrial heterogeneous terminal can characterize the heterogeneity of each industrial heterogeneous terminal.
[0042] The above-mentioned heterogeneous terminals refer to industrial heterogeneous terminals in the industrial intelligent manufacturing scenario, such as numerically controlled machine tool equipment, industrial robot equipment, intelligent sensing and detection equipment, intelligent logistics equipment, intelligent casting equipment, intelligent stamping equipment, etc., but not limited thereto.
[0043] The operation characteristic data of the above industrial heterogeneous terminals can characterize the heterogeneity of each industrial heterogeneous terminal.
[0044] In the above step S102, after obtaining the operation characteristic data of each industrial heterogeneous terminal, based on the operation characteristic data of each industrial heterogeneous terminal, multiple industrial heterogeneous terminals participating in local training are selected from several industrial heterogeneous terminals as training terminals to ensure the adaptation degree between the industrial heterogeneous terminal and the digital twin model modeling, and improve the modeling efficiency of the digital twin model of the industrial heterogeneous terminal.
[0045] The above training terminal refers to an industrial heterogeneous terminal used for local training of its local model.
[0046] The above selection of multiple heterogeneous terminals participating in local training from several heterogeneous terminals according to the operation characteristic data of each heterogeneous terminal may include selecting heterogeneous terminals with operation characteristic data higher than a preset operation characteristic threshold as heterogeneous terminals participating in local training, but is not limited to this.
[0047] In the above step S103, each training terminal is controlled to perform local training on the local model configured by using the local data set, the local model parameters of the local model, and the global model parameters of the digital twin model. During local training, the global model parameters of the digital twin model are updated, and the update method may include an asynchronous global update method or a synchronous global update method. In this way, the training cost and model loss of the digital twin model are balanced, which can ensure that the digital twin model can quickly respond to the dynamically variable environment in the industrial intelligent manufacturing scenario, enhance the data consistency between the virtual and real spaces of industrial intelligent manufacturing, and improve the modeling accuracy of the digital twin model of the industrial heterogeneous terminal.
[0048] In the above local training, the local data set of the training terminal may include the operation data of the industrial heterogeneous terminal, the device parameters, and the operation data of the virtual entity corresponding to the industrial heterogeneous terminal.
[0049] The operation data of the above industrial heterogeneous terminals may include temperature data, pressure data, vibration data, hardware load data, etc. of the industrial heterogeneous terminals. The device parameters of the industrial heterogeneous terminals may include device models, specifications, service life, device maintenance time values, etc. of the industrial heterogeneous terminals. The operation data of the virtual entity corresponding to the industrial heterogeneous terminal can be obtained by performing virtual-real conversion processing on the operation data of the industrial heterogeneous terminal. The virtual-real conversion processing is a prior art and will not be elaborated here. Alternatively, the operation data of the virtual entity corresponding to the industrial heterogeneous terminal is obtained through preset virtual-real mapping data. Specifically, the virtual entity operation data corresponding to the operation data of the industrial heterogeneous terminal is found in the preset virtual-real mapping data as the operation data of the virtual entity corresponding to the industrial heterogeneous terminal. The virtual-real mapping data may include multiple preset physical entity operation data and the virtual entity operation data corresponding to each preset physical entity operation data, but is not limited thereto.
[0050] In the above local training, the local model configured by the training terminal may be the digital twin model of the training terminal. This local model is essentially the same as the subsequent obtained global digital twin model. The local model parameters of the local model may be pre-set hyperparameters.
[0051] In the above local training, for the k global model parameters of the digital twin model in the r-th round of training, since it involves asynchronous global update and synchronous global update, this part will be described in detail later.
[0052] Controlling each training terminal to perform local training as described above may include controlling the training terminal to perform local training on the local model it configures based on the preset local model parameters and the global model parameters of the digital twin model. When the training terminal completes the local training of the current training round, if the current training round is less than the preset total number of training rounds, then increment the current training round by one, update the local model parameters, and then return to the step of performing local training on the local model it configures to achieve iterative training. Otherwise, it is determined that the training terminal has completed local training, but is not limited thereto.
[0053] Performing asynchronous global update or synchronous global update on the global model parameters of the digital twin model as described above may include when there are training terminals that have completed local training at the current moment, if the number of training terminals that have completed local training is greater than the preset number threshold, then perform synchronous global update on the global model parameters of the digital twin model to shorten the modeling duration of the digital twin model. Otherwise, perform asynchronous global update on the global model parameters of the digital twin model to improve the modeling accuracy of the digital twin model, but is not limited thereto.
[0054] In the above step S104, when all training terminals have completed local training, a global digital twin model is constructed according to the global model parameters of the digital twin model. The global digital twin model refers to the digital twin model of industrial heterogeneous terminals in the industrial intelligent manufacturing scenario, and the global digital twin model is universal, that is, the global digital twin model is applicable to all industrial heterogeneous terminals.
[0055] The above construction of the digital twin model according to the global model parameters of the digital twin model may include constructing the digital twin model according to the global model parameters of the digital twin model in combination with a preset modeling tool, but is not limited thereto.
[0056] The above steps will be further described below.
[0057] In some embodiments, the above operating characteristic data may include operation efficiency, communication efficiency, and historical loss function. The historical loss function is the loss function value of the local model of the heterogeneous terminal in the previous training round of the current training round.
[0058] The above selection of multiple heterogeneous terminals participating in local training as training terminals from several heterogeneous terminals according to the operating characteristic data of each heterogeneous terminal may include:
[0059] According to the selection times of each heterogeneous terminal, in combination with the total number of training terminals and the historical selection times, the confidence radius of each heterogeneous terminal relative to the current training round is obtained; among them, the selection times of the heterogeneous terminal is the number of times the heterogeneous terminal is selected to participate in local training before the current training round; the total number of training terminals is the number of heterogeneous terminals selected to participate in local training; the historical selection times is the number of times the historical heterogeneous terminal is selected to participate in local training before the current training round; the historical heterogeneous terminal is the heterogeneous terminal selected to participate in local training in the previous training round of the current training round.
[0060] According to the operation efficiency and selection times of each heterogeneous terminal, in combination with the confidence radius of each heterogeneous terminal relative to the current training round, the operation performance data of each heterogeneous terminal relative to the current training round is obtained; the operation performance data is used to characterize the operation performance of the heterogeneous terminal when locally training its local model in the current training round.
[0061] According to the communication efficiency and selection times of each heterogeneous terminal, in combination with the confidence radius of each heterogeneous terminal relative to the current training round, the communication performance data of each heterogeneous terminal relative to the current training round is obtained; the communication performance data is used to characterize the communication performance of the heterogeneous terminal when locally training its local model in the current training round.
[0062] According to the historical loss functions of different heterogeneous terminals, obtain the gradient norm values of the local models of different heterogeneous terminals with respect to the current training round;
[0063] According to the operation performance data and communication performance data of different heterogeneous terminals with respect to the current training round, and combining with the gradient norm values of the local models of different heterogeneous terminals with respect to the current training round, obtain the training characteristic parameters of different heterogeneous terminals; the training characteristic parameters are used to characterize the performance of heterogeneous terminals during local training of their local models;
[0064] According to the training characteristic parameters of different heterogeneous terminals, select multiple heterogeneous terminals participating in local training from several heterogeneous terminals as training terminals.
[0065] In this embodiment, to improve the modeling efficiency of the digital twin model of industrial heterogeneous terminals, determine the training characteristic parameters of each industrial heterogeneous terminal through the operation characteristic data of each industrial heterogeneous terminal. The training characteristic parameters characterize the performance of industrial heterogeneous terminals during local training of their local models. Then, through the training characteristic parameters of each industrial heterogeneous terminal, select the industrial heterogeneous terminals that finally participate in local training from several industrial heterogeneous terminals, and determine the selected industrial heterogeneous terminals as training terminals.
[0066] Specifically, first, use the selection times of each industrial heterogeneous terminal, combine with the total number of training terminals and historical selection times, to determine the confidence radius of each industrial heterogeneous terminal with respect to the current training round. The confidence radius is mainly used to correct the operation performance data and communication performance data of each industrial heterogeneous terminal with respect to the current training round to ensure the accuracy of each performance data.
[0067] Then, for each industrial heterogeneous terminal, there is: use the operation efficiency, selection times of the industrial heterogeneous terminal, and the confidence radius of the industrial heterogeneous terminal with respect to the current training round to determine the operation performance data of the industrial heterogeneous terminal with respect to the current training round. This operation performance data can characterize the operation performance of the industrial heterogeneous terminal during local training of its local model in the current training round; and, use the communication efficiency, selection times of the industrial heterogeneous terminal, and the confidence radius of the industrial heterogeneous terminal with respect to the current training round to determine the communication performance data of the industrial heterogeneous terminal with respect to the current training round. This communication performance data can characterize the communication performance of the industrial heterogeneous terminal during local training of its local model in the current training round; and, use the historical loss function of the industrial heterogeneous terminal to determine the gradient norm value of the local model of the industrial heterogeneous terminal with respect to the current training round. This gradient norm value can characterize the training degree of the local model of the industrial heterogeneous terminal; then, use the operation performance data and communication performance data of the industrial heterogeneous terminal with respect to the current training round and the gradient norm value of the local model of the industrial heterogeneous terminal with respect to the current training round to determine the training characteristic parameters of the industrial heterogeneous terminal.
[0068] After that, by using the training characteristic parameters of each industrial heterogeneous terminal, heterogeneous terminals that finally participate in local training are selected from several industrial heterogeneous terminals, and the selected industrial heterogeneous terminals are determined as training terminals.
[0069] The above operating characteristic data may include operation efficiency, communication efficiency, and historical loss function. The historical loss function is the loss function value of the local model of the heterogeneous terminal in the previous training round of the current training round. The operation efficiency refers to the training efficiency of the heterogeneous terminal during local training, and the communication efficiency refers to the efficiency of the heterogeneous terminal communicating with the edge server during local training, but is not limited thereto.
[0070] The above operation efficiency may be the ratio of the amount of training data in a single local training of the heterogeneous terminal to the training time consumed by the heterogeneous terminal in a single local training, but is not limited thereto.
[0071] The above communication efficiency may be the ratio of the amount of data transmitted by the heterogeneous terminal to the edge server when a single local training is completed to the transmission duration consumed by the heterogeneous terminal, but is not limited thereto.
[0072] The above selection times of the heterogeneous terminal refer to the number of times the heterogeneous terminal is selected to participate in local training before the current training round.
[0073] The above total number of training terminals refers to the number of heterogeneous terminals selected to participate in local training, which is a preset value.
[0074] The above historical selection times refer to the number of times the historical heterogeneous terminal is selected to participate in local training before the current training round. The historical heterogeneous terminal refers to the heterogeneous terminal selected to participate in local training in the previous training round of the current training round.
[0075] The above obtaining the confidence radius of each heterogeneous terminal relative to the current training round according to the selection times of each heterogeneous terminal, in combination with the total number of training terminals and the historical selection times, may include obtaining the confidence radius of each heterogeneous terminal relative to the current training round by combining machine learning methods according to the total number of training terminals, the historical selection times, and the selection times of each heterogeneous terminal, but is not limited thereto.
[0076] The above machine learning method can be set according to the actual situation, and this embodiment does not make specific limitations thereto.
[0077] For example, the above machine learning method may be a support vector machine; or, the above machine learning method may be logistic regression, but is not limited thereto.
[0078] Alternatively, according to the selection times of each heterogeneous terminal, in combination with the total number of training terminals and the historical selection times, the confidence radius of each heterogeneous terminal with respect to the current training round can be obtained, including obtaining the confidence radius of each heterogeneous terminal with respect to the current training round through the following formula (1) according to the total number of training terminals, the historical selection times, and the selection times of each heterogeneous terminal:
[0079] (1);
[0080] In formula (1), represents the confidence radius of the heterogeneous terminal with respect to the th training round, which can be understood as the confidence radius of the heterogeneous terminal in the th training round; the heterogeneous terminal refers to the th heterogeneous terminal; represents the confidence radius of the heterogeneous terminal with respect to the th training round, which can be understood as the confidence radius of the heterogeneous terminal in the th training round; represents the total number of training terminals, that is, the number of heterogeneous terminals selected to participate in local training; represents the historical selection times, that is, the number of times the historical heterogeneous terminals were selected to participate in local training in the previous training rounds, and the historical heterogeneous terminals are the heterogeneous terminals selected to participate in local training in the th training round; represents the set of historical heterogeneous terminals; represents that the heterogeneous terminal was selected to participate in local training in the th training round; represents that the heterogeneous terminal was not selected to participate in local training in the th training round; represents the selection times of the heterogeneous terminal , that is, the number of times the heterogeneous terminal was selected to participate in local training in the previous training rounds, represents the round number; represents whether the heterogeneous terminal was selected to participate in local training, , when is 1, it means that the heterogeneous terminal was selected to participate in local training, and when is 0, it means that the heterogeneous terminal Not selected to participate in local training.
[0081] The above operation performance data is used to characterize the operation performance of heterogeneous terminals when locally training their local models in the current training round.
[0082] The above operation performance data of each heterogeneous terminal obtained by combining the operation efficiency and selection times of each heterogeneous terminal with the confidence radius of each heterogeneous terminal relative to the current training round may include, for each heterogeneous terminal, obtaining the initial operation performance data of the heterogeneous terminal relative to the current training round according to the operation efficiency and selection times of the heterogeneous terminal and combining machine learning methods; calculating the sum of the initial operation performance data of the heterogeneous terminal relative to the current training round and the confidence radius as the operation performance data of the heterogeneous terminal relative to the current training round.
[0083] Alternatively, the above operation performance data of each heterogeneous terminal obtained by combining the operation efficiency and selection times of each heterogeneous terminal with the confidence radius of each heterogeneous terminal relative to the current training round may include obtaining the operation performance data of each heterogeneous terminal relative to the current training round through the following formula (2) according to the operation efficiency and selection times of each heterogeneous terminal and the confidence radius of each heterogeneous terminal relative to the current training round:
[0084] (2);
[0085] In formula (2), represents the operation performance data of heterogeneous terminal relative to the th training round, which can be understood as the operation performance data of heterogeneous terminal in the th training round; represents the initial operation performance data of heterogeneous terminal relative to the th training round, which can be understood as the initial operation performance data of heterogeneous terminal in the th training round, and it satisfies the following formula (3):
[0086] (3);
[0087] In formula (3), represents the operation efficiency of heterogeneous terminal .
[0088] The above communication performance data is used to characterize the communication performance of heterogeneous terminals when locally training their local models in the current training round.
[0089] The above-mentioned obtaining the communication performance data of each heterogeneous terminal with respect to the current training round by combining the communication efficiency and selection times of each heterogeneous terminal and the confidence radius of each heterogeneous terminal with respect to the current training round may include, for each heterogeneous terminal, obtaining the initial communication performance data of the heterogeneous terminal with respect to the current training round according to the communication efficiency and selection times of the heterogeneous terminal and by combining machine learning methods; calculating the sum of the initial communication performance data of the heterogeneous terminal with respect to the current training round and the confidence radius as the communication performance data of the heterogeneous terminal with respect to the current training round.
[0090] Alternatively, the above-mentioned obtaining the communication performance data of each heterogeneous terminal with respect to the current training round by combining the communication efficiency and selection times of each heterogeneous terminal and the confidence radius of each heterogeneous terminal with respect to the current training round may include obtaining the communication performance data of each heterogeneous terminal with respect to the current training round according to the communication efficiency and selection times of each heterogeneous terminal and the confidence radius of each heterogeneous terminal with respect to the current training round through the following formula (4):
[0091] (4);
[0092] In formula (4), represents the communication performance data of the heterogeneous terminal with respect to the th training round, which can be understood as the communication performance data of the heterogeneous terminal in the th training round; represents the initial communication performance data of the heterogeneous terminal with respect to the th training round, which can be understood as the initial communication performance data of the heterogeneous terminal in the th training round, and it satisfies the following formula (5):
[0093] (5);
[0094] In formula (5), represents the communication efficiency of the heterogeneous terminal .
[0095] The above-mentioned historical loss function is the loss function value of the local model of the heterogeneous terminal in the previous training round of the current training round.
[0096] The loss function of the above-mentioned local model can be set according to the actual situation, and this embodiment does not make specific limitations on this.
[0097] For example, the loss function can be the loss function of logistic regression, that is, the logarithmic loss function, but it is not limited thereto.
[0098] Based on the historical loss functions of the heterogeneous terminals, obtaining the gradient norm values of the local models of the heterogeneous terminals with respect to the current training round may include, for each heterogeneous terminal, directly calculating the gradient norm value of the historical loss function of the heterogeneous terminal as the gradient norm value of the local model of the heterogeneous terminal with respect to the current training round.
[0099] Alternatively, based on the historical loss functions of the heterogeneous terminals, obtaining the gradient norm values of the local models of the heterogeneous terminals with respect to the current training round may include obtaining the gradient norm values of the local models of the heterogeneous terminals with respect to the current training round according to the historical loss functions of the heterogeneous terminals through the following formula (6):
[0100] (6);
[0101] In formula (6), represents the gradient norm value of the local model of the heterogeneous terminal with respect to the th training round, which can be understood as the gradient norm value of the local model of the heterogeneous terminal in the th training round; represents the gradient value of the historical loss function of the heterogeneous terminal ; represents the historical loss function, that is, in the th training round, when the local model parameters of the heterogeneous terminal are , the loss function value of the local model of the heterogeneous terminal .
[0102] The above training characteristic parameters are used to characterize the performance of the heterogeneous terminal during local training of its local model.
[0103] Based on the operation performance data and communication performance data of the heterogeneous terminals with respect to the current training round, and combining the gradient norm values of the local models of the heterogeneous terminals with respect to the current training round, obtaining the training characteristic parameters of the heterogeneous terminals may include, for each heterogeneous terminal, weighting the operation performance data, communication performance data, and gradient norm values to obtain the training characteristic parameters of the heterogeneous terminal; wherein, the sum of the weights of the operation performance data, the weights of the communication performance data, and the weights of the gradient norm values is one.
[0104] Alternatively, obtaining the training characteristic parameters of each heterogeneous terminal based on the operation performance data and communication performance data of each heterogeneous terminal relative to the current training round, in combination with the gradient norm value of the local model of each heterogeneous terminal relative to the current training round, may include obtaining the training characteristic parameters of each heterogeneous terminal through the following formula (7) according to the operation performance data and communication performance data of each heterogeneous terminal relative to the current training round and the gradient norm value of the local model of each heterogeneous terminal relative to the current training round:
[0105] (7);
[0106] In formula (7), represents the training characteristic parameter of heterogeneous terminal ; represents the weight of the operation performance data of heterogeneous terminal relative to the th training round; represents the weight of the communication performance data of heterogeneous terminal relative to the th training round; represents the weight of the gradient norm value of the local model of heterogeneous terminal relative to the th training round; represents the total number of heterogeneous terminals.
[0107] Selecting multiple heterogeneous terminals to participate in local training from several heterogeneous terminals according to the training characteristic parameters of each heterogeneous terminal may include selecting, as the heterogeneous terminals participating in local training, the heterogeneous terminals whose training characteristic parameters are greater than a preset characteristic threshold from several heterogeneous terminals.
[0108] Alternatively, selecting multiple heterogeneous terminals to participate in local training from several heterogeneous terminals according to the training characteristic parameters of each heterogeneous terminal may include performing a sorting process on several heterogeneous terminals according to the training characteristic parameters of each heterogeneous terminal to obtain the sorting serial numbers of each heterogeneous terminal, where the sorting serial number of a heterogeneous terminal is positively correlated with the training characteristic parameter of the heterogeneous terminal; selecting, as the heterogeneous terminals participating in local training, the heterogeneous terminals whose sorting serial numbers are greater than or equal to a preset serial number threshold from several heterogeneous terminals, and the number of the selected heterogeneous terminals is equal to the total number of the above training terminals.
[0109] The obtaining of the training characteristic parameters of each heterogeneous terminal above may be executed in parallel, for example, determining the training characteristic parameters of each heterogeneous terminal simultaneously; or the obtaining of the training characteristic parameters of each heterogeneous terminal above may be executed serially, for example, determining the training characteristic parameters of each heterogeneous terminal in sequence, but not limited thereto.
[0110] The acquisition of the above operation performance data, the above communication performance data, and the above gradient norm value can be performed in parallel. For example, the operation performance data of the above heterogeneous terminals with respect to the current training round, the communication performance data of the above heterogeneous terminals with respect to the current training round, and the gradient norm value of the local model of the above heterogeneous terminals with respect to the current training round are determined simultaneously.
[0111] Alternatively, the acquisition of the above operation performance data, the above communication performance data, and the above gradient norm value can be performed serially. For example, first, the operation performance data of the above heterogeneous terminals with respect to the current training round is acquired, then the communication performance data of the above heterogeneous terminals with respect to the current training round is acquired, and finally the gradient norm value of the local model of the above heterogeneous terminals with respect to the current training round is acquired, but it is not limited to this.
[0112] In some embodiments, before controlling each training terminal to perform local training, the method may further include:
[0113] Updating the initial training rounds of the training terminals according to the operation efficiency and data volume of the training terminals, in combination with the total number of training terminals, the total terminal data volume, and the total operation efficiency, to obtain the total training rounds of the training terminals;
[0114] Wherein, the total terminal data volume is the sum of the data volumes of all training terminals, and the total operation efficiency is the sum of the operation efficiencies of all training terminals.
[0115] In this embodiment, before controlling each training terminal to perform local training, it is necessary to determine the total training rounds of each training terminal to improve the accuracy of the training rounds and the local training accuracy of each training terminal, and reduce the occurrence of insufficient or excessive local training. Specifically, for each training terminal, first, the initial training rounds of the training terminal are acquired; then, according to the operation efficiency and data volume of the training terminal, in combination with the total number of training terminals, the total terminal data volume, and the total operation efficiency, the initial training rounds of the training terminal are updated to obtain the total training rounds of the training terminal.
[0116] The initial training rounds of the above training terminals can be set according to the actual situation, and this embodiment does not make specific limitations on this.
[0117] The above total terminal data volume refers to the sum of the data volumes of all training terminals, where the data volume of a training terminal refers to the training data volume of the training terminal in a single local training.
[0118] The above total operation efficiency refers to the sum of the operation efficiencies of all training terminals.
[0119] Updating the initial training rounds of the training terminals according to the computing efficiency and data volume of the training terminals, in combination with the total number of training terminals, the total terminal data volume, and the total computing efficiency, to obtain the total training rounds of the training terminals may include determining the round correction value of the training terminals by combining the total number of training terminals, the total terminal data volume, the total computing efficiency, and the computing efficiency and data volume of the training terminals with machine learning methods; calculating the sum of the round correction value of the training terminals and the initial training rounds as the total training rounds of the training terminals, but not limited thereto.
[0120] Alternatively, updating the initial training rounds of the training terminals according to the computing efficiency and data volume of the training terminals, in combination with the total number of training terminals, the total terminal data volume, and the total computing efficiency, to obtain the total training rounds of the training terminals may include obtaining the total training rounds of the training terminals through the following formula (8) according to the total number of training terminals, the total terminal data volume, the total computing efficiency, and the computing efficiency and data volume of the training terminals:
[0121] (8);
[0122] In formula (8), represents the total training rounds of the th training terminal; represents the total number of training terminals, that is, the number of heterogeneous terminals selected to participate in local training; represents the initial training rounds of the th training terminal; represents the data volume of the th training terminal; represents the total terminal data volume, that is, the sum of the data volumes of all training terminals; represents that the th training terminal is selected to participate in local training; represents the set of training terminals; represents the average computing efficiency of all training terminals, which satisfies the following formula (9):
[0123] (9);
[0124] In formula (9), represents the computing efficiency of the th training terminal; represents the total computing efficiency, that is, the sum of the computing efficiencies of all training terminals.
[0125] In some embodiments, controlling each training terminal to perform local training may include:
[0126] The control training terminal performs local training on the local model of the training terminal based on the local model parameters of the training terminal and the global model parameters of the digital twin model;
[0127] When the training terminal completes the local training of the current training round, update the local model parameters of the training terminal to obtain the updated local model parameters as the local model parameters of the training terminal;
[0128] Compare the current training round with the total number of training rounds of the training terminal;
[0129] If the current training round is less than the total number of training rounds, increment the current training round by one and return to the step of controlling the training terminal to perform local training on the local model of the training terminal based on the local model parameters of the training terminal and the global model parameters of the digital twin model;
[0130] If the current training round is greater than or equal to the total number of training rounds, determine that the training terminal has completed local training and perform correction processing on the local model parameters of the training terminal to obtain the corrected local model parameters.
[0131] In this embodiment, for each training terminal, first, the control training terminal performs local training on the local model of the training terminal based on the local data set of the training terminal, the local model parameters of the training terminal, and the global model parameters of the digital twin model. Among them, the local data set of the training terminal may include the operation data of industrial heterogeneous terminals, device parameters, and the operation data of virtual entities corresponding to industrial heterogeneous terminals. Among them, the operation data of industrial heterogeneous terminals can indicate the operation status of industrial heterogeneous terminals, which can include temperature data, pressure data, vibration data, and hardware load data of industrial heterogeneous terminals, etc. The device parameters of industrial heterogeneous terminals can include the device model, specifications, service life, and device maintenance time value of industrial heterogeneous terminals, etc. The local model configured by the training terminal can be the digital twin model of the training terminal. This local model and the subsequent obtained global digital twin model are essentially the same. The local model parameters of the local model can be pre-set hyperparameters. For the global model parameters of the digital twin model in the current training round, since it involves asynchronous global update and synchronous global update, this part will be described in detail later. When the training terminal completes the local training of the current training round, update the local model parameters of the training terminal to obtain the updated local model parameters as the local model parameters of the training terminal; then, determine whether the current training round is less than the total number of training rounds of the training terminal; if so, it means that the local training has not been completed. At this time, increment the current training round by one and return to the step of performing local training on the local model of the training terminal to achieve iterative training; if not, determine that the training terminal has completed local training and perform correction processing on the local model parameters of the training terminal to obtain the corrected local model parameters.
[0132] It can be seen that this embodiment implements the training of the local model of the training terminal based on the local model parameters of the training terminal and the global model parameters of the digital twin model. When the local training of each round is completed, the local model parameters of the training terminal are updated, and when the local training of all rounds is completed, the local model parameters of the training terminal are corrected. In this way, the accuracy of the local model parameters of the training terminal can be improved, the local training accuracy of the training terminal can be ensured, and the phenomena of insufficient local training or excessive local training can be reduced.
[0133] The above update of the local model parameters of the training terminal to obtain the updated local model parameters may include updating the local model parameters of the training terminal through a preset parameter optimization algorithm to obtain the updated local model parameters, but is not limited thereto.
[0134] The above parameter optimization algorithm can be set according to the actual situation, and this embodiment does not make specific limitations on this.
[0135] For example, the above parameter optimization algorithm can be the gradient descent method; or, the above parameter optimization algorithm can be the stochastic gradient descent method, but is not limited thereto.
[0136] Or, the above update of the local model parameters of the training terminal to obtain the updated local model parameters may include updating the local model parameters of the training terminal based on the average local gradient to obtain the updated local model parameters, as shown in the following formula (10):
[0137] (10);
[0138] In formula (10), represents the updated local model parameters of the th training terminal, that is, the local model parameters of the th training terminal in the th training round; represents the local model parameters of the th training terminal, that is, the local model parameters of the th training terminal in the th training round; represents the preset learning rate; represents the average local gradient of the th training terminal in the th training round, which satisfies the following formula (11):
[0139] (11);
[0140] In formula (11), represents in the In the th training round of the th training terminal, the local model parameters after the th update; represents the total number of training rounds of the th training terminal; represents that in the th training round, when the local model parameters of the th training terminal are the loss function value of the local model of the th training terminal;
[0141] The above-mentioned correction process for the local model parameters of the training terminal to obtain the corrected local model parameters may include correcting the local model parameters of the training terminal if they exceed the preset parameter range to obtain the corrected local model parameters, and the corrected local model parameters are within the parameter range, but are not limited thereto.
[0142] In some embodiments, the above-mentioned correction process for the local model parameters of the training terminal to obtain the corrected local model parameters may include:
[0143] Correcting the local model parameters of the training terminal according to the model version number data of the training terminal to obtain the corrected local model parameters; wherein, the model version number data of the training terminal is the difference between the global model version number of the digital twin model and the local model version number of the training terminal.
[0144] In this embodiment, correcting the local model parameters of the training terminal according to the difference between the global model version number of the digital twin model and the local model version number of the training terminal to obtain the corrected local model parameters, thus improving the accuracy of the local model parameters of the training terminal and ensuring the local training accuracy of the training terminal.
[0145] The above-mentioned model version number data of the training terminal is used to measure the obsolescence degree or training lag degree of the local model of the training terminal.
[0146] The above-mentioned model version number data of the training terminal refers to the difference between the global model version number of the digital twin model and the local model version number of the training terminal.
[0147] The above-mentioned correction process of the local model parameters of the training terminal based on the model version number data of the training terminal to obtain the corrected local model parameters may include finding the model parameter correction value corresponding to the model version number data of the training terminal from the first version mapping data, and calculating the sum of the model parameter correction value and the local model parameters of the training terminal as the corrected local model parameters. The first version mapping data may include multiple preset model version number data and the corresponding model parameter correction values for each preset model version number data, but is not limited thereto.
[0148] The above-mentioned first version mapping data may be chart data or table data, but is not limited thereto.
[0149] Alternatively, the above-mentioned correction process of the local model parameters of the training terminal based on the model version number data of the training terminal to obtain the corrected local model parameters may include obtaining the corrected local model parameters according to the model version number data of the training terminal and the local model parameters through the following formula (12):
[0150] (12);
[0151] In formula (12), represents the corrected local model parameters of the th training terminal; represents the global model parameters of the digital twin model in the th round of training; represents the aging degree of the th training terminal, which satisfies the following formula (13):
[0152] (13);
[0153] In formula (13), represents the model version number data of the th training terminal, that is, the global model version number of the digital twin model relative to the local model version number of the th training terminal difference.
[0154] In some embodiments, the above-mentioned asynchronous global update or synchronous global update of the global model parameters of the digital twin model may include:
[0155] If it is detected that there is a training terminal that has completed local training at the current moment, the training terminal that has completed local training at the current moment is determined as an idle terminal, and the training terminals that have not completed local training at the current moment are determined as occupied terminals;
[0156] When the model version number data of the idle terminal is less than the preset version threshold, the global model parameters of the digital twin model are asynchronously globally updated according to the local model parameters and data volumes of each training terminal, in combination with the total terminal data volume, to obtain the updated global model parameters; among them, the local model parameters of the training terminals that have completed local training before the current moment and the local model parameters of the idle terminals are both the corrected local model parameters, and the local model parameters of the occupied terminals are the local model parameters of the previous training round of the current training round.
[0157] Update the global model version number of the digital twin model to obtain the updated global model version number.
[0158] In this embodiment, during the local training of each training terminal, the training terminals that have completed local training at the current moment are detected; if it is detected that there are training terminals that have completed local training at the current moment, first, the training terminals that have completed local training at the current moment are determined as idle terminals, and the training terminals that have not completed local training at the current moment are determined as occupied terminals, and then the model version number data of the idle terminals is compared with the preset version threshold. If the model version number data of the idle terminals is less than the preset version threshold, it indicates that the difference between the global model version number of the digital twin model and the local model version number of the idle terminals is small. In this way, it can be determined that the obsolescence degree or training lag degree of the local models of other training terminals is small, and at this time, asynchronous global update is performed.
[0159] Specifically, during the asynchronous global update, the global model parameters of the digital twin model are asynchronously globally updated according to the local model parameters and data volumes of each training terminal, in combination with the total terminal data volume, to obtain the updated global model parameters, where the local model parameters of the training terminals that have completed local training before the current moment and the local model parameters of the idle terminals are both the corrected local model parameters, and the local model parameters of the occupied terminals are the local model parameters of the previous training round of the current training round; and during the asynchronous global update, the global model version number of the digital twin model is updated.
[0160] In this way, in the case where the model version number data of the idle terminal is less than the preset version threshold, the global model parameter update of the digital twin model of industrial heterogeneous terminals is realized through the above asynchronous global update method, which can not only effectively reduce the inherent lag effect and model obsolescence problem, but also balance the training cost and model loss of the digital twin model of industrial heterogeneous terminals, enabling the digital twin model of industrial heterogeneous terminals to quickly respond to the dynamically variable environment in the industrial intelligent manufacturing scenario and ensuring the data consistency between the virtual and real spaces of industrial intelligent manufacturing, thereby improving the modeling accuracy of the digital twin model of industrial heterogeneous terminals.
[0161] The above version threshold can be set according to the actual situation, and this embodiment does not make specific limitations on this.
[0162] The above-mentioned asynchronous global update of the global model parameters of the digital twin model according to the local model parameters and data volumes of each training terminal, in combination with the total terminal data volume, to obtain the updated global model parameters may include calculating the mean of the data volumes of each training terminal as the average data volume, weighting the average data volume and the total terminal data volume to obtain the overall data volume, where the sum of the weights of the average data volume and the total terminal data volume is one; calculating the mean of the local model parameters of each training terminal as the average model parameter; obtaining the correction value of the global model parameters according to the overall data volume and the average model parameter, in combination with the method of machine learning; calculating the sum of the correction value of the global model parameters and the global model parameters of the digital twin model as the updated global model parameters.
[0163] Alternatively, the above-mentioned asynchronous global update of the global model parameters of the digital twin model according to the local model parameters and data volumes of each training terminal, in combination with the total terminal data volume, to obtain the updated global model parameters may include, according to the total terminal data volume and the local model parameters and data volumes of each training terminal, through the following formula (14), performing asynchronous global update on the global model parameters of the digital twin model to obtain the updated global model parameters:
[0164] (14);
[0165] In formula (14), represents the updated global model parameters; represents the th training terminal's data volume; represents the total terminal data volume, that is, the sum of the data volumes of all training terminals; represents the total number of training terminals, that is, the number of heterogeneous terminals selected to participate in local training.
[0166] It should be noted that in this embodiment, for the meaning of the parameter in the above formula (14), in the asynchronous global update, only the local model parameters of the training terminals that have completed local training before the current moment and the local model parameters of the idle terminals are the corrected local model parameters, that is, shown in the above formula (12); while the local model parameters of the occupied terminals are the local model parameters of the previous training round of the current training round. For example, if the current training round is the th training round, then the local model parameters of the occupied terminals are the local model parameters of the th training round, as shown in the above formula (10).
[0167] Updating the global model version number of the digital twin model as described above to obtain the updated global model version number may include finding, from the second version mapping data, the version number corresponding to the global model parameters after asynchronous global update as the updated global model version number, so as to implement the update of the global model version number of the digital twin model, where the second version mapping data includes multiple preset global model parameters and the version numbers corresponding to each preset global model parameter.
[0168] The above-mentioned second version mapping data may be chart data or table data, but is not limited thereto.
[0169] Alternatively, updating the global model version number of the digital twin model as described above to obtain the updated global model version number may include calculating the sum of the global model version number of the digital twin model and one as the updated global model version number, that is , is the global model version number of the digital twin model, but is not limited thereto.
[0170] In some embodiments, the above-mentioned asynchronous global update or synchronous global update of the global model parameters of the digital twin model may further include:
[0171] When the model version number data of the idle terminal is greater than or equal to the preset version threshold, controlling each occupied terminal to stop local training;
[0172] According to the local model parameters and data volumes of each training terminal, combined with the total terminal data volume, synchronously globally update the global model parameters of the digital twin model to obtain the updated global model parameters; where, the local model parameters of the training terminals that have completed local training before the current moment and the local model parameters of the idle terminals are both the corrected local model parameters, and the local model parameters of the occupied terminals are the local model parameters of the current training round;
[0173] Update the global model version number of the digital twin model to obtain the updated global model version number.
[0174] In this embodiment, if the model version number data of the idle terminal is greater than or equal to the preset version threshold, it indicates that the difference between the global model version number of the digital twin model and the local model version number of the idle terminal is relatively large. In this way, it can be determined that the local models of other training terminals are relatively outdated or lagging behind in training, and there may be inherent lagging effects and model obsolescence problems in other training terminals. At this time, synchronous global update is performed.
[0175] Specifically, during the synchronous global update, first, the training terminals that have not completed local training at the current moment are controlled to stop local training; then, based on the local model parameters and data volumes of each training terminal, combined with the total terminal data volume, synchronous global update is performed on the global model parameters of the digital twin model to obtain the updated global model parameters, where the local model parameters of the training terminals that have completed local training before the current moment and the local model parameters of the idle terminals are both the corrected local model parameters, and the local model parameters of the occupied terminals are the local model parameters of the current training round; and, during the synchronous global update, the global model version number of the digital twin model is updated.
[0176] In this way, in the case where the model version number data of the idle terminals is greater than or equal to the preset version threshold, by means of synchronous global update to implement the update of the global model parameters of the digital twin model of industrial heterogeneous terminals, it can not only effectively reduce the inherent lag effect and model obsolescence problems, but also balance the training cost and model loss of the digital twin model of industrial heterogeneous terminals, enabling the digital twin model of industrial heterogeneous terminals to quickly respond to the dynamically variable environment in the industrial intelligent manufacturing scenario and ensuring the data consistency between the virtual and real spaces of industrial intelligent manufacturing, thereby improving the modeling accuracy of the digital twin model of industrial heterogeneous terminals.
[0177] The implementation method of performing synchronous global update on the global model parameters of the digital twin model according to the local model parameters and data volumes of each training terminal, combined with the total terminal data volume, to obtain the updated global model parameters can refer to the content recorded in the foregoing embodiments, and will not be elaborated here. It should be noted that in this embodiment, for the parameter in the above formula (14), in the synchronous global update, only the local model parameters of the training terminals that have completed local training before the current moment and the local model parameters of the idle terminals are both the corrected local model parameters, that is, the shown in the above formula (12); while the local model parameters of the occupied terminals are the local model parameters of the current training round. For example, if the current training round is the th training round, then the local model parameters of the occupied terminals are the local model parameters of the th training round, as shown in the above formula (10) .
[0178] Updating the global model version number of the digital twin model as described above to obtain the updated global model version number may include finding, from the third version mapping data, the version number corresponding to the globally updated global model parameters of the digital twin model as the updated global model version number, so as to implement the update of the global model version number of the digital twin model, where the third version mapping data includes multiple preset global model parameters and the version number corresponding to each preset global model parameter.
[0179] The above-mentioned third version mapping data may be chart data or table data, but is not limited thereto.
[0180] Alternatively, updating the global model version number of the digital twin model as described above to obtain the updated global model version number may include calculating the sum of the global model version number of the digital twin model and one as the updated global model version number, that is , but is not limited thereto.
[0181] In some embodiments, after synchronously and globally updating the global model parameters of the digital twin model according to the local model parameters and data volume of each training terminal and combining the total terminal data volume to obtain the updated global model parameters, the above method may further include:
[0182] Prohibit idle terminals from performing local training;
[0183] For each occupied terminal, use the updated global model version number as the local model version number of the occupied terminal, and perform local training on the local model of the occupied terminal based on the total number of training rounds, local model parameters of the occupied terminal, and the global model parameters of the digital twin model after synchronous global update.
[0184] In this embodiment, after the synchronous global update, two operations are performed. One operation is to prohibit idle terminals from performing local training, that is, the training terminals that have completed local training will no longer participate in subsequent local training; the other operation is to control the training terminals that have not yet completed local training to continue training. Specifically, for each occupied terminal, the updated global model version number is used as the local model version number of the occupied terminal, and based on the total number of training rounds and local model parameters of the occupied terminal and the global model parameters of the digital twin model after the synchronous global update, local training is performed on the local model of the occupied terminal. In this way, after the global model parameters of the digital twin model of industrial heterogeneous terminals are updated in this embodiment, based on the total number of training rounds and local model parameters of each occupied terminal and the global model parameters of the digital twin model after the synchronous global update, each occupied terminal is controlled to restart local training, and the local model version number of each occupied terminal is updated, which can balance the training cost and model loss of the digital twin model of industrial heterogeneous terminals, reduce the lag effect and model obsolescence problem of each occupied terminal, and thus improve the modeling accuracy of the digital twin model of industrial heterogeneous terminals.
[0185] In some embodiments, the above asynchronous global update or synchronous global update of the global model parameters of the digital twin model may further include:
[0186] During the asynchronous global update, idle terminals are prohibited from performing local training, and for each occupied terminal, local training is performed on the local model of the occupied terminal based on the total number of training rounds and local model parameters of the occupied terminal and the global model parameters of the digital twin model before the asynchronous global update.
[0187] In this embodiment, during the asynchronous global update, two operations are performed simultaneously. One operation is to update the global model parameters and global model version number of the digital twin model, and the other operation is to control the training terminals that have not yet completed local training to continue training. For the above-mentioned other operation, idle terminals are prohibited from performing local training, that is, the training terminals that have completed local training will no longer participate in subsequent local training; at the same time, each occupied terminal is controlled to continue training. Specifically, for each occupied terminal, local training is performed on the local model of the occupied terminal based on the total number of training rounds and local model parameters of the occupied terminal and the global model parameters of the digital twin model before the asynchronous global update. In this way, in this embodiment, while updating the global model parameters of the digital twin model of industrial heterogeneous terminals, the local training of other training terminals is promoted, ensuring the modeling efficiency of the digital twin model of industrial heterogeneous terminals.
[0188] In some embodiments, the above construction of the digital twin model according to the global model parameters of the digital twin model may include:
[0189] According to the global model parameters after each asynchronous global update or each synchronous global update, a digital twin model is sequentially mapped and formed in the digital twin layer.
[0190] In this embodiment, each asynchronous global update or synchronous global update will update the global model parameters of the digital twin model. Therefore, multiple updated global model parameters can be obtained. Based on this, according to the global model parameters after each update, a complete and global digital twin model is sequentially constructed in the digital twin layer. Further, based on the global model parameters after the last update, a final and global digital twin model is formed in the digital twin layer, thus improving the modeling accuracy of the digital twin model. The global digital twin model refers to the digital twin model of industrial heterogeneous terminals in the industrial intelligent manufacturing scenario, and this global digital twin model is applicable to all industrial heterogeneous terminals and has universality.
[0191] The above digital twin model can be expressed by the following formula (15):
[0192] (15);
[0193] In formula (15), represents the digital twin model of industrial heterogeneous terminals in the th round of training; represents the generation function used to generate the digital twin model in the digital twin layer; represents the global model parameters of the digital twin model in the th round of training; represents the connection between the physical entity and the virtual entity in the th round of training, that is, the connection between the industrial heterogeneous terminal and the virtual entity corresponding to the industrial heterogeneous terminal in the th round of training. It can be set according to the actual situation. For example, it can be a pre-calibrated mapping table that records the connection between each industrial heterogeneous terminal and its corresponding virtual entity; represents the operating state of the physical entity in the th round of training, that is, the operating data of the industrial heterogeneous terminal in the th round of training, such as temperature data, pressure data, vibration data, and hardware load data, etc.; represents the operating state of the virtual entity corresponding to the physical entity in the th round of training, that is, the operating data of the virtual entity corresponding to the industrial heterogeneous terminal in the th round of training. Its acquisition method is recorded in the foregoing embodiments and will not be elaborated here; represents the digital twin model data in the th round of training, which includes the The operation data and device parameters of industrial heterogeneous terminals in the training round, etc.
[0194] It can be understood that in the actual industrial intelligent manufacturing scenario, after obtaining the global digital twin model, for any industrial heterogeneous terminal, according to the global model parameters updated last time, the real-time data of the industrial heterogeneous terminal, and the historical data of the industrial heterogeneous terminal, combined with the above formula (15), the digital twin model of the industrial heterogeneous terminal can be obtained. Among them, the real-time data of the industrial heterogeneous terminal can include the connection between the industrial heterogeneous terminal and the virtual entity corresponding to the industrial heterogeneous terminal at the current moment, the operation data of the industrial heterogeneous terminal at the current moment, and the operation data of the virtual entity corresponding to the industrial heterogeneous terminal at the current moment. The historical data of the industrial heterogeneous terminal can include the operation data and device parameters of the industrial heterogeneous terminal at historical moments.
[0195] To facilitate the understanding of the above digital twin model modeling method of the present application, an actual application scenario of the above digital twin model modeling method of the present application is taken as an example for illustration here.
[0196] In the industrial intelligent manufacturing scenario, there are several industrial heterogeneous terminals and an edge server configured. The edge server and all industrial heterogeneous terminals are connected to the industrial Internet of Things. Each industrial heterogeneous terminal is equipped with a corresponding local model, which is an initial digital twin model. The edge server is equipped with a digital twin layer, which is used to store the global model parameters of the digital twin model and construct the global digital twin model, and the global digital twin model is a digital twin model applicable to each industrial heterogeneous terminal. Among them, the industrial heterogeneous terminal selected to participate in local training is called the training terminal. Each training terminal is used to locally train its local model, and update its local model parameters when the current training round is completed or when the global update is synchronized, and upload the updated local model parameters to the edge server; the edge server is used to update the global model parameters of the digital twin model based on the local model parameters uploaded by each heterogeneous terminal, and after all heterogeneous terminals have completed training, construct the digital twin model of the industrial heterogeneous terminal according to the global model parameters of the digital twin model. Refer to Figure 2 , the process of constructing the digital twin model of the industrial heterogeneous terminal in this example is as follows in steps S201 - S204.
[0197] S201, the edge server determines the computing power and communication capabilities of each industrial heterogeneous terminal through the upper confidence bound recognition method of the optimistic estimation strategy, and obtains the gradient norm value of the local model of each industrial heterogeneous terminal. Then, based on the computing power, communication capabilities, and gradient norm value of the local model of each industrial heterogeneous terminal, select the top industrial heterogeneous terminals from several industrial heterogeneous terminals to participate in local training.
[0198] Specifically, first, determine the confidence radius of each industrial heterogeneous terminal relative to the current training round through the above formula (1); use the computing efficiency and confidence radius of each industrial heterogeneous terminal, and combine the above formulas (2)-(3) to obtain the computing performance data of each industrial heterogeneous terminal relative to the current training round; use the communication efficiency and confidence radius of each industrial heterogeneous terminal, and combine the above formulas (4)-(5) to obtain the communication performance data of each industrial heterogeneous terminal relative to the current training round; use the historical loss function of each industrial heterogeneous terminal, and combine the above formula (6) to obtain the gradient norm value of the local model of each industrial heterogeneous terminal relative to the current training round; then, use the computing performance data, communication performance data and gradient norm value of each industrial heterogeneous terminal, and combine the above formula (7) to obtain the training characteristic parameters of each industrial heterogeneous terminal; after that, according to the training characteristic parameters of each industrial heterogeneous terminal, sort several industrial heterogeneous terminals from large to small, and select the first industrial heterogeneous terminals as the industrial heterogeneous terminals participating in local training.
[0199] S202. For each training terminal, based on the computing power of the training terminal and the amount of local data owned by the training terminal, the edge server adaptively adjusts the local training rounds of the training terminal through the above formulas (8)-(9) to obtain the total training rounds of the training terminal and send them to the training terminal.
[0200] S203. For each training terminal, the training terminal performs local training on its local model based on its local model parameters and the global model parameters of the digital twin model; if the training terminal completes the local training of the current training round, the training terminal updates its local model parameters once by averaging the local gradients to obtain the updated local model parameters as the local model parameters of the training terminal. The update method is as shown in the above formulas (10)-(11), and it is judged whether the current training round is less than the total training rounds of the training terminal. If so, it means that the local training has not been completed. At this time, increment the current training round by one and return to the step of performing local training on the local model of the training terminal to achieve iterative training. Otherwise, the training terminal determines that its local training is completed, and corrects the local model parameters of the training terminal based on the aging principle, as shown in the above formulas (12)-(13), and then obtains the corrected local model parameters and uploads them to the edge server.
[0201] If the edge server receives the local model parameters uploaded by the training terminal that has completed local training at the current moment, it indicates that there is a training terminal that has completed local training at the current moment. At this time, the edge server determines the training terminal that has completed local training at the current moment as an idle terminal, determines the training terminal that has not completed local training at the current moment as an occupied terminal, and judges whether the model version number data of the idle terminal is less than the preset version threshold. If so, it performs asynchronous global update; otherwise, it performs synchronous global update.
[0202] More specifically, when the idle terminal completes local training, it will upload its corrected local model parameters to the edge server. After the edge server receives the local model parameters of the idle terminal , it calculates the model version number data of the idle terminal and compares it with the preset version threshold . For comparison.
[0203] If , the edge server first aggregates the local model parameters of the idle terminal and the global model parameters, updates the global model parameters through formula (14) to form new global model parameters. In the asynchronous global update, only the local model parameters of the training terminals that have completed local training before the current moment and the local model parameters of the idle terminal are the corrected local model parameters, while the local model parameters of the occupied terminal are the local model parameters of the previous training round of the current training round. Then let (that is, increment the global model version number by one), (that is, add the idle terminal to the set ), is the global model version number of the digital twin model, represents the set of training terminals that execute asynchronous global update, and this set does not participate in local training. During this period, the remaining occupied terminals still use the unupdated global model parameters for local training, represents the set of training terminals, represents the set of training terminals that execute synchronous global update.
[0204] If , then all occupied terminals Suspend. The edge server aggregates the global model parameters and the local model parameters of all training terminals, updates the global model parameters through formula (14) to form new global model parameters. In synchronous global update, the local model parameters of the training terminals that have completed local training before the current moment and the local model parameters of the idle terminals are all the corrected local model parameters, and the local model parameters of the occupied terminals are the local model parameters of the current training round. Then let (that is, increment the global model version number by one), (that is, add the idle terminals to the set ), and this set does not participate in local training.
[0205] After synchronous global update, the edge server distributes the updated global model version number and global model parameters to each occupied terminal; for each occupied terminal, set (that is, set the local model version number of each occupied terminal to the updated global model version number), and continue local training with the updated global model parameters.
[0206] S204. The edge server maps the weighted global model parameters in the digital twin layer to form a digital twin model applicable to any industrial heterogeneous terminal, as shown in formula (15) above.
[0207] In this example, for any industrial heterogeneous terminal, according to the globally updated model parameters after the last update, the real-time data of the industrial heterogeneous terminal, and the historical data of the industrial heterogeneous terminal, combined with formula (15) above, the digital twin model of the industrial heterogeneous terminal can be obtained. Among them, the real-time data of the industrial heterogeneous terminal can include the connection between the industrial heterogeneous terminal and the virtual entity corresponding to the industrial heterogeneous terminal at the current moment, the operating data of the industrial heterogeneous terminal at the current moment, and the operating data of the virtual entity corresponding to the industrial heterogeneous terminal at the current moment. The historical data of the industrial heterogeneous terminal can include the operating data and device parameters of the industrial heterogeneous terminal at historical moments.
[0208] As an extensible application, after obtaining the digital twin models of each industrial heterogeneous terminal, fault detection is performed on each industrial heterogeneous terminal. Specifically, the operating state of each industrial heterogeneous terminal can be obtained through the digital twin model of each industrial heterogeneous terminal, and then the preset fault detection model is used to perform fault detection on the operating state of each industrial heterogeneous terminal to obtain the result indicating whether each industrial heterogeneous terminal is faulty. This is beneficial to reducing the fault risk of industrial heterogeneous terminals and facilitating preventive equipment maintenance.
[0209] In addition, referring to Figure 3 , the embodiment of the present application also provides a modeling device for the digital twin model, and this device may include:
[0210] An acquisition module 301, configured to acquire the operation characteristic data of a plurality of heterogeneous terminals;
[0211] A first processing module 302, configured to select multiple heterogeneous terminals participating in local training from the plurality of heterogeneous terminals as training terminals according to the operation characteristic data of each heterogeneous terminal;
[0212] A second processing module 303, configured to control each training terminal to perform local training, and asynchronously globally update or synchronously globally update the global model parameters of the digital twin model during local training;
[0213] A third processing module 304, configured to, if all training terminals have completed local training, construct a digital twin model according to the global model parameters of the digital twin model.
[0214] The content in the above method embodiments is applicable to the device embodiments of the present application. The functions specifically implemented by the device embodiments of the present application are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those in the above method embodiments.
[0215] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order mentioned in the operation diagrams. For example, depending on the functions / operations involved, two consecutive blocks shown may actually be executed substantially simultaneously or the blocks can sometimes be executed in the reverse order. In addition, the embodiments presented and described in the flowcharts of the present application are provided by way of example for the purpose of providing a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logical flows presented herein. Alternative embodiments are contemplated, where the order of various operations is changed and where sub-operations described as part of a larger operation are executed independently.
[0216] In addition, although the present application is described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the functions and / or features may be integrated in a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It can also be understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present application. More precisely, considering the attributes, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the ordinary skills of an engineer. Therefore, those skilled in the art can implement the present application set forth in the claims without undue experimentation using ordinary skills. It can also be understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present application, which is determined by the full scope of the appended claims and their equivalents.
[0217] When the above functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several programs for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs, Read-Only Memories), random access memories (RAMs, Random Access Memories), magnetic disks, or optical discs.
[0218] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable programs for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by a program execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute programs from a program execution system, apparatus, or device), or in combination with these program execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with a program execution system, apparatus, or device.
[0219] More specific examples (nonexhaustive list) of computer-readable media include the following: electrical connection parts with one or more wirings (electronic devices), portable computer disk cartridges (magnetic devices), random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical fiber devices, and portable compact disc read-only memories (CDROMs). Additionally, a computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or otherwise processing it as appropriate, and then storing it in a computer memory.
[0220] It should be understood that each part of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable program execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0221] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples", etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0222] Although the embodiments of the present application have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and purposes of the present application, and the scope of the present application is defined by the claims and their equivalents.
[0223] The above is a specific description of the preferred embodiments of the present application, but the present application is not limited to the described embodiments. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present application, and these equivalent deformations or substitutions are all included within the scope defined by the claims of the present application.
Claims
1. A modeling method for a digital twin model, characterized in that, The method includes the following steps: Obtain the operation characteristic data of a number of heterogeneous terminals; wherein, the operation characteristic data includes operation efficiency, communication efficiency, and historical loss function; the historical loss function is the loss function value of the local model of the heterogeneous terminal in the previous training round before the current training round; According to the operation characteristic data of each heterogeneous terminal, select multiple heterogeneous terminals participating in local training from the number of heterogeneous terminals as training terminals; Control each training terminal to perform local training, and asynchronously globally update or synchronously globally update the global model parameters of the digital twin model during local training; If all the training terminals have completed local training, construct the digital twin model according to the global model parameters of the digital twin model; Among them, if it is detected that there is a training terminal that has completed local training at the current moment, determine the training terminal that has completed local training at the current moment as an idle terminal, and determine the training terminals that have not completed local training at the current moment as occupied terminals; when the model version number data of the idle terminal is less than a preset version threshold, according to the local model parameters and data volume of each training terminal, combined with the total terminal data volume, asynchronously globally update the global model parameters of the digital twin model to obtain the updated global model parameters, wherein, if the model version number data of the idle terminal is less than a preset version threshold, it indicates that the difference between the global model version number of the digital twin model and the local model version number of the idle terminal is small; when the model version number data of the idle terminal is greater than or equal to the preset version threshold, control each occupied terminal to stop local training; according to the local model parameters and data volume of each training terminal, combined with the total terminal data volume, synchronously globally update the global model parameters of the digital twin model to obtain the updated global model parameters.
2. The modeling method of the digital twin model according to claim 1, characterized in that, The step of selecting multiple heterogeneous terminals participating in local training from the number of heterogeneous terminals as training terminals according to the operation characteristic data of each heterogeneous terminal includes: According to the selection times of each heterogeneous terminal, combined with the total number of training terminals and historical selection times, obtain the confidence radius of each heterogeneous terminal relative to the current training round; wherein, the selection times of the heterogeneous terminal is the number of times the heterogeneous terminal is selected to participate in local training before the current training round; the total number of training terminals is the number of heterogeneous terminals selected to participate in local training; the historical selection times is the number of times the historical heterogeneous terminals are selected to participate in local training before the current training round; the historical heterogeneous terminals are the heterogeneous terminals selected to participate in local training in the previous training round before the current training round; According to the operation efficiency and selection times of each heterogeneous terminal, combined with the confidence radius of each heterogeneous terminal relative to the current training round, obtain the operation performance data of each heterogeneous terminal relative to the current training round; the operation performance data is used to characterize the operation performance of the heterogeneous terminal when locally training its local model in the current training round; Based on the communication efficiency and selection times of each heterogeneous terminal, and in combination with the confidence radius of each heterogeneous terminal relative to the current training round, obtain the communication performance data of each heterogeneous terminal relative to the current training round; the communication performance data is used to characterize the communication performance of the heterogeneous terminal when locally training its local model in the current training round; Based on the historical loss functions of each heterogeneous terminal, obtain the gradient norm values of the local models of each heterogeneous terminal relative to the current training round; Based on the operation performance data and communication performance data of each heterogeneous terminal relative to the current training round, and in combination with the gradient norm values of the local models of each heterogeneous terminal relative to the current training round, obtain the training characteristic parameters of each heterogeneous terminal; the training characteristic parameters are used to characterize the performance of the heterogeneous terminal when locally training its local model; Based on the training characteristic parameters of each heterogeneous terminal, select multiple heterogeneous terminals participating in local training from several heterogeneous terminals as the training terminals.
3. The modeling method of the digital twin model according to claim 1, characterized in that, Before controlling each training terminal to perform local training, the method further includes the following steps: Based on the operation efficiency and data volume of the training terminal, and in combination with the total number of training terminals, the total terminal data volume and the total operation efficiency, update the initial training rounds of the training terminal to obtain the total training rounds of the training terminal; Wherein, the total terminal data volume is the sum of the data volumes of all the training terminals, and the total operation efficiency is the sum of the operation efficiencies of all the training terminals.
4. The modeling method of the digital twin model according to claim 1, characterized in that The controlling each training terminal to perform local training includes: Controlling the training terminal to locally train the local model of the training terminal based on the local model parameters of the training terminal and the global model parameters of the digital twin model; In the case where the training terminal completes the local training of the current training round, update the local model parameters of the training terminal to obtain the updated local model parameters as the local model parameters of the training terminal; Compare the current training round with the total training rounds of the training terminal; If the current training round is less than the total training rounds, increment the current training round by one and return to the step of controlling the training terminal to locally train the local model of the training terminal based on the local model parameters of the training terminal and the global model parameters of the digital twin model; If the current training round is greater than or equal to the total training rounds, determine that the training terminal has completed local training and perform a correction process on the local model parameters of the training terminal to obtain the corrected local model parameters.
5. The modeling method of the digital twin model according to claim 4, characterized in that, The performing a correction process on the local model parameters of the training terminal to obtain the corrected local model parameters includes: Performing a correction process on the local model parameters of the training terminal according to the model version number data of the training terminal to obtain the corrected local model parameters; wherein, the model version number data of the training terminal is the difference between the global model version number of the digital twin model and the local model version number of the training terminal.
6. The modeling method of the digital twin model according to claim 1, characterized in that, Asynchronous global update or synchronous global update of the global model parameters of the digital twin model includes: If it is detected that there are training terminals that have completed local training at the current moment, the training terminals that have completed local training at the current moment are determined as idle terminals, and the training terminals that have not completed local training at the current moment are determined as occupied terminals; When the model version number data of the idle terminals is less than a preset version threshold, asynchronous global update of the global model parameters of the digital twin model is performed according to the local model parameters and data volumes of the training terminals, combined with the total terminal data volume, to obtain updated global model parameters; wherein, the local model parameters of the training terminals that have completed local training before the current moment and the local model parameters of the idle terminals are both corrected local model parameters, and the local model parameters of the occupied terminals are the local model parameters of the previous training round of the current training round; Update the global model version number of the digital twin model to obtain an updated global model version number.
7. The modeling method of the digital twin model according to claim 6, characterized in that, Asynchronous global update or synchronous global update of the global model parameters of the digital twin model further includes: When the model version number data of the idle terminals is greater than or equal to the preset version threshold, control each occupied terminal to stop local training; Synchronous global update of the global model parameters of the digital twin model is performed according to the local model parameters and data volumes of the training terminals, combined with the total terminal data volume, to obtain updated global model parameters; wherein, the local model parameters of the training terminals that have completed local training before the current moment and the local model parameters of the idle terminals are both corrected local model parameters, and the local model parameters of the occupied terminals are the local model parameters of the current training round; Update the global model version number of the digital twin model to obtain an updated global model version number.
8. The modeling method of the digital twin model according to claim 7, characterized in that, After performing synchronous global update of the global model parameters of the digital twin model according to the local model parameters and data volumes of the training terminals, combined with the total terminal data volume, to obtain updated global model parameters, the method further includes the following steps: Prohibit the idle terminals from performing local training; For each occupied terminal, use the updated global model version number as the local model version number of the occupied terminal, and perform local training on the local model of the occupied terminal based on the total number of training rounds and local model parameters of the occupied terminal and the global model parameters of the digital twin model after synchronous global update.
9. The modeling method of the digital twin model according to claim 6, characterized in that, Asynchronous global update or synchronous global update of the global model parameters of the digital twin model further includes: During asynchronous global update, prohibit the idle terminals from performing local training, and for each occupied terminal, perform local training on the local model of the occupied terminal based on the total number of training rounds and local model parameters of the occupied terminal and the global model parameters of the digital twin model before asynchronous global update.
10. A modeling device for a digital twin model, characterized in that including: An acquisition module, configured to acquire the operation characteristic data of a plurality of heterogeneous terminals; wherein, the operation characteristic data includes operation efficiency, communication efficiency, and a historical loss function; the historical loss function is the loss function value of the local model of the heterogeneous terminal in the previous training round before the current training round; A first processing module, configured to select multiple heterogeneous terminals participating in local training from the plurality of heterogeneous terminals as training terminals according to the operation characteristic data of each heterogeneous terminal; A second processing module, configured to control each training terminal to perform local training, and asynchronously globally update or synchronously globally update the global model parameters of the digital twin model during local training; A third processing module, configured to construct the digital twin model according to the global model parameters of the digital twin model if all the training terminals have completed local training; Wherein, if it is detected that there is a training terminal that has completed local training at the current moment, the training terminal that has completed local training at the current moment is determined as an idle terminal, and the training terminals that have not completed local training at the current moment are determined as occupied terminals; when the model version number data of the idle terminal is less than a preset version threshold, according to the local model parameters and data volume of each training terminal, combined with the total terminal data volume, asynchronously globally update the global model parameters of the digital twin model to obtain updated global model parameters, wherein, if the model version number data of the idle terminal is less than a preset version threshold, it indicates that the difference between the global model version number of the digital twin model and the local model version number of the idle terminal is small; when the model version number data of the idle terminal is greater than or equal to the preset version threshold, control each occupied terminal to stop local training; according to the local model parameters and data volume of each training terminal, combined with the total terminal data volume, synchronously globally update the global model parameters of the digital twin model to obtain updated global model parameters.
Citation Information
Patent Citations
Federal learning method and system based on semi-asynchronization, server and medium
CN113516249A
Heterogeneous network-oriented synchronous and asynchronous hybrid federated learning method
CN118378721A