Cloud side communication middleware, end side communication middleware and end-cloud cooperative system
By introducing cloud-side and end-side communication middleware into the federated learning system, the strategies, data, communications and models of federated training tasks are unified and coordinated, and the problems of communication delay and data loss in traditional federated learning are solved, and the efficiency and accuracy of model training are improved.
Patent Information
- Application Number
- CN202311290756.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-07
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2043-10-07
AI Technical Summary
In traditional federated learning communication, there is a lack of unified coordinated management between the cloud side and the end side, resulting in problems such as communication delay and data loss, affecting the efficiency and accuracy of model training.
Provide cloud-side communication middleware and end-side communication middleware. Through policy management, data management, model management and communication management modules, the policies, data, communication and models of the end-cloud collaborative implementation of federated training tasks are unifiedly coordinated and managed.
It improves communication efficiency, model training efficiency and accuracy, solves the problem of excessive communication overhead between participants in traditional federated learning, and enhances the efficiency and federability of federated learning.
Smart Images

Figure CN119788484A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of end-cloud collaboration technology, and are related to but not limited to a cloud-side communication middleware, an end-side communication middleware, and an end-cloud collaboration system. Background Art
[0002] End-cloud collaboration refers to the collaborative completion of computing resources and tasks between the cloud and terminal devices in the context of distributed computing and edge computing, so as 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 will also be added to the resource pool to collaboratively complete computing tasks, thereby improving the efficiency of processing and analysis.
[0003] In traditional federated learning communications, there is no unified coordination and management between the cloud and the end. Differences in computing power, bandwidth, and latency among the many participants on the cloud and the end result in communication delays, data loss, and other problems, which in turn affects the efficiency and accuracy of model training. Summary of the invention
[0004] In view of this, the cloud-side communication middleware, end-side communication middleware and end-cloud collaborative system provided in the embodiments of the present application can uniformly coordinate and manage the strategies, data, communications and models of the end-cloud collaborative execution of federated training tasks, thereby improving communication efficiency, model training efficiency and accuracy.
[0005] In a first aspect, the cloud-side communication middleware provided in the embodiment of the present application is applied to a network device, and the cloud-side communication middleware 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 used to manage the cloud-side policy of the end-cloud collaborative federated training task, and the cloud-side policy includes a model training policy and a device screening policy. The model training policy is used to indicate the training conditions corresponding to the training task model, and the device screening policy is used to indicate the screening conditions of the terminal devices for training the task model;
[0007] The data management module is used to obtain the identification information of the latest cloud-side policy, and send the identification information of the latest cloud-side policy to the terminal side, so that the terminal device of the terminal side obtains the latest cloud-side policy according to the identification information of the latest cloud-side policy;
[0008] The model management module is used to manage the task model, send the task model to the terminal side, and aggregate the model training results uploaded by the terminal side;
[0009] The communication management module is used to establish and manage a communication connection with the end side, send identification information of the latest cloud-side policy to the end side through the communication connection, and send the task model to the end side.
[0010] In a second aspect, the terminal-side communication middleware provided in the embodiment of the present application is applied to a terminal device, and the terminal-side communication middleware includes: a policy implementation module, a data acquisition module, a communication connection module and a model training module; wherein,
[0011] The policy implementation module is used to receive the cloud-side policy of the end-cloud collaborative federated training task issued by the cloud side, and determine the terminal device of the training task model according to the cloud-side policy, wherein the cloud-side policy includes a model training policy and a device screening policy, wherein the model training policy is used to indicate the training conditions of the training task model, and the device screening policy is used to indicate the screening conditions of the terminal devices for training the task model;
[0012] The data acquisition module is used to receive the identification information of the latest cloud-side policy issued by the cloud side, and 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 used 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;
[0014] The communication connection module is used to establish and manage a communication connection with the cloud side, receive the identification information of the latest cloud side strategy issued by the cloud side through the communication connection, obtain the latest cloud side strategy, receive the task model, and upload the model training results.
[0015] In a third aspect, the end-cloud collaborative system provided by the embodiment of the present application includes the cloud-side communication middleware provided by the first aspect of the embodiment of the present application, and the end-side communication middleware provided by the second aspect of the embodiment of the present application.
[0016] In a fourth aspect, the network device provided by the embodiment of the present application includes the cloud-side communication middleware provided in the first aspect of the embodiment of the present application.
[0017] In a fifth aspect, the terminal device provided in an embodiment of the present application includes the terminal-side communication middleware provided in the second aspect of the embodiment of the present application.
[0018] The cloud-side communication middleware, end-side communication middleware and end-cloud collaborative system provided in the embodiments of the present application can coordinate and manage the strategies, data, communications and models of the end-cloud collaborative execution of federated training tasks in a unified manner, thereby improving the communication efficiency, the efficiency and accuracy of model training, and thus solving the technical problems raised in the background technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0020] Figure 1 A schematic diagram of the structure of a cloud-side communication middleware provided in an embodiment of the present application;
[0021] Figure 2 A schematic diagram of the structure of a terminal-side communication middleware provided in an embodiment of the present application;
[0022] Figure 3 A structural diagram of a terminal-cloud collaboration system provided in an embodiment of the present application;
[0023] Figure 4 An architecture diagram of a terminal-cloud collaboration system provided in an embodiment of the present application;
[0024] Figure 5 A schematic diagram of a communication middleware architecture for end-cloud collaborative federated learning provided in an embodiment of the present application;
[0025] Figure 6 A schematic diagram of a process for issuing a cloud-side policy provided in an embodiment of the present application;
[0026] Figure 7 A schematic diagram of a process for selecting a smart communication protocol to establish a long connection provided in an embodiment of the present application;
[0027] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0030] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be 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 pointed out that the terms "first\second\third" involved in the embodiments of the present application are used to distinguish similar or different objects, and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0032] End-cloud collaboration refers to the collaborative completion of computing resources and tasks between the cloud and terminal devices in the context of distributed computing and edge computing, so as 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 will also be added to the resource pool to collaboratively complete computing tasks, thereby improving the efficiency of processing and analysis.
[0033] In traditional federated learning communications, there is no unified coordination and management between the cloud and the end. Differences in computing power, bandwidth, and latency among the many participants on the cloud and the end result in communication delays, data loss, and other problems, which in turn affects the efficiency and accuracy of model training.
[0034] In view of this, an embodiment of the present application provides a cloud-side communication middleware, which is applied to a network device on the cloud side, and the cloud-side communication middleware includes: a policy management module, a data management module, a model management module and a communication management module; wherein the policy management module is used to manage the cloud-side policy of the end-cloud collaborative federated training task, and the cloud-side policy includes a model training policy and a device screening policy, the model training policy is used to indicate the training conditions corresponding to the training task model, and the device screening policy is used to indicate the screening conditions of the terminal devices for training the task model; the data management module is used to obtain the identification information of the latest cloud-side policy, and send the identification information of the latest cloud-side policy to the end side, so that the terminal device on 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 used to manage the task model, send the task model to the end side, and aggregate the model training results uploaded by the end side; the communication management module is used to establish and manage the communication connection with the end side, send the identification information of the latest cloud-side policy to the end side through the communication connection, and send the task model to the end side. This communication middleware can coordinate and manage the cloud-side strategies, data, communications, and models when the end and cloud collaborate to perform federated training tasks, thereby improving communication efficiency and the efficiency and accuracy of model training.
[0035] The following will describe the technical solution of the cloud-side communication middleware in the embodiment of the present application in conjunction with the drawings in the embodiment of the present application.
[0036] Figure 1 A schematic diagram of the structure of a cloud-side communication middleware provided in an embodiment of the present application. The cloud-side communication middleware can be applied to network equipment, which can be a transmission receiving node, a base station, a server, a relay station or an access point during implementation. The network equipment can be a network equipment in a 5G communication system or a network equipment in a future evolution network. In addition, it can also be: a base station transceiver station in a global mobile communication system or a code division multiple access network, or an NB in a wideband code division multiple access network, or a base station eNB or eNodeB in long term evolution. The network equipment can also be a wireless controller in a cloud wireless access network scenario. As Figure 1 As shown, the cloud-side communication middleware may include a policy management module 101, a data management module 102, a model management module 103 and a communication management module 104.
[0037] The policy management module 101 is used to manage the cloud-side policy of the end-cloud collaborative federated training task. The cloud-side policy includes a model training policy and a device screening policy. The model training policy is used to indicate the training conditions corresponding to the training task model, and the device screening policy is used to indicate the screening conditions for screening terminal devices for training the task model.
[0038] The data management module 102 is used to obtain the identification information of the latest cloud-side policy and send the identification information of the latest cloud-side policy to the end side, so that the terminal device on 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 used to manage the task model, send the task model to the terminal side, and aggregate the model training results uploaded by the terminal side.
[0040] The communication management module 104 is used to establish and manage a communication connection with the terminal side, send identification information of the latest cloud-side policy to the terminal side through the communication connection, and send the task model to the terminal side.
[0041] The above-mentioned embodiment provides a cloud-side communication middleware solution 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 strategies, data, models and communications in the end-cloud collaborative execution of federated learning tasks are managed respectively, thereby achieving unified coordination and management between the cloud side and the end side. It can solve the problem of excessively high communication overhead between participants when the end-cloud collaborative execution of federated learning tasks affects the efficiency and accuracy of model training, thereby improving the efficiency and feasibility of federated learning.
[0042] In some embodiments, the end side uploads identification information of the end side policy to the cloud side through tracking data to achieve low-cost update of the policy.
[0043] In the embodiment of the present application, the data management module sends the identification information of the latest cloud-side policy to the terminal side, which can be used for:
[0044] Receive and parse the tracking data reported by the end side, the tracking data including the identification information of the end side policy, and the end side policy is obtained from the cloud side; when the identification information of the end side policy is inconsistent with the identification information of the latest cloud side policy, send the identification information of the latest cloud side policy to the end side.
[0045] It is understandable that the above solution realizes low-cost quasi-real-time inspection and update of policies based on the gateway update technology reported by the buried point, and can also support incremental updates and full updates. It realizes the stable and rapid release of intelligent participant policies, so that the terminal side can select the optimal participant based on the device network bandwidth, computing power, sample richness, etc., to reduce communication overhead and improve the generalization ability of the model to a certain extent.
[0046] In some embodiments, the cloud side can select some end-side devices as target end-side devices by setting task execution conditions, and then issue policies to achieve customized services.
[0047] In the embodiment of the present application, the policy management module may also be used for:
[0048] Obtaining a task execution condition, wherein the task execution condition includes characteristic information of a terminal device that executes the task, wherein the characteristic information includes at least one of a device model and a region to which it belongs; determining an end side that executes the task based on the characteristic information and characteristic information of each end side pre-stored in the policy management module, so that the end side that executes 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 based on the target model training strategy and the target device screening strategy, wherein the end side includes at least one terminal device.
[0049] It is understandable that the method of setting task execution conditions and selecting the end side can facilitate users to select a suitable end side, thereby realizing intelligent selection and customized services for issuing tasks.
[0050] Further, the cloud side includes a content distribution network, and the content distribution network is used to store the latest cloud side policy. The policy management module can also be used to:
[0051] The policy management module stores the target model training policy and the target device screening policy in the content distribution network, so that the end side executing the task obtains the target model training policy and the target device screening policy from the content distribution network.
[0052] It is understandable that the communication efficiency in heterogeneous networks can be improved by dynamically adjusting the communication strategy based on information such as the bandwidth and latency of the participants, including dynamically selecting a reliable network environment, a suitable communication protocol, etc.
[0053] In some embodiments, when the cloud side establishes communication with the terminal side through the communication management module, it is necessary to obtain information such as the corresponding operator and the network area to which the operator belongs.
[0054] In the embodiment of the present application, the communication management module may be specifically used for:
[0055] Receive a server acquisition request sent by the end side; parse the operator of the gateway corresponding to the server acquisition request and the network area to which it belongs, and determine the corresponding server information according to a preset gateway policy, wherein the preset gateway policy includes gateway policies of different operators in different network areas, and the server information includes a network address, a port, and a communication protocol; send the server information to the end side so that the end side establishes a connection according to the server information.
[0056] It is understandable that the communication management service can help the terminal side determine the corresponding server and obtain the corresponding server information to establish a communication connection.
[0057] Furthermore, the communication management module may also be used for:
[0058] A connection establishment request sent by a receiving end side, wherein the connection establishment request is initiated based on the server information; a security verification is performed on the connection establishment request, wherein the security verification includes at least one of message verification, authentication and authorization, duplicate connection judgment, and Internet Protocol address IP blacklist verification; feedback information is sent to the end side, wherein, when the feedback information indicates that the security verification has passed, a communication connection is established with the end side; or, when the feedback information indicates that the security verification has failed and the reason for the failure of the security verification is excessive load, the end side re-establishes the connection according to the server information.
[0059] It is understandable 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 this information by intercepting communication data, thereby endangering data privacy and security. In order to solve the problem of privacy leakage in federated learning, the embodiment of the present application implements hybrid authentication based on the content distribution network CDN, which ensures the security of resource file downloading while ensuring efficient transmission.
[0060] Furthermore, the communication management module may also be used for:
[0061] receiving a training application message sent by the terminal side, wherein the training application message includes information of a training task; and sending the training application message to the policy implementation module;
[0062] The policy implementation module is also used to:
[0063] According to the information of the training task included in the training application message, query whether the current task quota of the corresponding training task is greater than or equal to the preset quota threshold, and feedback the training application result to the communication management module according to the query result, when the query result indicates that the current task quota is greater than or equal to the preset quota threshold, the training application result is rejection of the application, and when the query result indicates that the current task quota is less than the preset quota threshold, the training application result is approval of the application;
[0064] The communication management module is also used for:
[0065] The training application result is sent to the terminal side.
[0066] It can be understood that through the real-time update of the federated task strategy, it is possible to dynamically select the optimal participant based on the participant's network environment, participant performance, and participant data coverage, thereby reducing communication overhead and improving the efficiency of federated learning and the generalization ability of the model.
[0067] In some embodiments, in traditional federated learning communication, after the full model is sent to the client, all participants need to upload the local model parameter updates to the central server, and then wait for the central server to download the global model updates to the local. This method requires a lot of communication overhead, especially when there are a large number of participants, which will cause communication to become a system bottleneck.
[0068] In the embodiment of the present application, the model management module sends the task model to the terminal side, which can be used for:
[0069] The task model is stored in the content distribution network, so that the terminal device on the end side obtains the task model from the content distribution network after being authenticated.
[0070] It can be understood that by pre-caching the global model to the CDN edge node, faster model update response speed and lower communication latency can be provided, thereby improving the performance and efficiency of the system.
[0071] Furthermore, the model management module can also be used to:
[0072] Through the communication connection established with the end side, a model feedback message uploaded by the end side is received, and the model feedback message is used to indicate the model training result of the end side; and the task model is obtained according to the model feedback message.
[0073] It is understandable that by adopting asynchronous communication strategies and global buffering mechanisms, the problems of long waiting time and excessive communication overhead between devices in traditional federated learning are solved, thereby improving the training efficiency of federated learning and decoupling the calculation and upload of the participants, thereby improving the scalability of the system and better adapting to different application scenarios and system environments.
[0074] Furthermore, the model management module includes a model cache area, and the model management module obtains the task model according to the model feedback message, for:
[0075] Upon receiving the model feedback message, the model parameters of the end-side training are obtained from the model cache area, where the model parameters stored in the model cache area are uploaded by the end-side; differential privacy technology is used to perform model aggregation on the model parameters of each end-side training to obtain the task model.
[0076] It is understandable that the embodiments of the present application ensure communication security through a variety of security means, such as differential privacy, TLS encryption, digital envelopes and digital signatures, CDN hybrid authentication, etc. to ensure communication security and prevent privacy leakage problems in federated training. In addition, differential privacy technology is used in uploading and aggregation after local model training to protect user data privacy, and the security of communication is ensured by encryption and decryption of digital envelopes to prevent data tampering and theft.
[0077] The embodiment of the present application innovatively proposes a technical solution for cloud-side communication middleware for end-cloud collaboration, which aims to solve the communication overhead between participants in end-cloud collaborative federated learning and improve the efficiency and feasibility of federated learning. The above solution effectively improves the efficiency and feasibility of federated learning and greatly reduces the communication overhead between participants, providing a new solution for communication in the field of end-cloud collaboration. The solution has broad application prospects and can be applied to various end-cloud collaborative communication scenarios.
[0078] The embodiment of the present application also provides an end-side communication middleware, which is applied to a terminal device on the end-side, and the end-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 used to receive the cloud-side policy of the end-cloud collaborative federated training task issued by the cloud side, and determine the terminal device of the training 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 the training conditions of the training task model, and the device screening policy is used to indicate the screening conditions of the terminal devices for training the task model; The data acquisition module is used to receive the identification information of the latest cloud-side policy issued by the cloud side, and obtain the latest cloud-side policy of the cloud side according to the identification information of the latest cloud-side policy; the model training module is used to manage the task model, train the task model to obtain the model training result, and send the model training result to the cloud side; the communication connection module is used to establish and manage the communication connection with the cloud side, and obtain the identification information of the latest cloud-side policy issued by the cloud side through the communication connection, obtain the latest cloud-side policy, receive the task model, and upload the model training result.
[0079] The technical solution of the terminal-side communication middleware in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application.
[0080] Figure 2 The schematic diagram of the structure of a terminal communication middleware provided in an embodiment of the present application. The terminal communication middleware can be applied to a terminal device, which can be various types of devices with information processing capabilities during implementation. For example, the terminal device can include a personal computer, a laptop, a PDA or a server, etc.; the terminal device can also be a mobile terminal, for example, the mobile terminal can include a mobile phone, a car computer, a tablet computer or a projector, etc. Figure 2 As shown, the end-side communication middleware includes: a policy implementation module 201, a data collection module 202, a communication connection module 204 and a model training module 203. Among them,
[0081] The policy implementation module 201 is used to receive the cloud-side policy of the end-cloud collaborative federated training task issued by the cloud side, and determine the terminal device of the training task model according to the cloud-side policy, wherein the cloud-side policy includes a model training policy and a device screening policy, wherein the model training policy is used to indicate the training conditions of the training task model, and the device screening policy is used to indicate the screening conditions of the terminal devices for training the task model;
[0082] The data acquisition module 202 is used to receive the identification information of the latest cloud-side policy issued by the cloud side, and obtain 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 used 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 used to establish and manage the communication connection with the cloud side, and obtain the identification information of the latest cloud side strategy issued by the cloud side through the communication connection, obtain the latest cloud side strategy, receive the task model, and upload the model training results.
[0085] The above-mentioned embodiment provides an end-side communication middleware solution in an end-cloud collaborative framework. By setting a policy implementation module, a data acquisition module, a model training module and a communication connection module, the strategies, data, models and communications in the end-cloud collaborative execution of federated learning tasks are managed respectively, thereby achieving unified coordination and management between the cloud side and the end side. It can solve the problem of excessive communication overhead between participants when the end-cloud collaborative execution of federated learning tasks affects the efficiency and accuracy of model training, thereby improving the efficiency and feasibility of federated learning.
[0086] In some embodiments, the end side uploads identification information of the end side policy to the cloud side through tracking data to achieve low-cost update of the policy.
[0087] The data acquisition module is also used for:
[0088] Obtain and report tracking data, wherein the tracking data includes identification information of the end-side policy, and the end-side policy is obtained 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; if the identification information of the end-side policy is inconsistent with the identification information of the latest cloud-side policy, obtain 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 when the tracking point reports the request, the configuration check service is requested synchronously to obtain the latest version information of the cloud side configuration in real time. When the terminal side configuration lags behind the cloud side configuration, the cloud side service is requested to obtain the latest strategy. At the same time, the communication overhead is reduced through incremental updates, so as to achieve the high efficiency and low cost effect of updating the federated training strategy.
[0090] In some embodiments, the policy implementation module is used to:
[0091] Obtain current state parameters, which include at least one of performance parameters, timing parameters and local data quality parameters; determine whether the current state parameters satisfy the model training strategy and device screening strategy in the latest cloud-side strategy, and if the model training strategy and device screening strategy are satisfied, determine to execute tasks corresponding to the latest cloud-side strategy.
[0092] It is understandable that the end-side client dynamically selects the appropriate device based on the latest strategy (such as network status, power, power consumption, device storage, local sample size, etc.), and establishes a long connection with the cloud side for real-time communication by dynamically selecting a communication protocol at the right time. Based on the quasi-real-time configuration strategy, the optimal participant is selected in combination with the current device performance, scenario, and data indicators, reducing unnecessary devices and connections to reduce communication overhead, while improving the feasibility and efficiency of federated learning.
[0093] In some embodiments, the communication connection module is specifically used to:
[0094] Send a server acquisition request to the cloud side, receive the server information returned by the cloud side, and establish a connection with the corresponding server according to the server information, wherein the server information includes a network address, a port, and a communication protocol.
[0095] It is understandable that in traditional federated learning communication, only a single communication protocol is used in heterogeneous networks, resulting in inflexible selection of communication protocols and inability to fully utilize network resources, thus affecting the efficiency and performance of federated learning. Intelligent selection of the optimal participants reduces communication overhead and improves the efficiency of federated learning.
[0096] Further, the communication connection module establishes a connection with the corresponding server according to the server information, which can be used to:
[0097] Acquire the current network status; select a target communication protocol from the communication protocols indicated in the server information according to the current network status, wherein the target communication protocol is at least one of the Hypertext Transfer Protocol HTTP, the Transmission Control Protocol TCP and the Quick UDP Internet Connection QUIC; establish a connection with the corresponding server according to the target communication protocol.
[0098] It is understandable that this solution provides a channel solution based on intelligent selection of communication protocols (HTTP / TCP / QUIC), realizes accurate client traffic scheduling through HTTP DNS, selects the optimal communication link and communication strategy in real time based on device information such as the device's network and performance status, and ensures the communication stability of network state federation training when the network connection is unstable. In addition, self-developed communication protocols can be used to ensure the reliability and real-time nature of 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 when the feedback information indicates that the security verification has passed, a communication connection corresponding to the first connection establishment request is established; when the feedback information indicates that the security verification has not passed and the reason for the failure of the security verification is excessive load, a second connection establishment request is sent to the cloud side based on the address in the network address that is located after the first address, so as to establish a communication connection corresponding to the second connection establishment request.
[0101] Furthermore, the communication connection module is also used for:
[0102] A training application message is sent to the cloud side, wherein the training application message includes information about the training task; and a training application result is received from the cloud side, wherein the training application result includes approval or rejection of the application.
[0103] It is understandable that the communication method using multiple technical means can provide a larger scale and more diversified communication method, and at the same time can fully and effectively utilize the limited end-side device resources, thereby improving the efficiency and performance of end-cloud collaborative tasks. This embodiment supports multiple communication scenarios: supporting efficient communication such as end-side data center offline computing tasks, real-time computing tasks, and end-cloud collaborative federated learning tasks.
[0104] In some embodiments, the training application result also includes a model address, and the model training module is further used to:
[0105] When the training application result is an approval application, the corresponding task model is obtained from the content distribution network after authentication according to the model address, and the task model in the content distribution network is pre-stored on the cloud side; the task model is trained according to local data to obtain a trained task model.
[0106] It is understandable that a variety of communication security measures are used to prevent privacy leaks and protect federal communication security: differential privacy, TLS encryption, digital envelopes, digital signatures, and CDN hybrid authentication are used to ensure communication security.
[0107] Furthermore, in traditional federated learning communications, participants need to wait for all participants to upload local model parameter updates before they can perform global model updates, which may result in longer training times and lower training efficiency.
[0108] In an embodiment of the present application, the model training module trains the task model according to 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 parallel segmented upload mode, and a model feedback message is sent to the cloud side through the communication connection module, so that the cloud side uses differential privacy technology to perform model aggregation on the model parameters trained on each end side to obtain the task model, wherein the model parameters are obtained according to the trained task model stored in the local cache area using differential privacy technology when the trained task model stored in the local cache area meets the preset upload requirements.
[0110] It is understandable that model aggregation introduces an asynchronous buffering mechanism to reduce device waiting time and thus improve training efficiency: through asynchronous communication strategies and model buffer mechanisms, the training dependencies between devices are decoupled, which greatly reduces the waiting time between devices, thereby improving training efficiency. At the same time, compression and other technologies are used to greatly reduce communication overhead.
[0111] The end-side communication middleware provided in the embodiment 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 communication in the field of end-cloud collaboration. This solution has broad application prospects and can be applied to various end-cloud collaborative communication scenarios.
[0112] Figure 3 This is a structural diagram of a terminal-cloud collaboration system provided in an embodiment of the present application. Figure 3 As shown, the end-cloud collaborative system includes cloud-side communication middleware 301, end-side communication middleware 302, and end-cloud link 303. The cloud-side communication middleware 301 is connected to 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 end-side communication middleware 302. In the embodiment of the present application, one cloud-side communication middleware 301 corresponding to an end-side communication middleware 302 can be used as an example for explanation, that is, a scenario where one network device corresponds to multiple terminal devices. Among them, the end-cloud link 303 can realize information transmission between the cloud-side communication middleware 301 and the end-side communication middleware 302.
[0114] It is understandable that the embodiments of this application are developed for the end-cloud collaboration field, especially for the needs of federated learning communication for end-cloud collaboration, but are not limited to this scenario. The system can provide an efficient, real-time, and scalable end-cloud collaborative communication link, support communications in multiple scenarios, multiple devices, and multiple users, and protect user privacy and data security.
[0115] The following describes an exemplary application of the embodiments of the present application in a practical application scenario.
[0116] Figure 4 This is an architecture diagram of a terminal-cloud collaboration system provided in an embodiment of the present application. Figure 4 As shown in the figure, the end-cloud collaboration system includes: end-cloud collaboration federated training strategy service, end-cloud collaboration federated training message communication service, end-cloud collaboration federated training model synchronization service and end-cloud collaboration federated training communication security service. Among them, the end-cloud collaboration DCC APP is the end-side communication middleware, and the other parts in the figure are cloud-side middleware.
[0117] The end-cloud collaborative federated training strategy service is mainly used in end-cloud collaborative scenarios. Users can send different policy configurations on the cloud side to the end-side client in real time to dynamically select the best participants for federated training configuration, including multiple selection methods based on device performance status, network status, sample richness, device distribution, etc. It also supports targeted multi-dimensional selection of the group to be sent and visual display of the results of the sending.
[0118] End-cloud collaborative federated training message communication service, this function is mainly used in end-cloud collaborative federated learning scenarios, and realizes real-time message transmission by establishing a connection channel that dynamically selects the communication protocol (Transmission Control Protocol TCP / Quick UDP Internet Connection QUIC) based on the user's network status. This technology can support real-time end-cloud communication with multiple message types, including training applications, training replies, gradient feedback, etc. Combined with settings such as service quality QoS, message transmission mode and message type, flexible and reliable message transmission between the end and the cloud can be achieved, and data analysis can be performed based on the device connection quality status to optimize the screening of training users.
[0119] End-cloud collaborative federated training model synchronization service, this function is mainly used in federated learning in end-cloud collaborative scenarios, and is used for large file transfers such as end-cloud collaborative training / inference model delivery and model gradient feedback. This function uses asynchronous communication and buffer mechanisms. Participants can upload local model updates at different time points and store these updates in the buffer, which greatly reduces the waiting time and communication overhead between devices and improves overall training efficiency. By updating the model to the content distribution network CDN edge node to achieve model distribution, faster response speed and lower communication latency are provided, while providing a visual model management and model transmission progress interface.
[0120] End-cloud collaborative federated training communication security service, this function is mainly used in the communication transmission of end-cloud collaborative federated training, and is used to protect the security of the cloud side and the end side in communication transmission and the privacy of personal data. Combined with CDN to achieve hybrid authentication, thereby preventing unauthorized access to model resources and ensuring the security of resource distribution. During model training and model aggregation, the privacy of user data is protected through differential privacy gradient clipping and privacy budget. In communication transmission, the transport layer security protocol TLS / Secure Sockets Layer SSL encryption protocol is used to ensure the security of data and communication, and digital envelopes and digital signatures are used to verify the authenticity and integrity of the data to further prevent data tampering and theft.
[0121] Figure 5 A schematic diagram of a communication middleware architecture for end-cloud collaborative federated learning provided in an embodiment of the present application. Figure 5 As shown in the figure, the end-cloud collaborative federated learning communication middleware is divided into the communication link cloud side and the communication link client. Its architecture consists of the following related entities:
[0122] The cloud side of the communication link refers to the related components running on the cloud server, which are used for dynamic policy management, data collection, long connection services, traffic scheduling, message management, model file management, etc. The cloud side of the communication link includes:
[0123] Policy management service: responsible for managing the end-cloud collaborative cloud-side configuration and task-related dispatching resources, including training strategies, timing strategies, and multi-dimensional device screening strategies (including device performance, network status, sample quality, and sample quantity, etc.).
[0124] Data collection: Responsible for the unified definition and management of cloud-side and end-cloud collaboration-related data collection services, including data reporting, data compression, data encryption, gateway update and other operations and service interfaces.
[0125] Long connection service: responsible for the establishment and management of client-side cloud connection for end-cloud collaboration, supporting multi-protocol (TCP / QUIC) and multi-port connection establishment on the client side, including connection management, message delivery, device management, heartbeat management, authentication and other operations and services.
[0126] Message management service: responsible for the end-cloud collaboration client-cloud message communication management, including message routing, offline message storage, real-time message delivery and other operations and services.
[0127] Traffic scheduling: Cloud-side traffic scheduling services responsible for end-cloud collaboration tasks, including traditional DNS resolution, precise traffic scheduling based on HTTPDNS, NLB, DPVS and other services.
[0128] Model management: Responsible for the cloud-side model management services for end-cloud collaborative tasks, including global model cache management, real-time model pulling, model uploading, model distribution, model updating, CDN preheating, CDN hybrid authentication and other operations and services.
[0129] The communication link client refers to the related components running in the end-side device environment, which are used for real-time data reporting, real-time configuration update, dynamic selection of communication protocol connection, 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 data points generated on the end side.
[0131] Long connection module: responsible for the connection and communication management on the end side. By judging the client network status, it dynamically selects TCP / QUIC to establish the connection and communicates asynchronously with the cloud side.
[0132] Configuration policy management module: responsible for end-side configuration management, dynamic participant policy implementation, etc.
[0133] Model management module: responsible for the management of model authentication, model download, local model cache, model storage, reporting after model differential privacy, and segmented upload on the terminal side.
[0134] Figure 6 A schematic diagram of a cloud-side policy delivery process provided in an embodiment of the present application. Figure 6 As shown, the process of issuing the cloud-side policy includes:
[0135] 401. The business defines the device strategy and training task strategy for 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.
[0136] 402. After selecting the population that needs federal training, the training tasks will be synchronized to the configuration management center through distributed transactions after review to ensure consistency, and the initialized model will be uploaded to the model management service.
[0137] 403. When the client reports the tracking point, it obtains the latest configuration version information through the gateway update and compares it with the local version. If the local version is behind, it pulls the latest configuration strategy from the cloud side.
[0138] 404. The terminal side analyzes the cloud side policy configuration and determines whether the current mobile phone status, timing, and local data quality meet the operation training conditions based on the training strategy.
[0139] 405. If the current time meets the job training conditions, a task matching the current regional model is obtained according to the device screening strategy.
[0140] 406. After the client 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 solution in the above embodiment has a low-cost real-time configuration distribution function. The traditional configuration update solution uses timed polling to pull / long connection push updates, which may cause untimely updates and waste of resources. This solution performs comprehensive inspection and updates on the buried point reporting gateway, thereby achieving low-cost configuration distribution, and also supports one-stop configuration management and incremental updates. This enables our system to help users quickly deploy and update a variety of task configurations, ensure high efficiency and accuracy of task execution, and facilitate rapid AB experiments and iterations of end-cloud collaborative tasks, thereby improving system performance and reliability.
[0142] In addition, in order to address the communication delays and data loss problems caused by network instability and differences in device computing performance in heterogeneous networks of many participants, a dynamic strategy (network status / power / power consumption / local data quality / computing performance, etc.) is implemented based on real-time updates of configurations to select the right device and the right time to select the device for federated training. This means that our system selects different methods to select the best participants according to different application scenarios and requirements, thereby reducing communication overhead, ensuring communication quality, and improving the efficiency of federated learning. At the same time, combined with the screening of data indicator richness (similarity, coverage, etc.), the generalization ability of the model is further improved.
[0143] Figure 7 A schematic diagram of a process for selecting a smart communication protocol to establish a long connection provided in an embodiment of the present application. Figure 7 As shown, the process of the intelligent communication protocol selecting to establish a long connection includes:
[0144] 501. The client requests the HTTPDNS server. After the server resolves the operator and the network area corresponding to the gateway IP, the server matches the corresponding IP+Port list based on the pre-acquired gateway policies of different operators in each network area.
[0145] 502. The client obtains the persistent connection server IP+PORT+communication protocol list returned by the server, caches the list, and performs load balancing based on the persistent connection list.
[0146] 503. The client dynamically selects the protocol (TCP / QUIC protocol) based on the current network status, network congestion level and other relevant strategies and the health status of the network environment.
[0147] 504. The client initiates a request to establish a connection, and the server performs security protection verification such as message verification, authentication, duplicate connection judgment, and IP blacklist.
[0148] 505. After the server authentication fails, it returns ACK and the reason for failure, and the server closes the connection; if the client determines that the error message is that the server load is too large, it selects a new IP and continues from step 2.
[0149] 506. If the server authentication is successful, it returns ACK, establishes a successful connection with the client, saves the successful IP, and prioritizes connecting to this IP next time a connection is established.
[0150] The selection method of the traditional federated learning communication protocol in the embodiments of the present application is usually determined once and for all, and cannot be dynamically adjusted according to the specific application scenario and the network conditions between the participants. This technology is based on a method of dynamic protocol selection, and flexibly selects appropriate communication protocols such as TCP / QUIC according to real-time information such as the network quality and device performance of the participants, making full use of the current network resources of the device, thereby improving the efficiency and performance of federated learning. In addition, in order to address the privacy leakage problem that may be caused by the sharing of model parameters by the participants, the TLS / SSL encryption protocol is used to encrypt data and communications, and the privacy of user data is protected through gradient clipping of differential privacy and privacy budget. Digital envelopes and digital signatures are used to verify the authenticity and integrity of data to prevent data tampering and theft, and hybrid authentication is implemented in combination with CDN to prevent unauthorized access to model resources.
[0151] It is understandable that the communication method using multiple technical means can provide a larger scale and more diverse communication method, thereby improving the performance and stability of communication between the end-side device and the cloud-side service. This method can meet the communication needs of different scenarios and requirements of end-cloud collaboration, and improve the flexibility and scalability of the system.
[0152] The present application also provides a process for federated training message communication. The process for federated training message communication includes: (1) After the connection is established, the end side sends an uplink training application message through a long connection according to the acquired 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 policy service according to the message type; (3) The policy service checks whether the current task quota is met. If the task application is passed, it sends an application approval message to the routing service, and sends a training rejection message to the routing service. (4) After receiving the rejection / application approval message, the routing service routes the message to the corresponding long connection server connected to the device according to the device ID. (5) The long connection service sends the message through the message queue telemetry transmission MQTT protocol. If the end side parses the message as a rejection message, it closes the long connection and waits for the next training. (6) The end side parses the message as an application approval message, obtains the authenticated model address through the model storage service, and pulls the model training resource package from the CDN after hybrid authentication. (7) After the end side locally loads the pulled model resource package, it reads the data set and starts local training. (8) After local training is successful, the trained model is cached locally. When the cache meets the dynamic trigger upload mechanism, the model parameters are compressed and uploaded to the model storage service in parallel, and a 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 request message to the aggregation service according to the message type. (10) After the aggregation service receives the model return message, it pulls the locally trained model results from the buffer of the model storage service in real time according to the number of cache areas and starts aggregation. (11) Until the results converge or the task is completed, the final aggregated model is uploaded to the model storage service for sending to the end side for local reasoning.
[0153] In order to solve the problems of high communication overhead and long waiting time in traditional federated learning, the embodiments of the present application adopt 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 buffering mechanism, where the device side caches local model updates, and uploads local model updates to the global cache based on a dynamic trigger upload mechanism, and the throughput and upload stability are improved through parallel segmented uploads. 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 communication overhead, thereby improving the efficiency of federated training. The aggregated model is preheated and cached to the CDN edge node to achieve efficient distribution of resources.
[0154] It should be understood that, although the various steps in the above-mentioned flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flow chart may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0155] The embodiment of the present application also provides a network device, including the above-mentioned cloud-side communication middleware. The embodiment of the present application also provides a terminal device, including the above-mentioned terminal-side communication middleware. The contents of the cloud-side communication middleware and the terminal-side communication middleware can be referred to the above introduction, and will not be repeated here.
[0156] Figure 8 The structure diagram of an electronic device provided in an embodiment of the present application. The electronic device may be a network device or a terminal device. Figure 8 As shown, the electronic device may include a processor 601, a memory 602, a communication interface 603 and a bus 604. The memory 602 is used to store instructions, and the processor 601 is used to execute the instructions stored in the memory 602. The processor 601, the memory 602 and the communication interface 603 are connected to each other through the bus 604.
[0157] The processor 601 may include one or more processing units. For example, the processor 601 is a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (FPGAs). Different processing units may be independent devices or integrated into one or more processors.
[0158] The memory 602 can be used to store computer executable program codes, which include instructions. The internal memory 602 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, video data, etc.), etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 601 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the memory 602, and / or instructions stored in a memory provided in the processor.
[0159] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0160] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. For the sake of brevity, this article will not repeat them.
[0161] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.
[0162] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0163] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple 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, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical or other forms.
[0164] The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed on multiple network units; some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0165] In addition, all functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may be a separate unit, or two or more modules may be integrated into one unit; the above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0166] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0167] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the relevant technology 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 for enabling an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0168] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain a new method embodiment. The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain a new product embodiment. The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain a new method embodiment or device embodiment.
[0169] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A cloud-side communication middleware, characterized in that: Applied to network equipment, the cloud-side communication middleware includes: a policy management module, a data management module, a model management module and a communication management module; wherein, The policy management module is used to manage the cloud-side policy of the end-cloud collaborative federated training task, and the cloud-side policy includes a model training policy and a device screening policy. The model training policy is used to indicate the training conditions corresponding to the training task model, and the device screening policy is used to indicate the screening conditions of the terminal devices for training the task model; The data management module is used to obtain the identification information of the latest cloud-side policy, and send the identification information of the latest cloud-side policy to the terminal side, so that the terminal device of the terminal side obtains the latest cloud-side policy according to the identification information of the latest cloud-side policy; The model management module is used to manage the task model, send the task model to the terminal side, and aggregate the model training results uploaded by the terminal side; The communication management module is used to establish and manage a communication connection with the end side, send identification information of the latest cloud side policy to the end side through the communication connection, and send the task model to the end side.
2. The middleware according to claim 1, characterized in that: The data management module sends identification information of the latest cloud-side policy to the terminal side, for: Receive and parse the tracking data reported by the end side, where the tracking data includes identification information of the end side policy, where the end side policy is obtained from the cloud side; When the identification information of the terminal-side policy is inconsistent with the identification information of the latest cloud-side policy, the identification information of the latest cloud-side policy is sent to the terminal side.
3. The middleware according to claim 1, characterized in that: The policy management module is also used for: Acquire a task execution condition, where the task execution condition includes characteristic information of a terminal device that executes the task, where the characteristic information includes at least one of a device model and a region to which the device belongs; Based on the characteristic information and the characteristic information of each end side pre-stored in the policy management module, the end side that executes the task is determined, so that the end side that executes the task obtains the target model training strategy and the target device screening strategy corresponding to the task, and selects the corresponding terminal device to execute the task according to the target model training strategy and the target device screening strategy, and the end side includes at least one terminal device.
4. The middleware according to claim 3, characterized in that: The cloud side includes a content distribution network, the content distribution network is used to store the latest cloud side policy, and the policy management module is also used to: The policy management module stores the target model training policy and the target device screening policy in the content distribution network, so that the end side that executes the task obtains the target model training policy and the target device screening policy from the content distribution network.
5. The middleware according to claim 1, characterized in that: The communication management module is specifically used for: Receiving a server acquisition request sent by the terminal side; Parse the operator and the network area of the gateway corresponding to the server acquisition request, and determine the corresponding server information according to the preset gateway policy, wherein the preset gateway policy includes the gateway policies of different operators in different network areas, and the server information includes the network address, port and communication protocol; The server information is sent to the end side, so that the end side establishes a connection according to the server information.
6. The middleware according to claim 5, characterized in that: The communication management module is also used for: A connection establishment request sent by a receiving end side, wherein the connection establishment request is initiated based on the server information; Performing security verification on the connection establishment request, wherein the security verification includes at least one of message verification, authentication, duplicate connection judgment, and Internet Protocol address IP blacklist verification; Feedback information is sent to the end side, wherein, when the feedback information indicates that the security verification has passed, a communication connection is established with the end side; or, when the feedback information indicates that the security verification has failed and the reason for the failure of the security verification is excessive load, the end side re-establishes the connection according to the server information.
7. The middleware according to claim 1, characterized in that: The communication management module is also used for: receiving a training request message sent by the terminal side, wherein the training request message includes information about a training task; Sending the training application message to the strategy implementation module; The policy implementation module is also used to: According to the information of the training task included in the training application message, query whether the current task quota of the corresponding training task is greater than or equal to the preset quota threshold, and feedback the training application result to the communication management module according to the query result, when the query result indicates that the current task quota is greater than or equal to the preset quota threshold, the training application result is rejection of the application, and when the query result indicates that the current task quota is less than the preset quota threshold, the training application result is approval of the application; The communication management module is also used for: The training application result is sent to the terminal side.
8. The middleware according to claim 7, characterized in that: The model management module sends the task model to the terminal side, for: The task model is stored in the content distribution network, so that the terminal device on the end side obtains the task model from the content distribution network after being authenticated.
9. The middleware according to claim 8, characterized in that: The model management module is also used for: Receiving, through a communication connection established with the terminal side, a model feedback message uploaded by the terminal side, wherein the model feedback message is used to indicate a model training result of the terminal side; The task model is obtained according to the model return message.
10. The middleware according to claim 8, characterized in that: The model management module includes a model cache area, and the model management module obtains the task model according to the model feedback message, and is used to: Upon receiving the model feedback message, obtaining the model parameters trained by the terminal side from the model cache area, where the model parameters stored in the model cache area are uploaded by the terminal side; Differential privacy technology is used to perform model aggregation on the model parameters trained on each end side to obtain the task model.
11. A terminal side communication middleware, characterized in that: Applied to terminal devices, the terminal-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 used to receive the cloud-side policy of the end-cloud collaborative federated training task issued by the cloud side, and determine the terminal device of the training task model according to the cloud-side policy, wherein the cloud-side policy includes a model training policy and a device screening policy, wherein the model training policy is used to indicate the training conditions of the training task model, and the device screening policy is used to indicate the screening conditions of the terminal devices for training the task model; The data acquisition module is used to receive the identification information of the latest cloud-side policy issued by the cloud side, and obtain the latest cloud-side policy of the cloud side according to the identification information of the latest cloud-side policy; The model training module is used 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 used to establish and manage a communication connection with the cloud side, and obtain the identification information of the latest cloud side strategy issued by the cloud side through the communication connection, obtain the latest cloud side strategy, receive the task model, and upload the model training results.
12. The middleware according to claim 11, characterized in that: The data acquisition module is also used for: Acquire and report tracking data, where the tracking data includes identification information of the device-side policy, and the device-side policy is acquired from the cloud side; Comparing whether the identification information of the terminal-side policy is consistent with the identification information of the latest cloud-side policy; When the identification information of the terminal-side policy is inconsistent with the identification information of the latest cloud-side policy, the latest cloud-side policy is acquired from the content distribution network of the cloud-side according to the version information of the latest cloud-side policy.
13. The middleware according to claim 12, characterized in that: The policy implementation module is used to: Acquire current state parameters, where the state parameters include at least one of a performance parameter, a timing parameter, and a local data quality parameter; Determine whether the current state parameters satisfy the model training strategy and the device screening strategy in the latest cloud-side strategy, and if the model training strategy and the device screening strategy are satisfied, determine to execute the task corresponding to the latest cloud-side strategy.
14. The middleware according to claim 10, characterized in that: The communication connection module is specifically used for: Send a server acquisition request to the cloud side, receive the server information returned by the cloud side, and establish a connection with the corresponding server according to the server information, wherein the server information includes a network address, a port, and a communication protocol.
15. The middleware according to claim 14, characterized in that: The communication connection module establishes a connection with the corresponding server according to the server information, and is used to: Acquire the current network status; select a target communication protocol from the communication protocols indicated in the server information according to the current network status, wherein the target communication protocol is at least one of the hypertext transfer protocol HTTP, the transmission control protocol TCP, and the fast UDP Internet connection QUIC; Establish a connection with the corresponding server according to the target communication protocol.
16. The middleware according to claim 15, characterized in that: 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: Based on a first address among the network addresses, sending a first connection establishment request to the cloud side; Receive feedback information based on the first connection establishment request sent by the cloud side, and when the feedback information indicates that the security verification has passed, establish a communication connection corresponding to the first connection establishment request; when the feedback information indicates that the security verification has not passed and the reason for the failure of the security verification is excessive load, send a second connection establishment request to the cloud side based on the address in the network address that is located after the first address, so as to establish a communication connection corresponding to the second connection establishment request.
17. The middleware according to claim 10, characterized in that: The communication connection module is also used for: Sending a training request message to the cloud side, wherein the training request message includes information about the training task; Receive the training application result sent by the cloud side, where the training application result includes approving the application or rejecting the application.
18. The middleware according to claim 17, characterized in that: The training application result also includes a model address, and the model training module is also used to: When the training application result is approval, obtaining a corresponding task model from a content distribution network after authentication according to the model address, where the task model in the content distribution network is pre-stored on the cloud side; The task model is trained according to local data to obtain a trained task model.
19. The middleware according to claim 10, characterized in that: The model training module trains the task model according to local data to obtain a trained task model for: The model parameters are compressed and uploaded to the cloud side in parallel segmented upload mode, and a model feedback message is sent to the cloud side through the communication connection module, so that the cloud side uses differential privacy technology to perform model aggregation on the model parameters trained on each end side to obtain the task model, wherein the model parameters are obtained according to the trained task model stored in the local cache area using differential privacy technology when the trained task model stored in the local cache area meets the preset upload requirements.
20. A terminal-cloud collaborative system, characterized in that: It includes the cloud-side communication middleware as described in any one of claims 1-10, and the terminal-side communication middleware as described in any one of claims 11-19.
21. A network device, characterized in that: Includes the cloud-side communication middleware as described in any one of claims 1-10.
22. A terminal device, characterized in that: Includes the end-side communication middleware as described in 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
Federal learning-based cloud side-end cooperative vehicle-mounted network resource allocation method
CN116684931A
Information transmission methods and apparatuses, and communication devices and storage medium
US20230232213A1