Model updating method and device, storage medium and electronic equipment

By performing local model aggregation and selecting superior edge cloud nodes at edge cloud nodes, the problem of high computing and storage pressure on central cloud devices is solved, the efficiency of model updates is improved, and rapid and efficient model optimization is achieved.

CN121880915APending Publication Date: 2026-04-17CHINA SATENT NETWORK APPLICATION RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA SATENT NETWORK APPLICATION RESEARCH INSTITUTE CO LTD
Filing Date
2024-10-15
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In federated learning mode, due to the large number of terminal access nodes, the central cloud equipment needs to process a large number of model parameters, resulting in excessive computing and storage pressure and low model update efficiency.

Method used

By performing local model aggregation at the target edge cloud nodes, the analytic hierarchy process (AHP) and entropy weighting method are used to select high-performance edge cloud nodes for local model and sample quality parameter aggregation. Then, the central cloud node performs global model aggregation and periodic updates.

Benefits of technology

Effectively utilize the computing resources of edge cloud and central cloud to reduce the computing pressure on central cloud, improve model aggregation efficiency, and achieve rapid model updates and optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121880915A_ABST
    Figure CN121880915A_ABST
Patent Text Reader

Abstract

The invention discloses a model updating method and device, a storage medium and electronic equipment. The method comprises the following steps: acquiring a target local model and a target sample quality parameter sent by a target terminal access node; performing aggregation operation on the target local model and a first local model stored in the target edge cloud node according to the target sample quality parameter and the first sample quality parameter to obtain a target local model; and sending the target local model and the sample quality parameters of the target local model to a central cloud node to instruct the central cloud node to perform aggregation operation on the target local model and other local models based on the sample quality parameters of the target local model and the sample quality parameters of the other local models to obtain a global model. According to the method and the device, the technical problem of relatively low updating efficiency of the model deployed on the node due to limited computing resources of the node is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for updating a model, a storage medium, and an electronic device. Background Technology

[0002] Currently, in the federated learning model, local model training is typically performed at each terminal access node. Then, the trained local models from each terminal access node are uploaded to the central cloud, which instructs the central cloud to aggregate the local models. The aggregated global model is then applied to various deep learning tasks, such as image recognition and object classification. Since the number of terminal access nodes is often large, the central cloud needs to process a large number of model parameters during the model aggregation process. In other words, a single central cloud device needs to directly aggregate multiple local models, resulting in excessive computational and storage pressure on the central cloud. Consequently, this leads to the technical problem of low model update efficiency in related technologies.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This application provides a model update method and apparatus, storage medium and electronic device to at least solve the technical problem that the model update efficiency deployed on nodes is low due to the limited computing resources of nodes.

[0005] According to one aspect of the embodiments of this application, a model update method is provided, applied to a target edge cloud node, comprising: acquiring a target local model and target sample quality parameters sent by a target terminal access node, wherein the target local model is a model obtained by the target terminal access node through local training, and the target sample quality parameters are used to represent the number of training samples and the uniformity of sample distribution used by the target terminal access node when training the target local model; performing an aggregation operation on the target local model and a first local model stored in the target edge cloud node according to the target sample quality parameters and a first sample quality parameter to obtain a target local model, wherein the first sample quality parameter is a parameter pre-acquired by the target edge cloud node from other terminal access nodes, and the first sample quality parameter is used to represent the number of training samples and the uniformity of sample distribution used by the target terminal access node when training the target local model; and performing an aggregation operation on the target local model and a first local model stored in the target edge cloud node according to the target sample quality parameters and a first sample quality parameter to represent the number of training samples and the uniformity of sample distribution used by the target terminal access node. The training samples used to obtain other local models include the number of samples and the uniformity of sample distribution. The first local model is the local model obtained by the target edge cloud node in the previous aggregation operation based on the first sample quality parameter and the other local models. The target local model and the sample quality parameter of the target local model are sent to the central cloud node to instruct the central cloud node to perform the aggregation operation on the target local model and the other local models based on the sample quality parameter of the target local model and the sample quality parameter of the other local models to obtain the global model. The other local models are models sent to the central cloud node by other edge cloud nodes. The global model is set to allow periodic distribution to the target terminal access node to instruct the target terminal access node to use the global model to update the target local model.

[0006] According to another aspect of the embodiments of this application, a model updating apparatus is also provided, applied in a target edge cloud node, comprising: an acquisition module, configured to acquire a target local model and target sample quality parameters sent by a target terminal access node, wherein the target local model is a model obtained by the target terminal access node through local training, and the target sample quality parameters are used to represent the number of training samples and the uniformity of sample distribution used by the target terminal access node when training the target local model; and a local aggregation module, configured to perform an aggregation operation on the target local model and a first local model stored in the target edge cloud node according to the target sample quality parameters and a first sample quality parameter to obtain a target local model, wherein the first sample quality parameter is a parameter pre-acquired by the target edge cloud node and sent by other terminal access nodes, and the first sample quality parameter is used to represent the number of training samples and the uniformity of sample distribution used by the target terminal access node when training the target local model; and a local aggregation module, configured to perform an aggregation operation on the target local model and a first local model stored in the target edge cloud node according to the target sample quality parameters and a first sample quality parameter .... The access node uses the number of training samples and the uniformity of sample distribution when training other local models. The first local model is the local model obtained by the target edge cloud node in the previous aggregation operation based on the first sample quality parameter and the other local models. The global aggregation module is used to send the target local model and the sample quality parameter of the target local model to the central cloud node, so as to instruct the central cloud node to perform the aggregation operation on the target local model and the other local models based on the sample quality parameter of the target local model and the sample quality parameter of the other local models to obtain a global model. The other local models are models sent to the central cloud node by other edge cloud nodes. The global model is set to allow periodic distribution to the target terminal access node, so as to instruct the target terminal access node to use the global model to update the target local model.

[0007] According to one aspect of the embodiments of this application, another model update method is provided, applied to a target terminal access node, comprising: obtaining a target local model through local training; sending the target local model and target sample quality parameters to a target edge cloud node to instruct the target edge cloud node to perform the following operations: performing an aggregation operation on the target local model and a first local model stored in the target edge cloud node according to the target sample quality parameters and a first sample quality parameter to obtain a target local model, wherein the first sample quality parameter is a parameter pre-acquired by the target edge cloud node and sent by other terminal access nodes, the first sample quality parameter being used to represent the number of training samples and the uniformity of sample distribution used by the other terminal access nodes when training other local models, and the first local model being the model obtained by the target edge cloud node in the previous round of aggregation operation. The process involves a local model aggregated based on the first sample quality parameter and the other local models; the target local model and its sample quality parameters are sent to a central cloud node to instruct the central cloud node to perform the aggregation operation on the target local model and the other local models based on the sample quality parameters of the target local model and the sample quality parameters of the other local models, to obtain a global model. The other local models are models sent to the central cloud node by other edge cloud nodes. The global model is configured to be periodically distributed to the target terminal access node, and the target terminal access node uses the global model to update the target local model. The target sample quality parameter represents the number of training samples and the uniformity of sample distribution used by the target terminal access node when training the target local model.

[0008] According to another aspect of the embodiments of this application, another model updating apparatus is also provided, applied in a target terminal access node, including: a training module, used to obtain a target local model through local training; and a transmission module, used to send the target local model and target sample quality parameters to a target edge cloud node, so as to instruct the target edge cloud node to perform the following operations: perform an aggregation operation on the target local model and a first local model stored in the target edge cloud node according to the target sample quality parameters and a first sample quality parameter to obtain a target local model, wherein the first sample quality parameter is a parameter pre-acquired by the target edge cloud node and sent by other terminal access nodes, and the first sample quality parameter is used to represent the number of training samples and the uniformity of sample distribution used by the other terminal access node when training other local models, and the first local model is the target edge cloud node. The target local model is obtained by aggregating the target local model based on the first sample quality parameter and the other local models in the previous aggregation operation. The target local model and the sample quality parameter of the target local model are sent to the central cloud node to instruct the central cloud node to perform the aggregation operation on the target local model and the other local models based on the sample quality parameter of the target local model and the sample quality parameter of the other local models to obtain a global model. The other local models are models sent to the central cloud node by other edge cloud nodes. The global model is set to allow periodic distribution to the target terminal access node. The target terminal access node uses the global model to update the target local model. The target sample quality parameter is used to represent the number of training samples and the uniformity of sample distribution used by the target terminal access node when training the target local model.

[0009] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the update method of the above-described model at runtime.

[0010] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the update method as described above.

[0011] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described model update method through the computer program.

[0012] In this embodiment, the local model training process and model transmission process of the target terminal access node are independent of each other. A combination of analytic hierarchy process (AHP) and entropy weighting method is used to compare the performance parameters of each edge cloud node, select the target edge cloud node, and then access the target edge cloud node. The target local model is uploaded to the target edge cloud node, which aggregates the target local model with other local models to obtain a target local model. Then, the central cloud model aggregates the target local model with other local models to obtain a global model. This rationally utilizes the computing resources of the edge cloud nodes and the central cloud node, avoiding excessive computing resource pressure on the central cloud node, thus improving model aggregation efficiency. This achieves the technical effect of rapid model updating and optimization, thereby solving the technical problem of low model update efficiency deployed on nodes due to limited computing resources. Attached Figure Description

[0013] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0014] Figure 1 This is a schematic diagram of an application environment for an optional model update method according to an embodiment of this application;

[0015] Figure 2 This is a flowchart illustrating an optional model update method according to an embodiment of this application;

[0016] Figure 3 This is a schematic diagram of an optional model update method according to an embodiment of this application;

[0017] Figure 4 This is a schematic diagram of another optional model update method according to an embodiment of this application;

[0018] Figure 5 This is a schematic diagram of another optional model update method according to an embodiment of this application;

[0019] Figure 6 This is a schematic diagram of an optional model updating device according to an embodiment of this application;

[0020] Figure 7 This is a schematic diagram of the structure of an updated product based on an optional model according to an embodiment of this application;

[0021] Figure 8 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of this application. Detailed Implementation

[0022] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0024] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:

[0025] Federated learning: A distributed machine learning approach that allows multiple participants (such as mobile devices, edge devices, or servers) to collaboratively train a shared machine learning model. In federated learning, data does not need to be centrally stored; each participant only uploads its model updates (such as gradient or weight updates), rather than the original data. Under the federated learning model, data does not need to be centrally stored, and model training can be performed locally, only requiring the sharing of updated model parameters.

[0026] Cloud node: A physical or virtual server in a cloud computing environment that provides computing resources, storage space or network services. In federated learning, cloud nodes may act as central servers or edge servers, responsible for coordinating the model training process of various participants, collecting model updates and distributing the latest global model.

[0027] The present application will be described below with reference to embodiments:

[0028] According to one aspect of the embodiments of this application, a model updating method is provided. Optionally, in this embodiment, the above-described model updating method can be applied to, for example... Figure 1The hardware environment shown consists of server 101 and terminal device 103. For example... Figure 1 As shown, server 101 is connected to terminal device 103 via a network and can be used to provide services to terminal device or applications installed on terminal device. Application 107 can be video application, instant messaging application, browser application, educational application, game application, etc. Database 105 can be set up on the server or independently of the server to provide data storage services for server 101, such as a game data storage server. The network mentioned above can include, but is not limited to, wired networks and wireless networks. The wired network includes local area networks, metropolitan area networks, and wide area networks. The wireless network includes Bluetooth, WIFI, and other networks that enable wireless communication. Terminal device 103 can be a terminal configured with an application, and can include, but is not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), laptops, tablets, handheld computers, MID (Mobile Internet Devices), PADs, desktop computers, smart TVs, smart voice interaction devices, smart home appliances, vehicle terminals, aircraft, virtual reality (VR) terminals, augmented reality (AR) terminals, mixed reality (MR) terminals, and other computer devices. The server mentioned above can be a single server, a server cluster composed of multiple servers, or a cloud server.

[0029] Combination Figure 1 As shown, the above model update method can be executed by an electronic device, which can be a terminal device or a server. The above model update method can be implemented by the terminal device or the server respectively, or by the terminal device and the server together.

[0030] The above is merely an example, and this embodiment does not impose any specific limitations.

[0031] Alternatively, as an alternative implementation method, such as Figure 2 As shown, the above model update method can be applied to the target terminal access node, including:

[0032] S202, obtain the target local model and target sample quality parameters sent by the target terminal access node. The target local model is the model obtained by the target terminal access node through local training. The target sample quality parameters are used to represent the number of training samples and the uniformity of sample distribution used by the target terminal access node when training the target local model.

[0033] Optionally, in the embodiments of this application, the target terminal access node may include, but is not limited to, computers, servers, various smart IoT devices, smart wearable devices, etc., the target local model may include, but is not limited to, various neural visual network models, logistic regression models, etc., and the target sample quality parameters may include, but are not limited to, the total number of samples used to train the target local model, the uniformity of sample distribution, etc. The uniformity of sample distribution can be used to describe the distribution of samples in various sample categories or feature spaces, and can be further subdivided into sample category balance: whether the number of samples in different categories is close; feature distribution: whether the distribution of data features in different ranges is uniform, etc.

[0034] For example, when training an image recognition network model using federated learning mode, one of the multiple terminal servers located in different regions can be selected as the target terminal access node. Then, an initial local model is initialized on each of the multiple terminal servers, or the initial local model sent to these multiple terminal servers by other cloud nodes can be obtained. These multiple terminal servers can independently train the initial local model locally using their respective computing resources and their own collected sample data to obtain the target local model. Then, the target local model is transmitted to the cloud node.

[0035] Furthermore, taking the aforementioned target terminal access node as an example, when participating in federated learning, it first performs a local search. If a local model sent by other cloud nodes is found, the local model can be used as the initial local model for training to obtain the aforementioned target local model. Here, the cloud node can be another terminal access node that can communicate with the target terminal access node, or an edge cloud node, or a central cloud node, etc.

[0036] It should also be noted that different terminal access nodes can use the same or different sample data when training their respective local models. That is, when different terminal access nodes can communicate with each other, they can use the sum of the sample data of these multiple terminal access nodes as sample data and share it with each terminal access node as the sample dataset for training their respective local models to improve the generalization ability of the local models; or, each terminal access node can use its own local data for local model training and not share sample data with other terminal access nodes; or, each terminal access node can selectively share some data instead of all the sample data. The determination of the sample dataset in the specific training process can be set according to the actual application scenario, and this application embodiment does not make specific limitations.

[0037] In an exemplary embodiment, during the training of the target local model at the target terminal access node, a separate process can be used as the model training process, and a separate process can also be used as the model transmission process. By separating the model training and model transmission processes, the training and transmission of the target local model can be carried out simultaneously, improving overall efficiency. For example, if the model transmission process detects that there is a local model that can be transmitted to other cloud nodes before the model training is finished, the model can be transmitted directly without considering the model training process.

[0038] Furthermore, in this model transmission process, not only can the target local model be transmitted to other cloud nodes, but the target sample quality parameters corresponding to the sample set used when training the target local model can also be output synchronously. Specifically, the target sample quality parameters can be used for subsequent model aggregation to determine the model aggregation weights of the target local model.

[0039] S204, perform an aggregation operation on the target local model and the first local model stored in the target edge cloud node according to the target sample quality parameters and the first sample quality parameters to obtain the target local model. The first sample quality parameters are parameters sent by other terminal access nodes and are obtained in advance by the target edge cloud node. The first sample quality parameters are used to represent the number of training samples and the uniformity of sample distribution used by other terminal access nodes when training other local models. The first local model is the local model obtained by the target edge cloud node in the previous aggregation operation based on the first sample quality parameters and other local models.

[0040] For example, when the model transmission process of the terminal access node detects the existence of a target local model that can be transmitted locally, the target edge cloud node can be identified from multiple cloud nodes. Then, the target edge cloud node is requested to be accessed, and the target local model and target sample quality parameters are sent to the target edge cloud node for subsequent local model operations.

[0041] Optionally, in the embodiments of this application, the target edge cloud node may include, but is not limited to, cloud servers, edge servers, micro data centers, etc. The first sample quality parameter corresponds to the first local model. The first local model refers to the model obtained by the target edge cloud node in the previous round of federated learning iteration based on the local model received from multiple terminal access nodes and the corresponding sample quality parameter.

[0042] In an exemplary embodiment, at the start of the current training round, the target terminal access node first searches its network environment to obtain all accessible edge cloud nodes. Then, it acquires the performance parameters of each edge cloud node. These performance parameters may include, but are not limited to, round-trip latency sub-parameters between each edge cloud node and the target terminal access node, processor load rate sub-parameters, and communication load rate sub-parameters of each edge cloud node. Next, based on the performance parameters of each edge cloud node, it obtains a communication score between each edge cloud node and the target terminal access node. The cloud node with the highest communication score is selected as the target edge cloud node. Specifically, the method for determining the target edge cloud node may include, but is not limited to:

[0043] S1 uses the AHP (Analytic Hierarchy Process) to construct the target judgment matrix. The importance of each sub-parameter in the performance parameters is demonstrated through pairwise comparisons. ij (The first, second, and third correlation parameters mentioned above) represent the importance of the sub-parameter in the i-th row relative to the sub-parameter in the j-th column; similarly: In this context, the matrix row elements and matrix column elements of the judgment matrix are used to indicate the performance parameter types, which include the parameter types of the round-trip delay sub-parameter, the parameter types of the communication load rate sub-parameter, and the parameter types of the processor load rate sub-parameter. The matrix cell elements in the judgment matrix are used to indicate the first associated parameter, the second associated parameter, and the third associated parameter.

[0044] Next, a hierarchical single sort is performed to determine the first-level weights of each performance sub-parameter (round-trip delay sub-parameter, processor load rate sub-parameter, and communication load rate sub-parameter). The weights of each row of the performance index in the judgment matrix are calculated using the root mean square, resulting in an m-dimensional vector, represented as follows:

[0045] Furthermore, the m-dimensional vectors are all standardized to first-level weights (when i = 1, 2, 3, corresponding to the values ​​of the elements in the first, second, and third rows of the matrix mentioned above), that is:

[0046]

[0047] It should be noted that a consistency check can also be performed on the first-level weights. That is, in order to ensure the quality and reliability of the AHP decision-making process and avoid misleading decisions caused by logical inconsistencies, a consistency check is required. Specifically:

[0048] First, it is necessary to calculate the maximum eigenvalue λ of each performance sub-parameter. max :

[0049]

[0050] Where A represents the judgment matrix mentioned above, and the values ​​of n and m are the same, both being the number of sub-parameters in the performance index parameters mentioned above.

[0051] Next, the Consistency Index (CI) is calculated.

[0052]

[0053] The random consistency index (RI) was obtained by looking up the matrix order and the corresponding RI table. When n=3, RI=0.58. Then, the consistency ratio (CR) was calculated:

[0054]

[0055] If CR is less than or equal to 0.1, the consistency of the judgment matrix is ​​considered acceptable. If CR is greater than 0.1, the judgment matrix can be re-evaluated or modified to improve its consistency.

[0056] S2, establish and standardize the performance index matrix for each edge cloud node. First, establish the performance index matrix. Figure 3 This is a schematic diagram of an optional model update method according to an embodiment of this application. The performance index matrix can be as follows: Figure 3 As shown, the data in the performance index matrix are then standardized:

[0057]

[0058] Where, x ij ' represents each matrix element in the standardized performance index matrix above, x ij In the above performance index matrix, each matrix element i indicates a row element, j indicates a column element, and min... i (x ij (max) refers to the value of the matrix element with the smallest value among all elements in each row, given the same number of columns. i (x ij This refers to the value of the matrix element with the largest value among all rows with the same number of columns. In other words, the matrix row elements in the performance index matrix are used to indicate each edge cloud node, and the matrix column elements in the performance index matrix are used to indicate the performance parameter type. The performance parameter type includes the parameter type of the round-trip delay sub-parameter, the parameter type of the communication load rate sub-parameter, and the parameter type of the processor load rate sub-parameter. The matrix cell elements in the performance index matrix are used to indicate the value of the round-trip delay sub-parameter, the value of the communication load rate sub-parameter, and the value of the processor load rate sub-parameter.

[0059] Furthermore, a target probability matrix is ​​established based on the aforementioned performance index matrix. For each element in the target probability matrix (i.e., the value of the performance index for each edge cloud node or central cloud node), the proportion of each element in the corresponding performance index can be calculated to construct the overall target probability matrix. The matrix element value in the target probability matrix is ​​p. ij It can be represented as:

[0060]

[0061] Next, after determining the target probability matrix, the information entropy of each performance sub-parameter is calculated, as shown below:

[0062]

[0063] Among them, information entropy e j It is a measure used to describe the uncertainty of a random variable. j indicates the sub-parameters in the performance index parameters (round-trip delay from the terminal access node to each edge cloud node, processor load rate of each edge cloud node, and communication load rate of each edge cloud). The greater the dispersion of a certain sub-parameter, the more uncertain the specific value of the performance index is. Therefore, the greater the information entropy (effective information content).

[0064] For example, i = 1 represents the first edge cloud node, and when j = 1, p ij The value represents the effective information content of the first probability parameter corresponding to the first edge cloud node: the round-trip delay sub-parameter corresponding to the first edge cloud node; when j=2, p ij The value represents the effective information content of the second probability parameter corresponding to the first edge cloud node: the communication load rate sub-parameter corresponding to the first edge cloud node; when j=3, p ij The value represents the effective information content of the third probability parameter corresponding to the first edge cloud node: the processor load rate sub-parameter corresponding to the first edge cloud node; similarly, i=2 represents the second edge cloud node, and when j=1, p ij The value represents the effective information content of the first probability parameter corresponding to the second edge cloud node; when j=2, p ij The value represents the effective information content of the second probability parameter corresponding to the second edge cloud node: the communication load rate sub-parameter corresponding to the second edge cloud node; when j=3, p ij The value represents the effective information content of the third probability parameter corresponding to the second edge cloud node: the processor load rate sub-parameter corresponding to the second edge cloud node.

[0065] Next, using the aforementioned information entropy e jDetermine the secondary weights of each sub-parameter in the performance index parameters. That is, determine the secondary weights of each sub-parameter based on the effective information content of each sub-parameter (when i = 1, 2, 3, the values ​​of the first sub-weight parameter, the second sub-weight parameter, and the third sub-weight parameter mentioned above).

[0066]

[0067] Ultimately, it can be achieved through the aforementioned first-level weight α i and second-order weights β j Calculate the comprehensive weight value w of the sub-parameters in each performance index parameter corresponding to each edge cloud node. i Here, i and j have the same value, both used to represent sub-parameters in the performance metric parameters:

[0068]

[0069] Taking an edge cloud node A as an example: i = 1, α i β i This represents the result of the first product above. w represents the result of the first summation above. i The first weight parameter mentioned above represents the edge cloud node A; i = 2, α i β i This represents the result of the second product above. w represents the result of the second summation above. i The second weight parameter mentioned above represents the edge cloud node A; i = 3, α i β i This represents the result of the third product above. w represents the result of the third summation above. i The third weight parameter mentioned above for edge cloud node A represents the comprehensive weight value w of the sub-parameters among the performance index parameters corresponding to each of the aforementioned cloud nodes. i Then, the communication score of each edge cloud node can be obtained (the probability value of the target terminal access node accessing each edge cloud node). Taking the communication score of one edge cloud node as an example: Communication score = Σ sub-parameter i in the performance index parameters * comprehensive weight value w i Based on this, the cloud node with the highest communication score is selected as the target edge cloud node.

[0070] Furthermore, after determining the target edge cloud node, the target local model and target sample quality parameters can be sent to the target edge cloud node as in the embodiments of this application. Since the target edge cloud node can also connect to other terminal access nodes, and other terminal access nodes can also determine the target edge cloud node and connect to it through the performance parameters of each edge cloud node as described above, and send their respective local models and corresponding sample quality parameters to the target edge cloud node. At this time, the target local model includes local models sent by multiple terminal access nodes. The target terminal access node can be determined as multiple terminal access nodes that have connected to the target edge cloud node in this round of training. Then, the target edge cloud node performs a local aggregation operation.

[0071] In an exemplary embodiment, assuming that the target edge cloud node connects to the target terminal access node in this round of training, then the first sample quality parameters used in the previous round of training and the first local model obtained from the previous round of aggregation are obtained from the edge cloud node, and a local aggregation operation is performed on the target local model and the first local model:

[0072] First, sum the sample quality parameters in the first sample quality parameters to obtain the first local weight parameter. Then, multiply the first local weight parameter by the first local model to obtain the first intermediate value. Similarly, multiply the sample quality parameters in the target sample quality parameters by the corresponding local models in the target local model to obtain the second intermediate value. Further, sum the sample quality parameters in the target sample quality parameters with the sample quality parameters in the first sample quality parameters to obtain the third intermediate value. Finally, divide the sum of the first and second intermediate values ​​by the third intermediate value to obtain the target local model, which can be represented as, but is not limited to:

[0073]

[0074] Among them, M t M is the target local model formed by local aggregation in the t-th round; i It is the local model uploaded by terminal access node i; N i M is the sample quality coefficient of terminal access node i in the target terminal access nodes; t-1 It is the local model formed by local aggregation in the (t-1)th round; N j These are the sample quality coefficients in the first sample quality coefficient of other terminal access nodes in the table, ∑ i M i ·N i It is the second intermediate value mentioned above, M t-1 ·∑ j N jIt is the first intermediate value mentioned above, ∑ i N i +∑ j N j It is the third intermediate value mentioned above.

[0075] It should be noted that in this round of local aggregation operation, the aforementioned first sample quality parameter can be determined by searching a pre-stored mapping relationship set of the target edge cloud node. This mapping relationship set can be represented as a list of terminal access node sample quality coefficients corresponding to the IP address of the terminal access node. The table records the network address of the terminal access node required for each round of training and the corresponding sample quality parameter, or only records the network address of the terminal access node required for the most recent round of training and the corresponding sample quality parameter. Furthermore, when a connection is established between the target terminal access node and the target edge cloud node, the target edge cloud node will prioritize updating the sample quality coefficient in the table that matches the IP of the target terminal access node. This application does not limit this aspect.

[0076] S206, the target local model and its sample quality parameters are sent to the central cloud node to instruct the central cloud node to perform aggregation operations on the target local model and other local models based on the sample quality parameters of the target local model and the sample quality parameters of other local models to obtain a global model. The other local models are models sent to the central cloud node by other edge cloud nodes. The global model is set to allow periodic distribution to the target terminal access node to instruct the target terminal access node to use the global model to update the target local model.

[0077] For example, after obtaining the aforementioned target local model, the sample quality parameters of the target local model can be determined based on the target sample quality parameters uploaded by the target terminal access node in this round of local aggregation operation. Specifically, this may include, but is not limited to, directly using the target sample quality parameters as the sample quality parameters of the target local model and uploading them together with the target local model to the aforementioned central cloud node. The central cloud node then performs an averaging operation on each sample quality parameter in the target sample quality parameters to obtain the sample quality parameters of the target local model. Alternatively, the target edge cloud node performs an averaging operation on each sample quality parameter in the target sample quality parameters to obtain the aforementioned mean sample quality parameters. The mean sample quality parameters are then determined as the sample quality parameters of the target local model and uploaded to the central cloud node. The central cloud node then directly uses the sample quality parameters of the target local model for subsequent global model aggregation operations.

[0078] It is understood that the sample quality parameters of the other local models mentioned above can also be determined as in the embodiments of this application.

[0079] Optionally, in the embodiments of this application, the aforementioned central cloud node can be understood as a server cluster with centralized computing and storage resources, and the aforementioned other local models refer to the local models uploaded by other edge cloud nodes besides the target edge cloud node in this round of training.

[0080] In an exemplary embodiment, when the central cloud node aggregates the target local model and other local models, it may include, but is not limited to:

[0081] Each edge cloud node periodically sends its current local model to the central cloud node, and uses the average sample quality coefficient of the terminal access nodes aggregated within that round as a weight to perform a weighted average to obtain the global model. The specific calculation formula is as follows:

[0082]

[0083] Among them, M global It is a global model; M i It is the local model uploaded by edge cloud node i (i.e., the target edge cloud node and other edge cloud nodes); N i : The average sample quality coefficient of terminal access nodes aggregated by edge cloud node i during this round (sample quality parameters of the target local model and other local models mentioned above), where, if i is used to indicate the target edge cloud node, then ∑ i N i ·M i This represents the fourth intermediate value mentioned above. If i is used to indicate other edge cloud nodes, then ∑ i N i ·M i Representing the fifth intermediate value mentioned above, ∑ i N i This represents the sixth intermediate value mentioned above.

[0084] In an exemplary embodiment, it is assumed that the target terminal access node initiates a model training process to train the aforementioned target local model. Figure 4 This is a schematic diagram of another optional model update method according to an embodiment of this application, such as... Figure 4 As shown, including but not limited to:

[0085] S402, Begin;

[0086] S404, implements a local machine learning strategy, increasing the number of local training rounds;

[0087] S406: Has the local training rounds reached the set limit? If yes, execute S422; otherwise, execute S408.

[0088] S408, Are there any local models that have not been selected as the initial model? If yes, execute S410; otherwise, execute S412.

[0089] S410, Select the local model as the initial model;

[0090] S412, Does a local model exist? If yes, execute S414; otherwise, execute S416.

[0091] S414, Select the local model as the initial model;

[0092] S416, Randomly generate the initial model;

[0093] S418, perform one round of local model training;

[0094] S420, Training ends, target local model is obtained, replace local model with target local model, continue to execute S404;

[0095] S422, End.

[0096] In yet another exemplary embodiment, the target terminal access node initiates a model transmission process for the target edge cloud node to transmit the aforementioned target local model. Figure 5 This is a schematic diagram of another optional model update method according to an embodiment of this application, such as... Figure 5 As shown, including but not limited to:

[0097] S502, Begin;

[0098] S504, Initiate the model transfer process;

[0099] S506, implement federated learning strategies;

[0100] S508: Does a local model exist locally? If it does, execute S510; otherwise, execute S512.

[0101] S510, whether the local model has been uploaded. Specifically, the MD5 code (hash encryption) is used to determine whether the local model has been uploaded. After each successful upload of the local model, the MD5 code of the local model uploaded in this round is recorded locally on the terminal access node. When it is necessary to verify whether the local model has been uploaded, the MD5 checksum of the local model of the current terminal access node can be compared with the checksum recorded in the local file of the terminal access node. If it has been uploaded, execute S512; otherwise, execute S514.

[0102] S512, block the transmission process for time t1, then execute S506;

[0103] S514: Has the number of federated learning rounds reached the set limit? If it has, proceed to S516; otherwise, proceed to S518.

[0104] S516, End;

[0105] S518, attempts to obtain a satellite communication time window. One satellite communication time window can be used to perform multiple local model training and uploading operations.

[0106] S520, has the satellite communication time window been successfully acquired?

[0107] S522: Is the current time window for satellite communication? If yes, it means that the local model can be transmitted and S524 can continue; otherwise, S526 will be executed.

[0108] S524 attempts to obtain the performance parameters of each edge cloud node;

[0109] S526, block the model transmission process until satellite communication is enabled, then continue executing S518;

[0110] S528: Has the performance parameters of the edge cloud node been successfully obtained? If yes, proceed to S530; otherwise, proceed to S532.

[0111] S530 selects the edge cloud node with the highest communication score to establish a connection;

[0112] S532, randomly selects edge cloud nodes to establish connections;

[0113] S534, the terminal access node requests to obtain the local model creation time (the first creation time mentioned above) of the edge cloud node it accesses and the creation time of the local model received by the terminal access node in the previous round (the second creation time mentioned above).

[0114] S536, Does the difference in model creation time exceed the set threshold (that is, the time difference between the first creation time and the second creation time meets the preset time difference)? If yes, execute S538; otherwise, execute S540.

[0115] S538, The terminal access node downloads a local model of the edge cloud node to establish a connection;

[0116] S540, upload the local model to the edge cloud node with the established connection;

[0117] S542, Local model uploaded successfully. Record the MD5 hash of the model locally.

[0118] S544, waiting for the edge cloud node to send the local model;

[0119] S546, the terminal access node saves the local model to its local storage;

[0120] S548, the terminal access node obtains the global model and tests the accuracy of the global model;

[0121] S550, the number of federal learning sessions increases, and S514 continues to be implemented.

[0122] This application's embodiments employ asynchronous execution of the target terminal access node's local model training and transmission processes. A combination of analytic hierarchy process (AHP) and entropy weighting is used to compare the performance parameters of each edge cloud node, selecting a target edge cloud node. The target edge cloud node is then accessed, and the target local model is uploaded there. The target edge cloud node aggregates the target local model with other local models to obtain a target local model. Finally, the central cloud model aggregates the target local model with other local models to obtain a global model. This approach rationally utilizes the computing resources of both edge and central cloud nodes, avoiding excessive pressure on the central cloud node's computing resources and improving model aggregation efficiency. This achieves the technical effect of rapid model updates and optimization, thus solving the technical problem of low model update efficiency on nodes due to limited computing resources.

[0123] As an optional approach, the above-mentioned aggregation operation on the target local model and the first local model stored in the target edge cloud node based on the target sample quality parameters and the first sample quality parameters to obtain the target local model includes: obtaining a pre-established mapping relationship set, wherein the mapping relationship set includes the mapping relationship between each of the terminal access nodes in the other terminal access nodes and each of the sample quality parameters in the first sample quality parameters; determining the sum of each of the sample quality parameters in the first sample quality parameters recorded in the mapping relationship set as the first local weight parameter; and performing an aggregation operation on the target local model and the first local model based on the first local weight parameter and the target sample quality parameters to obtain the target local model.

[0124] Through the embodiments of this application, model aggregation in an edge computing environment not only improves model performance but also optimizes resource utilization. Specifically, by aggregating local models accessed by different terminal access nodes, the data characteristics and computing capabilities of different terminal access nodes are combined, thereby improving the accuracy and generalization ability of local models. Furthermore, using edge cloud nodes for local model aggregation can reduce dependence on central cloud nodes, reduce network latency and bandwidth consumption, and improve resource utilization efficiency.

[0125] As an optional approach, the above-mentioned aggregation operation on the target local model and the first local model based on the first local weight parameters and the target sample quality parameters to obtain the target local model includes: multiplying the first local weight parameters and the first local model to obtain a first intermediate value; multiplying each of the sample quality parameters in the target sample quality parameters with each of the local models in the target local model, and determining the sum of the products as a second intermediate value; summing each of the sample quality parameters in the target sample quality parameters with each of the sample quality parameters in the first sample quality parameters to obtain a third intermediate value; and dividing the sum of the first intermediate value and the second intermediate value by the third intermediate value to obtain the target local model.

[0126] Through the embodiments of this application, different local models are fused according to their sample quality parameters to generate a more comprehensive and accurate target local model, thereby improving the prediction and generalization capabilities of the subsequent global model. Furthermore, through effective weight allocation and model fusion, the utilization efficiency of computing resources is effectively improved, and the unnecessary computing burden on edge cloud nodes is reduced, thus improving the overall computing efficiency of the model.

[0127] As an optional approach, before sending the target local model and its sample quality parameters to the central cloud node, the method further includes determining the sample quality parameters of the target local model by at least one of the following methods: directly determining the target sample quality parameters as the sample quality parameters of the target local model; performing an averaging operation on each of the target sample quality parameters to obtain the mean sample quality parameter, and determining the mean sample quality parameter as the sample quality parameter of the target local model.

[0128] Through the embodiments of this application, the sample quality parameters of the target local model are determined by directly determining or calculating the mean. Before sending the target local model and its sample quality parameters to the central cloud node, the sample quality parameters of the target local model are determined, which can reduce unnecessary communication burden, optimize the utilization of network resources, and allow different sample quality parameter determination methods to be selected according to actual conditions, increasing the flexibility and adaptability of the system and enabling it to cope with a variety of different edge computing scenarios.

[0129] As an optional approach, the method further includes: the central cloud node multiplying the target local model and the sample quality parameters of the target local model to obtain a fourth intermediate value; the central cloud node multiplying each of the sample quality parameters of the other local models with the corresponding local models in the other local models, and determining the sum of the products as a fifth intermediate value; the central cloud node adding the sample quality parameters of the target local model and the sample quality parameters of the other local models to obtain a sixth intermediate value; and the central cloud node dividing the sum of the fourth and fifth intermediate values ​​by the sixth intermediate value to obtain the global model.

[0130] Through the embodiments of this application, by multiplying the target local model with its sample quality parameters to obtain a fourth intermediate value, and by multiplying other local models with their sample quality parameters to obtain a fifth intermediate value, the central cloud node can assign corresponding weights to each local model according to its quality. Furthermore, by calculating the sum of the fourth and fifth intermediate values, the central cloud node can integrate the contributions of all local models, ensuring that the global model can reflect the data features and learning outcomes from different edge nodes. Moreover, by adding the sample quality parameters of the target local model to the sample quality parameters of other local models to obtain a sixth intermediate value, the central cloud node can dynamically adjust the weights of each local model in the global model, making the global model more adaptable to the ever-changing data environment. Finally, by fusing information from multiple local models, more accurate prediction results can be provided.

[0131] As an optional approach, the above-mentioned model update method can be applied to the target terminal access node, including: obtaining a target local model through local training; sending the target local model and target sample quality parameters to the target edge cloud node to instruct the target edge cloud node to perform the following operations: performing an aggregation operation on the target local model and the first local model stored in the target edge cloud node according to the target sample quality parameters and the first sample quality parameters to obtain a target local model, wherein the first sample quality parameters are parameters pre-acquired by the target edge cloud node and sent by other terminal access nodes, and the first sample quality parameters are used to represent the number of training samples and the uniformity of sample distribution used by the other terminal access nodes when training other local models, and the first local model is the model obtained by the target edge cloud node in the previous round of aggregation operation. The process involves aggregating a local model based on the first sample quality parameter and other local models. The target local model and its sample quality parameters are then sent to a central cloud node, instructing the central cloud node to perform the aggregation operation on the target local model and other local models based on their sample quality parameters, thereby obtaining a global model. The other local models are models sent to the central cloud node from other edge cloud nodes. The global model is configured to be periodically distributed to the target terminal access node, instructing the target terminal access node to update the target local model using the global model. The target sample quality parameter represents the number of training samples and the uniformity of sample distribution used by the target terminal access node when training the target local model.

[0132] For example, in the embodiments of this application, the above-mentioned target local model can be trained at the target terminal access node. Then, the trained target local model is uploaded to the target edge cloud node. Subsequently, the target edge node aggregates the target local model according to the target sample quality parameters to obtain the target local model. Then, it is uploaded to the central cloud node for global aggregation to obtain the global model.

[0133] As an optional approach, before acquiring the performance parameters sent by multiple edge cloud nodes, the method further includes: starting a model training process and a model transmission process, wherein the model training process and the model transmission process are set to run asynchronously, the model training process is used to train the target local model, and the model transmission process is used to send the target local model to the target edge cloud node; if a satellite communication time window is acquired, acquiring the performance parameters sent by multiple edge cloud nodes in the current time window through the model transmission process, wherein the satellite communication time window is used to indicate the time period during which the target local model is allowed to be sent to the target edge cloud node, the satellite communication time window includes the current time window, and the current time window corresponds to the training period required for one round of the target local model; if the satellite communication time window is not acquired, blocking the model transmission process, and reacquiring the satellite communication time window when satellite communication is enabled.

[0134] Optionally, in the embodiments of this application, the above-mentioned model training process refers to starting a process to train the above-mentioned target local model, and the model transmission process refers to starting another process to send the target local model to the target edge cloud node. The above-mentioned satellite communication time window can be understood as checking whether there is a time period that allows the model to be sent during the model transmission process.

[0135] For example, if a satellite communication time window is not available at the current moment, the model transmission process will be blocked, i.e., the transmission of the target local model will be suspended. Once satellite communication is enabled and a communication time window becomes available, the model transmission process will reacquire the time window and continue to transmit the target local model.

[0136] By utilizing satellite communication time windows to control model transmission through the embodiments of this application, the utilization of communication resources can be optimized, model transmission can be avoided during inappropriate time periods, and thus unnecessary communication costs can be reduced.

[0137] In an exemplary embodiment, since existing federated learning frameworks typically employ a single-layer federated learning architecture, using only one central cloud node as the model aggregation end, and other training nodes (such as the aforementioned target terminal access node and edge cloud nodes) are connected to the central cloud node via terrestrial networks, this limits the application scenarios of federated learning. Therefore, in the overall cloud-edge-device architecture formed under a wireless communication network, there are three different types of computing nodes: central cloud nodes, edge cloud nodes, and terminal access nodes. The cloud and edge, and edge and edge are connected via terrestrial networks; the cloud and device, edge and device, and device and device are connected via wireless networks such as mobile communication networks and satellite networks. Furthermore, edge cloud nodes and central cloud nodes have the same model aggregation capabilities and can serve as the model aggregation end in federated learning.

[0138] Furthermore, as a user's terminal access node, one can choose a suitable cloud node from the central cloud node or multiple edge cloud nodes as the model aggregation end. Therefore, the existing single-layer federated learning architecture, operating on a wireless network, puts excessive pressure on the technical resources of the central cloud node and the wireless network, and cannot fully utilize the resources of the edge cloud nodes. Based on this, this application proposes an update method for the aforementioned model, which can be applied to a two-layer federated learning architecture between cloud and edge to achieve a more reasonable allocation of tasks between the central cloud node and the edge cloud node. In the first-layer federated learning process between cloud and edge, a semi-asynchronous federated learning strategy based on terminal access node model training and transmission decoupling can be adopted to ensure the effective utilization of terminal access node resources under unstable wireless network conditions. At the same time, a weighted scoring algorithm for the computational performance indicators of edge cloud nodes based on AHP (Analytic Hierarchy Process) and entropy weight method is designed to ensure that the terminal access node can make reasonable selections of edge cloud nodes under unstable wireless network conditions. In the second-layer federated learning process between cloud and edge, a cloud-edge timed synchronous federated learning strategy based on model quality is adopted to ensure that both the global model of the central cloud node and the local model of the edge cloud node can be updated periodically.

[0139] For example, in this embodiment, the structure may include, but is not limited to, a three-layer structure consisting of a terminal access node, an edge cloud node, and a core central cloud node. The terminal access node is equipped with application sensors to collect data and store it in its local database. The terminal access node also possesses limited computing resources to perform simple processing of the collected data and local training of machine learning models. The edge cloud node can communicate with both the terminal access node and the central cloud node, and does not need to collect data; it possesses more computing resources than the terminal access node. The central cloud node can communicate wirelessly with the edge cloud node and transmit data with the terminal access node using network equipment such as base stations or satellite stations. Specifically, this includes the following:

[0140] The two-layer federated learning architecture can be divided into two parts: the first layer of federated learning is implemented based on edge-to-device or cloud-to-device communication, and the second layer of federated learning is implemented based on cloud-to-edge communication. The layers cooperate with each other and utilize each other's computation results. At the same time, they are relatively independent at runtime and do not involve strict dependencies. Data transmission also has two stages: the first layer of federated learning is connected via a wireless network and the second layer of federated learning is connected via a terrestrial network. The data transmission cost of the second layer is much lower than that of the first layer. The two-layer architecture effectively alleviates and distributes the communication pressure on the central cloud node, making the task allocation between edge cloud nodes and central cloud nodes more reasonable.

[0141] On the one hand, the core purpose of the semi-asynchronous federated learning strategy based on the decoupling of model training and transmission at terminal access nodes is to allow terminal access nodes to run two independent processes in parallel: one process is responsible for local model training, ensuring that the terminal access node can still train its local model even in the event of a network interruption; the other process uses a semi-asynchronous federated learning strategy to transmit the model, thus eliminating the need to wait for other terminal access nodes to complete model training and directly uploading the local model within the wireless network communication time window, maximizing the utilization of the wireless network communication time window. Specifically, when a terminal access node selects an edge cloud node to access, it can, but is not limited to, use a weighted scoring algorithm based on edge cloud performance metrics using AHP and entropy weighting to achieve a reasonable selection of edge clouds by the terminal access node.

[0142] First, the AHP method is based on the subjective evaluation of the relative importance of each criterion or option by decision-makers or experts based on their knowledge and experience, introducing rich domain knowledge and experience, thus making the decision more reasonable and closer to reality. Second, the entropy weight method determines the weight of each criterion based on the objective variability of data, which can reflect the information content and differences of each criterion. That is, it extracts information directly from the data without relying on the subjective evaluation of decision-makers or experts. By combining the two, the advantages of each can be fully utilized, combining subjective and objective factors to provide a more objective and scientific weight allocation for decision-making.

[0143] On the other hand, regarding the cloud-edge time-synchronized federated learning strategy based on model quality, existing federated learning frameworks do not have built-in multi-layer federated learning functionality. However, this application adopts a cloud-edge time-synchronized federated learning strategy based on model quality in the second layer of federated learning, including but not limited to:

[0144] 1) The timed synchronization aggregation strategy relies on the terrestrial network connection between the cloud and the edge. Timed synchronization aggregation ensures that each edge cloud can periodically update the local model to the global model. Even if a certain edge cloud does not receive a local model uploaded by a terminal access node during a period, it can still complete the local model update, ensuring that even if a terminal access node uploads a model to the edge cloud later, the model accuracy will not be affected by the local model being too outdated.

[0145] 2) A weighted aggregation strategy based on model quality is used. During the aggregation of the global model at the central cloud node, the average sample quality coefficient of the terminal access nodes aggregated by the edge cloud nodes in this round is collected as a model quality index to represent the quality of the local model. This model quality index is used as the weight of each edge cloud local model, ensuring that the higher quality local model will dominate during the aggregation process, thereby effectively improving the accuracy of the global model.

[0146] First, in the first layer of federated learning between endpoints and edges, the following can be included but not limited to:

[0147] Considering that in practical applications, there may be instances where only a single terminal access node connects to the edge cloud for federated learning, this application also proposes a semi-asynchronous weighted federated aggregation algorithm based on sample quality. That is, before the terminal access node uploads its local model, the sample quality of the local training set samples needs to be calculated, including but not limited to evaluation from the perspectives of sample size and sample distribution uniformity. The sample distribution uniformity can be calculated using the Gini index, and the specific calculation formula is as follows:

[0148]

[0149] Where, k Gini is the Gini index of the local training set samples, representing the uniformity of the sample distribution. Its value ranges from [0, 1], with a smaller Gini index indicating a more uneven sample distribution; n is the number of sample classes; p i The sample frequency is the sample frequency of the i-th category. Then, the sample quality coefficient is obtained by multiplying the sample number by the Gini coefficient.

[0150] In an exemplary embodiment, the training process of the local model may include, but is not limited to: First, the terminal access node stores a local model and a local model locally. The local model is distributed by the edge cloud node, and the local model is generated by training local sample data. When a computing task begins, the terminal access node starts a corresponding process to be responsible for training the local model. Each round of local training needs to be based on an initial model, i.e., the model to be trained. Through the embodiments of this application, it is ensured that a suitable initial model is selected for iterative training in each round. The training of the local model may include, but is not limited to:

[0151] Prioritize selecting a local model that has not been trained locally as the initial model for local training; secondly, select an existing local model for local training; if no local model or local model exists locally, the terminal access node will randomly generate an initial model and train it locally to obtain the target local model; after training, the target local model will replace the original local model. When the number of training rounds of local machine learning reaches the set upper limit, the distributed computing process of the terminal access node will be terminated.

[0152] In yet another exemplary embodiment, the semi-asynchronous federated learning strategy of the terminal access node may include, but is not limited to: the terminal access node initiating a corresponding process to be responsible for the semi-asynchronous federated learning strategy, and terminating the distributed computing process of the terminal access node when the number of federated learning rounds reaches a set upper limit.

[0153] Terminal access nodes will only establish connections with edge cloud nodes if a local model that has not been uploaded exists locally. This ensures that terminal access nodes participating in data transmission do not need to wait for other nodes to complete model training, thus making more efficient use of the wireless communication time window. Furthermore, MD5 hashing (a hash-encrypted encryption method) can be used to determine whether the local model (the aforementioned target local model) has been uploaded. After each successful upload, the MD5 hash of the uploaded local model is recorded locally. When it is necessary to verify whether a local model has been uploaded, the MD5 hash of the current local model can be compared with the hash recorded in the local file. If they match, it means that the local model has been uploaded.

[0154] Furthermore, after the terminal access node establishes a connection with the edge cloud node, the terminal access node queries the creation time of the local model stored at both the edge cloud node and the terminal access node. If the local model stored at the terminal access node is too outdated, it prioritizes downloading a newer local model from the edge cloud node. That is, it checks whether the difference in creation time between the local model at the edge cloud node and the terminal access node exceeds a time difference threshold. If it does, the local model stored at the terminal access node is considered too outdated, and the latest local model needs to be obtained from the edge cloud node for replacement of the local model. The time difference threshold t2 can be set as: t2 = max(2 Ttrain T Communication ).

[0155] Among them, T train : The time required to train the local model for one round; T Communication : The time elapsed since the start of this round of communication (the opening of the wireless communication time window); if the time difference between the local model creation at the edge cloud node and the terminal access node is less than twice T train This means that the model was uploaded immediately after one round of training; if the creation time difference between the two models is less than T... Communication This means that the two models may have been generated within the same time window, ensuring that both the timeliness of training and the data transmission efficiency within the communication window are considered when choosing whether to prioritize downloading the local model. Regarding the issue of node network interruption, if the edge cloud node and the terminal access node reconnect within a preset timeout period after the disconnection, the terminal access node can continue data transmission. If the disconnection time exceeds the preset duration, the edge cloud node will cut off communication with the terminal access node and respond normally to requests from other nodes. The terminal access node that was disconnected will automatically stop the current federated learning process after the connection is restored.

[0156] Specifically, when the aforementioned terminal access node determines the edge cloud node to access, in order to ensure that the terminal access node can make a reasonable selection of the edge cloud in a highly dynamic network environment, it may, but is not limited to, adopt a weighted scoring algorithm for edge cloud performance indicators based on AHP and entropy weight method. The specific steps include:

[0157] S1. Obtain the performance metrics of the edge cloud. Before each round of federated learning begins, each terminal access node needs to obtain the following performance metrics of the edge cloud nodes, including but not limited to several performance sub-metrics: round-trip latency from the terminal access node to each edge cloud node, CPU load rate (processor load rate) of each edge cloud node, and communication load rate (allocated bandwidth / total physical bandwidth) of each edge cloud.

[0158] S2 uses the AHP method to construct a judgment matrix, and compares the performance indicators pairwise to reflect their importance in the edge cloud selection problem. ij This represents the importance of the indicator in row i relative to the indicator in column j; similarly:

[0159] Next, a hierarchical single sort is performed to determine the first-level weight of each performance indicator. The weight of each performance indicator in each row of the judgment matrix is ​​calculated using the root mean square, resulting in an m-dimensional vector, represented as follows:

[0160] Furthermore, the m-dimensional vectors are all standardized into weight scalars, that is:

[0161]

[0162] It should be noted that a consistency check can also be performed on the first-level weights. That is, in order to ensure the quality and reliability of the AHP decision-making process and avoid misleading decisions caused by logical inconsistencies, a consistency check is required. Specifically:

[0163] First, it is necessary to calculate the maximum eigenvalue λ of the performance index. max :

[0164]

[0165] Where A represents the judgment matrix mentioned above, and the values ​​of n and m are the same, both being the number of sub-parameters in the performance index parameters mentioned above.

[0166] Next, the Consistency Index (CI) is calculated.

[0167]

[0168] The random consistency index (RI) was obtained by looking up the matrix order and the corresponding RI table. When n=3, RI=0.58. Then, the consistency ratio (CR) was calculated:

[0169]

[0170] If CR is less than or equal to 0.1, the consistency of the judgment matrix is ​​considered acceptable. If CR is greater than 0.1, the judgment matrix can be re-evaluated or modified to improve its consistency.

[0171] S3. Establish and standardize the performance index matrix for each edge cloud node. First, establish the performance index matrix, which can be described as follows: Figure 3 As shown, the data in the performance index matrix are then standardized:

[0172]

[0173] Where, x ij ' represents each matrix element in the standardized performance index matrix above, x ij In the above performance index matrix, each matrix element i indicates a row element, j indicates a column element, and min... i (x ij (max) refers to the value of the matrix element with the smallest value among all elements in each row, given the same number of columns. i (x ij This refers to the value of the matrix element with the largest value among all elements in each row, given the same number of columns.

[0174] Furthermore, a target probability matrix is ​​established based on the aforementioned performance index matrix. For each element in the target probability matrix (i.e., the value of the performance index for each edge cloud node or central cloud node), the proportion of each element in the corresponding performance index can be calculated to construct the overall target probability matrix. The matrix element value in the target probability matrix is ​​p. ij It can be represented as:

[0175]

[0176] Next, after determining the target probability matrix, the information entropy of each performance index is calculated, as shown below:

[0177]

[0178] Among them, information entropy e j It is a measure used to describe the uncertainty of a random variable. j indicates the sub-parameters in the performance index parameters (round-trip delay from the terminal access node to each edge cloud node, CPU load rate of each edge cloud node, and communication load rate of each edge cloud). The greater the dispersion of a certain sub-parameter, the more uncertain the specific value of the performance index is, and therefore, the greater the information entropy.

[0179] Next, using the aforementioned information entropy e j Determine the secondary weights of each sub-parameter in the performance index parameters; that is, determine the weights of each sub-parameter based on the amount of effective information it contains.

[0180]

[0181] Ultimately, it can be achieved through the aforementioned first-level weight α i and second-order weights β j Calculate the comprehensive weight value w of the sub-parameters in each performance index parameter for each cloud node. i Here, i and j have the same value, both used to represent sub-parameters in the performance metric parameters:

[0182]

[0183] The comprehensive weight value w of the sub-parameters in the various performance index parameters corresponding to each of the above cloud nodes is obtained. i Then, the communication score of each cloud node can be obtained. Taking the communication score of one cloud node as an example: Communication score = Σ sub-parameter i in the performance index parameters * comprehensive weight value w i Based on this, the cloud node with the highest communication score will be selected as the final cloud node for the aforementioned terminal access node to connect to.

[0184] It should be noted that the cloud node that the aforementioned terminal access node ultimately chooses to access can be a central cloud node or an edge cloud node. This application does not limit this. If, during this round of model update, the communication score of the central cloud node is higher than that of the edge cloud node, then the aforementioned terminal access node will ultimately choose to access the target cloud node, send its local model directly to the central cloud node, and aggregate it with the local models sent to the target cloud node by other edge cloud nodes, or the local models uploaded by other terminal access nodes that directly access the central cloud node, to obtain the aforementioned global model.

[0185] For example, assuming the terminal access node determines to access the edge cloud node, it can establish a connection with the edge cloud node, and then upload the locally stored local model and sample quality parameters to the edge cloud node. The edge cloud node can jointly maintain and record the sample quality coefficients attached to the terminal access node each time the local model is uploaded, and construct a terminal access node sample quality coefficient table corresponding to the IP address of the terminal access node.

[0186] Furthermore, when terminal access node a establishes a connection with the edge cloud node, the edge cloud node will first update the sample quality coefficients in the terminal access node sample quality coefficient table that match the IP address of the terminal access node. Then, the sample quality coefficient of terminal access node a and the sample quality coefficients of other terminal access nodes in the table are set as weights, and a weighted average operation is performed to aggregate a local model. That is, by considering the sample quality coefficients of the terminal access nodes, it is ensured that the model trained with high-quality samples dominates in the local model aggregation, which helps to improve the accuracy of the local model. In addition, the local models that already exist in the edge cloud node are included in the aggregation process, ensuring that model aggregation can still proceed normally even if only a single terminal access node is connected to the edge cloud node for federated learning. The specific aggregation algorithm expression is as follows:

[0187]

[0188] Among them, M t : The local model formed by local aggregation in round t; M i : The local model uploaded by terminal access node i; N i : Sample quality coefficient of terminal access node i; M t-1 : The local model formed by local aggregation in the (t-1)th round; N j : Sample quality coefficients of other terminal access nodes in the table.

[0189] Secondly, in the second layer of federated learning between cloud and edge, a timed federated aggregation algorithm based on model quality is adopted. Each edge cloud node periodically sends its current local model to the central cloud node, and the average sample quality coefficient of the terminal access nodes aggregated in this round is used as the weight to perform a weighted average to obtain the global model. The specific calculation formula is as follows:

[0190]

[0191] Among them, M global : Global model; M i : Local model uploaded by edge cloud node i; N i : The average sample quality coefficient of the terminal access nodes aggregated by edge cloud node i during this round.

[0192] Through the embodiments of this application, in the application scenario of two-layer federated learning in the overall cloud-edge-device architecture design, the load of the central cloud node and the edge cloud node is balanced. In the first layer of federated learning, a semi-asynchronous federated learning strategy with decoupling of transmission and training is adopted to overcome the limitations of traditional federated learning frameworks and solve the technical problem of unstable wireless communication of terminal access nodes. In the second layer of federated learning, a timed synchronization strategy is adopted to periodically update the local model of the edge cloud to prevent the local model of the edge cloud from becoming outdated. Furthermore, at the terminal access node, a weighted scoring algorithm based on edge cloud performance indicators using AHP and entropy weight method is used to select the most suitable edge cloud node for connection, ensuring the reasonable selection of edge cloud nodes by the terminal access node in a highly dynamic network environment.

[0193] It is understood that in the specific embodiments of this application, data such as user information are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0194] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0195] According to another aspect of the embodiments of this application, a model updating apparatus for implementing the above-described model updating method is also provided. For example... Figure 6 As shown, the device includes:

[0196] The acquisition module 602 is used to acquire the target local model and target sample quality parameters sent by the target terminal access node. The target local model is the model obtained by the target terminal access node through local training, and the target sample quality parameters are used to represent the number of training samples and the uniformity of sample distribution used by the target terminal access node when training the target local model.

[0197] The local aggregation module 604 is used to perform aggregation operations on the target local model and the first local model stored in the target edge cloud node according to the target sample quality parameters and the first sample quality parameters to obtain the target local model. The first sample quality parameters are parameters sent by other terminal access nodes and are obtained in advance by the target edge cloud node. The first sample quality parameters are used to represent the number of training samples and the uniformity of sample distribution used by other terminal access nodes when training other local models. The first local model is the local model obtained by the target edge cloud node in the previous aggregation operation based on the first sample quality parameters and other local models.

[0198] The global aggregation module 606 is used to send the target local model and the sample quality parameters of the target local model to the central cloud node, so as to instruct the central cloud node to perform aggregation operations on the target local model and other local models based on the sample quality parameters of the target local model and the sample quality parameters of other local models to obtain the global model. The other local models are models sent to the central cloud node by other edge cloud nodes. The global model is set to allow periodic distribution to the target terminal access node, so as to instruct the target terminal access node to use the global model to update the target local model.

[0199] As an optional solution, the above-mentioned apparatus is used to perform an aggregation operation on the target local model and the first local model stored in the target edge cloud node according to the target sample quality parameter and the first sample quality parameter in the following manner to obtain the target local model: obtaining a pre-established mapping relationship set, wherein the mapping relationship set includes the mapping relationship between each of the terminal access nodes in other terminal access nodes and each of the sample quality parameters in the first sample quality parameter; determining the sum of each of the sample quality parameters in the first sample quality parameter recorded in the mapping relationship set as the first local weight parameter; and performing an aggregation operation on the target local model and the first local model according to the first local weight parameter and the target sample quality parameter to obtain the target local model.

[0200] As an optional solution, the above-mentioned apparatus is used to perform an aggregation operation on the target local model and the first local model according to the first local weight parameter and the target sample quality parameter in the following manner to obtain the target local model: multiplying the first local weight parameter and the first local model to obtain a first intermediate value; multiplying each of the sample quality parameters in the target sample quality parameter with each of the local models in the target local model, and determining the sum of the products as a second intermediate value; summing each of the sample quality parameters in the target sample quality parameter with each of the sample quality parameters in the first sample quality parameter to obtain a third intermediate value; and dividing the sum of the first intermediate value and the second intermediate value by the third intermediate value to obtain the target local model.

[0201] As an optional solution, the above-mentioned apparatus is further used to: before sending the target local model and the sample quality parameters of the target local model to the central cloud node, determine the sample quality parameters of the target local model by at least one of the following methods: directly determining the target sample quality parameters as the sample quality parameters of the target local model; performing an averaging operation on each sample quality parameter in the target sample quality parameters to obtain the mean sample quality parameter, and determining the mean sample quality parameter as the sample quality parameter of the target local model.

[0202] As an optional solution, the above-mentioned device is further used for: the central cloud node multiplying the target local model and the sample quality parameters of the target local model to obtain a fourth intermediate value; the central cloud node multiplying each of the sample quality parameters of the other local models and the corresponding local models in the other local models, and determining the sum of the products as a fifth intermediate value; the central cloud node adding the sample quality parameters of the target local model and the sample quality parameters of the other local models to obtain a sixth intermediate value; and the central cloud node dividing the sum of the fourth intermediate value and the fifth intermediate value by the sixth intermediate value to obtain the global model.

[0203] According to another aspect of the embodiments of this application, a model updating apparatus for implementing the above-described model updating method is also provided. The apparatus includes:

[0204] The training module is used to obtain the target local model through local training;

[0205] The transmission module is used to send the target local model and target sample quality parameters to the target edge cloud node, instructing the target edge cloud node to perform the following operations: aggregate the target local model and the first local model stored in the target edge cloud node according to the target sample quality parameters and the first sample quality parameters to obtain the target local model. The first sample quality parameters are parameters pre-obtained by the target edge cloud node and sent by other terminal access nodes. These parameters represent the number of training samples and the uniformity of sample distribution used by other terminal access nodes when training other local models. The first local model is the model obtained by the target edge cloud node in the previous aggregation operation based on the first sample quality parameters and other local models. The local model is obtained by aggregating the local models from the ground model; the target local model and its sample quality parameters are sent to the central cloud node to instruct the central cloud node to perform aggregation operations on the target local model and other local models based on the sample quality parameters of the target local model and the sample quality parameters of other local models to obtain the global model. The other local models are models sent to the central cloud node by other edge cloud nodes. The global model is set to allow periodic distribution to the target terminal access node. The target terminal access node uses the global model to update the target local model. The target sample quality parameters are used to represent the number of training samples and the uniformity of sample distribution used by the target terminal access node when training the target local model.

[0206] As an optional solution, the above-mentioned apparatus is also used to: obtain performance parameters sent by multiple edge cloud nodes before sending the target local model and target sample quality parameters to the target edge cloud node, wherein the performance parameters are used to indicate the computational performance of each edge cloud node among the multiple edge cloud nodes; and determine the target edge cloud node from the multiple edge cloud nodes based on the performance parameters.

[0207] As an optional solution, the above-mentioned device is further configured to: after determining the target edge cloud node from multiple edge cloud nodes based on performance parameters, obtain the first creation time of the latest aggregated second local model of the target edge cloud node, and the second creation time of the third local model last received by the target terminal access node; if it is determined that the time difference between the first creation time and the second creation time meets a preset time difference, download the second local model from the target edge cloud node; train the second local model locally, and use the trained local model as the target local model.

[0208] As an optional approach, the aforementioned device is used to determine the target edge cloud node from multiple edge cloud nodes based on performance parameters in the following manner: acquiring the round-trip delay sub-parameters between each edge cloud node and the target terminal access node, the processor load rate sub-parameters of each edge cloud node, and the communication load rate sub-parameters, respectively, to obtain performance parameters; establishing a judgment matrix and a performance index matrix based on the performance parameters, wherein the matrix elements in the judgment matrix are used to indicate the correlation between the various sub-parameters in the performance parameters, and the performance index matrix is ​​used to indicate the effective information content of each sub-parameter corresponding to each edge cloud node; determining the probability value of the target terminal access node accessing each edge cloud node using the judgment matrix and the performance index matrix; and determining the edge cloud node with the largest probability value as the target edge cloud node.

[0209] As an optional solution, the above-mentioned device is used to establish a judgment matrix and a performance index matrix based on performance parameters in the following manner: Firstly, it obtains a pre-set first correlation parameter between the round-trip delay sub-parameter and the processor load rate sub-parameter, a second correlation parameter between the round-trip delay sub-parameter and the communication load rate sub-parameter, and a third correlation parameter between the processor load rate sub-parameter and the communication load rate sub-parameter, respectively. The first correlation parameter indicates the degree of correlation between the round-trip delay sub-parameter and the processor load rate sub-parameter, the second correlation parameter indicates the degree of correlation between the round-trip delay sub-parameter and the communication load rate sub-parameter, and the third correlation parameter indicates the degree of correlation between the processor load rate sub-parameter and the communication load rate sub-parameter. Then, it determines the values ​​of each matrix element in the judgment matrix based on the first correlation parameter, the second correlation parameter, and the third correlation parameter to generate the judgment matrix. The matrix row elements and matrix column elements of the judgment matrix are used to indicate the performance parameter type, which includes the parameter type of the round-trip delay sub-parameter, the parameter type of the communication load rate sub-parameter, and the parameter type of the processor load rate sub-parameter. The matrix cell elements in the judgment matrix indicate the first correlation parameter, the second correlation parameter, and the third correlation parameter.

[0210] As an optional solution, the above-mentioned device is used to establish a judgment matrix and a performance index matrix based on performance parameters in the following manner: obtaining the round-trip delay sub-parameter, communication load rate sub-parameter, and processor load rate sub-parameter corresponding to each edge cloud node; determining the performance index matrix based on the round-trip delay sub-parameter, communication load rate sub-parameter, and processor load rate sub-parameter corresponding to each edge cloud node, wherein the matrix row elements in the performance index matrix are used to indicate each edge cloud node, the matrix column elements in the performance index matrix are used to indicate the performance parameter type, the performance parameter type includes the parameter type of the round-trip delay sub-parameter, the parameter type of the communication load rate sub-parameter, and the parameter type of the processor load rate sub-parameter, and the matrix cell elements in the performance index matrix are used to indicate the value of the round-trip delay sub-parameter, the value of the communication load rate sub-parameter, and the value of the processor load rate sub-parameter.

[0211] As an optional solution, the above-mentioned device is further configured to: after determining the performance index matrix based on the round-trip delay sub-parameter, communication load rate sub-parameter, and processor load rate sub-parameter corresponding to each edge cloud node, determine the ratio of the round-trip delay sub-parameter corresponding to each edge cloud node to the sum of the multiple round-trip delay sub-parameters corresponding to multiple edge cloud nodes, to obtain a first probability parameter corresponding to each edge cloud node; determine the ratio of the communication load rate sub-parameter corresponding to each edge cloud node to the sum of the multiple communication load rate sub-parameters corresponding to multiple edge cloud nodes, to obtain a second probability parameter corresponding to each edge cloud node; determine the ratio of the processor load rate sub-parameter corresponding to each edge cloud node to the sum of the multiple processor load rate sub-parameters corresponding to multiple edge cloud nodes, to obtain a second probability parameter corresponding to each edge cloud node; and determine the ratio of the processor load rate sub-parameter corresponding to each edge cloud node to the sum of the multiple processor load rate sub-parameters corresponding to multiple edge cloud nodes, to obtain a second probability parameter corresponding to each edge cloud node. The third probability parameter corresponding to each edge cloud node is determined; a target probability matrix is ​​generated based on the first, second, and third probability parameters corresponding to each edge cloud node, wherein the matrix elements in the target probability matrix are used to determine the effective information content of the round-trip delay sub-parameter, communication load rate sub-parameter, and processor load rate sub-parameter corresponding to each edge cloud node; the weight parameters of each sub-parameter of the performance parameters corresponding to each edge cloud node are determined according to the effective information content of the round-trip delay sub-parameter, communication load rate sub-parameter, and processor load rate sub-parameter, wherein the weight parameters of each sub-parameter include the first sub-weight parameter of the round-trip delay sub-parameter, the second sub-weight parameter of the communication load rate sub-parameter, and the third sub-weight parameter of the processor load rate sub-parameter.

[0212] As an optional solution, the above-mentioned device is further configured to: multiply the elements of the first row of the judgment matrix with the first sub-weight parameters of each edge cloud node to obtain the first product result of each edge cloud node; and sum the multiple products obtained by multiplying the elements of the first row of the judgment matrix with the first sub-weight parameters of multiple edge cloud nodes to obtain the first summation result; and determine the ratio of the first product result of each edge cloud node to the first summation result as the first weight parameter corresponding to the round-trip delay sub-parameter of each edge cloud node, wherein the elements of the first row of the matrix are used to indicate the degree of correlation between the round-trip delay sub-parameter and the processor load rate sub-parameter, and the round-trip delay sub-parameter and the communication load rate sub-parameter; multiply the elements of the second row of the judgment matrix with the second sub-weight parameters of each edge cloud node to obtain the second product result of each edge cloud node; and sum the multiple products obtained by multiplying the elements of the second row of the judgment matrix with the second sub-weight parameters of each edge cloud node to obtain the second summation result; and determine the ratio of the second product result of each edge cloud node to the second summation result as the communication load rate sub-parameter of each edge cloud node. The second weight parameter corresponds to the parameter, where the second row of matrix elements indicates the correlation between the communication load rate sub-parameter and the round-trip delay sub-parameter, and between the communication load rate sub-parameter and the processor load rate sub-parameter. The third row of matrix elements in the judgment matrix is ​​multiplied by the third sub-weight parameter of each edge cloud node to obtain the third product result for each edge cloud node. Several products of the third row of matrix elements in the judgment matrix and the third sub-weight parameter of each edge cloud node are summed to obtain the third summation result. The ratio of the third product result to the third summation result for each edge cloud node is determined as the third weight parameter corresponding to the processor load rate sub-parameter of each edge cloud node. The third row of matrix elements indicates the correlation between the processor load rate sub-parameter and the round-trip delay sub-parameter, and between the processor load rate sub-parameter and the communication load rate sub-parameter. Based on the first, second, and third weight parameters of each edge cloud node, a weighted summation operation is performed on the round-trip delay sub-parameter, communication load rate, and processor load rate of each edge cloud node to obtain the probability value of the target terminal access node accessing each edge cloud node.

[0213] As an optional solution, the above-mentioned device is used to send the target local model and target sample quality parameters to the target edge cloud node in the following manner: when it is determined that the time difference between the first creation time and the second creation time does not meet the preset time difference, the target terminal access node sends the latest trained target local model and target sample quality parameters to the target edge cloud node.

[0214] As an optional solution, the above-mentioned device is further configured to: before acquiring the performance parameters sent by multiple edge cloud nodes, start the model training process and the model transmission process, wherein the model training process and the model transmission process are set to run asynchronously, the model training process is used to train the target local model, and the model transmission process is used to send the target local model to the target edge cloud node; if a satellite communication time window is acquired, acquire the performance parameters sent by multiple edge cloud nodes in the current time window through the model transmission process, wherein the satellite communication time window is used to indicate the time period during which the target local model is allowed to be sent to the target edge cloud node, the satellite communication time window includes the current time window, and the current time window corresponds to the training period required for one round of the target local model; if a satellite communication time window is not acquired, block the model transmission process, and reacquire the satellite communication time window when satellite communication is enabled.

[0215] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0216] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0217] According to one aspect of this application, a computer program product is provided, the computer program product comprising a computer program.

[0218] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0219] Figure 7 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown.

[0220] It should be noted that, Figure 7 The computer system 700 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0221] like Figure 7As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for system operation. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output interface 705 (I / O interface) is also connected to the bus 704.

[0222] The following components are connected to the input / output interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a local area network card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.

[0223] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit 701, it performs various functions defined in the system of this application.

[0224] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit 701, it performs various functions provided in the embodiments of this application.

[0225] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described model update method is also provided. This electronic device may be... Figure 1 The terminal device or server shown. This embodiment uses this electronic device as an example for illustration. Figure 8 As shown, the electronic device includes a memory 802 and a processor 804. The memory 802 stores a computer program, and the processor 804 is configured to execute the steps in any of the above method embodiments via the computer program.

[0226] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0227] Optionally, in this embodiment, the processor may be configured to execute the methods in the embodiments of this application via a computer program.

[0228] Alternatively, as those skilled in the art will understand, Figure 8 The structure shown is for illustrative purposes only. Figure 8 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 8 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 8 The different configurations shown.

[0229] The memory 802 can be used to store software programs and modules, such as the program instructions / modules corresponding to the model update method and apparatus in this embodiment. The processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, thereby implementing the aforementioned model update method. The memory 802 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 802 may further include memory remotely located relative to the processor 804, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 802 may be used, but is not limited to, to store information such as the target local model. As an example, such as... Figure 8 As shown, the memory 802 may include, but is not limited to, the acquisition module 602, the local aggregation model 604, and the global aggregation model 606 in the model update device. Furthermore, it may include, but is not limited to, other module units in the model update device, which will not be elaborated upon in this example.

[0230] Optionally, the transmission device 806 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 806 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 806 is a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0231] In addition, the above-mentioned electronic device also includes: a display 808 for displaying the above-mentioned global model; and a connection bus 810 for connecting the various module components in the above-mentioned electronic device.

[0232] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.

[0233] According to one aspect of this application, a computer-readable storage medium is provided, from which a processor of an electronic device reads computer instructions, and the processor executes the computer instructions, causing the electronic device to perform a model update method provided in various alternative implementations of the above-described model update aspect.

[0234] Optionally, in this embodiment, the computer-readable storage medium described above may be configured to store methods for performing the embodiments of this application.

[0235] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0236] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0237] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned 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 all or part of the 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 instructions to cause one or more electronic devices to execute all or part of the steps of the methods described in the various embodiments of this application.

[0238] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0239] In the several embodiments provided in this application, it should be understood that the disclosed application can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.

[0240] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0241] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0242] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A model updating method characterized by comprising: Applied to target edge cloud nodes, including: The target local model and target sample quality parameters sent by the target terminal access node are obtained. The target local model is a model obtained by the target terminal access node through local training. The target sample quality parameters are used to represent the number of training samples and the uniformity of sample distribution used by the target terminal access node when training the target local model. Based on the target sample quality parameters and the first sample quality parameters, an aggregation operation is performed on the target local model and the first local model stored in the target edge cloud node to obtain the target local model. The first sample quality parameters are parameters sent by other terminal access nodes and are obtained in advance by the target edge cloud node. The first sample quality parameters are used to represent the number of training samples and the uniformity of sample distribution used by the other terminal access nodes when training other local models. The first local model is the local model aggregated by the target edge cloud node in the previous aggregation operation based on the first sample quality parameters and other local models. The target local model and its sample quality parameters are sent to the central cloud node to instruct the central cloud node to perform the aggregation operation on the target local model and the other local models based on the sample quality parameters of the target local model and the sample quality parameters of other local models, to obtain a global model. The other local models are models sent to the central cloud node by other edge cloud nodes. The global model is set to allow periodic distribution to the target terminal access node to instruct the target terminal access node to use the global model to update the target local model.

2. The method of claim 1, wherein, The step of aggregating the target local model and the first local model stored in the target edge cloud node according to the target sample quality parameters and the first sample quality parameters to obtain the target local model includes: Obtain a pre-established set of mapping relationships, wherein the set of mapping relationships includes the mapping relationship between each of the terminal access nodes in the other terminal access nodes and each of the sample quality parameters in the first sample quality parameters; The sum of each of the sample quality parameters recorded in the first sample quality parameter set in the mapping relationship set is determined as the first local weight parameter; The target local model and the first local model are aggregated based on the first local weight parameter and the target sample quality parameter to obtain the target local model.

3. The method of claim 2, wherein, The step of aggregating the target local model and the first local model based on the first local weight parameter and the target sample quality parameter to obtain the target local model includes: Multiply the first local weight parameter by the first local model to obtain the first intermediate value; Each of the target sample quality parameters and each of the target local models are multiplied together, and the sum of the products is determined as the second intermediate value. The third intermediate value is obtained by summing each of the target sample quality parameters with each of the first sample quality parameters. The target local model is obtained by dividing the sum of the first intermediate value and the second intermediate value by the third intermediate value.

4. The method of claim 1, wherein, Before sending the target local model and its sample quality parameters to the central cloud node, the method further includes determining the sample quality parameters of the target local model by at least one of the following methods: The target sample quality parameters are directly determined as the sample quality parameters of the target local model; The mean value is calculated for each of the target sample quality parameters to obtain the mean sample quality parameter, and the mean sample quality parameter is determined as the sample quality parameter of the target local model.

5. The method of claim 4, wherein, The method further includes: The central cloud node multiplies the target local model and the sample quality parameters of the target local model to obtain a fourth intermediate value; The central cloud node multiplies each of the sample quality parameters of the other local models with each corresponding local model in the other local models, and determines the sum of each product as the fifth intermediate value; The central cloud node adds the sample quality parameters of the target local model and the sample quality parameters of the other local models to obtain the sixth intermediate value; The central cloud node divides the sum of the fourth and fifth intermediate values ​​by the sixth intermediate value to obtain the global model.

6. A model updating method characterized by comprising: Applied to the target terminal access node, including: The target local model is obtained through local training; The target local model and target sample quality parameters are sent to the target edge cloud node to instruct the target edge cloud node to perform the following operations: Aggregation operations are performed on the target local model and the first local model stored in the target edge cloud node based on the target sample quality parameters and the first sample quality parameters to obtain a target local model. The first sample quality parameters are parameters pre-acquired by the target edge cloud node and sent by other terminal access nodes. These parameters represent the number of training samples and the uniformity of sample distribution used by the other terminal access nodes when training other local models. The first local model is a local model aggregated by the target edge cloud node in the previous aggregation operation based on the first sample quality parameters and the other local models. The target local model and its sample quality parameters are then sent to the central cloud node to instruct the central cloud node to perform the aggregation operation on the target local model and the other local models based on the sample quality parameters of the target local model and the sample quality parameters of the other local models, resulting in a global model. The other local models are models sent to the central cloud node by other edge cloud nodes. The global model is configured to be periodically distributed to the target terminal access node, and the target terminal access node uses the global model to update the target local model. The target sample quality parameter is used to represent the number of training samples and the uniformity of sample distribution used by the target terminal access node when training the target local model.

7. The method of claim 6, wherein, Before sending the target local model and target sample quality parameters to the target edge cloud node, the method further includes: Acquire performance parameters sent by multiple edge cloud nodes, wherein the performance parameters are used to indicate the computing performance of each edge cloud node among the multiple edge cloud nodes; The target edge cloud node is determined from the plurality of edge cloud nodes based on the performance parameters.

8. The method of claim 7, wherein, After determining the target edge cloud node from the plurality of edge cloud nodes based on the performance parameters, the method further includes: The first creation time of the second local model obtained by the latest aggregation of the target edge cloud node is obtained, and the second creation time of the third local model last received by the target terminal access node is obtained. If the time difference between the first creation time and the second creation time meets the preset time difference, the second local model is downloaded from the target edge cloud node; the second local model is trained locally, and the trained local model is used as the target local model; If the time difference between the first creation time and the second creation time does not meet the preset time difference, the target local model and the target sample quality parameters, which are latest trained locally by the target terminal access node, are sent to the target edge cloud node.

9. The method of claim 7, wherein, The step of determining the target edge cloud node from the plurality of edge cloud nodes based on the performance parameters includes: The performance parameters are obtained by acquiring the round-trip delay sub-parameters between each edge cloud node and the target terminal access node, the processor load rate sub-parameters and the communication load rate sub-parameters of each edge cloud node; A judgment matrix and a performance index matrix are established based on the performance parameters, wherein the judgment matrix is ​​used to indicate the correlation between the various sub-parameters in the performance parameters, and the performance index matrix is ​​used to indicate the effective information content of each sub-parameter corresponding to each edge cloud node; The probability values ​​of the target terminal access node accessing each of the edge cloud nodes are determined using the judgment matrix and the performance index matrix. The edge cloud node with the highest probability value is determined as the target edge cloud node.

10. The method of claim 9, wherein, The step of establishing a judgment matrix and a performance index matrix based on the performance parameters includes: The following parameters are obtained respectively: a first correlation parameter between the round-trip delay sub-parameter and the processor load rate sub-parameter, a second correlation parameter between the round-trip delay sub-parameter and the communication load rate sub-parameter, and a third correlation parameter between the processor load rate sub-parameter and the communication load rate sub-parameter. The first correlation parameter indicates the degree of correlation between the round-trip delay sub-parameter and the processor load rate sub-parameter, the second correlation parameter indicates the degree of correlation between the round-trip delay sub-parameter and the communication load rate sub-parameter, and the third correlation parameter indicates the degree of correlation between the processor load rate sub-parameter and the communication load rate sub-parameter. The values ​​of each matrix element in the judgment matrix are determined based on the first association parameter, the second association parameter, and the third association parameter to generate the judgment matrix. The matrix row elements and matrix column elements of the judgment matrix are used to indicate the performance parameter type. The performance parameter type includes the parameter type of the round-trip delay sub-parameter, the parameter type of the communication load rate sub-parameter, and the parameter type of the processor load rate sub-parameter. The matrix elements in the judgment matrix are used to indicate the first association parameter, the second association parameter, and the third association parameter.

11. The method of claim 9, wherein, The step of establishing a judgment matrix and a performance index matrix based on the performance parameters includes: Obtain the round-trip delay sub-parameter, the communication load rate sub-parameter, and the processor load rate sub-parameter corresponding to each edge cloud node; The performance index matrix is ​​determined based on the round-trip delay sub-parameter, the communication load rate sub-parameter, and the processor load rate sub-parameter corresponding to each edge cloud node. The matrix row elements in the performance index matrix are used to indicate each edge cloud node, and the matrix column elements in the performance index matrix are used to indicate the performance parameter type. The performance parameter type includes the parameter type of the round-trip delay sub-parameter, the parameter type of the communication load rate sub-parameter, and the parameter type of the processor load rate sub-parameter. The matrix elements in the performance index matrix are used to indicate the value of the round-trip delay sub-parameter, the value of the communication load rate sub-parameter, and the value of the processor load rate sub-parameter.

12. The method of claim 11, wherein, After determining the performance index matrix based on the round-trip delay sub-parameter, the communication load rate sub-parameter, and the processor load rate sub-parameter corresponding to each edge cloud node, the method further includes: The ratio of the round-trip delay sub-parameter corresponding to each edge cloud node to the sum of the round-trip delay sub-parameters corresponding to multiple edge cloud nodes is determined to obtain the first probability parameter corresponding to each edge cloud node. The ratio of the communication load rate sub-parameter corresponding to each edge cloud node to the sum of the multiple communication load rate sub-parameters corresponding to multiple edge cloud nodes is determined to obtain the second probability parameter corresponding to each edge cloud node. The ratio of the processor load rate sub-parameter corresponding to each edge cloud node to the sum of the multiple processor load rate sub-parameters corresponding to multiple edge cloud nodes is determined to obtain the third probability parameter corresponding to each edge cloud node. A target probability matrix is ​​generated based on the first probability parameter, the second probability parameter, and the third probability parameter corresponding to each edge cloud node, wherein the target probability matrix is ​​used to determine the effective information content of the round-trip delay sub-parameter, the communication load rate sub-parameter, and the processor load rate sub-parameter corresponding to each edge cloud node; The weight parameters of each sub-parameter of the performance parameters corresponding to each edge cloud node are determined according to the target probability matrix, wherein the weight parameters of each sub-parameter include a first sub-weight parameter of the round-trip delay sub-parameter, a second sub-weight parameter of the communication load rate sub-parameter, and a third sub-weight parameter of the processor load rate sub-parameter.

13. The method of claim 12, wherein, The method further includes: The first row of the judgment matrix is ​​multiplied by the first sub-weight parameter of each edge cloud node to obtain the first product result of each edge cloud node. The multiple products obtained by multiplying the first row of the judgment matrix by the first sub-weight parameters of multiple edge cloud nodes are summed to obtain the first summation result. The ratio of the first product result of each edge cloud node to the first summation result is determined as the first weight parameter corresponding to the round-trip delay sub-parameter of each edge cloud node. The first row of the matrix is ​​used to indicate the degree of correlation between the round-trip delay sub-parameter and the processor load rate sub-parameter, and between the round-trip delay sub-parameter and the communication load rate sub-parameter. The second row matrix element in the judgment matrix is ​​multiplied by the second sub-weight parameter of each edge cloud node to obtain the second product result of each edge cloud node. The products of the second row matrix element in the judgment matrix and the second sub-weight parameter of each edge cloud node are summed to obtain the second summation result. The ratio of the second product result of each edge cloud node to the second summation result is determined as the second weight parameter corresponding to the communication load rate sub-parameter of each edge cloud node. The second row matrix element is used to indicate the degree of correlation between the communication load rate sub-parameter and the round-trip delay sub-parameter, and between the communication load rate sub-parameter and the processor load rate sub-parameter. The third row matrix element in the judgment matrix is ​​multiplied by the third sub-weight parameter of each edge cloud node to obtain the third product result of each edge cloud node. Several products of the third row matrix element in the judgment matrix and the third sub-weight parameter of each edge cloud node are summed to obtain the third summation result. The ratio of the third product result of each edge cloud node to the third summation result is determined as the third weight parameter corresponding to the processor load rate sub-parameter of each edge cloud node. The third row matrix element is used to indicate the degree of correlation between the processor load rate sub-parameter and the round-trip delay sub-parameter, and between the processor load rate sub-parameter and the communication load rate sub-parameter. Based on the first weight parameter, the second weight parameter, and the third weight parameter of each edge cloud node, a weighted summation operation is performed on the round-trip delay sub-parameter, communication load rate, and processor load rate of each edge cloud node to obtain the probability value of the target terminal access node accessing each edge cloud node.

14. The method according to claim 7, characterized in that, Before obtaining the performance parameters sent by multiple edge cloud nodes, the method further includes: The model training process and the model transmission process are started, wherein the model training process and the model transmission process are set to run asynchronously, the model training process is used to train the target local model, and the model transmission process is used to send the target local model to the target edge cloud node; When a satellite communication time window is obtained, the performance parameters sent by multiple edge cloud nodes in the current time window are obtained through the model transmission process. The satellite communication time window is used to indicate the time period during which the target local model is allowed to be sent to the target edge cloud node. The satellite communication time window includes the current time window, which corresponds to the training period required for one round of the target local model. If the satellite communication time window is not acquired, the model transmission process is blocked, and the satellite communication time window is reacquired when satellite communication is enabled.

15. A model updating device, characterized in that, Applied to target edge cloud nodes, including: The acquisition module is used to acquire the target local model and target sample quality parameters sent by the target terminal access node. The target local model is a model obtained by the target terminal access node through local training. The target sample quality parameters are used to represent the number of training samples and the uniformity of sample distribution used by the target terminal access node when training the target local model. The local aggregation module is used to perform aggregation operations on the target local model and the first local model stored in the target edge cloud node according to the target sample quality parameters and the first sample quality parameters to obtain the target local model. The first sample quality parameters are parameters sent by other terminal access nodes and are obtained in advance by the target edge cloud node. The first sample quality parameters are used to represent the number of training samples and the uniformity of sample distribution used by the other terminal access nodes when training other local models. The first local model is the local model obtained by the target edge cloud node in the previous aggregation operation based on the first sample quality parameters and other local models. A global aggregation module is used to send the target local model and its sample quality parameters to a central cloud node, instructing the central cloud node to perform the aggregation operation on the target local model and the other local models based on the sample quality parameters of the target local model and the sample quality parameters of other local models, to obtain a global model. The other local models are models sent to the central cloud node by other edge cloud nodes. The global model is set to allow periodic distribution to the target terminal access node, instructing the target terminal access node to use the global model to update the target local model.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein the computer program can be executed by an electronic device to perform the method described in any one of claims 1 to 5 and claims 6 to 14.

17. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method described in any one of claims 1 to 5 and claims 6 to 14.

18. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 5 and claims 6 to 14 via the computer program.