Cloud software adaptation method and device, electronic equipment and storage medium

By constructing and detecting the coupling relationship between modules and programmable network chips in the cloud network gateway software, dividing strong and weak coupling modules and performing specific adaptation, the problems of low efficiency and high cost of cloud network gateway software adaptation on different hardware are solved, achieving efficient hardware adaptation and smooth migration.

CN121833041APending Publication Date: 2026-04-10CHINA CONSTRUCTION BANK
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, cloud network gateway software suffers from low systemic adaptation efficiency, high cost, and poor compatibility when adapting to programmable network chips from different manufacturers and types, resulting in poor adaptation performance.

Method used

The cloud software module for network chip switches is constructed, the coupling relationship between the module and the programmable network chip is detected, and the modules are divided into two categories: strong coupling and weak coupling. Only the strong coupling modules are specifically adapted to generate cloud software compatible with different hardware.

Benefits of technology

By splitting and reusing modules, we can reduce redundant code development across chips, lower maintenance costs, improve development efficiency and hardware adaptability, and achieve smooth migration of cloud software across different hardware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833041A_ABST
    Figure CN121833041A_ABST
Patent Text Reader

Abstract

The invention discloses a cloud software adaptation method and device, electronic equipment and a storage medium, and relates to the technical field of cloud networks, and the method constructs a cloud software module of a network chip switch. The network chip switch comprises a universal chip and a programmable network chip. And detecting the coupling relationship between the cloud software module and the programmable network chip, and determining the cloud software module as a first module and a second module according to the coupling relationship. And executing specific adaptation on the first module to obtain a third module, and generating cloud software according to the second module and the third module. According to the technical scheme, only the first module which is strongly coupled with the programmable chip needs to be subjected to specific adaptation, cloud software does not need to be fully modified, and the adaptation development amount can be reduced; the second module can be reused across chips, and repeated development is avoided. The cloud software is generated by combining the two methods, different programmable chips can be adapted, smooth switching of the cloud software on different hardware is achieved, and then the development efficiency and the hardware adaptation flexibility are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud network technology, and in particular to a cloud software adaptation method and apparatus, electronic device and storage medium. Background Technology

[0002] Programmable network chips, with their flexible packet processing capabilities and high forwarding performance, can be applied to cloud networks and data center physical networks. As cloud network gateway software is deployed on programmable network chip devices, the architectures of programmable network chips from different manufacturers are becoming increasingly diverse, bringing new demands and challenges to hardware adaptation for cloud services.

[0003] In related technologies, programmable network chips are mainly divided into two categories: one is programmable network chips based on Application-Specific Integrated Circuits (ASICs), programmed using the P4 language, which implements custom cloud network functions by defining fixed pipelines for parsing, matching, and actions; the other is programmable network chips developed based on Network Processing Unit (NPU) technology architecture. Because there is currently no unified standard for the programming architecture and basic operating environment of programmable network chips, cloud network gateway software needs to be adapted separately for different hardware.

[0004] However, due to the lack of a unified programming architecture and basic operating environment standard in the field of programmable network chips, and the lack of a unified data model and system architecture for the design and development of corresponding cloud network software, cloud network gateway software suffers from systemic problems of low adaptation efficiency, high cost and poor compatibility when adapting to different manufacturers and different types of programmable network chips, thus affecting the adaptation effect of cloud network gateway software. Summary of the Invention

[0005] In view of this, this application provides a cloud software adaptation method, apparatus, electronic device, and storage medium to solve the problem of poor performance when cloud network gateway software is adapted to programmable network chips.

[0006] Firstly, this application provides a cloud software adaptation method, including: A cloud software module for constructing a network chip switch, wherein the network chip switch includes general-purpose chips and programmable network chips; Detect the coupling relationship between the cloud software module and the programmable network chip; Based on the coupling relationship, the cloud software modules are identified as the first module and the second module; Perform a specific adaptation on the first module to obtain the third module; Cloud software is generated based on the second module and the third module.

[0007] The above method first constructs the cloud software module, then detects the coupling relationship between the module and the programmable chip, and then divides the module into a first module that needs adaptation and a second module that does not need adaptation. Only the first module is specifically adapted before being assembled with the second module to generate the cloud software. This eliminates the need to modify all modules, reducing the complexity of cross-chip adaptation; the second module can be reused across hardware, avoiding redundant development and reducing maintenance costs. This allows the cloud software to migrate smoothly across different hardware, thereby improving the development efficiency and hardware adaptation flexibility of the cloud software.

[0008] In some embodiments of this application, the network chip switch uses a programmable network chip as the core data processing component, and the general-purpose chip is a CPU chip used for device management and protocol calculation.

[0009] In some embodiments of this application, the cloud software module for constructing a network chip switch includes: dividing the network chip switch into a data plane forwarding module, a data plane control module, a control plane module, and a physical network routing module to construct the cloud software module; wherein, the data plane forwarding module is used for service traffic forwarding and physical network routing protocol processing, the data plane control module is used for writing routing flow tables to the programmable network chip, the control plane module is used for routing configuration synchronization and monitoring information reporting between the cloud platform and the switch, and the physical network routing module is used for maintaining the physical network routing protocol.

[0010] In some embodiments of this application, detecting the coupling relationship between the cloud software module and the programmable network chip includes: determining the cloud software module as having a first coupling relationship in response to the cloud software module's function implementation including calling the hardware interface of the programmable network chip, parsing the specific data format of the programmable network chip, conforming to a custom specification, and adapting to a chip software development kit; and determining the cloud software module as having a second coupling relationship in response to the cloud software module's function implementation including at least one of the TCP / IP protocol, gRPC protocol, and general operating system interface.

[0011] In some embodiments of this application, determining the cloud software module as a first module and a second module based on the coupling relationship includes: the first module being a module having the first coupling relationship with the programmable network chip, and the second module being a module having the second coupling relationship with the programmable network chip; wherein, the first module includes the data plane forwarding module and a chip calling submodule in the data plane control module for converting control commands into operations executable by the programmable network chip; the second module includes the control plane module, a control interface submodule in the data plane control module for providing a standardized control interface to the outside world, and the physical network routing module.

[0012] In some embodiments of this application, the step of performing specific adaptation on the first module to obtain the third module includes: setting the forwarding logic of the service forwarding processing submodule according to the chip data processing capability; and configuring the monitoring data storage logic of the service forwarding processing submodule.

[0013] In some embodiments of this application, the step of performing specific adaptation on the first module to obtain the third module includes: constructing the interaction logic of the chip calling submodule; wherein, the interaction logic is used to convert external control requests of the control interface submodule into chip executable instructions and external data query requests into chip-side data reading instructions.

[0014] In some embodiments of this application, before generating cloud software based on the second module and the third module, the method further includes: performing solidification encapsulation on the second module to form a basic component; wherein the interaction interface between the basic component and the first module or the third module adopts the same data format.

[0015] In some embodiments of this application, generating cloud software based on the second module and the third module includes: assembling the third module with the corresponding basic component according to the model of the programmable network chip to obtain the cloud software.

[0016] Secondly, this application provides a cloud software adaptation device, comprising: The establishment unit is a cloud software module configured to build a network chip switch, which includes general-purpose chips and programmable network chips; The processing unit is configured to detect the coupling relationship between the cloud software module and the programmable network chip; determine the cloud software module as a first module and a second module based on the coupling relationship; perform specific adaptation on the first module to obtain a third module; and generate cloud software based on the second module and the third module.

[0017] Thirdly, this application provides an electronic device, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect embodiment.

[0018] Fourthly, this application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method described in the first aspect embodiment.

[0019] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect of the embodiments described above.

[0020] As can be seen from the above technical solutions, the cloud software adaptation method, apparatus, electronic device, and storage medium disclosed in this application relate to the field of cloud network technology. The method constructs a cloud software module for a network chip switch. The network chip switch includes a general-purpose chip and a programmable network chip. The coupling relationship between the cloud software module and the programmable network chip is then detected, and the cloud software module is determined as a first module and a second module based on the coupling relationship. Specific adaptation is performed on the first module to obtain a third module, and then cloud software is generated based on the second and third modules. By applying the technical solution of this application, only the first module, which is strongly coupled with the programmable chip, needs to be specifically adapted, without requiring a full modification of the cloud software, thus reducing the amount of adaptation development. The second module can be reused across chips, avoiding redundant development. Combining the two to generate cloud software allows for adaptation to different programmable chips, enabling smooth switching of cloud software on different hardware, thereby improving development efficiency and hardware adaptation flexibility.

[0021] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 A flowchart illustrating a cloud software adaptation method provided in an embodiment of this application is shown. Figure 2 This application illustrates a gateway model architecture diagram provided in an embodiment. Figure 3 This illustration shows a schematic diagram of the structure of a cloud software adaptation device provided in an embodiment of this application; Figure 4 A schematic block diagram of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0025] The embodiments of this application will now be described in more detail with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0026] This disclosure is not exhaustive, but merely illustrative of some embodiments, and is not intended to limit the scope of protection of this disclosure. Unless otherwise specified, each step in a particular embodiment can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a particular embodiment can also be implemented as an independent embodiment, and the order of the steps in a particular embodiment can be arbitrarily interchanged. Furthermore, the optional implementation methods in a particular embodiment can be arbitrarily combined; moreover, the embodiments can be arbitrarily combined, for example, some or all steps of different embodiments can be arbitrarily combined, and a particular embodiment can be arbitrarily combined with the optional implementation methods of other embodiments.

[0027] In each of the disclosed embodiments, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions of the embodiments are consistent and can be referenced by each other. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships. The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the scope of this disclosure. In this disclosure, unless otherwise stated, elements expressed in the singular form, such as "a," "an," "the," "the," "the," "the," "the," "the," "this," etc., can mean "one and only one," or "one or more," "at least one," etc. For example, when using articles such as "a," "an," "the," etc. in translation, the noun following the article can be understood as either a singular or a plural expression. In some embodiments, the terms “in response to…”, “in response to determining…”, “in the case of…”, “when…”, “if…”, “if…”, etc., can be used interchangeably. In some embodiments, the terms “greater than,” “greater than or equal to,” “not less than,” “more than,” “more than or equal to,” “not less than,” “higher than,” “higher than or equal to,” “not lower than,” and “above” can be used interchangeably, as can the terms “less than,” “less than or equal to,” “not greater than,” “less than,” “less than or equal to,” “not more than,” “lower than,” “lower than or equal to,” “not higher than,” and “below”. The prefixes such as "first" and "second" in the embodiments of this disclosure are only for distinguishing different descriptive objects and do not constitute restrictions on the position, order, priority, number or content of the descriptive objects. For the description of the descriptive objects, please refer to the description in the claims or the context of the embodiments. The use of prefixes should not constitute unnecessary restrictions.

[0028] In the embodiments disclosed herein, "multiple" refers to two or more. In the embodiments disclosed herein, terms such as “import”, “input”, and “read in” can be used interchangeably.

[0029] In some embodiments, devices, etc., can be interpreted as physical or virtual, and their names are not limited to the names recorded in the embodiments. Terms such as “device”, “equipment”, “circuit”, “network element”, “node”, “function”, “unit”, “section”, “system”, “network”, “chip”, “chip system”, “entity”, and “subject” can be used interchangeably.

[0030] The following explains the technical terms used in this application.

[0031] Virtual Private Cloud (VPC): An isolated network space in the cloud; Direct Connect (DC): A cloud service that provides fast and reliable connections between user data centers and cloud resources; Internet Data Center (IDC): A platform with complete equipment (high-speed internet access, high-performance LAN, secure and reliable data center environment), professional management, and comprehensive application services; Overlay Network: One or more logical networks built on a physical network in the cloud using network virtualization technology; Underlay Network: A physical network that actually consists of physical devices such as switches, routers, and physical servers, carrying the overlay logical network; Network Function Virtualization (NFV): Implementing the functions of each network node in software using network virtualization technology; Virtual Routing Forwarding (VRF): A technology that runs multiple routing tables on a single routing and switching device to achieve service isolation; Software Defined Network (SDN): A network management method that supports dynamically programmable network configuration; Programming Protocol-Independent Packet (PIP). Processors (P4) is a high-level programming language specifically designed for configuring the data plane forwarding and processing logic of switches.

[0032] Programmable network chips, due to their flexible packet processing capabilities and high forwarding performance, can be applied in cloud networking and data center physical networks. Programmable chips mainly include ASIC chips (such as Barefoot Tofino) and programmable network chips based on technologies such as NPU.

[0033] ASIC chips are programmed using the P4 language, implementing custom cloud network functions through defined pipelines of parsing, matching, and actions. However, this architecture suffers from drawbacks such as high hardware costs and limited functional flexibility due to the pipeline stages. Programmable network chips based on technologies like NPUs can provide performance and programmability comparable to Tofino chips. However, the programming models used by these chips differ significantly from the declarative model of the Tofino P4 language.

[0034] In related technologies, cloud network gateway software (cloud software) is deployed on programmable network chip devices. Since there is no unified standard for the programming architecture and basic operating environment of programmable network chips, cloud software is difficult to adapt to different hardware, making it impossible for cloud services to achieve smooth migration on different hardware.

[0035] In other words, the process of adapting cloud software for various programmable network chip switches to different network chips requires extensive porting of core network business functions and code refactoring. This results in the need to reimplement the same network business rules in the codebase of each chip platform, increasing time and development costs. Since the same functional code is scattered across projects on different network chip platforms, it is difficult to maintain consistency. When business requirements change, developers need to find and modify the code that handles the relevant logic on all platforms one by one, which can easily lead to failures. Furthermore, because the code of each network chip platform is deeply coupled with the platform, changes to some logic require starting the entire platform for testing, resulting in poor testability. In addition, the overly tight binding between the code and the platform leads to excessively high understanding costs of the system and poor system scalability.

[0036] To address the aforementioned issues, this application provides a cloud software adaptation method aimed at eliminating code duplication, reducing maintenance costs, improving testability and cross-platform consistency, thereby ensuring the smooth migration of cloud gateway services across different hardware.

[0037] like Figure 1 As shown, in some embodiments, the method may include steps S101-S105.

[0038] S101, Constructing a cloud software module for network chip switches.

[0039] The network chip switch includes general-purpose chips and programmable network chips. For example, the general-purpose chip can be a Central Processing Unit (CPU), and the programmable network chip can be the P4 chip or NPU chip described in the above embodiments. The cloud software module consists of multiple modules divided according to the logical layer.

[0040] S102, Detect the coupling relationship between the cloud software module and the programmable network chip.

[0041] After constructing the cloud software modules, the coupling relationship between each cloud software module and the programmable network chip is detected. The coupling relationship refers to the degree of dependency between the cloud software modules and the programmable network chip.

[0042] S103. Based on the coupling relationship, the cloud software module is determined as the first module and the second module.

[0043] After detecting the coupling relationship between each cloud software module, the cloud software modules are identified as the first module and the second module based on the coupling relationship, where the first module is a module with a strong coupling relationship and the second module is a module with a weak coupling relationship.

[0044] S104. Perform specific adaptation on the first module to obtain the third module.

[0045] After identifying the first and second modules, a specific adaptation is performed on the first module, which has a strong coupling relationship. For example, it is customized according to the technical characteristics of the programmable network chip (such as hardware architecture, software development kit interface specifications, etc.) to obtain a third module that can be adapted to the programmable network chip.

[0046] S105. Generate cloud software based on the second and third modules.

[0047] The second module is a general-purpose component that requires no adaptation, while the third module is an adapted module specific to a particular chip. By assembling these two types of modules according to functional logic, cloud software compatible with programmable network chips can be generated, enabling rapid adaptation and reuse of cloud software across different hardware architectures.

[0048] In this embodiment, efficient adaptation of cloud software is achieved through module layering and coupling analysis. First, a network chip switch cloud software module is constructed, which includes a general-purpose chip (such as a CPU) and a programmable network chip (such as a P4 / NPU). Then, the coupling relationship between each module and the programmable chip is detected, and the strongly coupled functional modules are designated as the first module that needs to be adapted, while the weakly coupled ones are designated as the second module that can be used universally. The first module is specifically adapted according to the chip technology characteristics to obtain the third module. Finally, the second module that does not need to be adapted and the adapted third module are assembled according to functional logic to generate cloud software compatible with the target chip.

[0049] In this way, by splitting and reusing modules, targeted adaptation is only performed on strongly coupled modules, eliminating redundant code development across chips; the generalized design of weakly coupled modules can reduce maintenance costs, and the clear module boundaries improve testability; at the same time, based on the assembly mechanism of general modules and adaptation modules, cloud software can be quickly adapted to different hardware architectures, ensuring cross-platform consistency and smooth migration capabilities of cloud gateway services.

[0050] In some embodiments, the network chip switch uses a programmable network chip, such as a P4 / NPU, as the core data processing component; the general-purpose chip is a CPU chip used for device management and protocol calculation.

[0051] like Figure 2As shown, in some embodiments, the programmable network chip switch (i.e., network chip switch) adopts a heterogeneous hardware architecture of CPU (general-purpose chip, responsible for device management and protocol calculation) and P4 / NPU (programmable network chip, responsible for high-speed data forwarding), and the software layer is divided into four types of cloud software modules: data plane forwarding, data plane control, control plane, and physical network routing.

[0052] Based on their coupling relationship with the programmable chip, the cloud software modules are divided into a strongly coupled first module (business data forwarding and processing, chip interface calls, etc.) and a weakly coupled second module (destination address determination, control interface, platform integration, routing protocol maintenance, etc.). The two types of modules interact through a unified format interface. After adaptation, the strongly coupled module works in deep collaboration with the programmable chip, while the weakly coupled module serves as a general-purpose component to support cross-chip reuse.

[0053] For step S101, in some embodiments, when constructing the cloud software module of the network chip switch, the network chip switch is divided into a data plane forwarding module (e.g., Figure 2 The data plane forwarding program and data plane control module (as shown) are shown. Figure 2 The data plane control program and control plane module (as shown) are shown. Figure 2 The control plane program shown) and physical network routing module (such as Figure 2 The physical network routing program shown is used to build cloud software modules.

[0054] The data plane forwarding module is used for service traffic forwarding and physical network routing protocol processing, for example... Figure 2 The data plane forwarding program shown is a core component of the cloud gateway, responsible for forwarding service traffic and handling routing protocols between physical networks; the data plane control module is used to write routing flow tables to the programmable network chip, for example... Figure 2 The data plane control program shown is a component that writes routing flow tables into the entries of the service forwarding processing program in the chip.

[0055] The control plane module is used for routing configuration synchronization and monitoring information reporting between the cloud platform and the switch, for example... Figure 2 The control plane program shown is a component for synchronizing routing configurations and reporting monitoring information between the cloud platform and the programmable switch; the physical network routing module is used to maintain physical network routing protocols, such as... Figure 2The physical network routing program shown is a maintenance component for routing protocols between the programmable switch and the physical network. Based on the low-level network design of the gateway, it maintains routing protocols such as Border Gateway Protocol (BGP) and Open Shortest Path First (OSPF), as well as high-availability detection functions such as Bidirectional Forwarding Detection (BFD) and Virtual Router Redundancy Protocol (VRRP).

[0056] It should be noted that the data plane forwarding module described in the following embodiments is the data plane forwarding program, the data plane control module is the data plane control program, the control plane module is the control plane program, and the physical network routing module is the physical network routing program.

[0057] In order to determine the minimum set that needs to be adapted, in some embodiments, when detecting the coupling relationship between the cloud software module and the programmable network chip, in response to the cloud software module's functional implementation including calling the hardware interface of the programmable network chip, parsing the programmable network chip's specific data format, following custom specifications (such as vendor-defined specifications), and adapting the chip's software development kit (SDK), the cloud software module is determined to be a first coupling relationship, i.e. a strong coupling relationship.

[0058] In some embodiments, the first module is a module that has a first coupling relationship with the programmable network chip.

[0059] In some embodiments, the first module includes a service forwarding processing submodule in the data plane forwarding module for underlying forwarding logic of service traffic, and a chip calling submodule (chip interface calling component) in the data plane control module for converting control instructions into operations executable by the programmable network chip.

[0060] For example, the data plane forwarding program is highly coupled with the network chip, making it impossible to form a unified programming model. Therefore, this part of the program can only be adapted to individual network chips. Similarly, the chip interface call component of the data plane control program is highly coupled with the network chip's SDK, making it impossible to form a unified programming model for this part. These are all the first modules with strong coupling, representing the minimum set that needs to be adapted.

[0061] In some embodiments, in response to the functional implementation of the cloud software module, the cloud software module is determined to be a second coupling relationship, i.e. a weak coupling relationship, based on at least one of TCP / IP (Transmission Control Protocol / Internet Protocol), gRPC (g Remote Procedure Call Protocol), and a general operating system interface, and no adaptation is required.

[0062] In some embodiments, the second module includes a control plane module, a control interface sub-module (external control interface component) in the data plane control module for providing standardized control interfaces to the outside world, and a physical network routing module.

[0063] For example, the external control interface components in the data plane control program do not need to be repeatedly developed based on the chip platform. The interface between the control plane program and the chip call interface components should form a unified format. In actual deployment, a unified control interface component and the corresponding chip call interface components can be deployed in a modular fashion. The control plane program interacts with the cloud platform through the standard TCP / IP protocol and cloud API interface, and interacts with the data plane control program through the standardized gRPC interface. Therefore, this part of the components does not need to be adapted to the network chip platform. The physical network routing program is passed through to the physical network routing program on the CPU operating system through the data plane forwarding program on the network chip. The routing protocol can be maintained by configuring the corresponding components such as open source Free Range Routing (FRR) and Quagga (Quagga routing suite).

[0064] For step S104, in some embodiments, when performing specific adaptation, the forwarding logic of the service forwarding processing submodule can be set according to the chip data processing capability; and the monitoring data storage logic of the service forwarding processing submodule can be configured.

[0065] For example, in a data plane forwarding program, logically, upon receiving a data packet, the chip should determine whether the packet should be sent to the CPU or continue processing by the on-chip business data forwarding processing unit based on the destination address. The core functions of the gateway, such as business data forwarding processing logic, flow table design, and register definitions, are designed and implemented according to the chip's development specifications. Simultaneously, the monitoring items from the cloud platform side must be statistically implemented in the program and written into the chip's registers and other storage entities.

[0066] The data sent to the CPU mainly includes the processing logic of the physical network routing protocol and the data exchanged between the system-generated address and the gateway. To reduce the adaptation workload, the processing of this data is handled by the operating system's kernel protocol stack through the chip's interface to the CPU, and implemented by the operating system's physical network routing program. This way, developers only need to iterate on the logic of the service forwarding processing part during the adaptation process. The logic for determining the data packet's destination based on the destination address, and the logic for sending data packets to the CPU or sending data from the CPU through the production port, are relatively simple and do not require frequent maintenance.

[0067] In some embodiments, during specific adaptation, interaction logic for the chip calling submodule can be constructed. This interaction logic is used to convert external control requests from the control interface submodule into chip-executable instructions, and external data query requests into chip-side data read instructions.

[0068] For example, the chip call submodule includes the chip interface call component of the data plane control program. This component is highly coupled with the network chip's SDK, making it impossible to form a unified programming model. The chip SDK needs to be adapted and implemented, primarily to handle the addition, deletion, modification, and querying of routing table entries received by the external control program interface, and to implement the corresponding operations in the chip flow table through the SDK. For monitoring read requests, the SDK is needed to read data from chip registers and other storage entities.

[0069] In some embodiments, before generating cloud software based on the second and third modules, the second module is further encapsulated to form a basic component. The basic component uses the same data format for its interaction interface with either the first or third module.

[0070] For example, the control plane program (interacting with the cloud platform via standard TCP / IP protocol and cloud API, requiring no chip adaptation), the external control interface components of the data plane control program (starting a general gRPC interface, eliminating the need for redundant development), and the physical network routing program (implemented based on open-source components, requiring no chip adaptation) are solidified and encapsulated to form basic components. The interfaces between the external control interface components and the chip call interface components should form a unified format, and this unified format should support the modular deployment of unified control interface components (general components or second modules) and corresponding chip interface call components (first modules or third modules).

[0071] In some embodiments, when generating cloud software based on the second module and the third module, the third module is assembled with the corresponding basic components according to the model of the programmable network chip to obtain the cloud software.

[0072] For example, the interface between the external control interface component (basic component or second module) of the data plane control program and the chip call interface component (adapted to become the third module) forms a unified format. During deployment, a unified control interface component and the corresponding chip call interface component can be deployed in a modular fashion. Specifically, different chip call interface components (third modules) are adapted for different programmable network chip models. These adapted third modules are then assembled with the general external control interface component (basic component) using a unified interface. Combined with other basic components (such as the control plane program and physical network routing program), a complete cloud software is ultimately formed.

[0073] Based on the above embodiments, exemplarily, such as Figure 2 As shown, based on the hardware design logic of network chip switches, they can be divided into components on the operating system in the CPU chip and components in the programmable network chip. According to the logical level, they can be divided into data plane forwarding programs, data plane control programs, control plane programs, and routing protocol programs (cloud software modules), among which: The data plane forwarding program is a core component of the cloud gateway, used for forwarding service traffic and handling routing protocols between physical networks. The data plane forwarding program is highly coupled with the network chip, making a unified programming model impossible. Therefore, this part of the program must be adapted to individual network chips. Logically, when the chip receives a data packet, it first determines whether the packet should be sent to the CPU or continue processing by the chip's service data forwarding processing unit based on the destination address. The gateway's service data forwarding processing logic, flow table design, register definitions, and other core functions are designed and implemented according to the chip's development specifications. Simultaneously, monitoring items from the cloud platform must be statistically analyzed within the program and written to chip registers and other storage entities. The data sent to the CPU mainly includes the processing logic of the physical network routing protocol and data exchanged between the system-generated address and the gateway. To reduce adaptation workload, the processing of this data is handled by the operating system's kernel protocol stack through the chip's CPU-to-device interface, and implemented by the operating system's physical network routing program.

[0074] In this way, during the adaptation process, only the logic of the business forwarding and processing part needs to be iterated, and the logic is relatively simple and does not require frequent maintenance.

[0075] The data plane control program is the component that writes routing flow tables into the service forwarding processing program's entries within the chip. It can be divided into an external control interface component and a chip call interface component. The external control interface component provides services through a general gRPC interface. On one hand, it supports requests from the control plane routing distribution component of external cloud platforms to add, delete, modify, and query routing table entries. On the other hand, it supports detailed monitoring data query requests from the monitoring upload component of the cloud platform. The chip interface call component is highly coupled with the network chip's SDK, requiring adaptation and implementation of the SDK. It primarily handles the addition, deletion, modification, and querying of routing table entries received by the external control program interface, implementing the corresponding operations in the chip's flow table through the SDK. For monitoring read requests, the SDK is needed to read data from chip registers and other storage entities.

[0076] In this way, during the adaptation process, the external control interface components in the data plane control program do not need to be repeatedly developed according to the chip platform. The interface between the control interface components and the chip call interface components forms a unified format. During deployment, a unified assembly deployment of the control interface components and the corresponding chip interface call components can be achieved, thereby reducing the workload of adaptation.

[0077] The control plane program is a component that manages and synchronizes routing configurations and reports monitoring information between the cloud platform and the programmable switch. The components of the control plane program interact with the cloud platform through standard TCP / IP protocols and cloud API interfaces, and interact with the data plane control program through a standardized gRPC interface. Therefore, no adaptation to the network chip platform is required.

[0078] The physical network routing program is a component that maintains routing protocols between the programmable switch and the physical network. It maintains routing protocols such as BGP and OSPF, and high-availability detection functions such as BFD and VRRP, based on the gateway's low-level network design. The physical network routing program on the CPU operating system is passed through the data plane forwarding program on the network chip, and the maintenance of routing protocols can be completed by configuring open-source components such as FRR and quagga.

[0079] As can be seen from the above technical solutions, the cloud software adaptation method provided in this application is based on the programmable network chip and various components (cloud software modules) on the CPU operating system in the network chip switch (programmable switch). By analyzing the interface logic and calling logic between the components, the components are divided into data plane forwarding programs, data plane control programs, control plane programs, and physical network routing programs. By analyzing the coupling relationship between each component and sub-components and the network chip, the minimum set (first module) that needs to be adapted is determined, thereby reducing the complexity of adaptation development and reducing the risks caused by adaptation.

[0080] Based on the above-described cloud software adaptation method, this application also provides a cloud software adaptation device, such as... Figure 3 As shown, in some embodiments, the device 300 includes a setup unit 301 and a processing unit 302, wherein: Establishment unit 301 is configured as a cloud software module for building a network chip switch, the network chip switch including a general-purpose chip and a programmable network chip; The processing unit 302 is configured to detect the coupling relationship between the cloud software module and the programmable network chip; determine the cloud software module as a first module and a second module based on the coupling relationship; perform specific adaptation on the first module to obtain a third module; and generate cloud software based on the second module and the third module.

[0081] In some embodiments, the establishment unit 301 executes a cloud software module for building a network chip switch, configured to divide the network chip switch into a data plane forwarding module, a data plane control module, a control plane module, and a physical network routing module to build the cloud software module; wherein, the data plane forwarding module is used for service traffic forwarding and physical network routing protocol processing, the data plane control module is used for writing routing flow tables to the programmable network chip, the control plane module is used for routing configuration synchronization and monitoring information reporting between the cloud platform and the switch, and the physical network routing module is used for maintaining the physical network routing protocol.

[0082] In some embodiments, the processing unit 302 performs the detection of the coupling relationship between the cloud software module and the programmable network chip, and is configured to determine that the cloud software module is in a first coupling relationship in response to the cloud software module's function implementation including calling the hardware interface of the programmable network chip, parsing the specific data format of the programmable network chip, conforming to a custom specification, and adapting to a chip software development kit; and to determine that the cloud software module is in a second coupling relationship in response to the cloud software module's function implementation including at least one of the TCP / IP protocol, gRPC protocol, and general operating system interface.

[0083] In some embodiments, the processing unit 302 performs the following: determining the cloud software module as a first module and a second module based on the coupling relationship; the first module is configured to be a module having the first coupling relationship with the programmable network chip, and the second module is a module having the second coupling relationship with the programmable network chip; wherein, the first module includes the data plane forwarding module and a chip calling submodule in the data plane control module for converting control commands into operations executable by the programmable network chip; the second module includes the control plane module, a control interface submodule in the data plane control module for providing a standardized control interface to the outside world, and the physical network routing module.

[0084] In some embodiments, the processing unit 302 performs a specific adaptation to the first module to obtain a third module, and is configured to set the forwarding logic of the service forwarding processing submodule according to the chip data processing capability; and configure the monitoring data storage logic of the service forwarding processing submodule.

[0085] In some embodiments, the processing unit 302 performs a specific adaptation to the first module to obtain a third module, including: constructing the interaction logic of the chip calling submodule; wherein the interaction logic is used to convert external control requests of the control interface submodule into chip executable instructions and external data query requests into chip-side data read instructions.

[0086] In some embodiments, before the processing unit 302 generates cloud software based on the second module and the third module, it is further configured to perform solidification encapsulation on the second module to form a basic component; wherein the basic component and the interaction interface of the first module or the third module adopt the same data format.

[0087] In some embodiments, the processing unit 302 executes cloud software generation based on the second module and the third module, and is configured to assemble the third module with the corresponding basic components according to the model of the programmable network chip to obtain the cloud software.

[0088] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of the embodiments of this disclosure, and the principle is the same. Therefore, the embodiments of this disclosure are not limited thereto.

[0089] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0090] Figure 4 A schematic block diagram of an example electronic device 400 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0091] like Figure 4As shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes based on a computer program stored in ROM (Read-Only Memory) 402 or a computer program loaded from storage unit 408 into RAM (Random Access Memory) 403. The RAM 403 may also store various programs and data required for the operation of the electronic device 400. The computing unit 401, ROM 402, and RAM 403 are interconnected via a bus 404. An I / O (Input / Output) interface 405 is also connected to the bus 404.

[0092] Multiple components in electronic device 400 are connected to I / O interface 405, including: input unit 406, such as keyboard, mouse, etc.; output unit 407, such as various types of displays, speakers, etc.; storage unit 408, such as disk, optical disk, etc.; and communication unit 409, such as network card, modem, wireless transceiver, etc. Communication unit 409 allows electronic device 400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0093] The computing unit 401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, CPUs (Central Processing Units), GPUs (Graphics Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSPs (Digital Signal Processors), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as cloud software adaptation methods. For example, in some embodiments, the cloud software adaptation method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of the methods described above may be performed. Alternatively, in other embodiments, computing unit 401 may be configured to perform the aforementioned cloud software adaptation method by any other suitable means (e.g., by means of firmware).

[0094] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System-on-Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0095] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0096] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0097] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0098] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include LANs (Local Area Networks), WANs (Wide Area Networks), the Internet, and blockchain networks.

[0099] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.

[0100] It's important to note that artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.

[0101] As can be seen from the above technical solutions, the cloud software adaptation method, apparatus, electronic device, and storage medium disclosed in this application are based on the various cloud software modules on the programmable network chip and CPU operating system in the network chip switch. By analyzing the interface logic and calling logic between each module, the cloud software modules are identified as data plane forwarding programs, data plane control programs, control plane programs, and physical network routing programs. By analyzing the coupling relationship between each module and its corresponding sub-modules with the network chip, the minimum set that needs to be adapted is determined, thereby reducing the complexity of adaptation development and lowering the risks caused by adaptation.

[0102] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0103] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A cloud software adaptation method, characterized in that, include: A cloud software module for constructing a network chip switch, wherein the network chip switch includes general-purpose chips and programmable network chips; Detect the coupling relationship between the cloud software module and the programmable network chip; Based on the coupling relationship, the cloud software modules are identified as the first module and the second module; Perform a specific adaptation on the first module to obtain the third module; Cloud software is generated based on the second module and the third module.

2. The method according to claim 1, characterized in that, The network chip switch uses a programmable network chip as its core data processing component, and the general-purpose chip is a CPU chip used for device management and protocol calculation.

3. The method according to claim 1, characterized in that, The cloud software module for constructing the network chip switch includes: The network chip switch is divided into a data plane forwarding module, a data plane control module, a control plane module, and a physical network routing module to construct the cloud software module; The data plane forwarding module is used for service traffic forwarding and physical network routing protocol processing; the data plane control module is used for writing routing flow tables to programmable network chips; the control plane module is used for routing configuration synchronization and monitoring information reporting between the cloud platform and the switch; and the physical network routing module is used for maintaining physical network routing protocols.

4. The method according to claim 3, characterized in that, The detection of the coupling relationship between the cloud software module and the programmable network chip includes: In response to the function implementation of the cloud software module including calling the hardware interface of the programmable network chip, parsing the specific data format of the programmable network chip, following the custom specification, and adapting to the chip software development kit, the cloud software module is determined to be the first coupling relationship; In response to the fact that the cloud software module's functional implementation includes at least one of TCP / IP protocol, gRPC protocol, and general operating system interface, the cloud software module is determined to be a second coupling relationship.

5. The method according to claim 4, characterized in that, The step of determining the cloud software module as the first module and the second module based on the coupling relationship includes: The first module is a module that has the first coupling relationship with the programmable network chip, and the second module is a module that has the second coupling relationship with the programmable network chip; The first module includes the data plane forwarding module and the chip calling submodule in the data plane control module for converting control commands into operations executable by the programmable network chip. The second module includes the control plane module, the control interface sub-module in the data plane control module for providing standardized control interfaces to the outside world, and the physical network routing module.

6. The method according to claim 5, characterized in that, The process of performing specific adaptation on the first module to obtain the third module includes: The forwarding logic of the service forwarding processing submodule is set according to the chip's data processing capabilities; In addition, the monitoring data storage logic of the service forwarding processing submodule is configured.

7. The method according to claim 5, characterized in that, The process of performing specific adaptation on the first module to obtain the third module includes: Construct the interaction logic for the chip calling submodule; The interaction logic is used to convert external control requests from the control interface submodule into chip-executable instructions and external data query requests into chip-side data read instructions.

8. The method according to claim 1, characterized in that, Before generating the cloud software based on the second module and the third module, the method further includes: The second module is solidified and packaged to form a basic component; The basic components use the same data format for their interaction interface with the first module or the third module.

9. The method according to claim 8, characterized in that, The process of generating cloud software based on the second module and the third module includes: Based on the model of the programmable network chip, the third module is assembled with the corresponding basic components to obtain the cloud software.

10. A cloud software adaptation device, characterized in that, include: The establishment unit is a cloud software module configured to build a network chip switch, which includes general-purpose chips and programmable network chips; The processing unit is configured to detect the coupling relationship between the cloud software module and the programmable network chip; and to determine the cloud software module as a first module and a second module based on the coupling relationship. Perform a specific adaptation on the first module to obtain the third module; generate cloud software based on the second module and the third module.

11. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.

12. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-9.

13. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1-9.