Network forwarding processing method for service, related device and storage medium
By employing domain-driven design and a four-layer software architecture, and utilizing a set of network processing objects for network forwarding, the problem of low efficiency in traditional business data forwarding is solved, achieving efficient and flexible network forwarding.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2022-05-17
- Publication Date
- 2026-07-10
AI Technical Summary
In traditional business data forwarding processes, the code is tightly coupled with the business logic, resulting in low forwarding efficiency and an inability to quickly adapt to changes in business needs.
Adopting the domain-driven design approach, a four-layer software architecture is designed, including an interface layer, an application layer, an object layer, and a data support layer. Network forwarding is handled through a set of network processing objects, reducing code writing and improving network forwarding efficiency.
By using a collection of network processing objects at the object layer, high efficiency and reusability of network forwarding are achieved, reducing the workload of developers and improving the flexibility and efficiency of business data forwarding.
Smart Images

Figure CN117118888B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, related equipment, and storage medium for processing network forwarding of services. Background Technology
[0002] With the development of computer technology, traditional business data forwarding requires a product manager to provide a business data forwarding requirement. Developers then analyze and break down the business data forwarding process based on this requirement, design the database tables for handling this business, and finally write the corresponding code to implement the business data forwarding. This code design is tightly coupled to the current business logic. If the business forwarding requirements change, the code may need to be completely redesigned to re-implement the business data forwarding, resulting in low forwarding efficiency. Summary of the Invention
[0003] This application provides a method, related equipment, and storage medium for network forwarding processing of services, which can improve the efficiency of network forwarding processing of services.
[0004] On one hand, embodiments of this application provide a network forwarding processing method for services, applied to a network controller. The network controller provides network services for each service item in a service item set. The network controller includes an interface layer, an application layer, and an object layer. Multiple network processing objects are configured in the object layer. These network processing objects are used to perform network forwarding processing on service data generated by the service items in the service item set. The method includes:
[0005] In response to a service request for a target service item received at the interface layer, the target service data to be forwarded is obtained from the service request.
[0006] The application layer performs forwarding analysis on the target business data of the target business project, determines the set of network processing objects, and obtains the processing logic orchestration instructions of the set of network processing objects for network forwarding processing of the target business data.
[0007] The target service data is processed by network forwarding through the object layer according to the processing logic orchestration instructions.
[0008] The processing logic orchestration instructions include the execution order of each target network processing object in the network processing object set when performing network forwarding processing on the target service data.
[0009] On one hand, this application provides a network forwarding processing apparatus for services, applied to a network controller. The network controller provides network services for each service item in a service item set. The network controller includes an interface layer, an application layer, and an object layer. Multiple network processing objects are configured in the object layer. These network processing objects are used to perform network forwarding processing on service data generated by the service items in the service item set. The apparatus includes:
[0010] The receiving unit is used to receive business requests for the target business item at the interface layer;
[0011] The processing unit is used to respond to a service request for a target service item received at the interface layer and obtain the target service data to be forwarded from the service request.
[0012] The processing unit is further configured to perform forwarding analysis on the target service data of the target service project through the application layer, determine the network processing object set, and obtain the processing logic orchestration instructions for the network processing object set to perform network forwarding processing on the target service data.
[0013] The processing unit is further configured to perform network forwarding processing on the target service data by means of the object layer according to the processing logic orchestration instructions;
[0014] The processing logic orchestration instructions include the execution order of each target network processing object in the network processing object set when performing network forwarding processing on the target service data.
[0015] On one hand, embodiments of this application provide a computer device, the computer device comprising:
[0016] A processor is used to execute computer programs;
[0017] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the network forwarding processing method for services as described above.
[0018] On the one hand, embodiments of this application provide a computer-readable storage medium storing a computer program that is loaded by a processor and executed as described above for network forwarding processing of services.
[0019] On one hand, embodiments of this application provide a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the aforementioned network forwarding processing method for services.
[0020] In this embodiment, in response to a service request for a target service item received at the interface layer, target service data to be forwarded is obtained from the service request; the target service data of the target service item is analyzed for forwarding at the application layer to determine a set of network processing objects, and the processing logic orchestration instructions for the network processing objects to perform network forwarding processing on the target service data are obtained; the target service data is processed for network forwarding at the object layer according to the processing logic orchestration instructions. By determining the set of network processing objects and directly performing network forwarding processing on the target service data at the object layer based on the execution order of each target network processing object in the set of network processing objects, the network forwarding processing of the target service data is performed without writing code, thus improving the efficiency of network forwarding processing of the service. Attached Figure Description
[0021] Figure 1a This is a schematic diagram of a region model provided in an embodiment of this application;
[0022] Figure 1b This is a schematic diagram illustrating an object layer located at a core position, as provided in an embodiment of this application.
[0023] Figure 1c This is a schematic diagram of the structure of a network controller provided in an embodiment of this application;
[0024] Figure 1d This is another schematic diagram of region modeling provided in the embodiments of this application;
[0025] Figure 1e This is a schematic diagram illustrating the construction of the object layer in a network controller according to an embodiment of this application;
[0026] Figure 2 This is a flowchart illustrating a network forwarding method for services provided in an embodiment of the invention.
[0027] Figure 3a This is a network forwarding process for service data of service item A provided in an embodiment of the invention;
[0028] Figure 3b This is a network forwarding process for service data of service item B provided in an embodiment of the invention;
[0029] Figure 3c This is a schematic diagram illustrating a scenario where business project A and business project B share a common network processing object, as provided in an embodiment of this application.
[0030] Figure 4 This is a schematic diagram of an abstract entity object provided in an embodiment of this application;
[0031] Figure 5This is a schematic diagram illustrating the attribute values and behavior methods of an entity object description service provided in an embodiment of this application;
[0032] Figure 6 This is a schematic diagram illustrating the construction of a composite object according to an embodiment of this application;
[0033] Figure 7 This is a flowchart illustrating another network forwarding method for services provided in an embodiment of this application.
[0034] Figure 8 This is a schematic diagram of setting a dependency inversion layer at the object layer, provided in an embodiment of this application.
[0035] Figure 9 This is a schematic diagram of the structure of a network forwarding processing device for services provided in an embodiment of this application;
[0036] Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0037] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0038] (1) Cloud computing refers to the delivery and usage model of IT infrastructure, which means obtaining the required resources in an on-demand and easily scalable manner through the network; in a broader sense, cloud computing refers to the delivery and usage model of services, which means obtaining the required services in an on-demand and easily scalable manner through the network. These services can be IT and software, Internet-related, or other services. Cloud computing is the product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing.
[0039] With the development of the internet, real-time data streams, and the diversification of connected devices, as well as the demands for search services, social networks, mobile commerce, and open collaboration, cloud computing has rapidly developed. Unlike previous parallel distributed computing, cloud computing will fundamentally revolutionize the entire internet model and enterprise management model.
[0040] (2) Cloud storage
[0041] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of storage devices of various types (storage devices are also called storage nodes) in the network to work together through application software or application interfaces to provide data storage and business access functions to the outside world.
[0042] Currently, the storage method of storage systems is as follows: Logical volumes are created. During the creation of a logical volume, physical storage space is allocated to each logical volume. This physical storage space may consist of a single storage device or the disks of several storage devices. Clients store data on a logical volume, which means storing the data on the file system. The file system divides the data into many parts, each part being an object. Each object contains not only the data but also additional information such as a data identifier (ID, ID entity). The file system writes each object to the physical storage space of that logical volume and records the storage location information of each object. Therefore, when a client requests access to data, the file system can allow the client to access the data based on the storage location information of each object.
[0043] The process by which a storage system allocates physical storage space to a logical volume is as follows: the physical storage space is pre-divided into strips according to the capacity estimate of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of Redundant Array of Independent Disks (RAID). A logical volume can be understood as a strip, thus allocating physical storage space to the logical volume.
[0044] (3) In software design or development, it is generally divided into two types: waterfall and agile. Waterfall refers to a project manager conducting extensive business analysis, creating a basic model based on existing requirements, and then passing the results to the developers. This is the developers' requirements document, which they simply follow. In this model, it's difficult to get frequent feedback from users. Therefore, the business model is assumed to be correct during the initial analysis, leading to predictable results. Months or even years later, the delivered product will inevitably deviate significantly from the customer's expectations. Agile, on the other hand, also requires extensive analysis, extending to more detailed business modules. It involves small iterations and periodic delivery, resulting in more frequent and timely customer feedback. However, agile cannot consider all aspects of the business, and because it embraces change, numerous changes to requirements or business models will inevitably lead to significant maintenance costs. Furthermore, the demands on developers will be higher.
[0045] In this embodiment, Domain-Driven Design (DDD), compared to Waterfall and Agile design, is a more granular iterative design approach. The smallest unit in DDD can be a Domain Model. A Domain Model is a carrier that accurately reflects a specific knowledge element within a domain. Acquiring this knowledge requires frequent communication with Domain Experts to transform professional knowledge into a Domain Model. Domain Models are technology-agnostic, possess high business abstraction, and accurately describe the knowledge system within a domain. They are also independent and require learning how to make them expressive, establishing relationships between them to form a complete domain architecture. Typically, pictograms or a Ubiquitous Language can be used to describe the relationships between Domain Models. Based on this, Domain Code Design can then be performed.
[0046] The core of Domain-Driven Design (DDD) is establishing a region model, which is a part of the real world that needs to be studied for a specific business scenario. A region model can be like... Figure 1a It can be a reasonable abstraction of the real world to be studied, which is then transformed into virtual objects to form regional objects.
[0047] In this embodiment, a network controller hierarchy partitioning optimization scheme is designed based on the domain-driven design principle. This scheme guides the object design of the network controller at the code organization level, enabling the network controller to provide network services to various business projects within a set of business projects. To better facilitate object design, the network controller design incorporates the following... Figure 1b As shown, the network controller is built around the object layer, which serves as the core. Database services, data caching services, components, and frameworks are built around this object layer.
[0048] Through the above approach, a four-layer software architecture can be designed based on Domain-Driven Design (DDD) principles. This includes the construction and method population of entity objects (i.e., constructing behavioral methods for entity objects), the construction of composite objects, and the introduction of a dependency inversion layer. This achieves the goal of building a platform-based object layer for the network controller, thereby improving the reusability, robustness, and maintainability of the network controller, and enhancing the efficiency of network forwarding and processing of business data. This transforms the traditional three-layer structure of the network controller (i.e., ...) Figure 1cIn this paper, the traditional three-layer network controller 11 (application interface layer, business logic layer, and data layer) has evolved into a four-layer software structure. The core of this four-layer structure is the object layer, where the network processing object is a crucial component. The existence of the network processing object guides developers in object design. This four-layer architecture transforms the traditional data-driven network controller into an object-driven one, thus resolving the issues of heavy code dependence on external databases and the large amount of business logic code in the middle layer, which is strongly correlated with business scenarios. The network controller provided in this embodiment can, as... Figure 1c As shown, the network controller 12 may include: an interface layer, an application layer, an object layer, and a data support layer.
[0049] ① Interface Layer: The external parts of the application interface layer and business logic layer in the traditional network controller are divided into the interface layer. This interface layer includes application programming interfaces and data transfer objects (DTOs). This interface layer can be responsible for receiving business data and business data forwarding instructions sent from the outside.
[0050] ② Application Layer: Responsible for command forwarding, business orchestration of the execution order of network processing objects involved in the network forwarding process, and splicing the execution order and results. It delegates the functions to the object layer for implementation. The application layer includes application services.
[0051] ③ Object Layer: This layer contains core network processing objects to implement specific business logic and obtains the necessary data through the data support layer. Multiple network processing objects can be configured in this layer. These objects are used to perform network forwarding processing on business data generated by business items in the business item set. Network processing objects can include at least one of the following: entity objects, numerical objects, and composite objects.
[0052] ④ Data Support Layer: Provides data services for one or more of the interface layer, application layer, and object layer. These data services may include one or more of the following: database services, data caching services, third-party interface services, and message queue services.
[0053] In one embodiment, for a business project, such as Figure 1dAs shown, we can first perform regional analysis on the network forwarding processing of the business data for this business project to determine the entity objects needed for this processing. Then, we can model the entity objects to obtain the network processing objects, complete the microservice partitioning and object layer code implementation, and finally use the network processing objects to support the specific requirements of the production layer. This can be understood as: analyzing the entity objects needed for network forwarding processing of the business data for this business project, modeling these entity objects to obtain the network processing objects, and implementing the business processing logic of these network processing objects at the object layer. Figure 1e In this framework, a platform-based object layer is constructed by building network processing objects and services to form the controller service platform. Different business projects can share common network processing objects. When new or changing requirements arise, only the application layer needs to be developed, achieved through the combination and scheduling of network processing objects, greatly improving development efficiency. Ultimately, this aims to create a platform-based object layer, improving code robustness and maintainability. Figure 1e In this context, common network processing objects may include, but are not limited to: VSI (Virtual Switch Interface), GRE (Generic Routing Encapsulation), Vxlan (Virtual Extensible Local Area Network), NQA (Network Quality Analyzer), IPSEC (Internet Protocol Security), PIPE (Pipeline), LOOpback, VRF (Virtual Routing Forwarding), BGP (Border Gateway Protocol), BFD (Bidirectional Forwarding Detection), carrier physical leased lines, internet channels, tenant channels, and 5G CPE (Customer Premise Equipment). Data from the interface layer can be sent to the application layer via DTO. DO (Domain Object) refers to network processing objects, and PO (Persistent Object) refers to persistent objects, related to databases, data caches, Tsac Callers, and SDWAN Callers in the data support layer. Among them, Caller: the caller; Tsac: a type of security gateway; SDWAN: Software-defined wide area network.
[0054] In one embodiment, based on the aforementioned network controller, this application provides a network forwarding processing scheme for services. The general principle of this network forwarding processing scheme is as follows: When it is necessary to perform network forwarding processing on target service data of a target service item in a set of service items, firstly, the target service data of the target service item is received through the interface layer in the network controller, and the target service data of the target service item is analyzed for forwarding through the application layer in the network controller to determine the set of network processing objects; then, the processing logic orchestration instructions for the network processing set to perform network forwarding processing on the target service data are obtained, and the target service data is performed for network forwarding processing through the object layer according to the processing logic orchestration instructions.
[0055] Through the aforementioned network controller, network processing objects in the object layer can be generated through regional analysis and regional modeling. These network processing objects do not need to be changed frequently and have cohesive business logic. A reasonable network processing object can be reused by any business project in the set of business projects without having to write corresponding code based on the network forwarding processing requirements of the business project's business data. This improves the reusability, robustness, and maintainability of the network processing objects in the network controller and enhances the efficiency of network forwarding processing for the business.
[0056] Based on the above network forwarding processing scheme for services, please refer to Figure 2 , Figure 2 This is a flowchart illustrating a service network forwarding processing method provided in an embodiment of this application. This method can be executed by a computer device equipped with a network controller. The service network forwarding processing method can be applied to the network controller, which can provide network services for each service item in a service item set. The network controller includes an interface layer, an application layer, an object layer, and a data support layer. Multiple network processing objects are configured in the object layer. The computer device can be a terminal device or a server. The terminal device can be, but is not limited to, smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, vehicle terminals, smart wearable devices, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The service network forwarding processing method provided in this embodiment can include the following steps S201-S203:
[0057] S201: In response to a business request received at the interface layer for a target business item, retrieve the target business data to be forwarded from the business request. The business item set may include one or more business items, and the target business item is any one of the one or more business items included in the business item set. A business item can be a data query item, a data storage item, etc. For example, when it is a data query item, the target business data can be the business data to be queried; when it is a data storage item, the target business data is the data to be stored. When network forwarding of the target business data of a target business item is desired, a business request for the business item can be sent to the interface layer, carrying the target business data to be forwarded. The interface layer can then respond to the received business request for the target business item and retrieve the target business data to be forwarded from the business request.
[0058] Multiple network processing objects are configured in the object layer. When business data from any business project in this business project set undergoes network forwarding processing, it can obtain the corresponding network processing object from the multiple network processing objects configured in the object layer of the network controller. That is, business projects in the business project set can reuse some or all of the network processing objects configured in the object layer. For example, the business project set includes business project A and business project B, such as... Figure 3a and Figure 3b As shown, Figure 3a The process of network forwarding for business data of business project A (Resource set 1-vECMGW1 (virtual edge computing machine gateway) forwards the dataset to resource set 1-vECMGW2 (virtual edge computing machine gateway) via VxLAN) Figure 3b The process of network forwarding for business data of business B (the business data on the tenant side can be forwarded to the operator side through the IPsec (Internet Protocol Security) network, and then the operator side sends the business data to the ECNPL (External Connection Network.Private Line) on the Internet side through a leased line, and the ECNPL forwards the business data to the external network gateway EGW through Vxlan).
[0059] Business project A requires the network processing objects "IPsec" and "Vxlan" to be used in the network controller; business project B also requires the network processing objects "IPsec" and "Vxlan" to be used in the network controller. If the network processing objects "IPsec" and "Vxlan" do not exist at the object layer in the network controller, then... Figure 3c As shown, in practical applications... Figure 3c Area 31 in the diagram indicates that business project A has insufficient attributes defined for Vxlan to meet the needs of project B. Figure 3c Region 32 indicates that business project A is logically coupled with Vxlan and Ipsec. This means that the implementation code corresponding to the same network processing objects in business project A and business project B cannot be reused (i.e., each project must write its own code). If the network processing objects "Ipsec" and "Vxlan" are configured in the object layer of the network controller, both business project A and business project B can reuse the network processing objects "Ipsec" and "Vxlan" in the object layer. This eliminates the need for developers to write corresponding code for network forwarding of business data for any business project, reducing the waste of resources caused by development.
[0060] The network processing objects configured in the object layer can include any one or more of entity objects, numerical objects, and composite objects. Entity objects can be used to describe the attribute values and behavioral methods of nodes or services involved in the network forwarding process. Entity objects have a unique identifier (ID) and are characterized by high cohesion and low coupling. Numerical objects are used to describe the parameter data required for the operation of nodes or services involved in the network forwarding process. Numerical objects do not have a unique identifier (ID). The nodes involved in this application's embodiments can be, for example, base stations, routers, etc., and the services involved can be, for example, dedicated channels, routing, protocol packets, CPEs, IPsec, etc. For example, such as... Figure 4 As shown, for IPSEC in the traditional business logic layer 41, the traditional approach is to define business objects "UsageCount" and "Edge Computing Machine Gateway Identifier EcmgwID" for business project A in the business logic layer. The business objects "UsageCount" and "EcmgwID" are abstractions of business requirements. In this embodiment, the business objects "UsageCount" and "EcmgwID" in IPSEC can be recorded in the application layer 42 where business project A resides. Furthermore, IPSEC is abstracted using a region model to obtain the entity object "IPSEC" and the IPSEC attributes described by this entity object: "EncapVrf (Encapsulated Virtual Router Forwarding)," "InstanceID (Instance ID)," "CidrPair (Classless Inter-Domain Route Pair)," and "DecapVrf (Decapsulated Virtual Router Forwarding)," which are then recorded in the object layer 43. Figure 4Region 44 is an intersection region. In software development, the abstract business objects and entity objects in this intersection region usually have some overlap. The business objects are incomplete abstractions of the entity objects and will also add some other business logic. For example, setting AllocateIP (allocate IP (Internet Protocol)) and CreatePSK (create PSK (pre-shared key)) for the entity object "IPSEC".
[0061] In one embodiment, the aforementioned behavioral method may include cohesive business logic, while attribute values can be hidden within the entity object. In practical application, this behavioral method directly exposes the cohesive business processing logic and uses a target method to expose the attribute values of the nodes or services described by the entity object. The target method may include one of the following: Getter / Setter methods. The Getter method returns the values of internal member variables to the caller, while the Setter method can be used to set the member variables and filter out unreasonable values. Figure 5 As shown, Figure 5 The section 51 describes the business processing logic implemented by IPSEC using traditional object-oriented methods to translate flowcharts. This approach easily degenerates into transactional scripts with poor reusability. However, in... Figure 5 In embodiment 52 of this application, after determining the entity object "IPSEC", a behavioral method is assigned to the IPSEC described by the entity object "IPSEC" and the attribute value is hidden in the entity object. The behavioral method exposed externally should contain cohesive business logic, and the attribute value is exposed using method 1 (such as a setter method) and method 2 (such as a getter method). It should be noted that during network forwarding processing, the entity object should describe the behavioral methods of the involved nodes or services in a moderate manner (i.e., avoid over-capacity). Excessive capacity may introduce dependencies on other entity objects, causing unnecessary coupling.
[0062] In one embodiment, entity objects with high cohesion and low coupling can handle network forwarding of business data for business projects. However, details that are not originally relevant may be exposed between entity objects or between entity objects and value objects, potentially introducing coupling between entity objects. For example, in Figure 6In the past, the entity objects described by the network processing objects exposed details of dedicated channels, routes, and IPsec, and introduced coupling between IPsec and user premises equipment. To address these issues, in this embodiment, the network processing object may include a composite object. This composite object is obtained by aggregating a group of related entity objects or value objects. The composite object may include multiple entity objects and / or multiple value objects, and the number of composite objects can be one or more. High cohesion, reusability, and hiding of details are important during aggregation. Therefore, a root entity object can be set in the composite object, through which the corresponding composite objects can be accessed. This can be understood as: any composite object interacts with the interaction object through the root entity object, which includes any one or more of the following: application layer, other composite objects in the object layer, entity objects, and value objects. Using composite objects avoids exposing too many unnecessary details and introducing unnecessary coupling between entity objects. The composite object only exposes core methods (i.e., exposing the behavior methods corresponding to the root entity object), enabling the entity objects and / or value objects included in the composite object to work together to achieve corresponding business functions. Furthermore, the composite object can also serve as the basic unit for data modification and persistence.
[0063] like Figure 6 As shown, since the dedicated channel, routing, IPsec, and user premises equipment described by the entity objects can complete the network forwarding processing of business data for the business project, but expose too many details, and there is a certain coupling between the protocol packets and the user premises equipment, and the user premises equipment also sets an acquisition identifier (GetID). Therefore, the entity objects describing the dedicated channel, the entity objects describing the routing, the entity objects describing the IPsec, and the entity objects describing the user premises equipment in the object layer of the network controller can be aggregated into a composite object, and an entity object can be selected from the entity objects describing the dedicated channel, the entity objects describing the routing, the entity objects describing the IPsec, and the entity objects describing the user premises equipment as the root entity object. For example, the entity object describing the user premises equipment can be selected as the root entity object, or an entity object can be randomly selected as the root entity object. This application embodiment does not limit this. The final composite object has the following characteristics: (1) Other entity objects in the composite object and the root entity object have the same life cycle; (2) The composite object has a set of consistent business rules and has transaction consistency; (3) The number of entity objects and / or numerical objects in the composite object is less than a preset value, which can be set according to requirements.
[0064] In one embodiment, the network controller can be configured within the nodes or services involved in the network's forwarding process. For example, in Figure 3bIn this architecture, the network controller is configured in the Customer Premises Equipment (CPE). The network processing objects at the object layer of the network controller can include IPsec. Through this IPsec object, the CPE can control the forwarding of target service data to the operator's user plane function. Alternatively, the network controller can also be configured in the User Plane Function (UPF). The network processing objects at the object layer of the network controller can include IPsec (Internet Security Protocol), GRE, leased lines, IPsec over GRE (using GRE tunnels to encapsulate IPSec tunnels), and TSACGW (Terrain Gateway for Edge Access and Acceleration Platform). Through these IPsec, GRE encapsulation, and leased lines, the user plane function can forward target service data to the Internet's ECNPL in 5G. It should be understood that for any service project, the network controller can be configured in any node or service involved in that project. The network processing objects included in the object layer of the network controller configured in the node or service can be the same or different. The 5G base station and the user plane function constitute the 5GC (i.e., the 5G core network).
[0065] S202: By performing forwarding analysis on the target service data of the target service project through the application layer, a set of network processing objects is determined, and the processing logic orchestration instructions for the network processing object set to perform network forwarding processing on the target service data are obtained. The set of network processing objects may include one or more target network processing objects, each of which can be used to perform network forwarding processing on the target service data generated by the target service project. The processing logic orchestration instructions may include the execution order of each target network processing object in the set when performing network forwarding processing on the target service data. In some embodiments, the processing orchestration instructions may also include execution instructions, which are used to trigger the object layer to execute the service processing logic corresponding to each network processing object according to the execution order of each target network processing object.
[0066] In one embodiment, the target service data of a target service item can be sent to the application layer in the network controller through the interface layer. The application layer can then receive the target service data and perform forwarding analysis on it to obtain a set of network processing objects. This forwarding analysis can be understood as area analysis, specifically referring to analyzing the network forwarding processing flow of the target service data for that service item, and the network processing objects required under that forwarding processing flow.
[0067] The specific implementation of obtaining the processing logic orchestration instructions for network forwarding of target service data from the network processing object set can be as follows: the execution order of each target network processing object included in the network processing object set is obtained through the application layer when the target service data is network forwarded, and processing logic orchestration instructions are generated based on the execution order of each target network processing object included in the network processing object set.
[0068] S203. The target business data is processed by network forwarding through the object layer according to the instructions arranged by the processing logic.
[0069] In one embodiment, the processing and editing orchestration instructions are obtained from the application layer through the object layer in the network controller. The processing logic orchestration instructions include: the execution order of each target network processing object in the network processing object set when performing network forwarding processing on the target service data, and executing each target network processing object in sequence according to the execution order of each target network processing object in the network processing object set to complete the network forwarding processing of the target service data of the target service project.
[0070] In this embodiment, in response to a service request for a target service item received at the interface layer, target service data to be forwarded is obtained from the service request; the target service data of the target service item is analyzed for forwarding at the application layer to determine a set of network processing objects, and the processing logic orchestration instructions for the network processing objects to perform network forwarding processing on the target service data are obtained; the target service data is processed for network forwarding at the object layer according to the processing logic orchestration instructions. By determining the set of network processing objects and directly performing network forwarding processing on the target service data at the object layer based on the execution order of each target network processing object in the set of network processing objects, the network forwarding processing of the target service data is performed without writing code, thus improving the efficiency of network forwarding processing of the service.
[0071] Based on the network forwarding processing scheme for the service, please refer to Figure 7 , Figure 7 This is a flowchart illustrating a network forwarding method for services provided in an embodiment of this application. The network forwarding method for services can be applied to a network controller configured in a computer device. The network controller may include an interface layer, an application layer, an object layer, and a data support layer. In this embodiment, the network forwarding method for services may include the following steps S701-S705:
[0072] S701: In response to a service request for a target service item received at the interface layer, obtain the target service data to be forwarded from the service request.
[0073] S702: By performing forwarding analysis on the target service data of the target service project through the application layer, a set of network processing objects is determined, and the processing logic orchestration instructions for the network processing object set to perform network forwarding processing on the target service data are obtained. The set of network processing objects includes one or more target network processing objects.
[0074] In one embodiment, the application layer configures processing logic modules corresponding to each business project in the business project set. One business project can correspond to one or more processing logic modules. Configuring these processing logic modules facilitates determining the network processing objects for network forwarding of business data from different business projects. For example... Figure 1e As shown, at the application layer, processing logic modules corresponding to business project A, business project B, and business project C can be pre-developed. These processing logic modules can specify the set of network processing objects for the target business data of the business project during network forwarding, the execution order of processing among the network objects, and the processing logic corresponding to the processing result obtained from the network forwarding of the target business data. The specific implementation method for determining the set of network processing objects by analyzing the target business data of the target business project through the application layer can be as follows: determine the processing logic modules configured for the target business project in the application layer (e.g., find the corresponding processing logic module based on the business project identifier), and analyze the target business data through the processing logic modules configured for the target business project in the application layer to obtain the set of network processing objects during network forwarding of the target business data. Specifically, the set of network processing objects during network forwarding of the target business data can be directly obtained from the processing logic modules configured for the target business project.
[0075] In some embodiments, the execution order of each target network processing object in the network processing object set can be obtained from the processing logic module configured for the target business project, and a processing logic orchestration instruction for network forwarding processing of the target business data can be generated based on the execution order of each network processing object.
[0076] S703: Obtain processing logic orchestration instructions from the application layer through object services included in the object layer. To avoid the object layer directly exposing itself to the application layer, this embodiment provides services to the application layer through object services in the object layer. When the application layer delivers processing logic orchestration instructions for network forwarding of target service data to the object layer, it can obtain these instructions from the application layer through object services included in the object layer.
[0077] S704: Determine the execution order of each target network processing object in the network processing object set based on the processing logic orchestration instructions. The processing logic orchestration instructions include the execution order of each target network processing object in the network processing object set. This can be determined by the object service from multiple network processing objects configured at the object layer based on the processing logic orchestration instructions, along with the execution order of each target network processing object.
[0078] S705: Perform network forwarding processing on the target service data according to the execution order of each target network processing object. Any target network processing object can be any one of the following: an entity object, a numerical object, or a composite object.
[0079] In one embodiment, an entity object is used to describe the attribute values and behavioral methods of the nodes or services involved in the network forwarding process. When the network processing object set includes multiple target entity objects, the specific implementation of network forwarding processing of target business data according to the execution order of each target network processing object can be as follows: according to the execution order of each target entity object, the attribute values and behavioral methods of the nodes or services described by each target entity object are determined sequentially, and the business processing logic exposed by the corresponding behavioral methods is executed sequentially based on the attribute values of the nodes or services described by each target entity object to complete the network forwarding of the target business data. The business processing logic defines the processing procedure for network forwarding of business data.
[0080] In one embodiment, a numerical object is used to describe the parameter data required by the nodes or services involved in the network forwarding process during runtime. The network processing object set includes target entity objects and target numerical objects. The specific implementation of network forwarding processing of target business data according to the execution order of each target network processing object can be as follows: according to the execution order of the target entity objects, the attribute values and behavior methods of the nodes or services described by the target entity objects and the parameter data required by the nodes or services described by the target numerical objects during runtime are determined in sequence. Then, the nodes or services are run in sequence based on the parameter data required by the described nodes or services during runtime, and the business processing logic exposed by the corresponding behavior methods is executed based on the attribute values of the nodes or services described by the target entity objects to complete the network forwarding of the target business data.
[0081] In one embodiment, the network processing object set includes multiple composite objects. The specific implementation of network forwarding processing of target service data according to the execution order of each target network processing object can be as follows: Following the execution order of each target network object, the business processing logic within each composite object is executed sequentially through its root entity object to complete the network forwarding processing of the target service data. In this case, the business processing logic within the composite object can include: business processing logic between business entity objects of each entity object, business processing logic between entity objects and numerical objects, processing logic between numerical objects, etc.
[0082] Specifically, when processing target business data via network forwarding, if the processing logic orchestration instructions determine that there is data interaction between the first and second combination objects of the network processing object set, then the data interaction is performed through the root entity object of the first combination object and the root entity object of the second combination object. For example... Figure 3b As shown, the network processing object set includes multiple combined objects: tenant channel, 5G CPE, operator physical leased line, and internet channel. The execution order of these combined objects is: tenant channel - 5G CPE - operator physical leased line - internet channel. Data interaction exists between the tenant channel and the 5G CPE, between the 5G CPE and the operator physical leased line, and between the operator physical leased line and the internet channel. Each combined object corresponds to a root entity object. The object service executes the service processing logic within the tenant channel according to the root entity object corresponding to the tenant channel, and forwards the target service data to the root entity object of the 5G CPE via the tenant channel's root entity object. Next, the service processing logic within the 5G CPE is executed according to the 5G CPE's root entity object, and the target service data is forwarded to the root entity object of the operator physical leased line via the 5G CPE's root entity object. Finally, the service processing logic within the operator physical leased line is executed according to the operator physical leased line's root entity object, and the target service data is forwarded to the root entity object of the internet channel via the operator physical leased line's root entity object. By sequentially executing the business processing logic corresponding to multiple combined objects, the network forwarding processing of the target business data can be better achieved.
[0083] In one embodiment, the network controller further includes a data support layer, which can be used to provide data services to any one or more of the interface layer, application layer, and object layer. The data services provided by the data support layer may include any one or more of the following: database services, data caching services, third-party interface services, and message queue services. The third-party interface services may include: data query interface services and data notification interface services (such as email services and SMS services).
[0084] Unlike the traditional top-down dependency approach, which places the base layer (data layer) at the core, this application proposes placing the object layer at the very core. To prevent the object layer from having to modify its dependencies on external data if those dependencies change, thus ensuring proper coupling with business code, this application implements a dependency inversion layer (also known as an anti-corruption layer) within the object layer. This dependency inversion layer enables dependency inversion. Figure 8 As shown, when the object layer (such as the Dctg service (dedicated tunnel group service) in the object layer) has external data dependencies on third-party interface services and data caching services in the data support layer, a dependency inversion layer can be set up in the object layer. When processing and forwarding business data of business projects over the network, the dependency data that needs to be obtained from the data support layer can be injected into the object layer as required when determining the set of network processing objects.
[0085] The dependency inversion layer (DIL) is implemented by defining the interfaces of the components or services it depends on in the object layer; that is, the DIL can be presented in the form of interfaces. External dependency interface information is injected into the network processing object through interface injection, while the specific implementation is placed in the data support layer. This way, when external dependent components or services change, only the injected interface information needs to be modified, without affecting the business logic in the object layer. Specifically, interface injection rules can be used to inject the interface information of the components or services that the object layer depends on into the DIL. This interface injection rule can be a constructor function in the object layer, which allows for the injection of interface information. If the interface information of the components or services that the object layer depends on changes, the modified interface information of the components or services that the object layer depends on is obtained and injected into the DIL through the interface injection rule. Injecting the modified interface information can overwrite the original interface information of the components or services.
[0086] In one embodiment, a function switch can be set in the dependency inversion layer to implement special business requirements in different business project scenarios. The business code is unaware of this. When the function is disabled, the call to the corresponding function interface in the dependency inversion layer returns success, but no operation is performed. When the function is enabled, the call to the corresponding function interface in the dependency inversion layer returns success, and the corresponding special business requirement operation needs to be executed.
[0087] In one embodiment, the dependency inversion layer also includes a cache for storing dependency data, which includes one or a combination of two of the following: dependency data successfully used by the object layer and preset dependency data. The dependency data successfully used by the object layer can be dependency data that was successfully used by the object layer in the last successful instance, or dependency data successfully used by the object layer within a historical time period. The preset dependency data can be business fallback data or data that the data service in the data support layer cannot provide. For example, when testing network forwarding processing of business data for a business project, if unit test data services cannot be deployed in a unit test environment, the data corresponding to the unit test (i.e., the preset dependency data) can be stored in the cache of the dependency inversion layer. The computer device can detect whether obtaining the target data service from the data support layer through the object layer has failed. If the failure is detected, the dependency data corresponding to the target data service is obtained from the dependency data stored in the cache of the dependency inversion layer, and the obtained dependency data is sent to the object layer. If the success is detected, the data corresponding to the target data service is sent to the object layer through the repository interface. Setting up caching in the dependency inversion layer can effectively reduce the request pressure on external dependencies. Specifically, if the dependency data (i.e., service data) provided by the target data service is not obtained, it can be considered a failure to retrieve the target data service from the data support layer through the object layer.
[0088] The dependency inversion layer can be used to shield dependency data of a target type, where the interface or protocol of this dependency data does not meet preset conditions. The target type can include, but is not limited to, database types, third-party interface types, etc. The preset conditions can be the target interface requirements or the target interface protocol. In this case, the method to detect whether obtaining the target data service from the data support layer through the object layer has failed can be as follows: the computer device can detect whether the service data is dependency data of the target type. This service data refers to the data corresponding to the target data service obtained through the object layer, which is provided by the data support layer. If the service data is detected as dependency data of the target type, it can be determined that obtaining the target data service from the data support layer through the object layer has failed; otherwise, it can be determined that obtaining the target data service from the data support layer through the object layer has succeeded. Here, the service data and dependency data are of the same type, both obtained from the data support layer and required by the network processing object of the object layer.
[0089] In one embodiment, after the target business data is processed via network forwarding according to the processing logic orchestration instructions by the object layer, the processing result can be obtained through the application layer and output through a third-party interface service in the data support layer. For example, if the third-party interface is an email notification interface, the processing result can be output via email through the email notification interface in the data support layer.
[0090] It should be noted that the region model involved in the embodiments of this application can be called a domain model, the object layer can be called a domain layer, the network processing object can be called a domain object, the numerical object can also be called a value object, and the composite object can be called an aggregation.
[0091] In this embodiment, in response to a service request for a target service item received at the interface layer, target service data to be forwarded is obtained from the service request. The application layer performs forwarding analysis on the target service data of the target service item to determine a set of network processing objects and obtains the processing logic orchestration instructions for the network processing objects to perform network forwarding processing on the service data. The processing logic orchestration instructions are obtained from the application layer through the object services included in the object layer. The execution order of each target network processing object in the set of network processing objects is determined according to the processing logic orchestration instructions. The target service data is processed for network forwarding according to the execution order of each target network processing object. The network forwarding processing of the service data of the service item can be performed quickly through the object services included in the object layer and the processing logic orchestration instructions of the application layer.
[0092] Based on the description of the above embodiments of the network forwarding processing method for services, this application also discloses a network forwarding processing apparatus for services. This apparatus can be a computer program (including program code) running on the aforementioned computer device. The computer device is configured with a network controller, which provides network services to each service item in a service item set. The network controller includes an interface layer, an application layer, and an object layer. Multiple network processing objects are configured in the object layer, and these objects are used to perform network forwarding processing on the service data generated by the service items in the service item set. This network forwarding processing apparatus for services can execute... Figure 2 and Figure 7 The method shown. Please refer to [link / reference]. Figure 9 Network forwarding processing for services can include the following units:
[0093] The receiving unit 901 is used to receive business requests for the target business item at the interface layer;
[0094] Processing unit 902 is configured to, in response to a service request for a target service item received at the interface layer, obtain target service data to be forwarded from the service request.
[0095] The processing unit 902 is further configured to perform forwarding analysis on the target service data of the target service project through the application layer, determine the network processing object set, and obtain the processing logic orchestration instruction of the network processing object set for network forwarding processing of the target service data;
[0096] The processing unit is further configured to perform network forwarding processing on the target service data by means of the object layer according to the processing logic orchestration instructions;
[0097] The processing logic orchestration instructions include the execution order of each target network processing object in the network processing object set when performing network forwarding processing on the target service data.
[0098] In one embodiment, the application layer configures processing logic modules corresponding to each business item in the business item set, with one or more processing logic modules corresponding to each business item. When the processing unit 902 forwards and analyzes the target business data of the target business item through the application layer, it can specifically be used for:
[0099] Identify the processing logic modules configured for the target business item in the application layer;
[0100] The target business data is forwarded and analyzed by the processing logic module configured for the target business project in the application layer.
[0101] In one embodiment, the network processing objects configured in the object layer include any one or more of the following: entity objects, numerical objects, and composite objects; wherein:
[0102] The entity object is used to describe the attribute values and behavior methods of the nodes or services involved in the network forwarding process;
[0103] The numerical object is used to describe the parameter data required by the nodes or services involved in the network forwarding process during runtime.
[0104] The composite object includes multiple entity objects and / or multiple value objects. A root entity object is set in the composite object. The composite object interacts with the interaction object through the root entity object. The interaction object includes any one or more of the following: the application layer, other composite objects in the object layer, entity objects, and value objects.
[0105] In one embodiment, the network controller further includes a data support layer, which is used to provide data services for any one or more of the interface layer, the application layer, and the object layer;
[0106] The data services provided by the data support layer include any one or more of the following: database services, data caching services, third-party interface services, and message queue services.
[0107] In one embodiment, a dependency inversion layer is provided in the object layer, and the processing unit 902 is further configured to:
[0108] The interface information of the components or services that the object layer depends on is injected into the dependency inversion layer through interface injection rules.
[0109] If the interface information of the components or services that the object layer depends on changes, the interface information of the components or services that the object layer depends on after the change is obtained, and the changed interface information is injected into the dependency inversion layer through the interface injection rule.
[0110] In one embodiment, the dependency inversion layer further includes a cache for storing dependency data, which includes one or a combination of two of the following: dependency data successfully used by the object layer and preset dependency data. The processing unit 902 is further configured to:
[0111] Detect whether the service of obtaining the target data from the data support layer through the object layer has failed;
[0112] If so, the dependency data corresponding to the target data service is obtained from the dependency data stored in the cache of the dependency inversion layer, and the obtained dependency data is sent to the object layer.
[0113] In one embodiment, the dependency inversion layer is used to shield the target type's dependency data, where the interface or protocol of the target type's dependency data does not meet preset conditions; the post-processing unit, when detecting whether obtaining the target data service from the data support layer through the object layer has failed, may specifically be used to:
[0114] The detection service data is determined to be dependent data of the target type. The service data refers to the data corresponding to the target data service obtained through the object layer. The target data service is provided by the data support layer.
[0115] If so, it is determined that obtaining the target data service from the data support layer through the object layer failed.
[0116] In one embodiment, the network processing object set includes: a plurality of combined objects, and the processing unit 902 is further configured to:
[0117] When performing network forwarding processing on the target service data, if it is determined that there is data interaction between the first combined object and the second combined object of the network processing object set according to the instruction of the processing logic orchestration, then data interaction is performed through the root entity object of the first combined object and the root entity object of the second combined object.
[0118] In one embodiment, the object layer further includes an object service, and the processing unit, when performing network forwarding processing on the target service data according to the processing logic orchestration instructions through the object layer, can specifically be used for:
[0119] Processing logic orchestration instructions are obtained from the application layer through object services;
[0120] The execution order of each target network processing object in the set of network processing objects is determined according to the processing logic orchestration instructions.
[0121] The target service data is processed by network forwarding according to the execution order of each target network processing object.
[0122] In one embodiment, the processing unit 902 is further configured to:
[0123] The application layer obtains the processing result of the target service data being network forwarded by the object layer according to the processing logic orchestration instructions;
[0124] The processing results are output through a third-party interface service in the data support layer.
[0125] In this embodiment, in response to a service request for a target service item received at the interface layer, target service data to be forwarded is obtained from the service request; the target service data of the target service item is analyzed for forwarding at the application layer to determine a set of network processing objects, and the processing logic orchestration instructions for the network processing objects to perform network forwarding processing on the target service data are obtained; the target service data is processed for network forwarding at the object layer according to the processing logic orchestration instructions. By determining the set of network processing objects and directly performing network forwarding processing on the target service data at the object layer based on the execution order of each target network processing object in the set of network processing objects, the network forwarding processing of the target service data is performed without writing code, thus improving the efficiency of network forwarding processing of the service.
[0126] Based on the above description of the network forwarding processing method embodiments for services, this application also discloses a computer device, which includes a network controller. Please refer to... Figure 10The computer device may include at least a processor 1001, an input device 1002, an output device 1003, and a memory 1004. The processor 1001, input device 1002, output device 1003, and memory 1004 within the computer device may be connected via a bus or other means.
[0127] The memory 1004 is a memory device in a computer device used to store programs and data. It is understood that the memory 1004 here can include the computer device's built-in storage medium, or it can include extended storage media supported by the computer device. The memory 1004 provides storage space for the computer device's operating system. Furthermore, computer programs (including program code) are also stored in this storage space. It should be noted that the computer storage medium here can be high-speed RAM; optionally, it can also be at least one computer storage medium located remotely from the aforementioned processor, which can be called a Central Processing Unit (CPU), the core and control center of the computer device, used to run the computer programs stored in the memory 1004.
[0128] In one implementation, a processor 1001 may load and execute a computer program stored in memory 1004 to implement the corresponding steps of the method described in the above-described embodiments of the network forwarding processing method for services; specifically, the processor 1001 loads and executes the computer program stored in memory 1004 for:
[0129] In response to a business request for a target business item received at the interface layer, the target business data to be forwarded is obtained from the business request.
[0130] The application layer performs forwarding analysis on the target business data of the target business project, determines the set of network processing objects, and obtains the processing logic orchestration instructions of the set of network processing objects for network forwarding processing of the target business data.
[0131] The target service data is processed by network forwarding through the object layer according to the processing logic orchestration instructions.
[0132] The processing logic orchestration instructions include the execution order of each target network processing object in the network processing object set when performing network forwarding processing on the target service data.
[0133] In one embodiment, the application layer is configured with processing logic modules corresponding to each business item in the business item set. One business item corresponds to one or more processing logic modules. When the application layer forwards and analyzes the target business data of the target business item, the processor 1001 loads and executes the computer program stored in the memory 1004, which can be specifically used for:
[0134] Identify the processing logic modules configured for the target business item in the application layer;
[0135] The target business data is forwarded and analyzed by the processing logic module configured for the target business project in the application layer.
[0136] In one embodiment, the network processing objects configured in the object layer include any one or more of the following: entity objects, numerical objects, and composite objects; wherein:
[0137] The entity object is used to describe the attribute values and behavior methods of the nodes or services involved in the network forwarding process;
[0138] The numerical object is used to describe the parameter data required by the nodes or services involved in the network forwarding process during runtime.
[0139] The composite object includes multiple entity objects and / or multiple value objects. A root entity object is set in the composite object. The composite object interacts with the interaction object through the root entity object. The interaction object includes any one or more of the following: the application layer, other composite objects in the object layer, entity objects, and value objects.
[0140] In one embodiment, the network controller further includes a data support layer, which is used to provide data services for any one or more of the interface layer, the application layer, and the object layer;
[0141] The data services provided by the data support layer include any one or more of the following: database services, data caching services, third-party interface services, and message queue services.
[0142] In one embodiment, a dependency inversion layer is provided in the object layer, and the processor 1001 loads and executes a computer program stored in memory 1004, further configured to:
[0143] The interface information of the components or services that the object layer depends on is injected into the dependency inversion layer through interface injection rules.
[0144] If the interface information of the components or services that the object layer depends on changes, the interface information of the components or services that the object layer depends on after the change is obtained, and the changed interface information is injected into the dependency inversion layer through the interface injection rule.
[0145] In one embodiment, the dependency inversion layer further includes a cache for storing dependency data, which includes one or a combination of two of the following: dependency data successfully used by the object layer and preset dependency data. The processor 1001 loads and executes the computer program stored in the memory 1004, and is further used for:
[0146] Detect whether the service of obtaining the target data from the data support layer through the object layer has failed;
[0147] If so, the dependency data corresponding to the target data service is obtained from the dependency data stored in the cache of the dependency inversion layer, and the obtained dependency data is sent to the object layer.
[0148] In one embodiment, the dependency inversion layer is used to shield the dependency data of the target type, where the interface or protocol of the dependency data of the target type does not meet preset conditions; when detecting whether obtaining the target data service from the data support layer through the object layer has failed, the processor 1001 loads and executes the computer program stored in the memory 1004, which can be specifically used for:
[0149] The detection service data is determined to be dependent data of the target type. The service data refers to the data corresponding to the target data service obtained through the object layer. The target data service is provided by the data support layer.
[0150] If so, it is determined that obtaining the target data service from the data support layer through the object layer failed.
[0151] In one embodiment, the network processing object set includes: multiple composite objects; the processor 1001 loads and executes a computer program stored in the memory 1004, and is further configured to:
[0152] When performing network forwarding processing on the target service data, if it is determined that there is data interaction between the first combined object and the second combined object of the network processing object set according to the instruction of the processing logic orchestration, then data interaction is performed through the root entity object of the first combined object and the root entity object of the second combined object.
[0153] In one embodiment, the object layer further includes an object service. When the target service data is processed via network forwarding through the object layer according to the processing logic orchestration instructions, the processor 1001 loads and executes the computer program stored in the memory 1004, which can be specifically used for:
[0154] Processing logic orchestration instructions are obtained from the application layer through object services;
[0155] The execution order of each target network processing object in the set of network processing objects is determined according to the processing logic orchestration instructions.
[0156] The target service data is processed by network forwarding according to the execution order of each target network processing object.
[0157] In one embodiment, the processor 1001 loads and executes a computer program stored in the memory 1004, and is further configured to:
[0158] The application layer obtains the processing result of the target service data being network forwarded by the object layer according to the processing logic orchestration instructions;
[0159] The processing results are output through a third-party interface service in the data support layer.
[0160] It should be understood that, in the embodiments of this application, the processor 1001 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0161] In this embodiment, in response to a service request for a target service item received at the interface layer, target service data to be forwarded is obtained from the service request; the target service data of the target service item is analyzed for forwarding at the application layer to determine a set of network processing objects, and the processing logic orchestration instructions for the network processing objects to perform network forwarding processing on the target service data are obtained; the target service data is processed for network forwarding at the object layer according to the processing logic orchestration instructions. By determining the set of network processing objects and directly performing network forwarding processing on the target service data at the object layer based on the execution order of each target network processing object in the set of network processing objects, the network forwarding processing of the target service data is performed without writing code, thus improving the efficiency of network forwarding processing of the service.
[0162] Furthermore, it should be noted that this application also provides a computer-readable storage medium storing a computer program, which includes program instructions. When a processor executes these program instructions, it can execute the aforementioned... Figure 2 and Figure 7 The methods described in the corresponding embodiments are therefore not repeated here. For technical details not disclosed in the computer-readable storage medium embodiments related to this application, please refer to the description of the method embodiments of this application. As an example, program instructions may be deployed on a computer device, executed on multiple computer devices located in one location, or executed on multiple computer devices distributed in multiple locations and interconnected through a communication network.
[0163] According to one aspect of this application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, enabling the computer device to perform the aforementioned... Figure 2 and Figure 7 The methods described in the corresponding embodiments are therefore not repeated here.
[0164] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0165] The above description discloses only one preferred embodiment of the present invention, and should not be construed as limiting the scope of the present invention. Those skilled in the art will understand that all or part of the processes of the above embodiments can be implemented, and equivalent changes made in accordance with the claims of the present invention are still within the scope of the invention.
Claims
1. A method for network forwarding of services, characterized in that, This method is applied to a network controller that provides network services to various business items in a set of business items. The network controller includes an interface layer, an application layer, and an object layer. Multiple network processing objects are configured in the object layer. These network processing objects are used to perform network forwarding processing on business data generated by the business items in the set of business items. The method includes: In response to a business request for a target business item received at the interface layer, the target business data to be forwarded is obtained from the business request; The application layer performs forwarding analysis on the target business data of the target business project, determines the set of network processing objects, and obtains the processing logic orchestration instructions of the set of network processing objects for network forwarding processing of the target business data. The target service data is processed by network forwarding through the object layer according to the processing logic orchestration instructions. The processing logic orchestration instructions include the execution order of each target network processing object in the network processing object set when performing network forwarding processing on the target service data.
2. The method as described in claim 1, characterized in that, The application layer is configured with processing logic modules corresponding to each business item in the business item set. One business item corresponds to one or more processing logic modules. The forwarding and analysis of the target business data of the target business item through the application layer includes: Identify the processing logic modules configured for the target business item in the application layer; The target business data is forwarded and analyzed by the processing logic module configured for the target business project in the application layer.
3. The method as described in claim 1, characterized in that, The network processing objects configured in the object layer include any one or more of the following: entity objects, numerical objects, and composite objects; wherein: The entity object is used to describe the attribute values and behavior methods of the nodes or services involved in the network forwarding process; The numerical object is used to describe the parameter data required by the nodes or services involved in the network forwarding process during runtime. The composite object includes multiple entity objects and / or multiple value objects. A root entity object is set in the composite object. The composite object interacts with the interaction object through the root entity object. The interaction object includes any one or more of the following: the application layer, other composite objects in the object layer, entity objects, and value objects.
4. The method according to any one of claims 1-3, characterized in that, The network controller further includes a data support layer, which is used to provide data services for any one or more of the interface layer, the application layer, and the object layer. The data services provided by the data support layer include any one or more of the following: database services, data caching services, third-party interface services, and message queue services.
5. The method as described in claim 4, characterized in that, The method further includes setting up a dependency inversion layer in the object layer, and also includes: The interface information of the components or services that the object layer depends on is injected into the dependency inversion layer through interface injection rules. If the interface information of the components or services that the object layer depends on changes, the interface information of the components or services that the object layer depends on after the change is obtained, and the changed interface information is injected into the dependency inversion layer through the interface injection rule.
6. The method as described in claim 5, characterized in that, The dependency inversion layer also includes a cache for storing dependency data. This dependency data includes one or a combination of two of the following: dependency data successfully used by the object layer and preset dependency data. The method further includes: Detect whether the service of obtaining the target data from the data support layer through the object layer has failed; If so, the dependency data corresponding to the target data service is obtained from the dependency data stored in the cache of the dependency inversion layer, and the obtained dependency data is sent to the object layer.
7. The method as described in claim 6, characterized in that, The dependency inversion layer is used to shield the dependency data of the target type, where the interface or protocol of the dependency data of the target type does not meet the preset conditions. The detection of whether the target data service failed to be obtained from the data support layer through the object layer includes: The detection service data is determined to be dependent data of the target type. The service data refers to the data corresponding to the target data service obtained through the object layer. The target data service is provided by the data support layer. If so, it is determined that obtaining the target data service from the data support layer through the object layer failed.
8. The method as described in claim 3, characterized in that, The network processing object set includes: multiple composite objects, and the method further includes: When performing network forwarding processing on the target service data, if it is determined that there is data interaction between the first combined object and the second combined object of the network processing object set according to the instruction of the processing logic orchestration, then data interaction is performed through the root entity object of the first combined object and the root entity object of the second combined object.
9. The method as described in claim 1, characterized in that, The object layer also includes object services, and the process of performing network forwarding processing on the target service data through the object layer according to the processing logic orchestration instructions includes: Processing logic orchestration instructions are obtained from the application layer through object services; The execution order of each target network processing object in the set of network processing objects is determined according to the processing logic orchestration instructions. The target service data is processed by network forwarding according to the execution order of each target network processing object.
10. The method as described in claim 4, characterized in that, The method further includes: The application layer obtains the processing result of the target service data being network forwarded by the object layer according to the processing logic orchestration instructions; The processing results are output through a third-party interface service in the data support layer.
11. A network forwarding processing apparatus for services, characterized in that, An apparatus is applied to a network controller that provides network services to various business items in a set of business items. The network controller includes an interface layer, an application layer, and an object layer. Multiple network processing objects are configured in the object layer. These network processing objects are used to perform network forwarding processing on business data generated by the business items in the set of business items. The apparatus includes: The receiving unit is used to receive business requests for the target business item received at the interface layer. The processing unit is configured to, in response to a service request for a target service item received at the interface layer, obtain the target service data to be forwarded from the service request. The processing unit is further configured to perform forwarding analysis on the target service data of the target service project through the application layer, determine the network processing object set, and obtain the processing logic orchestration instructions for the network processing object set to perform network forwarding processing on the target service data. The processing unit is further configured to perform network forwarding processing on the target service data by means of the object layer according to the processing logic orchestration instructions; The processing logic orchestration instructions include the execution order of each target network processing object in the network processing object set when performing network forwarding processing on the target service data.
12. A computer device, characterized in that, include: A processor is used to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, performs the network forwarding processing method for services as described in any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer storage medium stores a computer program, which, when executed by a processor, performs the network forwarding processing method for services as described in any one of claims 1-10.
14. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, performs the network forwarding processing method for services as described in any one of claims 1-10.