Cloud-side communication middleware, end-side communication middleware and end-cloud collaboration system
By unifying and coordinating the communication middleware between the cloud and the device, the problems of communication latency and data loss in federated learning are solved, improving the efficiency and accuracy of model training and realizing efficient federated learning.
Patent Information
- Application Number
- CN202311290756.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-07
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-10-07
AI Technical Summary
In traditional federated learning communication, the lack of unified coordination and management between the cloud and the edge leads to differences in computing power, bandwidth and latency, resulting in communication delays and data loss, which affects the efficiency and accuracy of model training.
It provides cloud-side communication middleware and edge-side communication middleware, including policy management, data management, model management and communication management modules, to achieve unified coordination and management of federated training tasks. Through optimization of policy selection, data transmission, model aggregation and communication connection, it improves communication efficiency and model training accuracy.
Through unified coordination and management, communication overhead is reduced, the efficiency and feasibility of federated learning are improved, the efficiency and accuracy of model training are ensured, and data privacy and security are protected.
Smart Images

Figure CN119788484B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The embodiment of the present application relates to the technical field of end-cloud collaboration, and relates to, but is not limited to, a cloud-side communication middleware, an end-side communication middleware and an end-cloud collaboration system. BACKGROUND
[0002] End-cloud collaboration refers to, in the background of distributed computing and edge computing, collaborative completion by allocating computing resources and tasks between the cloud side and terminal devices, to realize more efficient computing and data processing. With the rapid growth of mobile device processing capability and the increasing demand for data collection and analysis, mobile terminals with certain computing capability and data are also added to the resource pool to collaboratively complete the computing task, thereby improving the efficiency of processing and analysis.
[0003] In traditional federated learning communication, there is no unified coordination and management between the cloud side and the end side, and the differences in computing capability, bandwidth and delay of the cloud side and the end side and other contents of numerous participants affect the communication delay, data loss and other problems, thereby affecting the efficiency and accuracy of model training. SUMMARY
[0004] Therefore, the cloud-side communication middleware, the end-side communication middleware and the end-cloud collaboration system provided by the embodiment of the present application can uniformly coordinate and manage the strategy, data, communication and model of the end-cloud collaboration for performing a federated training task, thereby improving the communication efficiency, the efficiency and accuracy of model training.
[0005] In a first aspect, the cloud-side communication middleware provided by the embodiment of the present application is applied to a network device, and includes a policy management module, a data management module, a model management module and a communication management module, wherein
[0006] The policy management module is configured to manage a cloud-side policy of an end-cloud collaboration federated training task, the cloud-side policy including a model training policy and a device screening policy, the model training policy being configured to indicate a training condition corresponding to a task model, and the device screening policy being configured to indicate a screening condition for screening a terminal device for training the task model;
[0007] The data management module is configured to obtain identification information of a latest cloud-side policy, and to issue the identification information of the latest cloud-side policy to the end side, so that a terminal device of the end side obtains the latest cloud-side policy according to the identification information of the latest cloud-side policy;
[0008] The model management module is configured to manage the task model, to issue the task model to the end side, and to aggregate a model training result uploaded by the end side;
[0009] The communication management module is configured to establish and manage a communication connection with the cloud side, to send identification information of the latest cloud side policy to the cloud side through the communication connection, and to send the task model to the cloud side.
[0010] In a second aspect, the end-side communication middleware provided by the embodiments of the present application is applied to a terminal device, and includes a policy implementation module, a data collection module, a communication connection module, and a model training module.
[0011] The policy implementation module is configured to receive a cloud side policy of an end-cloud collaborative federated training task sent by the cloud side, and to determine a terminal device for training a task model according to the cloud side policy. The cloud side policy includes a model training policy and a device screening policy. The model training policy is used to indicate a training condition of the training task model, and the device screening policy is used to indicate a screening condition for screening the terminal device for training the task model.
[0012] The data collection module is configured to receive identification information of the latest cloud side policy sent by the cloud side, and to obtain the latest cloud side policy of the cloud side according to the identification information of the latest cloud side policy.
[0013] The model training module is configured to manage the task model, to train the task model to obtain a model training result, and to send the model training result to the cloud side.
[0014] The communication connection module is configured to establish and manage a communication connection with the cloud side, to receive identification information of the latest cloud side policy sent by the cloud side through the communication connection, to obtain the latest cloud side policy, to receive the task model, and to upload the model training result.
[0015] In a third aspect, the end-cloud collaborative system provided by the embodiments of the present application includes the cloud side communication middleware provided by the first aspect of the present application, and the end-side communication middleware provided by the second aspect of the present application.
[0016] In a fourth aspect, the network device provided by the embodiments of the present application includes the cloud side communication middleware provided by the first aspect of the present application.
[0017] In a fifth aspect, the terminal device provided by the embodiments of the present application includes the end-side communication middleware provided by the second aspect of the present application.
[0018] The cloud side communication middleware, the end-side communication middleware, and the end-cloud collaborative system provided by the embodiments of the present application can uniformly coordinate and manage the policy, data, communication, and model for performing a federated training task in end-cloud collaboration, thereby improving the communication efficiency, the model training efficiency, and the accuracy, and thus solving the technical problems proposed in the background art. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.
[0020] Figure 1 A schematic diagram of the structure of a cloud-side communication middleware provided in an embodiment of this application;
[0021] Figure 2 A schematic diagram of the structure of an end-side communication middleware provided in an embodiment of this application;
[0022] Figure 3 A structural diagram of an end-to-cloud collaborative system provided in an embodiment of this application;
[0023] Figure 4 An architecture diagram of an end-to-cloud collaborative system provided in this application embodiment;
[0024] Figure 5 A schematic diagram of a communication middleware architecture for edge-cloud collaborative federated learning provided in this application embodiment;
[0025] Figure 6 A schematic diagram illustrating a cloud-side policy distribution process provided in an embodiment of this application;
[0026] Figure 7 This application provides a schematic diagram of a process for selecting and establishing a long connection using an intelligent communication protocol, as illustrated in an embodiment of the present application.
[0027] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the specific technical solutions of this application will be further described in detail below with reference to the accompanying drawings of the embodiments of this application. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0030] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0031] It should be noted that the terms "first", "second", "third" in the embodiments of the present application are used to distinguish similar or different objects, and do not represent a specific order of the objects. Understandably, "first", "second", "third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0032] End-cloud collaboration refers to the allocation of computing resources and tasks between the cloud side and the terminal device to achieve more efficient computing and data processing. With the rapid growth of mobile device processing power and the increasing demand for data collection and analysis, mobile terminals with certain computing power and data are also added to the resource pool to collaboratively complete computing tasks, thereby improving processing and analysis efficiency.
[0033] In traditional federated learning communication, there is no unified coordination and management between the cloud side and the end side, and the differences in computing power, bandwidth, and delay of the cloud side and the end side affect the communication delay, data loss, and other problems, thereby affecting the efficiency and accuracy of model training.
[0034] Therefore, the embodiments of the present application provide a cloud-side communication middleware applied to a network device of the cloud side, which includes a policy management module, a data management module, a model management module, and a communication management module. The policy management module is configured to manage the cloud-side policy of the end-cloud collaborative federated training task, the cloud-side policy including a model training policy and a device screening policy. The model training policy is configured to indicate the training condition corresponding to the training task model, and the device screening policy is configured to indicate the screening condition of the terminal device screening the training task model. The data management module is configured to obtain the identification information of the latest cloud-side policy, and to issue the identification information of the latest cloud-side policy to the end side, so that the terminal device of the end side obtains the latest cloud-side policy according to the identification information of the latest cloud-side policy. The model management module is configured to manage the task model, issue the task model to the end side, and aggregate the model training results uploaded by the end side. The communication management module is configured to establish and manage the communication connection with the end side, issue the identification information of the latest cloud-side policy to the end side through the communication connection, and issue the task model to the end side. The communication middleware can uniformly coordinate and manage the policy, data, communication, and model of the cloud side when the end-cloud collaboration performs the federated training task, thereby improving the communication efficiency, the efficiency, and the accuracy of model training.
[0035] The technical solutions of the cloud-side communication middleware in the embodiments of the present application will be described below with reference to the accompanying drawings.
[0036] Figure 1 A structural diagram of a cloud-side communication middleware is provided for an embodiment of the present application. The cloud-side communication middleware can be applied to a network device, which can be a transmission and reception node, a base station, a server, a relay station or an access point, etc. in the implementation process. The network device can be a network device in a 5G communication system or a network device in a future evolved network, etc. In addition, it can also be a base transceiver station in a global system for mobile communications or a code division multiple access network, and can also be an NB in a wideband code division multiple access, and can also be a base station eNB or eNodeB in a long-term evolution. The network device can also be a wireless controller in a cloud radio access network scenario, etc. As shown in the figure, the cloud-side communication middleware can include a policy management module 101, a data management module 102, a model management module 103 and a communication management module 104. Among them, Figure 1
[0037] The policy management module 101 is configured to manage a cloud-side policy for an end-cloud collaborative federated training task, the cloud-side policy including a model training policy and a device screening policy, the model training policy being configured to indicate a training condition corresponding to a task model, and the device screening policy being configured to indicate a screening condition for screening a terminal device for training the task model.
[0038] The data management module 102 is configured to obtain identification information of a latest cloud-side policy, and to issue the identification information of the latest cloud-side policy to an end-side, so that a terminal device of the end-side obtains the latest cloud-side policy according to the identification information of the latest cloud-side policy.
[0039] The model management module 103 is configured to manage the task model, issue the task model to the end-side, and aggregate a model training result uploaded by the end-side.
[0040] The communication management module 104 is configured to establish and manage a communication connection with the end-side, issue the identification information of the latest cloud-side policy to the end-side through the communication connection, and issue the task model to the end-side.
[0041] The above embodiment provides a cloud-side communication middleware scheme in an end-cloud collaborative framework. By setting a policy management module, a data management module, a model management module and a communication management module, the policy, data, model and communication, etc. in the execution of the federated learning task are managed respectively, the unified coordination and management between the cloud side and the end side are realized, the problem of high communication overhead between the participants in the execution of the federated learning task by the end-cloud collaboration, which affects the efficiency and accuracy of the model training, is solved, and the efficiency and feasibility of the federated learning are improved.
[0042] In some embodiments, the end-side uploads the identification information of the end-side policy to the cloud side through the buried point data to realize low-cost updating of the policy.
[0043] In the embodiment of the present application, the data management module issues the identification information of the latest cloud-side strategy to the end side, which can be used for:
[0044] receiving and analyzing the buried point data reported by the end side, the buried point data including the identification information of the end-side strategy, the end-side strategy being obtained from the cloud side; in the case that the identification information of the end-side strategy is inconsistent with the identification information of the latest cloud-side strategy, issuing the identification information of the latest cloud-side strategy to the end side.
[0045] It can be understood that the above scheme realizes low-cost and quasi-real-time checking and updating of the strategy based on the gateway updating technology of the buried point reporting, and can also support incremental updating and full updating. The stable and rapid distribution of the intelligent participant strategy is realized, so that the end side can select the optimal participant according to the device network bandwidth, computing capability, sample richness, etc., to reduce the communication overhead and improve the generalization capability of the model to a certain extent.
[0046] In some embodiments, the cloud side can select part of the end side as the target end side by setting the task execution condition, and then distribute the strategy, realizing customized services.
[0047] In the embodiment of the present application, the strategy management module can also be used for:
[0048] obtaining a task execution condition, the task execution condition including feature information of a terminal device executing the task, the feature information including at least one of a device model and a region to which the terminal device belongs; determining an end side executing the task according to the feature information and pre-stored feature information of each end side in the strategy management module, so that the end side executing the task obtains a target model training strategy and a target device screening strategy corresponding to the task, and selects a corresponding terminal device to execute the task according to the target model training strategy and the target device screening strategy, the end side including at least one terminal device.
[0049] It can be understood that the method of setting the task execution condition to select the end side can facilitate the user to select the suitable end side, realizing intelligent selection and customized services of the distributed task.
[0050] Further, the cloud side includes a content distribution network, the content distribution network being used to store the latest cloud-side strategy, and the strategy management module can also be used for:
[0051] The strategy management module stores the target model training strategy and the target device screening strategy to the content distribution network, so that the end side executing the task obtains the target model training strategy and the target device screening strategy from the content distribution network.
[0052] It can be understood that the communication strategy is dynamically adjusted according to the bandwidth and delay information of the participants, including dynamically selecting a reliable network environment and a suitable communication protocol, thereby improving the communication efficiency in a heterogeneous network.
[0053] In some embodiments, when the cloud side establishes communication with the end side through the communication management module, information of a corresponding operator and a network area to which the operator belongs needs to be obtained.
[0054] In the embodiments of the present application, the communication management module can be specifically used for:
[0055] receiving a server acquisition request sent by the end side; parsing an operator of a gateway corresponding to the server acquisition request and a network area to which the gateway belongs, determining corresponding server information according to a preset gateway strategy, the preset gateway strategy including gateway strategies of different operators in different network areas, the server information including a network address, a port and a communication protocol; and sending the server information to the end side, so that the end side establishes a connection according to the server information.
[0056] It can be understood that the communication management service can help the end side to determine the corresponding server and obtain the corresponding server information to establish a communication connection.
[0057] Further, the communication management module can also be used for:
[0058] receiving a connection establishment request sent by the end side, the connection establishment request being initiated based on the server information; performing security verification on the connection establishment request, the security verification including at least one of message verification, authentication and authorization, repeated connection judgment and Internet Protocol address (IP) black list verification; and sending feedback information to the end side, wherein, in a case where the feedback information indicates that the security verification is passed, a communication connection is established with the end side; or, in a case where the feedback information indicates that the security verification is not passed and the reason why the security verification is not passed is that the load is too large, the end side re-establishes a connection according to the server information.
[0059] It can be understood that in traditional federated learning communication, the communication between participants may expose some sensitive information, such as data distribution, model parameters, etc. Attackers can obtain these information by intercepting communication data, thereby endangering data privacy and security. To solve the problem of federated learning privacy leakage, the embodiments of the present application realize hybrid authentication based on a content distribution network (CDN), which ensures the security of resource file download while efficiently transmitting.
[0060] Further, the communication management module can also be used for:
[0061] receive the training application message sent by the end side, the training application message including information of a training task; send the training application message to the policy implementation module;
[0062] The policy implementation module is further configured to:
[0063] query whether the current task quota of the corresponding training task is greater than or equal to a preset quota threshold according to the message of the training task included in the training application message, and feed back a training application result to the communication management module according to a query result, wherein the training application result is a refused application when the query result indicates that the current task quota is greater than or equal to the preset quota threshold, and the training application result is an agreed application when the query result indicates that the current task quota is less than the preset quota threshold;
[0064] The communication management module is further configured to:
[0065] send the training application result to the end side.
[0066] It can be understood that, through real-time updating of the federated task policy, the optimal participant is selected dynamically according to the network environment of the participant, the performance of the participant and the data coverage of the participant, and the communication overhead is reduced, and the efficiency of federated learning and the generalization ability of the model are improved.
[0067] In some embodiments, in traditional federated learning communication, after the full model is distributed to the client, all participants need to upload the local model parameter update to the central server, and then wait for the central server to download the global model update to the local. This method requires a large amount of communication overhead, especially in the case of a large number of participants, which will cause communication to become a system bottleneck.
[0068] In the embodiments of the present application, the model management module distributes the task model to the end side, which can be used for:
[0069] storing the task model to the content distribution network, so that the terminal device of the end side obtains the task model from the content distribution network after authentication.
[0070] It can be understood that, by preheating the global model to the CDN edge node, faster model update response speed and lower communication delay can be provided, thereby improving the performance and efficiency of the system.
[0071] Further, the model management module can be further configured to:
[0072] receive a model return message uploaded by the end side through the established communication connection, the model return message being used to indicate the model training result of the end side; and obtain the task model according to the model return message.
[0073] It can be understood that, by adopting the asynchronous communication strategy and the global buffer mechanism, the problem of long waiting time and large communication overhead between devices in traditional federated learning is solved, thereby improving the training efficiency of federated learning, decoupling the calculation and uploading of participants, and thereby improving the system scalability, and better adapting to different application scenarios and system environments.
[0074] Further, the model management module includes a model cache area, and the model management module acquires a task model according to the model return message, for:
[0075] Upon receiving the model return message, the model parameter of the end-side training is acquired from the model cache area, the model parameter stored in the model cache area is uploaded by the end side, differential privacy technology is used to perform model aggregation on the model parameter of each end-side training, and the task model is obtained.
[0076] It can be understood that, the application embodiments guarantee communication security through multiple security means, such as differential privacy, TLS encryption, digital envelope and digital signature, CDN hybrid authentication, etc., to prevent privacy leakage in federated training. Moreover, differential privacy technology is used to protect user data privacy after local model training, uploading and aggregation, and the security of communication is guaranteed through encryption and decryption of digital envelopes, to prevent data tampering and theft.
[0077] The application embodiments innovatively propose a technical scheme of an end-cloud collaborative cloud-side communication middleware, aiming to solve the communication overhead between participants in end-cloud collaborative federated learning, and improve the efficiency and feasibility of federated learning. The above scheme effectively improves the efficiency and feasibility of federated learning and greatly reduces the communication overhead between participants, providing a new solution for end-cloud collaborative communication. The scheme has wide application prospects and can be applied to various end-cloud collaborative communication scenarios.
[0078] The embodiment of the application further provides an end-side communication middleware, which is applied to a terminal device at an end side, and comprises a policy implementation module, a data collection module, a communication connection module and a model training module. The policy implementation module is configured to receive a cloud-side policy of an end-cloud collaborative federated training task issued by a cloud side, and determine a terminal device of a training task model according to the cloud-side policy. The cloud-side policy comprises a model training policy and a device screening policy. The model training policy is used to indicate a training condition of the training task model, and the device screening policy is used to indicate a screening condition of screening the terminal device of the training task model. The data collection module is configured to receive identification information of a latest cloud-side policy issued by the cloud side, and acquire the latest cloud-side policy according to the identification information of the latest cloud-side policy. The model training module is configured to manage the training task model, train the training task model to obtain a model training result, and send the model training result to the cloud side. The communication connection module is configured to establish and manage a communication connection with the cloud side, and receive the identification information of the latest cloud-side policy issued by the cloud side, acquire the latest cloud-side policy, receive the training task model and upload the model training result through the communication connection.
[0079] The technical scheme of the end-side communication middleware in the embodiment of the application will be described below with reference to the drawings in the embodiment of the application.
[0080] Figure 2 A structural schematic diagram of an end-side communication middleware provided by the embodiment of the application is shown in FIG. 2. The end-side communication middleware can be applied to a terminal device. The terminal device can be various types of devices with information processing capability in the implementation process. For example, the terminal device can include a personal computer, a notebook computer, a palm computer or a server, etc. The terminal device can also be a mobile terminal, for example, the mobile terminal can include a mobile phone, a vehicle-mounted computer, a tablet computer or a projector, etc. As shown in FIG. 2, the end-side communication middleware comprises a policy implementation module 201, a data collection module 202, a communication connection module 204 and a model training module 203. Figure 2 The policy implementation module 201 is configured to receive a cloud-side policy of an end-cloud collaborative federated training task issued by a cloud side, and determine a terminal device of a training task model according to the cloud-side policy. The cloud-side policy comprises a model training policy and a device screening policy. The model training policy is used to indicate a training condition of the training task model, and the device screening policy is used to indicate a screening condition of screening the terminal device of the training task model.
[0081] The policy implementation module 201 is configured to receive a cloud-side policy of an end-cloud collaborative federated training task issued by a cloud side, and determine a terminal device of a training task model according to the cloud-side policy. The cloud-side policy comprises a model training policy and a device screening policy. The model training policy is used to indicate a training condition of the training task model, and the device screening policy is used to indicate a screening condition of screening the terminal device of the training task model.
[0082] The data collection module 202 is configured to receive identification information of the latest cloud-side policy issued by the cloud side, and acquire the latest cloud-side policy of the cloud side according to the identification information of the latest cloud-side policy.
[0083] The model training module 203 is configured to manage the task model, train the task model to obtain a model training result, and send the model training result to the cloud side.
[0084] The communication connection module 204 is configured to establish and manage a communication connection with the cloud side, and through the communication connection, receive the identification information of the latest cloud-side policy issued by the cloud side, acquire the latest cloud-side policy, receive the task model, and upload the model training result.
[0085] The above embodiment provides an end-side communication middleware scheme in an end-cloud collaborative framework. By setting a policy implementation module, a data collection module, a model training module and a communication connection module, the policy, data, model and communication and the like in the execution of a federated learning task by the end-cloud collaboration are managed respectively, unified coordination and management between the cloud side and the end side are realized, the problem of excessively high communication cost between participants in the execution of the federated learning task by the end-cloud collaboration, which affects the efficiency and accuracy of model training, is solved, and the efficiency and feasibility of the federated learning are improved.
[0086] In some embodiments, the end side uploads the identification information of the end-side policy to the cloud side through the buried point data, so as to realize low-cost updating of the policy.
[0087] The data collection module is further configured to:
[0088] acquire and report the buried point data, the identification information of the end-side policy is included in the buried point data, the end-side policy is acquired from the cloud side, compare whether the identification information of the end-side policy is consistent with the identification information of the latest cloud-side policy, and in the case that the identification information of the end-side policy is inconsistent with the identification information of the latest cloud-side policy, acquire the latest cloud-side policy from the content distribution network of the cloud side according to the version information of the latest cloud-side policy.
[0089] It can be understood that the configuration check service is requested synchronously when the buried point reporting request is requested, the version information of the latest configuration of the cloud side is acquired in real time, the cloud side service is requested to acquire the latest policy when the end-side configuration lags behind the cloud-side configuration, the communication cost is reduced through incremental updating, and the effect of high efficiency and low cost of updating of the federated training policy is realized.
[0090] In some embodiments, the policy implementation module is configured to:
[0091] Obtaining a current state parameter, the state parameter including at least one of a performance parameter, a timing parameter and a local data quality parameter; determining whether the current state parameter meets a model training strategy and a device screening strategy in the latest cloud side strategy, and in the case of meeting the model training strategy and the device screening strategy, determining to execute a task corresponding to the latest cloud side strategy.
[0092] It can be understood that the end side client dynamically selects a suitable device according to the latest strategy (such as network condition, power, power consumption, device storage, local sample size, etc.), and establishes a long connection with the cloud side at a suitable time through dynamic selection of a communication protocol to perform real-time communication. Based on the quasi-real-time configuration strategy, the optimal participant is selected in combination with the current device performance, scene and data index, unnecessary devices and connections are reduced, the communication overhead is reduced, and the feasibility and efficiency of federated learning are improved.
[0093] In some embodiments, the communication connection module is specifically used for:
[0094] Sending a server acquisition request to the cloud side, receiving server information returned by the cloud side, and establishing a connection with a corresponding server according to the server information, the server information including a network address, a port and a communication protocol.
[0095] It can be understood that in the conventional federated learning communication, only one single communication protocol is used in a heterogeneous network, which leads to inflexible selection of the communication protocol and cannot fully utilize network resources, thereby affecting the efficiency and performance of federated learning. The optimal participant is intelligently selected to reduce the communication overhead and improve the efficiency of federated learning.
[0096] Further, the communication connection module establishes a connection with a corresponding server according to the server information, which can be used for:
[0097] Obtaining a current network state; selecting a target communication protocol from the communication protocols indicated by the server information according to the current network state, the target communication protocol being at least one of a hypertext transfer protocol (HTTP), a transmission control protocol (TCP) and a quick UDP internet connections (QUIC); and establishing a connection with a corresponding server according to the target communication protocol.
[0098] It can be understood that the scheme provides a channel scheme based on intelligent selection of communication protocols (HTTP / TCP / QUIC), realizes accurate flow scheduling of the client through HTTP DNS, selects the optimal communication link and communication strategy according to device information such as network and performance state of the device in real time, and guarantees the communication stability of the network state federated training in the case of unstable network connection. In addition, a self-developed communication protocol can be used to guarantee the reliability and real-time performance of the federated communication message transmission. Intelligent communication protocol selection improves the communication reliability of heterogeneous devices.
[0099] Further, the network address includes at least one address, and the communication connection module establishes a connection with the corresponding server according to the target communication protocol, for:
[0100] Based on the first address in the network address, a first connection establishment request is sent to the cloud side; feedback information based on the first connection establishment request sent by the cloud side is received, and in the case that the feedback information indicates that the security verification is passed, a communication connection corresponding to the first connection establishment request is established, and in the case that the feedback information indicates that the security verification is not passed and the reason for the security verification not being passed is that the load is too large, a second connection establishment request is sent to the cloud side based on the address after the first address in the network address, to establish a communication connection corresponding to the second connection establishment request.
[0101] Further, the communication connection module is further used for:
[0102] A training application message is sent to the cloud side, and the training application message includes information of a training task; a training application result sent by the cloud side is received, and the training application result includes an agreed application or a rejected application.
[0103] It can be understood that the communication method using multiple technical means can provide a larger scale and more diversified communication method, and can also fully and effectively utilize limited end-side device resources, thereby improving the efficiency and performance of the end-cloud collaborative task. The present embodiment supports multiple communication scenarios: supporting end-side data center offline computing tasks, real-time computing tasks, end-cloud collaborative federated learning tasks and efficient communication.
[0104] In some embodiments, the training application result further includes a model address, and the model training module is further used for:
[0105] In the case that the training application result is an agreed application, a corresponding task model is obtained from a content distribution network after authentication according to the model address, the task model in the content distribution network being pre-stored by the cloud side; the task model is trained according to local data to obtain a trained task model.
[0106] It can be understood that various communication security measures prevent privacy leakage and protect federal communication security: differential privacy, TLS encryption, digital envelope, digital signature, CDN hybrid authentication, and various measures to ensure communication security.
[0107] Further, in the conventional federated learning communication, the participants need to wait for all participants to upload the local model parameter updates before performing global model updates, which can cause longer training time and lower training efficiency.
[0108] In the embodiments of the present application, the model training module trains the task model according to the local data to obtain a trained task model, which can be used for:
[0109] The model parameters are compressed and uploaded to the cloud side in a parallel segmented manner, and the model return message is sent to the cloud side through the communication connection module, so that the cloud side uses differential privacy technology to aggregate the model parameters of each end-side training to obtain the task model. The model parameters are stored in the local cache area using differential privacy technology, and when the trained task model stored in the local cache area meets the preset upload requirement, the parameters obtained from the trained task model.
[0110] It can be understood that the introduction of the asynchronous buffer mechanism reduces the device waiting time and improves the training efficiency: through the asynchronous communication strategy and the model buffer mechanism, the training dependence between devices is decoupled, the waiting time between devices is greatly reduced, and the training efficiency is improved. At the same time, through the compression technology, the communication overhead is greatly reduced.
[0111] The end-side communication middleware provided by the embodiments of the present application effectively improves the efficiency and feasibility of federated learning and greatly reduces the communication overhead between participants, providing a new solution for end-cloud collaboration communication in the field. The scheme has wide application prospects and can be applied to various end-cloud collaboration communication scenarios.
[0112] Figure 3 The structure diagram of an end-cloud collaboration system provided by the embodiments of the present application is shown in FIG. 1. Figure 3 As shown in FIG. 1, the end-cloud collaboration system includes a cloud-side communication middleware 301, an end-side communication middleware 302, and an end-cloud link 303. The cloud-side communication middleware 301 is in communication connection with the end-side communication middleware 302 through the end-cloud link 303.
[0113] It should be noted that there can be multiple cloud-side communication middleware 301 and multiple terminal-side communication middleware 302. In this embodiment, an example of a terminal-side communication middleware 302 corresponding to one cloud-side communication middleware 301 can be used for explanation, that is, a scenario where one network device corresponds to multiple terminal devices. The end-cloud link 303 enables information transmission between the cloud-side communication middleware 301 and the terminal-side communication middleware 302.
[0114] It is understood that the embodiments of this application are developed for the field of edge-cloud collaboration, particularly for the needs of federated learning communication in edge-cloud collaboration, but are not limited to this scenario. This system can provide an efficient, real-time, and scalable edge-cloud collaborative communication link, supporting communication across multiple scenarios, devices, and users, while protecting user privacy and data security.
[0115] The following describes an exemplary application of the embodiments of this application in a real-world application scenario.
[0116] Figure 4 This is an architecture diagram of an edge-cloud collaborative system provided in an embodiment of this application. Figure 4 As shown, the edge-cloud collaborative system includes: edge-cloud collaborative federated training strategy service, edge-cloud collaborative federated training message communication service, edge-cloud collaborative federated training model synchronization service, and edge-cloud collaborative federated training communication security service. Among these, the edge-cloud collaborative DCC APP is the edge-side communication middleware, and the other parts in the diagram are cloud-side middleware.
[0117] The edge-cloud collaborative federated training strategy service is primarily used in edge-cloud collaborative scenarios. Users can configure different strategies on the cloud side and distribute them to the edge client in real time, enabling dynamic selection of the optimal participants for federated training. This includes various selection methods based on device performance, network status, sample richness, and device distribution. It also supports targeted, multi-dimensional selection of the target audience and visualization of the distribution results.
[0118] The edge-cloud collaborative federated training message communication service is primarily used in edge-cloud collaborative federated learning scenarios. It achieves real-time message transmission by establishing a connection channel that dynamically selects the communication protocol (Transmission Control Protocol TCP / Fast UDP Internet Connection QUIC) based on the user's network conditions. This technology supports real-time edge-cloud communication for various message types, including training requests, training responses, and gradient feedback. By combining settings such as Quality of Service (QoS), message transmission mode, and message type, flexible and reliable message transmission between the edge and cloud can be achieved. Furthermore, data analysis based on device connection quality can be used to optimize the selection of training users.
[0119] The end-cloud collaborative federal training model synchronization service is mainly applied to the end-cloud collaborative scene federated learning, and is used for large file transmission such as end-cloud collaborative training / inference model distribution and model gradient return. The function uses an asynchronous communication and buffer mechanism, participants can upload local model updates at different time points, and store these updates in the buffer, thereby greatly reducing the waiting time and communication overhead between devices, and improving the overall training efficiency. By uploading the model update to the content distribution network (CDN) edge node, the distribution of the model is realized, which provides faster response speed and lower communication delay, and a visual model management and model transmission progress interface is provided.
[0120] The end-cloud collaborative federal training communication security service is mainly applied to the communication transmission of the end-cloud collaborative federal training, and is used for protecting the security and personal data privacy of the cloud side and the end side in the communication transmission. Hybrid authentication is realized in combination with the CDN, so as to prevent unauthorized access to model resources and ensure the security of resource distribution. The privacy of user data is protected by differential privacy gradient clipping and privacy budget during model training and model aggregation. In the communication transmission, the transmission layer security protocol (TLS) / secure sockets layer (SSL) encryption protocol is used to ensure the security of data and communication, and digital envelope and digital signature are used to verify the authenticity and integrity of data, further preventing data from being tampered with and stolen.
[0121] Figure 5 A communication middleware architecture diagram of the end-cloud collaborative federated learning is provided for the embodiments of the present application. As shown in the figure, the end-cloud collaborative federated learning communication middleware is divided into a communication link cloud side and a communication link client, and the architecture composition includes the following related subjects: Figure 5
[0122] The communication link cloud side refers to related components running on the cloud server, and is used for dynamic policy management, data collection, long connection service, traffic scheduling, message management, model file management, etc. The communication link cloud side includes:
[0123] Policy management service: responsible for managing the end-cloud collaborative cloud side configuration and task-related distributed resources, including training strategy, timing strategy, multi-dimensional device screening strategy (including device performance, network state, sample quality and sample quantity, etc.).
[0124] Data collection: responsible for unified definition and management of cloud-side end-cloud collaborative related buried point data collection services, including data reporting, data compression, data encryption, gateway updating, etc. Operation and service interface.
[0125] Long connection service: responsible for establishing and managing the cloud-side connection of the end-cloud collaborative client, supporting multiple protocols (TCP / QUIC) and multiple port connections of the client, including connection management, message distribution, device management, heartbeat management and authentication and authorization, etc. Operation and service.
[0126] Message management service: responsible for the cloud-side message communication management of the end-cloud collaboration client, including message routing, offline message storage, real-time message delivery, and other operations and services.
[0127] Traffic scheduling: responsible for the cloud-side traffic scheduling service of the end-cloud collaboration task, including traditional DNS resolution, HTTPDNS-based accurate traffic scheduling, NLB and DPVS services, etc.
[0128] Model management: responsible for the cloud-side model management service of the end-cloud collaboration task, including global model cache management, real-time model pulling, model uploading, model delivery, model updating, CDN preheating, and CDN hybrid authentication, etc.
[0129] Communication link client, refers to the relevant components running in the end-side device environment, used for real-time data reporting, real-time configuration updating, dynamic communication protocol connection selection, asynchronous communication, local model caching and transmission, etc. The communication link client includes:
[0130] Data collection module: responsible for real-time collection and reporting of end-side generated buried points, etc.
[0131] Long connection module: responsible for connection and communication management of the end side, dynamically selects TCP / QUIC for connection through judgment of client network status, and performs asynchronous communication with the cloud side.
[0132] Configuration policy management module: responsible for end-side configuration management and dynamic participant policy implementation, etc.
[0133] Model management module: responsible for end-side model authentication, model download, local model caching, model storage, model differential privacy post-reporting, segmented uploading, etc.
[0134] Figure 6 A flowchart of cloud-side policy delivery provided by an embodiment of the present application. As shown in Figure 6 , the cloud-side policy delivery process includes:
[0135] 401. The business defines the device policy and training task policy of the federated training on the machine learning operation MLOPS platform, including training time, charging status, battery condition, device temperature, network status, sample richness, and storage space, etc.
[0136] 402. After the population requiring federated training is selected by population circle, the training task is synchronized to the configuration management center through distributed transaction after being audited to ensure consistency, and the model is initialized and uploaded to the model management service.
[0137] 403. The client updates the latest configuration version information through the gateway when reporting the buried point, and compares it with the local version. If the local version is outdated, the latest configuration strategy is pulled from the cloud side.
[0138] 404. The end side analyzes the cloud side strategy configuration, and determines whether the current mobile phone state, opportunity and local data quality meet the job training conditions according to the training strategy.
[0139] 405. If the current opportunity meets the job training conditions, a task matching the current regional model is obtained according to the device screening strategy.
[0140] 406. After the end side obtains the target task, it starts to apply to the cloud side to establish a connection according to the task requirements.
[0141] The technical solutions in the above embodiments have a low-cost real-time configuration distribution function. The traditional configuration update scheme uses timed polling / push update, which has the problems of outdated update and resource waste. The present scheme comprehensively checks and updates through the buried point reporting gateway, thereby realizing low-cost configuration distribution, and also supporting one-stop configuration management and incremental update. This enables our system to help users quickly deploy and update various task configurations, ensuring efficient and accurate task execution, assisting in the rapid AB experiment and iteration of end-cloud collaborative tasks, and thereby improving the performance and reliability of the system.
[0142] In addition, to solve the problems of communication delay and data loss caused by unstable network and poor device computing performance of the heterogeneous network of many participants, the real-time update based on the configuration realizes dynamic strategy (network condition / power consumption / computing performance / local data quality) selection to select appropriate devices and appropriate time to select devices for federated training. This means that our system selects the optimal participants according to different application scenarios and requirements, thereby reducing communication overhead, ensuring communication quality and improving federated learning efficiency. At the same time, combined with data index richness (similarity, coverage, etc.) screening, the generalization ability of the model is further improved.
[0143] Figure 7 A flowchart of an intelligent communication protocol selection establishing a long connection is provided for the embodiments of the present application. As shown in Figure 7 , the intelligent communication protocol selection establishing a long connection process includes:
[0144] 501. The client requests the HTTPDNS server, and after the server parses the gateway IP corresponding to the operator and the network area accessed, the server matches the corresponding IP+Port list according to the gateway strategy of different operators in each network area obtained in advance.
[0145] 502. The client obtains the long connection server IP+PORT+communication protocol list returned by the server, caches the list, and balances the load according to the long connection list.
[0146] 503. The client dynamically selects the protocol (TCP / QUIC protocol) according to the current network state, network congestion degree and other related strategies to perform health status of network environment.
[0147] 504. The client initiates a request to establish a connection, and the server performs message verification, authentication and authorization, repeated connection judgment, IP black list and other security protection verification.
[0148] 505. After the server authentication fails, return ACK and failure reason, and the server closes the connection; the client judges if the error information is that the server load is too large, and then selects a new IP to continue from the second step.
[0149] 506. If the server authentication is passed, return ACK and establish a successful connection with the client, save the successful IP, and connect the IP preferentially next time.
[0150] The embodiments of the application are directed to the selection method of the traditional federated learning communication protocol, which is usually determined at one time and cannot be dynamically adjusted according to the specific application scene and the network situation between the participants. Based on the method of dynamic protocol selection, the real-time information such as the network quality and device performance of the participants is used to flexibly select the appropriate communication protocol TCP / QUIC, fully utilize the current network resources of the device, and further improve the efficiency and performance of federated learning. In addition, in view of the problem of privacy leakage caused by the sharing of model parameters by the participants, the TLS / SSL encryption protocol is used to encrypt data and communication, the differential privacy gradient clipping is used to protect the privacy of user data, the digital envelope and digital signature are used to verify the authenticity and integrity of data, prevent data from being tampered with and stolen, and combined with CDN to realize hybrid authentication, thereby preventing unauthorized access to model resources.
[0151] It can be understood that the communication mode using multiple technical means can provide larger scale and more diversified communication mode, thereby improving the performance and stability of the communication between the end-side device and the cloud-side service. This mode can meet the communication needs of different scenes and needs of end-cloud collaboration, and improve the flexibility and scalability of the system.
[0152] The application also provides a federal training message communication process. The federal training message communication process includes: (1) after the connection is established, the uplink training application message is sent through the long connection according to the obtained training task; (2) the long connection communication service forwards the message to the routing service, and the routing service forwards the training application message to the strategy service according to the message type; (3) the strategy service checks whether the current task quota is met, and if the task application is passed, the application pass message is sent to the routing service, and the training rejection message is sent to the routing service; (4) after the routing service receives the rejection / application pass message, the message is routed to the corresponding long connection server of the device connection according to the device ID; (5) the long connection service sends the message through the message queue telemetry transmission MQTT protocol, and the terminal side analyzes the message, such as closing the long connection and waiting for the next training if it is a rejection message; (6) the terminal side analyzes the message as an application pass message, obtains the authentication model address through the model storage service, and pulls the model training resource package from the CDN after hybrid authentication; (7) after the terminal side locally loads the pulled model resource package, the dataset is read to start local training; (8) after the local training is successful, the trained model is cached locally, and when the cache meets the dynamic trigger upload mechanism, the model parameters are compressed and uploaded to the model storage service in parallel, and the model return message is sent to the long connection; (9) the long connection communication service forwards the message to the routing service, and the routing service forwards the training application message to the aggregation service according to the message type; (10) after the aggregation service receives the model return message, the local training model result is pulled from the buffer area of the model storage service according to the number of cache areas in real time, and aggregation is started; (11) until the result converges or the task ends, the finally aggregated model is uploaded to the model storage service for distribution to the terminal side for local inference.
[0153] The embodiments of the application solve the problems of large communication overhead and long waiting time of traditional federated learning by adopting an asynchronous communication strategy, allowing devices to complete local training and upload parameter updates at different time points without waiting for other devices. The traditional training process is improved by introducing a buffer mechanism, and the device side caches the local model update, and uploads the local model update to the global cache according to the dynamic trigger upload mechanism, and improves the throughput and stability of uploading by parallel segmented uploading. The aggregation service can extract a certain number of device updates from the global cache in real time for integration, which greatly reduces the waiting time between devices and reduces the communication overhead, and improves the federated training efficiency. The aggregated model is preheated and cached to the CDN edge node to realize efficient distribution of resources.
[0154] It should be understood that although the steps in the flowcharts above are shown in a sequential order, such steps can not necessarily be performed in the order illustrated by the arrows. Unless explicitly stated, the execution of the steps is not strictly sequential, and the steps can be performed in other orders. Moreover, at least some of the steps in the flowcharts can include multiple sub-steps or stages, which can not necessarily be performed at the same time, and which can not necessarily be performed sequentially, but can be performed in rotation or alternation with other steps or sub-steps or stages of other steps.
[0155] The embodiments of the present application also provide a network device, which comprises the cloud-side communication middleware described above. The embodiments of the present application also provide a terminal device, which comprises the terminal-side communication middleware described above. The content of the cloud-side communication middleware and the terminal-side communication middleware can refer to the foregoing description, and will not be described here again.
[0156] Figure 8 A structural schematic diagram of an electronic device is provided in the embodiments of the present application. The electronic device can be a network device or a terminal device. As shown in the figure, Figure 8 The electronic device can comprise a processor 601, a memory 602, a communication interface 603 and a bus 604. The memory 602 is configured to store instructions, and the processor 601 is configured to execute the instructions stored in the memory 602. The processor 601, the memory 602 and the communication interface 603 are communicatively connected with each other through the bus 604.
[0157] The processor 601 can comprise one or more processing units. For example, the processor 601 is a central processing unit (CPU), and can also be an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement one or more embodiments of the present application, such as one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs). Different processing units can be independent devices, or can be integrated in one or more processors.
[0158] The memory 602 can be used to store computer-executable program code including instructions. The internal memory 602 can include a program storage area and a data storage area. The program storage area can store an operating system, application programs (such as a sound playing function, an image playing function, etc.) required by at least one function, etc. The data storage area can store data (such as audio data, video data, etc.) created during use of the electronic device 100, etc. In addition, the memory 602 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 601 executes various function applications and data processing of the electronic device 100 by running instructions stored in the memory 602 and / or instructions stored in a memory disposed in the processor.
[0159] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than those illustrated, or combine certain components, or split certain components, or different arrangement of components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0160] It should be understood that the terms "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the description mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" or "in some embodiments" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that the size of the sequence numbers of the above processes in various embodiments of the present application does not mean the order of execution, and the execution order of the processes should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The sequence numbers of the above embodiments of the present application are only for description, not representing the advantages or disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between each embodiment, and the same or similar parts can be referred to each other, and for the sake of brevity, the text will not be repeated here.
[0161] The term "and / or" herein is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, object A and / or object B, which can represent the three cases of existence of object A alone, existence of object A and object B, and existence of object B alone.
[0162] It should be noted that, in the present document, the terms "comprising", "containing", or any other similar term are intended to encompass non-exclusive inclusion, such that processes, methods, articles, or apparatuses that comprise a list of elements are not limited to those elements, but can also include other elements not expressly listed, or inherent to such processes, methods, articles, or apparatuses. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0163] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The above-described embodiments are merely illustrative, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, such as: a plurality of modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed components can be indirect coupling or communication connection between some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0164] The above-described modules described as separate components can or can not be physically separated, and the components displayed as modules can or can not be physical modules; they can be located in one place or distributed on multiple network units; and part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment.
[0165] In addition, each functional module in each embodiment of the present application can be integrated in one processing unit, or each module can be a separate unit, or two or more modules can be integrated in one unit; the integrated module can be realized in the form of hardware or hardware plus software function unit.
[0166] Those of ordinary skill in the art can understand that all or part of the steps of the above method embodiments can be completed by program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium, and the program executes the steps of the above method embodiments when executed; and the foregoing storage medium includes mobile storage devices, read only memory (ROM), magnetic discs or optical discs, and various program code storage media.
[0167] Alternatively, the above-mentioned integrated units of the present application, if realized in the form of software function modules and sold or used as independent products, can also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to make an electronic device execute all or part of the methods described in the embodiments of the present application. The aforementioned storage medium includes: mobile storage devices, ROM, magnetic disks or optical disks and various other media that can store program codes.
[0168] The methods disclosed in the several method embodiments of the present application can be combined arbitrarily without conflict to obtain new method embodiments. The features disclosed in the several product embodiments of the present application can be combined arbitrarily without conflict to obtain new product embodiments. The features disclosed in the several method or device embodiments of the present application can be combined arbitrarily without conflict to obtain new method or device embodiments.
[0169] The above is only an implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A cloud-side communication middleware, characterized by, The cloud-side communication middleware applied to a network device comprises a policy management module, a data management module, a model management module and a communication management module. The policy management module is configured to manage a cloud-side policy of an end-cloud collaborative federated training task, the cloud-side policy comprising a model training policy and a device screening policy, the model training policy being configured to indicate a training condition corresponding to a training task model, and the device screening policy being configured to indicate a screening condition for screening a terminal device for training the task model. The data management module is configured to acquire identification information of a latest cloud-side policy, and to issue the identification information of the latest cloud-side policy to an end side, so that the terminal device of the end side acquires the latest cloud-side policy according to the identification information of the latest cloud-side policy. The model management module is configured to manage the task model, issue the task model to the end side, and aggregate a model training result uploaded by the end side. The communication management module is configured to establish and manage a communication connection with the end side, issue the identification information of the latest cloud-side policy to the end side through the communication connection, and issue the task model to the end side.
2. The middleware of claim 1, wherein, The data management module issues the identification information of the latest cloud-side policy to the end side, so as to: receive and analyze embedded point data reported by the end side, the embedded point data comprising identification information of an end-side policy, the end-side policy being acquired from the cloud side; in a case where the identification information of the end-side policy is inconsistent with the identification information of the latest cloud-side policy, issue the identification information of the latest cloud-side policy to the end side.
3. The middleware of claim 1, wherein, The policy management module is further configured to: acquire a task execution condition, the task execution condition comprising feature information of a terminal device for executing the task, the feature information comprising at least one of a device model and a region to which the terminal device belongs; determine an end side for executing the task according to the feature information and feature information of each end side pre-stored in the policy management module, so that the end side for executing the task acquires a target model training policy and a target device screening policy corresponding to the task, and selects a corresponding terminal device to execute the task according to the target model training policy and the target device screening policy, the end side comprising at least one terminal device.
4. The middleware of claim 3, wherein, The cloud side comprises a content distribution network configured to store the latest cloud-side policy, and the policy management module is further configured to: store the target model training policy and the target device screening policy to the content distribution network, so that the end side for executing the task acquires the target model training policy and the target device screening policy from the content distribution network.
5. The middleware of claim 1, wherein, The communication management module is specifically configured to: receive a server acquisition request sent by the end side; analyze an operator of a gateway corresponding to the server acquisition request and a network region to which the gateway belongs, determine corresponding server information according to a preset gateway policy, the preset gateway policy comprising gateway policies of different operators in different network regions, and the server information comprising a network address, a port and a communication protocol; The server information is sent to the terminal side, so that the terminal side establishes a connection according to the server information.
6. The middleware of claim 5, wherein, The communication management module is further configured to: receive a connection establishment request sent by the terminal side, the connection establishment request being initiated based on the server information; perform security verification on the connection establishment request, the security verification including at least one of message verification, authentication and authorization, repeated connection judgment, and Internet Protocol (IP) black list verification; send feedback information to the terminal side, wherein, in a case where the feedback information indicates that the security verification is passed, a communication connection is established with the terminal side; or, in a case where the feedback information indicates that the security verification is not passed and the reason for the security verification not being passed is that the load is too large, the terminal side re-establishes a connection according to the server information.
7. The middleware of claim 1, wherein, The communication management module is further configured to: receive a training application message sent by the terminal side, the training application message including information of a training task; send the training application message to a policy implementation module; The policy implementation module is further configured to: query, according to the information of the training task included in the training application message, whether a current task quota of the corresponding training task is greater than or equal to a preset quota threshold, and feed back a training application result to the communication management module according to a query result, wherein, in a case where the query result indicates that the current task quota is greater than or equal to the preset quota threshold, the training application result is a rejected application, and in a case where the query result indicates that the current task quota is less than the preset quota threshold, the training application result is an approved application. The communication management module is further configured to: send the training application result to the terminal side.
8. The middleware of claim 7, wherein, The model management module sends the task model to the terminal side, so that: the terminal device of the terminal side stores the task model to a content distribution network, so that the terminal device of the terminal side obtains the task model from the content distribution network after passing authentication.
9. The middleware of claim 8, wherein, The model management module is further configured to: receive a model return message uploaded by the terminal side through a communication connection established with the terminal side, the model return message being used to indicate a model training result of the terminal side; obtain a task model according to the model return message.
10. The middleware of claim 9, wherein, The model management module includes a model cache area, and the model management module obtains a task model according to the model return message, so that: after receiving the model return message, the model management module obtains model parameters trained by the terminal side from the model cache area, the model parameters stored in the model cache area being uploaded by the terminal side; the model management module performs model aggregation on the model parameters trained by each terminal side by using a differential privacy technology, to obtain the task model.
11. An end-side communication middleware, characterized by, The terminal device-side communication middleware includes a policy implementation module, a data acquisition module, a communication connection module, and a model training module, wherein: the policy implementation module is configured to receive a cloud-side policy of a terminal-cloud collaborative federated training task issued by a cloud side, and determine a terminal device of a training task model according to the cloud-side policy, the cloud-side policy including a model training policy and a device screening policy, the model training policy being used to indicate a training condition of the training task model, and the device screening policy being used to indicate a screening condition of screening the terminal device of the training task model; The data collection module is configured to receive identification information of a latest cloud-side policy issued by the cloud side, and acquire the latest cloud-side policy according to the identification information of the latest cloud-side policy. The model training module is configured to manage the task model, train the task model to obtain a model training result, and send the model training result to the cloud side. The communication connection module is configured to establish and manage a communication connection with the cloud side, receive the identification information of the latest cloud-side policy issued by the cloud side, acquire the latest cloud-side policy, receive the task model, and upload the model training result.
12. The middleware of claim 11, wherein, The data collection module is further configured to: acquire and report a buried point data, the buried point data including identification information of the end-side policy, the end-side policy being acquired from the cloud side; compare whether the identification information of the end-side policy is consistent with the identification information of the latest cloud-side policy; in a case where the identification information of the end-side policy is inconsistent with the identification information of the latest cloud-side policy, acquire the latest cloud-side policy from a content distribution network of the cloud side according to version information of the latest cloud-side policy.
13. The middleware of claim 12, wherein, The policy implementation module is configured to: acquire a current state parameter, the state parameter including at least one of a performance parameter, a timing parameter, and a local data quality parameter; determine whether the current state parameter satisfies a model training policy and a device screening policy in the latest cloud-side policy, and in a case where the current state parameter satisfies the model training policy and the device screening policy, determine to execute a task corresponding to the latest cloud-side policy.
14. The middleware of claim 11, wherein, The communication connection module is specifically configured to: send a server acquisition request to the cloud side, receive server information returned by the cloud side, and establish a connection with a corresponding server according to the server information, the server information including a network address, a port, and a communication protocol.
15. The middleware of claim 14, wherein, The communication connection module establishes the connection with the corresponding server according to the server information, and is configured to: acquire a current network state, select a target communication protocol from the communication protocols indicated in the server information according to the current network state, the target communication protocol being at least one of a hypertext transfer protocol (HTTP), a transmission control protocol (TCP), and a quick UDP internet connections (QUIC); establish the connection with the corresponding server according to the target communication protocol.
16. The middleware of claim 15, wherein, The network address includes at least one address, and the communication connection module establishes the connection with the corresponding server according to the target communication protocol, and is configured to: based on a first address in the network address, send a first connection establishment request to the cloud side; receive feedback information sent by the cloud side based on the first connection establishment request, in a case where the feedback information indicates that a security verification is passed, establish a communication connection corresponding to the first connection establishment request, and in a case where the feedback information indicates that the security verification is not passed and a reason for the security verification not being passed is that a load is too large, send a second connection establishment request to the cloud side based on an address located behind the first address in the network address, to establish a communication connection corresponding to the second connection establishment request.
17. The middleware of claim 11, wherein, The communication connection module is further configured to: send a training application message to the cloud side, the training application message comprising information of a training task; receive a training application result sent by the cloud side, the training application result comprising an approval or a rejection.
18. The middleware of claim 17, wherein, The training application result further comprises a model address, and the model training module is further configured to: in a case where the training application result is the approval, acquire a corresponding task model from a content distribution network after authentication according to the model address, the task model in the content distribution network being pre-stored by the cloud side; train the task model according to local data to obtain a trained task model.
19. The middleware of claim 11, wherein, The model training module trains the task model according to local data to obtain a trained task model, which is configured to: compress model parameters, upload the model parameters to the cloud side in a parallel segmented manner, and send a model return message to the cloud side through the communication connection module, so that the cloud side aggregates the model parameters of each end-side trained model by using differential privacy technology to obtain the task model, wherein the model parameters are obtained from the trained task model stored in a local cache area by using differential privacy technology, and the parameters are obtained from the trained task model when the trained task model stored in the local cache area meets a preset uploading requirement.
20. An end-cloud collaboration system, comprising: The cloud-side communication middleware of any one of claims 1-10 and the end-side communication middleware of any one of claims 11-19.
21. A network device, comprising: The cloud-side communication middleware of any one of claims 1-10.
22. A terminal device, comprising: The end-side communication middleware of any one of claims 11-19.
Citation Information
Patent Citations
Deep learning model training and reasoning architecture deployment method based on cloud edge-end cooperation
CN114422349A
End-cloud cooperation system, distributed processing cluster and mobile end device
CN114884832A