Network access method, device, equipment and medium

By using container network interfaces and mapping relationship libraries in cloud computing, we can judge the tasks belonging to the container group and control network access, and solve the problem of access request processing between different types of network cards, achieving task-level network isolation and security improvement.

CN119071071AActive Publication Date: 2024-12-03BEIJING VOLCANO ENGINE TECH CO LTD

Patent Information

Application Number
CN202411204937.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-03
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

In cloud computing scenarios, when container groups are configured with different types of network cards, it is difficult to achieve task-level network isolation. The existing technology cannot effectively handle access requests between different types of network cards, resulting in poor network isolation.

Method used

By receiving target access requests between container groups, use the target plug-in in the container network interface to determine whether the container group belongs to the same task. If so, access is allowed, otherwise access will be blocked; use the mapping relationship library to match the network card address and task tag to determine The task to which the container group belongs, realizes unified network access control for different types of network cards.

Benefits of technology

It realizes task-level network isolation, covers multiple network card types in container groups, improves network access security and flexibility, ensures normal access between container groups of the same task, and reduces the cost of network isolation adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071071A_ABST
    Figure CN119071071A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a network access method and device, equipment and a medium, and the method comprises the steps: receiving a target access request sent by a first container group through a first network card, and the target access request comprises a first network card address of the first network card and a second network card address of a second network card of an accessed second container group; sending the target access request to a target plug-in corresponding to the first network card in the container network interface; and if the target plug-in determines that the first container group and the second container group belong to the same task based on the first network card address and the second network card address, sending the target access request to a second network card corresponding to the second network card address of the second container group. Therefore, access is allowed between the container groups of the same task, task-level network isolation is realized, various network card types in the container groups are covered, full-coverage unified network access control is realized, and the security of network access is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of cloud computing, and in particular to a network access method, device, equipment and medium. Background Art

[0002] In cloud computing scenarios, cloud service providers of Model as a Service (MaaS) can provide large models as services to users. Users hope that their model-related tasks can be run in an isolated network environment. A task can be composed of one container group (Pod) or multiple container groups. In the related technology, task-level network isolation can be achieved for a certain type of network card in the container group, but when the container group is configured with different types of network cards, it is difficult to achieve task-level network isolation. Summary of the invention

[0003] In order to solve the above technical problems, the present disclosure provides a network access method, device, equipment and medium.

[0004] The present disclosure provides a network access method, the method comprising:

[0005] Receive a target access request sent by the first container group through the first network card, wherein the target access request includes a first network card address of the first network card and a second network card address of a second network card of the second container group to be accessed;

[0006] Sending the target access request to a target plug-in corresponding to the container network interface of the first network card;

[0007] If it is determined by the target plug-in based on the first network card address and the second network card address that the first container group and the second container group belong to the same task, the target access request is sent to the second network card corresponding to the second network card address of the second container group.

[0008] The present disclosure also provides a network access device, the device comprising:

[0009] A receiving module, configured to receive a target access request sent by a first container group through a first network card, wherein the target access request includes a first network card address of the first network card and a second network card address of a second network card of a second container group to be accessed;

[0010] A first sending module, configured to send the target access request to a target plug-in corresponding to the container network interface of the first network card;

[0011] a second sending module, configured to send the target access request to a second network card corresponding to the second network card address of the second container group if it is determined by the target plug-in based on the first network card address and the second network card address that the first container group and the second container group belong to the same task.

[0012] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the network access method provided by the embodiment of the present disclosure.

[0013] The embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the network access method provided by the embodiment of the present disclosure.

[0014] The technical solution provided by the embodiment of the present disclosure has the following advantages over the prior art: the network access solution provided by the embodiment of the present disclosure receives a target access request sent by the first container group through the first network card, wherein the target access request includes the first network card address of the first network card and the second network card address of the second network card of the second container group to be accessed; sends the target access request to the target plug-in corresponding to the first network card in the container network interface; if it is determined through the target plug-in based on the first network card address and the second network card address that the first container group and the second container group belong to the same task, then sends the target access request to the second network card corresponding to the second network card address of the second container group. By adopting the above technical solution, the received target access request can be sent to the target plug-in of the first network card in the container network interface. The target plug-in determines whether the container group belongs to the same task according to the network card addresses of the two container group network cards. If so, access is allowed, and the target access request is sent to the second network card. Different plug-ins are set through the container network interface to process access requests of different types of network cards in the container group respectively. Access is allowed between container groups of the same task. Not only task-level network isolation is achieved, but also multiple network card types in the container group are covered, achieving full coverage of unified network access control, thereby improving the security of network access. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0016] Figure 1 A flowchart of a network access method provided in some embodiments of the present disclosure;

[0017] Figure 2 A schematic diagram of a deployment of a network access method provided in some embodiments of the present disclosure;

[0018] Figure 3 A flowchart of another network access method provided in some embodiments of the present disclosure;

[0019] Figure 4 A schematic diagram of a network card in a node provided in some embodiments of the present disclosure;

[0020] Figure 5 A flowchart of another network access method provided for some embodiments of the present disclosure;

[0021] Figure 6 A schematic diagram of the architecture of a control panel platform provided for some embodiments of the present disclosure;

[0022] Figure 7 A schematic diagram of the structure of a network access device provided in some embodiments of the present disclosure;

[0023] Figure 8 A schematic diagram of the structure of an electronic device provided for some embodiments of the present disclosure. DETAILED DESCRIPTION

[0024] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0025] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0026] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0027] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0030] The large model is also called the Large Language Model (LLM). The large model is a natural language processing model that can automatically learn the rules and structure of the language, understand the meaning of the language, and generate text with correct grammar and semantic coherence based on the understood meaning. The large model can also generate images from text, generate videos from text, and so on.

[0031] In the cloud computing scenario, a cloud service provider (Cloud Service Provider, CSP) of Model as a Service can take over the large model of the model supplier (Vendor), and then provide inference, fine-tuning and other services based on the large model. Users hope that their model-related tasks can run in an isolated network environment. In the related technology, task-level network isolation can be achieved for a certain type of network card in the container group. However, when the container group has different network devices, the container group is usually configured with different types of network cards. It is difficult to achieve task-level network isolation for these different types of network cards, that is, it is difficult to achieve fine-grained isolation between tasks in the east-west direction.

[0032] In order to solve the above problems, the embodiments of the present disclosure provide a network access method, which is introduced below in conjunction with specific embodiments.

[0033] Figure 1 A flowchart of a network access method provided in some embodiments of the present disclosure, the method can be executed by a network access device, a cloud service platform, or a container network interface (CNI), the cloud service platform can be a software platform that provides cloud services, wherein the device can be implemented by software and / or hardware, and can generally be integrated in an electronic device. Figure 1 As shown, the method includes:

[0034] Step 101: Receive a target access request sent by a first container group through a first network card, wherein the target access request includes a first network card address of the first network card and a second network card address of a second network card of a second container group to be accessed.

[0035] The first container group may be a container group that initiates network access. The second container group may be a container group that accepts network access. The container group may be the smallest scheduling unit in container technology. The container group may include one or more containers. Each container in the same container group shares resources. Tasks such as model reasoning and model fine-tuning (Supervised Fine-Tuning, SFT) may be performed in the container group. The container group may be used to execute tasks of the user.

[0036] The first network card can be used for network communication of the first container group, and the first network card can be a network card configured for the first container group. The first network card address can be an Internet Protocol (IP) address of the first network card. The second network card can be used for network communication of the second container group, and the second network card can be a network card configured for the second container group. The second network card address can be an Internet Protocol address of the second network card. The target access request can be a network access request sent by the first container group for accessing the second container group.

[0037] In the embodiment of the present disclosure, when the first container group needs to access the second container group, the first container group determines the first network card address of the first network card corresponding to itself and the second network card address of the second network card corresponding to the second container group. And generates a target access request according to the first network card address and the second network card address, and the first container group sends the target access request to the network access device through the first network card. The network access device receives the target access request.

[0038] Step 102: Send the target access request to the target plug-in corresponding to the container network interface of the first network card.

[0039] Among them, the container network interface (CNI) can be a standard interface that provides network configuration for the container group. The container network interface can define a set of interface specifications, and provide specification documents and standard implementations. Through the container network interface, the container group can interact with the remote network interface card (RNIC) or the network interface card (NIC).

[0040] The container network interface may correspond to the node where the container group is located. Figure 2A schematic diagram of a deployment of a network access method provided in some embodiments of the present disclosure, such as Figure 2 As shown, if container group A and container group B are in node A, and container group C and container group D are in node B, container group A and container group B in node A can correspond to container network interface 1, and container group C and container group D in node B can correspond to container network interface 2.

[0041] The target plug-in may be a plug-in that processes the access request sent by the first network card. The target plug-in may be used to determine whether the container group that initiates the network access and the container group that is accessed belong to the same task. This embodiment does not limit the programming language of the target plug-in.

[0042] In the embodiment of the present disclosure, after receiving the target access request, the network access device determines the target plug-in corresponding to the first network card sending the target access request in the container network interface, and sends the target access request to the target plug-in.

[0043] In some embodiments of the present disclosure, the container network interface includes multiple plug-ins, each plug-in corresponds to a network card type of the container group. For example, the container network interface 1 corresponding to the container group A includes plug-in 1 and plug-in 0, plug-in 1 corresponds to the primary network card of the container group A, and plug-in 0 corresponds to the auxiliary network card of the container group A. Accordingly, sending a target access request to the target plug-in corresponding to the first network card in the container network interface includes: determining the target network card type of the first network card; determining the target plug-in corresponding to the target network card type among the multiple plug-ins included in the container network interface, and sending the target access request to the target plug-in.

[0044] The target network card type may be the network card type of the first network card, which includes but is not limited to the primary network card (eth0) and the secondary network card (eth1-n), where n is a positive integer. The secondary network card may be a network card with remote direct memory access (RDMA) function. The plug-in may correspond to the network card type, and the primary network card and the secondary network card may correspond to different plug-ins. Optionally, in the container network interface, one or more corresponding plug-ins are set for each network card type.

[0045] In some embodiments of the present disclosure, the second network card has the same network card type as the first network card. For example, the first network card and the second network card can both be primary network cards, or the first network card and the second network card can both be auxiliary network cards. The network access is implemented between network cards of the same network card type between two container groups.

[0046] In this embodiment, an address type correspondence relationship between the network card address and the network card type is pre-set, and the network access device can query and process the address type correspondence relationship according to the first network card address, and determine the network card type corresponding to the first network card address as the target network card type. Further, among the multiple plug-ins included in the container network interface, the plug-in whose network port type is the target network card type is determined as the target plug-in, and the target access request is sent to the target plug-in.

[0047] In the above solution, when different types of network cards are configured in the container group, different plug-ins are used to process access requests sent by network cards of different types, thereby achieving comprehensive processing of the content sent by the container group and creating a foundation for achieving task-level network isolation in this scenario.

[0048] Step 103: If the target plug-in determines that the first container group and the second container group belong to the same task based on the first network card address and the second network card address, send the target access request to the second network card corresponding to the second network card address of the second container group.

[0049] Among them, the task may include one or more tasks issued or executed by the user on the cloud service platform. Exemplarily, the task is a model-related task of the user, or the task may be a computing-related task of the user. For example, the task may include model reasoning and / or model fine-tuning. The task may have a single or multiple container groups.

[0050] In the disclosed embodiment, after receiving the target access request, the target plug-in checks the target access request according to the preset access rules. The embodiment does not limit the method of implementing the access rules. Specifically, the target plug-in can parse the target access request, obtain the first network card address and the second network card address, and determine whether the first container group and the second container group belong to the same task based on the first network card address and the second network card address. If so, since network access can be performed between container groups within the same task, the network access device will send the target access request of the first container group to the second network card of the second container group through the remote network interface card or the network interface card, and the second container group will receive the target access request through the second network card. Figure 2As shown, if the first container group is container group A, the first network card is the primary network card of container group A, and the second container group is container group C. Assuming that container group A and container group C belong to the same task through plug-in 0 in container network interface 1, plug-in 0 in container network interface 1 sends the target access request to the remote network interface card or network interface card corresponding to container network interface 1, and the remote network interface card or network interface card corresponding to container network interface 1 sends the target access request to the remote network interface card or network interface card corresponding to container network interface 2, and the remote network interface card or network interface card corresponding to container network interface 2 sends the target access request to the primary network card of container group C through container network interface 2.

[0051] If the first container group and the second container group do not belong to the same task, since network isolation is required between container groups of different tasks, the network access device blocks the sending of the target access request to the second network card to prevent the first container group from performing network access across tasks.

[0052] Figure 3 A flowchart of another network access method provided by some embodiments of the present disclosure is shown as follows: Figure 3 As shown, in some embodiments of the present disclosure, determining that the first container group and the second container group belong to the same task based on the first network card address and the second network card address through the target plug-in includes:

[0053] Step 301: Obtain a mapping relationship library through a target plug-in.

[0054] In some embodiments of the present disclosure, the mapping relationship library includes multiple network card addresses and multiple task tags with mapping relationships, and each network card address has a mapping relationship with a task tag, that is, each network card address can correspond to a task. A task tag can have a mapping relationship with one or more network card addresses, that is, a task can correspond to multiple network cards. The task tag can be used to identify the task to which the container group corresponding to the network card address belongs. One or more plug-ins can jointly maintain a mapping relationship library and obtain the mapping relationship in the mapping relationship library. This embodiment does not limit the storage location of the mapping database. Optionally, the mapping relationship stored in the mapping relationship library can be dynamically adjusted according to the needs of the user.

[0055] In this embodiment, the target plug-in may obtain the mapping relationship library after receiving the target access request, or the target plug-in may obtain the mapping relationship library and then obtain the target access request, which is not limited in this embodiment.

[0056] Step 302: Match the first network card address and the second network card address in the mapping relationship library respectively through the target plug-in, and determine the first task label corresponding to the successfully matched first network card address and the second task label corresponding to the second network card address.

[0057] The first task label may represent the task to which the first container group belongs, and the second task label may represent the task to which the second container group belongs.

[0058] In this embodiment, the target plug-in can query and process the mapping relationship library according to the first network card address, determine the task tag corresponding to the first network card address as the first task tag, and query and process the mapping relationship library according to the second network card address, and determine the task tag corresponding to the second network card address as the second task tag.

[0059] Step 303: If the first task label and the second task label are the same, it is determined that the first container group and the second container group belong to the same task.

[0060] In this embodiment, the target plug-in can determine whether the first task label and the second task label are the same. If so, it is determined that the first container group corresponding to the first task label and the second container group corresponding to the second task label belong to the same task. Otherwise, it is determined that the first container group and the second container group do not belong to the same task.

[0061] For example, if in the mapping relationship library, IP1 and Grp1 have a mapping relationship, IP2 and Grp1 have a mapping relationship, and the first network card address is IP1, and the second network card address is IP2. Since the task labels corresponding to the first network card address and the second network card address are both Grp1, it is determined that the first container group and the second container group belong to the same task.

[0062] In the above scheme, the mapping relationship between the network card address and the task label recorded in the mapping relationship library is used to determine whether the container group belongs to the same task, and the mapping relationship can be dynamically adjusted, which improves the flexibility of network isolation between container groups and reduces the cost of adjusting the existing network isolation.

[0063] by Figure 2 For example, Figure 2As shown, container group A and container group C belong to the same task, forming an isolated network X, corresponding to the same task label Grp1; container group B and container group D belong to the same task, forming an isolated network Y, corresponding to the same task label Grp2. Plugin 0 in container network interface 1 is of the same plug-in type as plugin 0 in container network interface 2, and plugin 1 in container network interface 1 is of the same plug-in type as plugin 1 in container network interface 2. The plug-in corresponding to the primary network card of container group A is plugin 0 in container network interface 1, and the plug-in corresponding to the secondary network card of container group A is plugin 1 in container network interface 1; the plug-in corresponding to the primary network card of container group C is plugin 0 in container network interface 2, and the plug-in corresponding to the secondary network card of container group C is plugin 1 in container network interface 2. Container network interface 1 and container network interface 2 exchange data through remote network interface cards or network interface cards.

[0064] When performing network access, the corresponding plug-in in the container network interface will process the corresponding traffic and determine the first network card address of the first network card that initiates the access and the first task tag corresponding to the first network card address according to the target access request. And determine the second network card address of the second network card as the access destination and the second task tag corresponding to the second network card address. Determine whether the first task tag and the second task tag match. If they match, the target access request is released. If they do not match, the target access request is not released.

[0065] Figure 4 A schematic diagram of a network card in a node provided in some embodiments of the present disclosure, such as Figure 4 As shown, each container group has a primary network card and a secondary network card. In each node, the primary network card is mapped to the virtual machine network card (Secondary Elastic Network Interface). The secondary network card is mapped to the remote direct memory access network card (RDMA Elastic Network Interface, RDMAENI). Figure 4 In the example, the host network card (Primary Elastic Network Interface) can be the network interface used by the host, and the virtual machine network card can be the network interface used by the virtual machine container.

[0066] The network access scheme provided by the embodiment of the present disclosure receives a target access request sent by the first container group through the first network card, wherein the target access request includes the first network card address of the first network card and the second network card address of the second network card of the second container group to be accessed; sends the target access request to the target plug-in corresponding to the first network card in the container network interface; if the first container group and the second container group are determined to belong to the same task based on the first network card address and the second network card address through the target plug-in, the target access request is sent to the second network card corresponding to the second network card address of the second container group. With the above technical scheme, the received target access request can be sent to the target plug-in of the first network card in the container network interface, and the target plug-in determines whether the container group belongs to the same task according to the network card addresses of the two container group network cards. If so, access is allowed, and the target access request is sent to the second network card. Different plug-ins are set through the container network interface to process access requests of different types of network cards in the container group respectively, and access is allowed between container groups of the same task, which not only realizes task-level network isolation, but also covers multiple network card types in the container group, and realizes full coverage of unified network access control, thereby improving the security of network access.

[0067] In some embodiments of the present disclosure, the network access method further includes: when the first container group is destroyed, the plug-in in the container network interface corresponding to the first container group and the access rule corresponding to the container group will be destroyed. Thus, computer space is released and invalid occupation of computer space is avoided.

[0068] In some embodiments of the present disclosure, after determining the first task tag corresponding to the first network card address and the second task tag corresponding to the second network card address that are successfully matched, the network access method further includes: if the first task tag and / or the second task tag is a service tag, determining that the first container group and the second container group meet the access condition.

[0069] The service tag may be used to mark a service container group. This embodiment does not limit the service tag. For example, the service tag may be Grp-Service. The service container group may be a container group that provides system services. The system service may be understood as a service that is not directly related to the task and is related to the system itself. This embodiment does not limit the system service. For example, the system service may include system storage services, system network services, and the like.

[0070] In this embodiment, after determining the first task tag and the second task tag, the target plug-in can determine whether at least one of the first task tag and the second task tag is a service tag. If so, it means that at least one of the first container group and the second container group is a service container group. Specifically, if the first task tag is a service tag, it means that the first container group is a service container group. If the second task tag is a service tag, it means that the second container group is a service container group. If the first task tag and the second task tag are service tags, it means that both the first container group and the second container group are service container groups. Since network access can be performed between the service container group and other container groups, it is determined that the first container group and the second container group meet the access conditions, and the target access request is sent to the second network card corresponding to the second network card address of the second container group. Figure 2 As shown, the host network includes a service container group in node A and a service container group in node B. The service container group can perform network access to other container groups.

[0071] Optionally, the task label of the service container group can be adjusted from the service label to another task label, so as to adjust the service container group to a container group to which the task belongs, and perform network access between the container groups to which the task belongs, and no longer have the function of performing network access with all container groups.

[0072] In the above solution, when there is a service container group in the first container group and the second container group, network access is performed between the two container groups, thereby ensuring that the system service can be carried out normally.

[0073] Figure 5 A flowchart of another network access method provided in some embodiments of the present disclosure is as follows: Figure 5 As shown, the network access method also includes:

[0074] Step 501: In response to a creation operation of at least one target container group corresponding to a target task, assign a target task label to the at least one target container group.

[0075] The target task may be a task currently being configured with a container group. The target container group may be a container group configured to the target task. The creation operation may be an operation of creating a container group to which the task belongs. This embodiment does not limit the creation operation. For example, the creation operation may be a trigger operation for creating a control, or the creation operation may be a start operation for the target container group. The target task tag may be used to mark the target task to which the target container group belongs.

[0076] In this embodiment, the administrator of the container group can select at least one target container group required to achieve the target task, and then the administrator performs a creation operation. In response to the creation operation, the network access device assigns the target task tag corresponding to the target task to the at least one target container group.

[0077] In some embodiments of the present disclosure, assigning a target task label to at least one target container group includes: assigning a task identifier of the target task as the target task label to each target container group. The task identifier may be a unique identifier of the target task, the task identifier may be non-customized, or the task identifier may be an existing identifier. This embodiment does not limit the task identifier, for example, the task identifier may be the name of the target task or the serial number of the target task.

[0078] In this embodiment, the network access device can obtain the task identifier of the target task and assign the task identifier as the target task tag to the target container group to which the target task belongs. Thus, the existing task identifier is used as the target task tag to avoid identifier confusion caused by introducing other identifiers.

[0079] In some embodiments of the present disclosure, assigning a target task label to at least one target container group includes: assigning a custom identifier of the target task as a target task label to each target container group. Thus, the label can be customized according to the needs of the user, which enhances the comprehensibility of the label.

[0080] Step 502: Establish multiple mapping relationships between multiple network card addresses of multiple network cards included in each target container group and target task tags respectively.

[0081] In this embodiment, the network access device can obtain the network card address of the network card included in the target container group. For each network card address, the network access device establishes a mapping relationship between the network port address and the target task label.

[0082] For example, if the network card address of the primary network card of a target container group is IP3, the network card address of the secondary network card is IP4, and the target task label is Grp1, then a mapping relationship between IP3 and Grp1, and a mapping relationship between IP4 and Grp1 are established.

[0083] Step 503: transmit the multiple mapping relationships to the multiple plug-ins of the container network interface respectively, and store the multiple mapping relationships in the mapping relationship library through the container network interface, wherein each plug-in stores at least one mapping relationship of at least one network card of the corresponding network card type.

[0084] In this embodiment, after determining the mapping relationship between the target container group to which the target task belongs and the target task label, the network access device can transmit the mapping relationship to multiple plug-ins of the container network interface corresponding to the container group, and store the mapping relationship in the mapping relationship library through the container network interface to realize dynamic update of the mapping relationship library.

[0085] In the above scheme, the mapping relationship between the target task and the target container group to which it belongs is flexibly established, and the mapping relationship library is dynamically updated based on the mapping relationship, thereby realizing flexible adjustment of network isolation.

[0086] Next, the network access method in the embodiment of the present disclosure is further described by using a specific example. Figure 6 A schematic diagram of the architecture of a control panel platform (Control Plane) provided in some embodiments of the present disclosure, Figure 6 The hardware in the system includes a central processing unit, a network interface card (NIC), and an accelerator (Accelerated Devices). The network interface card may include a data processing unit (DPU). The accelerator may include a graphics processing unit (GPU), a tensor processing unit (TPU), a field programmable gate array (FPGA), and an application specific integrated circuit (ASIC). Figure 6 The storage service in the example may be a cloud storage service implemented based on a cloud server. This embodiment does not limit the specific hardware device for implementing the storage service. The storage service may include one or more databases. Figure 6 As shown, in this embodiment, the model of the control panel platform can be used as a model-as-a-service to undertake large models from various model suppliers, and then use these large models to provide external services such as reasoning services and fine-tuning services. In essence, model-as-a-service is platform-as-a-service (PaaS).

[0087] The data plane relies on Infrastructure as a Service (IaaS). The data plane can have a corresponding software stack, which can be scheduled and deployed as a service container group on the governed cloud server (Elastic Compute Service, ECS) node. In response to the user's scheduling, it will be scheduled accordingly according to the scheduler. Figure 6 There are multiple user container groups (User Pod) and service container groups (Service Pod) in the Elastic Compute Service Volume Manager (ECS VM).

[0088] Usually, the tasks related to Model as a Service can be divided into reasoning tasks and training tasks (for example, dynamic fine-tuning tasks), etc. And there are three roles in this task: cloud service provider, model provider, and user.

[0089] Specifically, cloud service providers provide cloud services (e.g., infrastructure as a service or platform as a service) to serve entities of different model suppliers. Model suppliers own large models and use cloud service providers to build their own inference tasks and other services. Users are entities that run applications provided by cloud service providers and model suppliers. Users have corresponding network environment isolation requirements for model suppliers and cloud service providers. Specifically, when users obtain models as services from cloud service providers, they hope that their tasks can run in isolated network environments such as security sandboxes.

[0090] A task can be implemented based on one container group or multiple container groups. In order to achieve mandatory isolation, an isolated network environment should be provided for the customer's load. For example, for network cards that do not have remote direct memory access, a virtual private cloud (VPC) network environment can be provided. However, for model-as-a-service, the model supplier directly provides the model to the cloud service provider, and the cloud service provider will build services based on the model. Therefore, it is inconvenient and costly to provide a virtual private network for each model. Therefore, many large model applications will be deployed in the same virtual private network. For network cards with remote direct memory access, access control list (ACL) isolation can be used, which has a larger granularity. However, even if the model-as-a-service of the same model is deployed in a virtual private network, there will still be network isolation requirements for services owned by different users.

[0091] The network access method provided by the embodiment of the present disclosure can achieve fine-grained network isolation at the task level when different types of network cards are configured in the container group. The method specifically includes:

[0092] Step a1: group the target container groups. Specifically, group the service container groups in the cluster into corresponding groups; and group the container groups corresponding to different tasks into different groups.

[0093] Step a2: When the target container group is started, the pre-set components in the cluster assign unique labels to the container groups in the same group. The network access device transmits the association between the network card address corresponding to the container group and the task label to different corresponding plug-ins, and maintains the corresponding association in the plug-in.

[0094] Step a3: If there is a target access request routed to the container network interface, the container network interface will use the corresponding plug-in to process the target access request. The plug-in determines whether the target access request meets the corresponding access conditions, and the target access requests between container groups in the same group are allowed to pass through the access conditions.

[0095] Step a3: When the container group is destroyed, the corresponding plug-in and the corresponding access conditions in each container network interface will be destroyed.

[0096] The network access solution provided by the embodiments of the present disclosure improves the security of network isolation and the security of model providers and model users in using the model as a service, making model providers and model users more assured.

[0097] Figure 7 This is a schematic diagram of the structure of a network access device provided in some embodiments of the present disclosure. The device can be implemented by software and / or hardware and can generally be integrated into an electronic device. Figure 7 As shown, the network access device includes:

[0098] A receiving module 701 is configured to receive a target access request sent by a first container group through a first network card, wherein the target access request includes a first network card address of the first network card and a second network card address of a second network card of a second container group to be accessed;

[0099] A first sending module 702 is used to send the target access request to a target plug-in corresponding to the container network interface of the first network card;

[0100] The second sending module 703 is configured to send the target access request to a second network card corresponding to the second network card address of the second container group if it is determined by the target plug-in based on the first network card address and the second network card address that the first container group and the second container group belong to the same task.

[0101] In some embodiments of the present disclosure, the container network interface includes multiple plug-ins, each of which corresponds to a network card type of the container group, and the first sending module 702 is used to:

[0102] Determining a target network card type of the first network card;

[0103] A target plug-in corresponding to the target network card type is determined from a plurality of plug-ins included in the container network interface, and the target access request is sent to the target plug-in.

[0104] In some embodiments of the present disclosure, the second network card is of the same network card type as the first network card.

[0105] In some embodiments of the present disclosure, determining, by the target plug-in based on the first network card address and the second network card address, that the first container group and the second container group belong to the same task includes:

[0106] Acquire a mapping relationship library through the target plug-in;

[0107] Matching the first network card address and the second network card address in a mapping relationship library respectively through the target plug-in, and determining a first task label corresponding to the first network card address and a second task label corresponding to the second network card address that are successfully matched;

[0108] If the first task label and the second task label are the same, it is determined that the first container group and the second container group belong to the same task.

[0109] In some embodiments of the present disclosure, the mapping relationship library includes multiple network card addresses and multiple task tags having a mapping relationship, and each of the network card addresses has a mapping relationship with one of the task tags.

[0110] In some embodiments of the present disclosure, the network access device further includes:

[0111] A condition judgment module is used to determine that the first container group and the second container group meet the access condition if the first task tag and / or the second task tag are service tags after determining that the first task tag corresponding to the first network card address and the second task tag corresponding to the second network card address are successfully matched.

[0112] In some embodiments of the present disclosure, the network access device further includes:

[0113] an allocating module, configured to allocate a target task label to the at least one target container group in response to a creation operation of the at least one target container group corresponding to the target task;

[0114] A mapping module, used to establish multiple mapping relationships between multiple network card addresses of multiple network cards included in each of the target container groups and the target task labels respectively;

[0115] A transmission module is used to transmit the multiple mapping relationships to multiple plug-ins of the container network interface respectively, and store the multiple mapping relationships in a mapping relationship library through the container network interface, wherein each of the plug-ins stores at least one mapping relationship of at least one network card of the corresponding network card type.

[0116] In some embodiments of the present disclosure, the assigning of the target task label to the at least one target container group includes: assigning the task identifier of the target task as the target task label to each of the target container groups.

[0117] The network access device provided in the embodiments of the present disclosure can execute the network access method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0118] A computer program product comprises a computer program / instruction, which implements the steps of the above network access method when executed by a processor.

[0119] Figure 8 A schematic diagram of the structure of an electronic device provided for some embodiments of the present disclosure.

[0120] The following specific reference Figure 8 , which shows a schematic diagram of the structure of an electronic device 800 suitable for implementing the embodiment of the present disclosure. The electronic device 800 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0121] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0122] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0123] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the network access method of the embodiment of the present disclosure are executed.

[0124] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0125] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0126] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0127] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: receives a target access request sent by the first container group through the first network card, wherein the target access request includes the first network card address of the first network card and the second network card address of the second network card of the second container group to be accessed; sends the target access request to a target plug-in corresponding to the first network card in the container network interface; if it is determined through the target plug-in based on the first network card address and the second network card address that the first container group and the second container group belong to the same task, then sends the target access request to the second network card corresponding to the second network card address of the second container group.

[0128] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0129] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0130] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0131] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0132] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0133] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the type, scope of use, usage scenarios, etc. of the information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0134] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0135] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0136] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A network access method, characterized in that: include: Receive a target access request sent by the first container group through the first network card, wherein the target access request includes a first network card address of the first network card and a second network card address of a second network card of the second container group to be accessed; Sending the target access request to a target plug-in corresponding to the container network interface of the first network card; If it is determined by the target plug-in based on the first network card address and the second network card address that the first container group and the second container group belong to the same task, the target access request is sent to the second network card corresponding to the second network card address of the second container group.

2. The method according to claim 1, characterized in that The container network interface includes a plurality of plug-ins, each of which corresponds to a network card type of the container group, and sending the target access request to the target plug-in corresponding to the first network card in the container network interface includes: Determining a target network card type of the first network card; A target plug-in corresponding to the target network card type is determined from a plurality of plug-ins included in the container network interface, and the target access request is sent to the target plug-in.

3. The method according to claim 2, characterized in that The second network card is of the same type as the first network card.

4. The method according to claim 1, characterized in that: Determining, by the target plug-in based on the first network card address and the second network card address, that the first container group and the second container group belong to the same task includes: Acquire a mapping relationship library through the target plug-in; Matching the first network card address and the second network card address in a mapping relationship library respectively through the target plug-in, and determining a first task label corresponding to the first network card address and a second task label corresponding to the second network card address that are successfully matched; If the first task label and the second task label are the same, it is determined that the first container group and the second container group belong to the same task.

5. The method according to claim 4, characterized in that The mapping relationship library includes a plurality of network card addresses and a plurality of task labels having a mapping relationship, and each of the network card addresses has a mapping relationship with one of the task labels.

6. The method according to claim 4, characterized in that After determining the first task tag corresponding to the first network card address and the second task tag corresponding to the second network card address that are successfully matched, the method further includes: If the first task tag and / or the second task tag is a service tag, it is determined that the first container group and the second container group meet an access condition.

7. The method according to claim 1, characterized in that The method further comprises: In response to a creation operation of at least one target container group corresponding to the target task, assigning a target task label to the at least one target container group; Establishing multiple mapping relationships between multiple network card addresses of multiple network cards included in each target container group and the target task label respectively; The multiple mapping relationships are respectively transmitted to multiple plug-ins of the container network interface, and the multiple mapping relationships are stored in a mapping relationship library through the container network interface, wherein each of the plug-ins stores at least one mapping relationship of at least one network card of the corresponding network card type.

8. The method according to claim 7, characterized in that The assigning of the target task label to the at least one target container group includes: The task identifier of the target task is assigned to each of the target container groups as a target task label.

9. A network access device, characterized in that: include: A receiving module, configured to receive a target access request sent by a first container group through a first network card, wherein the target access request includes a first network card address of the first network card and a second network card address of a second network card of a second container group to be accessed; A first sending module, configured to send the target access request to a target plug-in corresponding to the container network interface of the first network card; a second sending module, configured to send the target access request to a second network card corresponding to the second network card address of the second container group if it is determined by the target plug-in based on the first network card address and the second network card address that the first container group and the second container group belong to the same task.

10. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the network access method described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the network access method described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Container group pod deployment configuration method and device, equipment and storage medium

    CN113886011A

  • Container network interface with multiple types of interfaces

    CN115001962A

  • Container group creation method and device, electronic equipment and storage medium

    CN115469961A

  • Multi-network card IP address management method and system based on container cloud platform

    CN116455814A

  • Method and device for realizing multiple network cards of container

    CN116781288A

Cited By

  • Network access method, device, equipment and medium

    CN119814446A

  • A network security access method and device applied to a large model service, equipment and medium

    CN119814446B

  • Network access method, device, equipment and medium

    CN120151015A

  • Network security access method and device for large model task, equipment and medium

    CN120151015B