Secure communication method and apparatus, electronic device and non-volatile storage medium

By employing Internet Protocol security devices and self-developed encryption algorithms in a large-scale model platform, efficient dynamic key management was achieved, solving the problems of low encryption and decryption efficiency and inflexible key management, and ensuring the security and stability of cross-host communication.

WO2026170758A9PCT designated stage Publication Date: 2026-11-19CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/131602
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-02-13
Filing Date
2025-10-31
Publication Date
2026-11-19

AI Technical Summary

Technical Problem

Existing encrypted communication technologies suffer from low encryption and decryption efficiency and inflexible key management when communicating with containers on large model platforms. They are difficult to adapt to the dynamic environment of containers, which affects security and stability.

Method used

By employing Internet Protocol security devices and self-developed encryption algorithms, the target key is determined by obtaining the unit information of the computing unit, and the data transmitted by the computing unit is encrypted. Combined with a dynamic key management mechanism, the security and efficiency of cross-host communication are achieved.

Benefits of technology

It improves encryption and decryption efficiency, ensures the security and stability of cross-host communication of applications on large model platforms, reduces the risk of key leakage, and improves the system's flexibility and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025131602_19112026_PF_FP_ABST
    Figure CN2025131602_19112026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a secure communication method and apparatus, an electronic device and a non-volatile storage medium. The method comprises: acquiring unit information corresponding to computing units in nodes of a target cluster, the target cluster comprising a cluster corresponding to a large model platform, the target cluster comprising a plurality of nodes, and each node comprising a plurality of computing units; according to the unit information of the computing units, determining target keys corresponding to the computing units, each computing unit corresponding to one target key; and when the computing units perform cross-host communication, using Internet protocol security devices to encrypt, according to the target keys, data transmitted by the computing units, so as to implement secure communication between the computing units in the different nodes. The present application solves the technical problems of low encryption and decryption efficiency and inflexible key management of encrypted communication technologies in the prior art when dealing with container communications of large model platforms.
Need to check novelty before this filing date? Find Prior Art

Description

Secure communication methods, devices, electronic equipment and non-volatile storage media

[0001] This application claims priority to Chinese Patent Application No. 2025101621036, filed on February 13, 2025, entitled "Secure Communication Method, Apparatus, Electronic Device and Non-Volatile Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of cloud computing communication security technology, and more specifically, to a secure communication method, apparatus, electronic device, and non-volatile storage medium. Background Technology

[0003] Currently, many large-scale AI modeling platforms and big data platforms are based on Kubernetes technology, making their communication security and privacy extremely critical. In Kubernetes, Pods (computation units) are the smallest deployable units, and cross-host communication between Pods often involves important tasks such as application interaction and the transmission of private data. If this communication data is not protected, it can lead to serious security incidents such as sensitive data leakage, unauthorized access, and data tampering. Therefore, ensuring the communication security of Pods is of great significance to the overall security and stability of large-scale modeling platforms built on Kubernetes technology.

[0004] However, existing encrypted communication technologies suffer from drawbacks when dealing with container communication on large-scale platform platforms, including low encryption / decryption efficiency, inflexible key management, and difficulty adapting to dynamic container environments. Currently, no effective solutions have been proposed to address these issues. Summary of the Invention

[0005] This application provides a secure communication method, apparatus, electronic device, and non-volatile storage medium to at least solve the technical problems of low encryption and decryption efficiency and inflexible key management in related technologies when dealing with container communication on large-scale platform.

[0006] According to one aspect of the embodiments of this application, a secure communication method is provided, comprising: obtaining unit information corresponding to computing units in nodes of a target cluster, wherein the target cluster includes a cluster corresponding to a large model platform, the target cluster contains multiple nodes, and each node contains multiple computing units; determining a target key corresponding to a computing unit based on the unit information of the computing unit, wherein each computing unit corresponds to one target key; and, in the case of cross-host communication between computing units, using an Internet Protocol security device to encrypt the data transmitted by the computing units based on the target key, so as to achieve secure communication between computing units in different nodes, wherein each node corresponds to one Internet Protocol security device.

[0007] In some embodiments, the method further includes: when a change event is detected in the computing unit in the node, updating the target key corresponding to the computing unit according to the unit information corresponding to the changed computing unit, wherein the change event includes at least one of the following: destroying the computing unit, creating the computing unit, or updating the computing unit.

[0008] In some embodiments, before obtaining the unit information corresponding to the computing units in the nodes of the target cluster, the method further includes: installing the target cluster and setting up a container network interface plugin for the target cluster, wherein the type of the target cluster includes: a Kubernetes cluster, and the container network interface plugin is used to allocate Internet Protocol addresses to the computing units in the target cluster and manage network communication between computing units; determining the operating system type corresponding to each node in the target cluster and configuring software packages corresponding to the operating system type for the nodes, wherein the software packages are used to install Internet Protocol security devices on the operating system corresponding to the nodes.

[0009] In some embodiments, the operating system type includes: target type and non-target type, wherein the target type includes: a Linux distribution operating system; configuring a software package corresponding to the operating system type for the node includes: configuring a first software package for the node when the operating system type is a target type, wherein the first software package includes at least one of the following: the libreswan software package; configuring a second software package for the node when the operating system type is a non-target type, wherein the second software package includes at least one of the following: the strongswan software package.

[0010] In some embodiments, after configuring the software package corresponding to the operating system type on the node, the method further includes: setting the firewall on each node in the target cluster to a closed state to ensure that the communication of Internet Protocol security devices in the target cluster is unrestricted; or, keeping the firewall open and setting the User Datagram Protocol (UDP) port required for the Internet Protocol security devices to communicate.

[0011] In some embodiments, the method further includes: configuring a target encryption algorithm for each node in the target cluster, wherein the target encryption algorithm is used to obtain the unit information corresponding to the computing unit in the node through the config configuration of the target cluster, and generate a target key corresponding to the computing unit based on the unit information, wherein the unit information is the identification information corresponding to the computing unit, including: Internet Protocol address.

[0012] In some embodiments, the target key includes: a symmetric key and an asymmetric encryption key; encrypting the data transmitted by the computing unit based on the target key includes: determining the block size based on the data size of the data to be transmitted by the computing unit and the system resource load status; dividing the data to be transmitted according to the block size to obtain multiple data blocks; encrypting the data blocks using the symmetric key to obtain encrypted data blocks, wherein each data block corresponds to a symmetric key; encrypting the symmetric key using the asymmetric encryption key, and sending the encrypted symmetric key and the encrypted data blocks to the computing unit for computing transmission.

[0013] According to another aspect of the embodiments of this application, a secure communication device is also provided, comprising: an information acquisition module, configured to acquire unit information corresponding to computing units in nodes of a target cluster, wherein the target cluster includes a cluster corresponding to a large model platform, the target cluster contains multiple nodes, and each node contains multiple computing units; a key determination module, configured to determine a target key corresponding to a computing unit based on the unit information of the computing unit, wherein each computing unit corresponds to one target key; and an encrypted transmission module, configured to encrypt the data transmitted by the computing units using an Internet Protocol security device based on the target key when the computing units communicate across hosts, so as to achieve secure communication between computing units in different nodes, wherein each node corresponds to one Internet Protocol security device.

[0014] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory and a processor, the processor being configured to run a program stored in the memory, wherein the program executes a secure communication method during runtime.

[0015] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored computer program, wherein the device where the non-volatile storage medium is located executes a secure communication method by running the computer program.

[0016] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program, wherein when the computer program is executed by a processor, the steps of implementing a secure communication method are implemented.

[0017] In this embodiment, the method involves obtaining unit information corresponding to computing units in nodes of a target cluster. The target cluster includes a cluster corresponding to a large-scale model platform, containing multiple nodes, each containing multiple computing units. Based on the unit information of the computing units, a target key corresponding to each computing unit is determined, with each computing unit corresponding to one target key. When computing units communicate across hosts, an Internet Protocol (IP) security device is used to encrypt the data transmitted by the computing units based on the target key, thereby achieving secure communication between computing units in different nodes. This approach, where each node corresponds to one IP security device, provides an efficient encrypted communication architecture through a simplified and highly universal system architecture and a more secure and efficient target encryption algorithm. This achieves the goal of protecting the security of cross-host communication of applications on a Kubernetes-based large-scale model platform, thus solving the technical problems of low encryption / decryption efficiency and inflexible key management in related encrypted communication technologies when dealing with container communication on large-scale model platforms. Attached Figure Description

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

[0019] Figure 1 is a hardware structure block diagram of a computer terminal (or electronic device) for implementing a method of secure communication according to an embodiment of this application;

[0020] Figure 2 is a schematic diagram of a secure communication method according to an embodiment of this application;

[0021] Figure 3 is a schematic diagram of a method for encrypted secure communication on a large model platform according to an embodiment of this application;

[0022] Figure 4 is a schematic diagram of a communication architecture in a target cluster according to an embodiment of this application;

[0023] Figure 5 is a schematic diagram of a secure communication device provided according to an embodiment of this application. Detailed Implementation

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

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

[0026] To facilitate a better understanding of the embodiments of this application by those skilled in the art, some technical terms or nouns involved in the embodiments of this application are explained as follows:

[0027] Kubernetes: An open-source container orchestration engine for automating the deployment, scaling, and management of containerized applications. It can manage containerized applications across multiple hosts, providing features such as resource scheduling, service discovery, autoscaling, and rolling updates.

[0028] CNI: A standard network plugin interface used to define a common specification between container runtimes (such as Docker, rkt, etc.) and network plugins. It enables different network solutions (such as Flannel, Calico, etc.) to be easily integrated with container orchestration systems (such as Kubernetes).

[0029] IPsec (Internet Protocol Security): A suite of protocols used to provide secure IP communication at the network layer. It can encrypt, authenticate, and protect the integrity of IP packets.

[0030] Pod: The smallest deployable and manageable unit of computing in Kubernetes.

[0031] In practice, after a large-scale model platform creates a Virtual Cluster Job (Vcjob), it schedules multiple training Pods onto Node nodes in a Kubernetes cluster. During training, cross-host communication between multiple Pods requires the exchange of a large amount of training data. Related technologies use a service mesh approach to encrypt cross-host communication between Pods, injecting a Sidecar container into each training Pod and establishing a bidirectional TLS (Transport Layer Security) configuration between the two services to achieve encrypted communication. However, the encryption algorithms in these technologies have several shortcomings in large-scale model scenarios.

[0032] First, from a performance perspective, traditional encryption algorithms are computationally inefficient when encrypting and decrypting large amounts of training data. For example, when multiple Pods exchange data simultaneously, encryption and decryption operations consume significant CPU (Central Processing Unit) resources, leading to a decrease in the performance of Pods processing training tasks. Second, they lack flexibility in key management. For dynamically changing Pod environments, timely and efficient key updates and distribution are difficult to achieve, potentially creating security risks and impacting overall communication efficiency and security.

[0033] However, the service mesh approach also has many drawbacks. Its high degree of autonomy, system complexity, and significant performance overhead greatly limit its widespread application, and its high degree of autonomy also significantly restricts security. For example, the complex architecture of the service mesh can experience performance bottlenecks when dealing with specific scenarios such as resource-constrained large-scale container platforms, and due to its complex autonomous logic, security vulnerabilities may be difficult to locate and fix quickly.

[0034] To address the aforementioned issues, this application provides relevant solutions aimed at resolving the problems of service mesh systems being complex, having high performance overhead, and having security limitations due to their high degree of autonomy, as well as the low encryption and decryption efficiency, inflexible key management, and difficulty in adapting to dynamic container environments when dealing with container communication on large-scale platform platforms. These solutions are described in detail below.

[0035] According to an embodiment of this application, a method embodiment for secure communication is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0036] The method embodiments provided in this application can be executed in a mobile terminal, computer terminal, or similar computing device. Figure 1 shows a hardware structure block diagram of a computer terminal (or electronic device) for implementing a secure communication method. As shown in Figure 1, the computer terminal 10 (or electronic device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that the structure shown in Figure 1 is only illustrative and does not limit the structure of the above-described electronic device. For example, the computer terminal 10 may also include more or fewer components than shown in Figure 1, or have a different configuration than shown in Figure 1.

[0037] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or electronic device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0038] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the secure communication method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned secure communication method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0039] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0040] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or electronic device).

[0041] Under the above operating environment, this application embodiment provides a secure communication method. Figure 2 is a schematic diagram of the secure communication method flow according to the embodiment of this application. As shown in Figure 2, the method includes the following steps:

[0042] Step S202: Obtain the unit information corresponding to the computing units in the nodes of the target cluster. The target cluster includes the cluster corresponding to the large model platform. The target cluster contains multiple nodes, and each node contains multiple computing units.

[0043] Step S204: Determine the target key corresponding to the computing unit based on the unit information of the computing unit, wherein each computing unit corresponds to one target key;

[0044] Step S206: When computing units communicate across hosts, an Internet Protocol security device is used to encrypt the data transmitted by the computing units based on the target key, so as to realize secure communication between computing units in different nodes, wherein each node corresponds to an Internet Protocol security device.

[0045] Through the above steps, a simplified and highly universal system architecture and a more secure and efficient target encryption algorithm are used to provide an efficient encrypted communication architecture. This achieves the goal of protecting the cross-host communication security of applications on large-scale Kubernetes platforms, thereby solving the technical problems of low encryption and decryption efficiency and inflexible key management in related encrypted communication technologies when dealing with container communication on large-scale platforms.

[0046] The secure communication method in steps S202 to S206 of the embodiments of this application will be further described below.

[0047] In this embodiment, the target cluster is illustrated using a Kubernetes cluster corresponding to a large model platform. The nodes mentioned above refer to Node nodes in the Kubernetes cluster, and the computing units refer to Pods on the Node nodes. In this embodiment, an IPsec device is created on each Node node, and IPsec tunneling technology is used with a self-developed encryption algorithm to encrypt cross-host container traffic, which is then transmitted through the physical network. Compared with the related technologies that inject companion containers and combine them with traditional encryption algorithms, this embodiment completes communication encryption at the system network layer using a self-developed algorithm, which has higher encryption and decryption efficiency and a dynamic key management mechanism, and has zero intrusion into business operations. Thus, while improving communication security, it does not affect system performance. The details are described below.

[0048] Figure 3 is a schematic diagram of a method flow for encrypted secure communication on a large model platform according to an embodiment of this application, as shown in Figure 3.

[0049] First, install the Kubernetes cluster and deploy the relevant plugins. The specific steps are as follows.

[0050] In some embodiments of this application, before obtaining the unit information corresponding to the computing units in the nodes of the target cluster, the method further includes the following steps: installing the target cluster and setting up a container network interface plugin for the target cluster, wherein the type of the target cluster includes: a Kubernetes cluster, and the container network interface plugin is used to allocate Internet Protocol addresses to the computing units in the target cluster and manage network communication between computing units; determining the operating system type corresponding to each node in the target cluster and configuring software packages corresponding to the operating system type for the nodes, wherein the software packages are used to install Internet Protocol security devices on the operating system corresponding to the nodes.

[0051] Specifically, you can pre-install the official standard version of the Kubernetes cluster, deploy the relevant CNI (Container Network Interface) plugins, and not deploy any third-party network components.

[0052] For example, you can use officially provided tools (such as kubeadm) to install a standard Kubernetes cluster, which includes control plane components (API Server, Controller Manager, Scheduler, etc.) and worker node components (Kubelet, Kube-proxy, etc.). Then, deploy a Kubernetes-enabled CNI plugin to ensure that Pods in the cluster can communicate with each other. This CNI plugin is responsible for assigning IP addresses to Pods and managing network communication between them. At the same time, no additional third-party network components (such as service meshes like Istio or Linkerd) are used in this step. This helps simplify the network architecture and avoids performance or compatibility issues caused by complex network configurations.

[0053] By building the above infrastructure, we can ensure that the Kubernetes cluster can run normally and provide a basic environment for subsequent network configuration; and through the CNI plugin, we can provide Pods with network isolation and communication capabilities while maintaining the simplicity of the network architecture.

[0054] Next, based on the different operating systems of each node in the cluster, you can configure the corresponding software packages for each node according to its operating system type. The specific steps are as follows.

[0055] In some embodiments of this application, the operating system type includes: target type and non-target type, wherein the target type includes: a Linux distribution operating system; configuring a software package corresponding to the operating system type for the node includes: configuring a first software package for the node when the operating system type is a target type, wherein the first software package includes at least one of the following: the libreswan software package; configuring a second software package for the node when the operating system type is a non-target type, wherein the second software package includes at least one of the following: the strongswan software package.

[0056] Specifically, depending on the operating system of the nodes in the cluster, in this embodiment, the libreswan package can be installed on nodes running Red Hat Linux distributions (i.e., the target type mentioned above), and the strongswan package can be installed on nodes running other operating systems (i.e., the non-target type mentioned above).

[0057] Among them, libreswan and strongswan are IPsec implementation packages optimized for different operating systems. This application embodiment ensures that all nodes in the cluster can stably run IPsec devices by selecting IPsec implementations suitable for different operating systems, thereby supporting encrypted communication across hosts.

[0058] To further ensure smooth communication of IPsec devices, after configuring the software packages corresponding to the operating system type on the nodes, it is also necessary to configure the firewall in the system. The specific steps are as follows.

[0059] In some embodiments of this application, after configuring the software package corresponding to the operating system type on the node, the method further includes the following steps: setting the firewall in each node of the target cluster to a closed state to ensure that the communication of Internet Protocol security devices in the target cluster is unrestricted; or, keeping the firewall open and setting the User Datagram Protocol port required for Internet Protocol security devices to communicate.

[0060] Specifically, in this embodiment, if the cluster environment allows, the firewall can be completely turned off to ensure that IPsec communication is unrestricted; or, if it is necessary to keep the firewall on, the specified UDP (User Datagram Protocol) ports required by IPsec need to be opened to ensure that these ports are open on all nodes so that IPsec devices can communicate normally.

[0061] This step ensures smooth communication between IPsec devices, preventing encrypted communication failures caused by firewall restrictions. Furthermore, while ensuring communication security, it allows users to choose whether to disable the firewall based on actual needs, thus improving system flexibility.

[0062] Next, an encryption algorithm can be applied to the target location of each node in the cluster. The specific steps are as follows.

[0063] In some embodiments of this application, the method further includes the following steps: configuring a target encryption algorithm for each node in the target cluster, wherein the target encryption algorithm is used to obtain the unit information corresponding to the computing unit in the node through the config configuration of the target cluster, and generate a target key corresponding to the computing unit based on the unit information, wherein the unit information is the identification information corresponding to the computing unit, including: Internet Protocol address.

[0064] In this embodiment, the target encryption algorithm can be a self-developed encryption algorithm, which can obtain the Pod information (i.e., the unit information) on its current node through the Kubernetes config and generate a dynamic key (i.e., the target key) based on the unique identifier of the Pod.

[0065] Subsequently, the IPsec device can use the dynamic key to perform mutual authentication between two nodes in the cluster. In the case of cross-host communication between computing units, the data transmitted by the computing unit is encrypted based on the target key to achieve secure communication between computing units on different nodes, ensuring the legitimacy of both communicating parties and preventing unauthorized nodes from accessing the communication. For example, after the above series of configurations, the communication architecture in the target cluster is shown in Figure 4.

[0066] The self-developed encryption algorithm in this embodiment is designed based on the analysis of existing encryption algorithms and combined with the special requirements of container communication on large model platforms.

[0067] In terms of algorithm structure, the self-developed encryption algorithm in this embodiment connects to the Kubernetes cluster through configured authentication information. It can monitor events such as the destruction, creation, and update of Pods on the current node in real time and dynamically change the key, which can greatly improve the security of key exchange. The specific steps are as follows.

[0068] In some embodiments of this application, the method further includes the following steps: when a change event is detected in the computing unit in the node, the target key corresponding to the computing unit is updated according to the unit information corresponding to the changed computing unit, wherein the change event includes at least one of the following: destroying the computing unit, creating the computing unit, or updating the computing unit.

[0069] Specifically, in a Kubernetes environment, the lifecycle of a Pod is dynamic and may be frequently created, updated, or destroyed. The self-developed encryption algorithm in this application can monitor these changes in real time and generate and update keys promptly based on the current Pod state. This mechanism ensures that each Pod uses the latest key during runtime, thereby reducing the risk of key leakage or cracking. Furthermore, by dynamically generating keys, even if a key is leaked at some point, attackers cannot use it for unauthorized access for an extended period because the key will be updated within a short time. This short-lifecycle key management strategy greatly improves key security and reduces potential security risks.

[0070] Furthermore, container communication within large model platforms involves a large amount of highly sensitive data, such as model training data and user privacy data. While general encryption algorithms in related technologies can provide a certain level of security, they may suffer from inefficiency or inflexible key management when faced with the specific needs of large model platforms. The encryption algorithm in this embodiment is designed with the usage characteristics of large model platforms in mind. For the transmission of large data blocks commonly found in large model platforms, specialized block encryption and decryption techniques can be employed to improve encryption and decryption speed. System overhead is reduced by decreasing memory usage and minimizing the amount of encryption header information transmitted over the network. Details are as follows.

[0071] In some embodiments of this application, the target key includes: a symmetric key and an asymmetric encryption key; encrypting the data transmitted by the computing unit based on the target key includes the following steps: determining the block size based on the data size of the data to be transmitted by the computing unit and the system resource load status; dividing the data to be transmitted according to the block size to obtain multiple data blocks; encrypting the data blocks using a symmetric key to obtain encrypted data blocks, wherein each data block corresponds to a symmetric key; encrypting the symmetric key using an asymmetric encryption key, and sending the encrypted symmetric key and the encrypted data blocks to the computing unit for computing transmission.

[0072] Specifically, large data blocks can be divided into multiple smaller blocks based on the size of the data to be transmitted and system resources. For example, each data block can be set to 4MB. A symmetric key (such as an AES key) is generated for each data block. Symmetric encryption algorithms (such as AES) have high encryption and decryption speeds. Each data block is encrypted using the generated symmetric key, and the encryption process can be processed in parallel to further improve efficiency. Afterward, an asymmetric encryption algorithm (such as RSA) is used to encrypt the symmetric key to ensure secure key transmission.

[0073] During data transmission, the encrypted symmetric key can be transmitted along with the encrypted data blocks over the network to the target node. This ensures that the receiver can correctly decrypt and merge the data blocks. After receiving the data, the receiver uses the private key of the asymmetric encryption to decrypt the symmetric key, thus ensuring that only the legitimate receiver can decrypt the symmetric key. Then, the decrypted symmetric key is used to decrypt each data block. The decryption process can also be processed in parallel to improve efficiency. Finally, the decrypted data blocks are merged in order to restore the original data.

[0074] This block encryption and merge decryption technique can efficiently handle the encrypted transmission of large data blocks while ensuring communication security and data integrity.

[0075] The following example illustrates the process of secure container communication across hosts in the target cluster configured as described above.

[0076] Assuming Pod A is running on Node 1 and needs to communicate with Pod B running on Node 2, Pod A can send requests to the network interface of Node 1 via Kubernetes network plugins. The IPsec device on Node 1 is configured to intercept all cross-host network traffic. When Pod A's data packets arrive at the network interface of Node 1, the IPsec device captures these packets. The IPsec device then uses a proprietary encryption algorithm to encrypt the data packets. This algorithm generates a dynamic key based on Pod A's unique identifier (e.g., IP address) and uses this key to encrypt the data packets. The encrypted data packets may include an additional IPsec header to identify the encrypted information.

[0077] Next, the encrypted data packet is sent from Node 1 to Node 2 via the physical network (such as Ethernet, fiber optic, etc.). Upon receiving the encrypted data packet, the IPsec device on Node 2 recognizes it as an IPsec packet requiring decryption. The IPsec device uses a proprietary encryption algorithm and a dynamic key to decrypt the packet. During decryption, the IPsec device verifies the packet's origin and integrity. This is accomplished through authentication using the dynamic key, ensuring the packet indeed originates from the legitimate Node 1. If authentication fails (e.g., key mismatch or packet tampering), the packet is discarded, and communication is interrupted. The decrypted data packet is then passed to Pod B via Node 2's network interface. Once Pod B receives the data, it can process the request normally, just like it would any other unencrypted network traffic.

[0078] Through the above process, cross-host container communication is encrypted and authenticated during transmission, ensuring the confidentiality, integrity, and legitimacy of data. Self-developed encryption algorithms and dynamic key management mechanisms further enhance communication security, while IPsec devices' interception and processing at the network layer ensure the transparency and efficiency of the entire process. This design not only protects sensitive data but also ensures the overall security of container communication on large-scale platform models.

[0079] This application's solution is based on the Kubernetes open CNI interface and uses Linux IPsec technology to implement a cross-host communication scheme in Kubernetes, achieving encrypted pod communication. Compared to related technologies that use companion containers for encrypted communication, this method directly utilizes existing technology interfaces and protocols at the network layer, avoiding intrusion into business operations and achieving zero intrusion. While ensuring communication security, it does not affect the normal operation of business, avoiding the problem of security measures interfering with business logic or performance, greatly improving the overall stability and resource utilization of the large-scale platform, while also improving communication security and efficiency.

[0080] Furthermore, this application's solution addresses the common large data block transmission on large-scale model platforms. Based on a self-developed encryption algorithm, it employs specialized block encryption and merging / decryption techniques to improve encryption algorithm efficiency. By configuring authentication information to connect to the Kubernetes cluster, it monitors events such as Pod destruction, creation, and updates on the current node in real time, thereby dynamically changing the key and implementing a dynamic key management mechanism.

[0081] Among its features, the dynamic key management mechanism in the self-developed encryption algorithm can update keys in a timely manner according to the dynamic changes of Pods, preventing key leakage or cracking and greatly improving the security of key exchange. Simultaneously, dynamic keys generated based on Pod information are used for mutual authentication between nodes, ensuring the legitimacy of both communicating parties and effectively preventing unauthorized nodes from accessing the communication. Furthermore, the use of IPsec devices combined with the self-developed encryption algorithm at the network layer to encrypt container traffic provides comprehensive protection against data leakage and tampering during network transmission, ensuring the security of container communication on large-scale platform models.

[0082] The block encryption and merge decryption techniques in the self-developed encryption algorithm improve the speed of encryption and decryption, reduce data processing time, and thus enhance the performance of containers in handling training tasks and other business operations. At the same time, by reducing memory usage and minimizing encryption header information in network transmission, system overhead is reduced, enabling the system to utilize resources more efficiently and avoiding performance degradation caused by encryption operations.

[0083] According to an embodiment of this application, a secure communication device is also provided. Figure 5 is a schematic diagram of the structure of a secure communication device provided according to an embodiment of this application. As shown in Figure 5, the device includes:

[0084] The information acquisition module 50 is used to acquire the unit information corresponding to the computing units in the nodes of the target cluster. The target cluster includes the cluster corresponding to the large model platform. The target cluster contains multiple nodes, and each node contains multiple computing units.

[0085] The key determination module 52 is used to determine the target key corresponding to the computing unit based on the unit information of the computing unit, wherein each computing unit corresponds to one target key;

[0086] The encrypted transmission module 54 is used to encrypt the data transmitted by the computing unit using an Internet Protocol security device based on the target key when the computing unit is communicating across hosts, so as to realize secure communication between computing units in different nodes. Each node corresponds to an Internet Protocol security device.

[0087] In some embodiments, the key determination module 52 is further configured to: when a change event is detected in the computing unit in the node, update the target key corresponding to the computing unit according to the unit information corresponding to the changed computing unit, wherein the change event includes at least one of the following: destroying the computing unit, creating the computing unit, or updating the computing unit.

[0088] In some embodiments, before obtaining the unit information corresponding to the computing units in the nodes of the target cluster, the secure communication device is further configured to: install the target cluster and set up a container network interface plugin for the target cluster, wherein the type of the target cluster includes: a Kubernetes cluster, the container network interface plugin is used to allocate Internet Protocol addresses to the computing units in the target cluster and manage network communication between computing units; determine the operating system type corresponding to each node in the target cluster and configure a software package corresponding to the operating system type for the node, wherein the software package is used to install Internet Protocol security devices on the operating system corresponding to the node.

[0089] In some embodiments, the operating system type includes: target type and non-target type, wherein the target type includes: a Linux distribution operating system; configuring a software package corresponding to the operating system type for the node includes: configuring a first software package for the node when the operating system type is a target type, wherein the first software package includes at least one of the following: the libreswan software package; configuring a second software package for the node when the operating system type is a non-target type, wherein the second software package includes at least one of the following: the strongswan software package.

[0090] In some embodiments, after configuring the software package corresponding to the operating system type on the node, the secure communication device is further configured to: set the firewalls on each node in the target cluster to a closed state to ensure that the communication of Internet Protocol security devices in the target cluster is unrestricted; or, keep the firewalls open and set the User Datagram Protocol (UDP) ports required for Internet Protocol security devices to communicate.

[0091] In some embodiments, the secure communication device is further configured to: configure a target encryption algorithm for each node in the target cluster, wherein the target encryption algorithm is configured to obtain the unit information corresponding to the computing unit in the node through the config configuration of the target cluster, and generate a target key corresponding to the computing unit based on the unit information, wherein the unit information is the identification information corresponding to the computing unit, including: Internet Protocol address.

[0092] In some embodiments, the target key includes: a symmetric key and an asymmetric encryption key; encrypting the data transmitted by the computing unit based on the target key includes: determining the block size based on the data size of the data to be transmitted by the computing unit and the system resource load status; dividing the data to be transmitted according to the block size to obtain multiple data blocks; encrypting the data blocks using the symmetric key to obtain encrypted data blocks, wherein each data block corresponds to a symmetric key; encrypting the symmetric key using the asymmetric encryption key, and sending the encrypted symmetric key and the encrypted data blocks to the computing unit for computing transmission.

[0093] It should be noted that each module in the above-mentioned secure communication device can be a program module (e.g., a set of program instructions to implement a certain function) or a hardware module. For the latter, it can be manifested in the following forms, but is not limited to them: each of the above modules is manifested as a processor, or the functions of each of the above modules are implemented by a processor.

[0094] It should be noted that the secure communication device provided in this embodiment can be used to execute the secure communication method shown in FIG2. Therefore, the relevant explanations and descriptions of the above-mentioned secure communication method also apply to the embodiments of this application, and will not be repeated here.

[0095] This application embodiment also provides a non-volatile storage medium, which includes a stored computer program. The device containing the non-volatile storage medium executes the following secure communication method by running the computer program: obtaining unit information corresponding to computing units in nodes of a target cluster, wherein the target cluster includes a cluster corresponding to a large model platform, the target cluster contains multiple nodes, and each node contains multiple computing units; determining a target key corresponding to the computing unit based on the unit information of the computing unit, wherein each computing unit corresponds to one target key; and, in the case of cross-host communication between computing units, using an Internet Protocol (IP) security device to encrypt the data transmitted by the computing units based on the target key, thereby achieving secure communication between computing units in different nodes, wherein each node corresponds to one IP security device.

[0096] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the secure communication method described in various embodiments of this application: obtaining unit information corresponding to computing units in nodes of a target cluster, wherein the target cluster includes a cluster corresponding to a large model platform, the target cluster contains multiple nodes, and each node contains multiple computing units; determining a target key corresponding to the computing unit based on the unit information of the computing unit, wherein each computing unit corresponds to one target key; and, in the case of cross-host communication between computing units, using an Internet Protocol security device to encrypt the data transmitted by the computing units based on the target key, so as to achieve secure communication between computing units in different nodes, wherein each node corresponds to one Internet Protocol security device.

[0097] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. In the above embodiments of this application, the descriptions of each embodiment have their own emphasis, and for parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

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

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

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

[0101] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

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

Claims

1. A secure communication method, comprising: Obtain the unit information corresponding to the computing units in the nodes of the target cluster, wherein the target cluster includes a cluster corresponding to a large model platform, the target cluster contains multiple nodes, and each node contains multiple computing units; Based on the unit information of the computing unit, a target key corresponding to the computing unit is determined, wherein each computing unit corresponds to one target key; In the case of cross-host communication between the computing units, an Internet Protocol security device is used to encrypt the data transmitted by the computing units according to the target key, so as to realize secure communication between the computing units in different nodes, wherein each node corresponds to one Internet Protocol security device.

2. The secure communication method according to claim 1 further includes: If a change event is detected in the computing unit in the node, the target key corresponding to the computing unit is updated according to the unit information corresponding to the changed computing unit. The change event includes at least one of the following: destroying the computing unit, creating the computing unit, or updating the computing unit.

3. The secure communication method of claim 1, wherein, Before obtaining the unit information corresponding to the computing unit in the nodes of the target cluster, the method further includes: Install the target cluster and set up a container network interface plugin for the target cluster, wherein the type of the target cluster includes: a Kubernetes cluster, and the container network interface plugin is used to assign Internet Protocol addresses to the computing units in the target cluster and manage network communication between the computing units; The operating system type corresponding to each node in the target cluster is determined, and a software package corresponding to the operating system type is configured for each node, wherein the software package is used to install the Internet Protocol security device on the operating system corresponding to the node.

4. The secure communication method of claim 3, wherein, The operating system type includes: target type and non-target type, wherein the target type includes: Linux distribution operating system; configuring the software package corresponding to the operating system type for the node includes: When the operating system type is the target type, a first software package is configured for the node, wherein the first software package includes at least one of the following: the libreswan software package; In the case where the operating system type is the non-target type, a second software package is configured for the node, wherein the second software package includes at least one of the following: the strongswan software package.

5. The secure communication method of claim 3, wherein, After configuring the software package corresponding to the operating system type on the node, the method further includes: The firewalls on each node in the target cluster are set to be disabled to ensure that the communication of the Internet Protocol security devices in the target cluster is unrestricted. Alternatively, keep the firewall enabled and configure the Internet Protocol security device to use the User Datagram Protocol (UDP) ports required for communication.

6. The secure communication method according to claim 1 further includes: Configure a target encryption algorithm for each node in the target cluster, wherein the target encryption algorithm is used to obtain the unit information corresponding to the computing unit in the node through the config configuration of the target cluster, and generate the target key corresponding to the computing unit based on the unit information, wherein the unit information is the identification information corresponding to the computing unit, including: Internet Protocol address.

7. The secure communication method of claim 1, wherein, The target key includes: a symmetric key and an asymmetric encryption key; encrypting the data transmitted by the computing unit based on the target key includes: The block size is determined based on the data size of the data that the computing unit plans to transmit and the system resource load status; The data to be transmitted is divided into multiple data blocks according to the block size. The data block is encrypted using the symmetric key to obtain an encrypted data block, wherein each data block corresponds to one symmetric key; The asymmetric encryption key is used to encrypt the symmetric key, and the encrypted symmetric key and the encrypted data block are sent to the computing unit for computational transmission.

8. The secure communication method of claim 7, wherein, The process of dividing the data to be transmitted into multiple data blocks according to the block size includes: The data to be transmitted is divided into multiple data blocks of 4MB each.

9. The secure communication method of claim 7, wherein, The symmetric key is an AES key, and the asymmetric encryption key is an RSA key.

10. A secure communication device, comprising: The information acquisition module is used to acquire the unit information corresponding to the computing units in the nodes of the target cluster, wherein the target cluster includes a cluster corresponding to a large model platform, the target cluster contains multiple nodes, and each node contains multiple computing units; A key determination module is used to determine a target key corresponding to the computing unit based on the unit information of the computing unit, wherein each computing unit corresponds to one target key; An encrypted transmission module is used to encrypt the data transmitted by the computing units using an Internet Protocol security device based on the target key when the computing units are communicating across hosts, so as to achieve secure communication between the computing units in different nodes, wherein each node corresponds to one Internet Protocol security device.

11. An electronic device comprising: A memory and a processor, the processor being configured to run a program stored in the memory, wherein the program, when executed, performs the secure communication method according to any one of claims 1 to 9.

12. A non-transitory storage medium including a stored computer program, wherein, The device containing the non-volatile storage medium executes the secure communication method according to any one of claims 1 to 9 by running the computer program.

13. A computer program product comprising a computer program, wherein, When the computer program is executed by a processor, it implements the steps of the secure communication method according to any one of claims 1 to 9.