Patent Description:
Currently, there are two development trends of internet computation, and one is a ubiquitous computing capability. That is, computing containers with different scales of computing capabilities are widely distributed in different distances between users. These computing containers may be thousands of base stations that have computing capabilities and that are brought by tens of billions of intelligent terminals, billions of home gateways worldwide, and future mobile edge computing (mobile edge computing, MEC) in each city, or may be hundreds of cloud-hosted (Cloud CO) equipment rooms brought by network function virtualization (network function virtualization, NFC), and dozens of large-scale cloud data centers in each country. The other is a trend that features being microservice-based or serverless (Serverless). A conventional client-server (client-server) mode is deconstructed. Applications on a server (server) side are deconstructed into "functional components" for being deployed on a cloud platform. The functional components are scheduled by a same application programming interface gateway (application programming interface gateway, API gateway). In this way, an event-triggering function component can "be used immediately after being required and be ended immediately after being used". That is, the functional component can be dynamically instantiated as required. A service logic of a server is transferred to a client side. A client only needs to focus on a "computation function" but does not need to be aware of computing resources such as a computation place and a server/virtual machine/container. Therefore, the client needs to focus only on the service logic and implement that "a function is a service".

There is a gap between a current internet architecture and the foregoing trends. In a space dimension, a current internet topology is an "end-to-end model", that is, a network is in the middle and computation is in the periphery. However, in an edge computing or ubiquitous computing scenario, an internet topology is changed to computation and is embedded in a network. A current internet protocol (Internet Protocol, IP) route technology is based on the "end-to-end model" and considers only IP reachability. The network and the computation are two uncorrelated independent worlds. Consequently, it is difficult to construct, through the network, a highly efficiently organized distributed computing system by using a ubiquitous capability.

<CIT> describes a path computation element for temporal tunnel services. <CIT> describes a technique for selecting a path computation element.

Embodiments of this application provide a route computation method and a related routing domain used to inject a computing capability, as routing information, into a routing domain, so that the computing capability is added to route computation, thereby achieving optimal computation and network resource utilization.

According to a first aspect, an embodiment of this application provides a routing domain. The routing domain includes a computing container and a network router. The network router is a routing node that supports route computation. The computing container is connected to the network router through a virtual link. The computing container is configured to run a routing protocol, where the routing protocol is used to carry a computing capability of the computing container or the computing capability of the computing container and an identifier of a service or function; and send the computing capability of the computing container or the computing capability of the computing container and the identifier of the service or function to the network router by using the routing protocol. The network router is configured to obtain the computing capability, obtain a network capability of the routing domain; and compute a route based on the computing capability; or compute a route based on the computing capability and the network capability; and diffuse the computing capability or the computing capability and the identifier of the service or function to each network router in the routing domain and/or to another routing domain.

It can be learned from the technical solution provided in this embodiment of this application that the computing container diffuses the computing capability of the computing container and the identifier of the service or function in the routing domain, so that the computing capability is considered during route computation, thereby achieving optimal computation and network resource utilization.

Embodiments, which do not fall within the scope of the appended set of claims are to be interpreted as background information, useful for understanding the invention.

Embodiments of this application provide a route computation method and a related device, used to inject a computing capability, as routing information, into a routing domain, so that the computing capability is added to route computation, thereby achieving optimal computation and network resource utilization.

In the specification, claims, and accompanying drawings of this application, the terms "first", "second", "third", "fourth", and so on (if existent) are intended to distinguish between similar objects but do not necessarily indicate a specific order or sequence. It should be understood that the data termed in such a way are interchangeable in proper circumstances so that the embodiments of the present invention described herein can be implemented in other orders than the order illustrated or described herein. Moreover, the terms "include", "contain" and any other variants mean to cover the non-exclusive inclusion, for example, a process, method, system, product, or device that includes a list of steps or units is not necessarily limited to those units, but may include other units not expressly listed or inherent to such a process, method, product, or device.

Currently, there are two development trends of internet computation, and one is a ubiquitous computing capability. That is, computing containers with different scales of computing capabilities are widely distributed in different distances between users. These computing containers may be thousands of base stations that have computing capabilities and that are brought by tens of billions of intelligent terminals, billions of home gateways worldwide, and MEC in each city, or hundreds of cloud CO equipment rooms brought by NFC, and dozens of large-scale cloud data centers in each country. However, there is a gap between a current internet architecture and the foregoing trends. In a space dimension, a current internet topology is an "end-to-end model" (that is, a network is in the middle and computation is in the periphery). As shown in <FIG>, a set of nodes (Node) or vertices (Vertical) included in a current network routing domain is (u, v, w). A set of edges (Edge) connecting neighboring nodes is {(u, v) c1, (v, w) c2, (w, u) c3 <NUM>, where c <NUM>, c2, and c3 are weighted values of the edges. In the network routing domain shown in <FIG>, a node herein is a router or a network routing node, an edge herein is a link (Link) between neighboring nodes, and a weighted value herein may also be referred to as a link state (Link state). The link between the neighboring nodes may be a direct physical link, or may be a logical link that is reachable through a network. In <FIG>, X and Y are respectively computing containers in which a function x and a function y are located, and are located outside the routing domain. Therefore, a current IP route technology is based on the "end-to-end model" and considers only IP reachability. The network and the computation are two uncorrelated independent worlds. Consequently, it is difficult to construct, through the network, a highly efficiently organized distributed computing system by using a ubiquitous capability.

To resolve the problem, an embodiment of this application provides a routing domain. The routing domain includes a computing container and a network router. The network router is a routing node that supports route computation. The computing container is connected to the network router through a virtual link. The computing container is configured to run a routing protocol, where the routing protocol is used to carry a computing capability of the computing container or the computing capability of the computing container and an identifier of a service or function; and send the computing capability of the computing container or the computing capability of the computing container and the identifier of the service or function to the network router by using the routing protocol. The network router is configured to obtain a network capability of the routing domain; and compute a route based on the computing capability; or compute a route based on the computing capability and the network capability.

Specifically, an architecture of the routing domain may be shown in <FIG>. The network routing domain includes a computing container <NUM> and a network router <NUM>. A quantity of computing containers <NUM> and a quantity of network routers <NUM> are not limited herein. The computing container <NUM> is connected to the network router <NUM> through a virtual link. The virtual link may be a direct physical link, or may be a logical link that is reachable through a network. It may be understood that the computing container <NUM> in this embodiment of this application may be a server, a virtual machine, a container, or a smaller unit that provides a computing resource, and the network router <NUM> may be a router.

Based on the routing domain shown in <FIG>, a route computation process in the routing domain is described.

The computing container <NUM>, as a route initiator, runs a route daemon process. Then, in the route daemon process, an identifier of a service or function corresponding to the computing container <NUM> and a computing capability parameter of the computing container <NUM> are used as a virtual link state and sent to a neighboring network router <NUM> by using a routing protocol (where the routing protocol includes an interior gateway protocol (interior gateway protocol, IGP) or a border gateway protocol (border gateway protocol, BGP)). The routing protocol is used to carry a computing capability of the computing container or the computing capability of the computing container and an identifier of a service or function. Then, the network router <NUM> obtains a network capability of the routing domain. Finally, the network router <NUM> computes a route based on the network capability and the computing capability of the computing container <NUM> or the network router <NUM> computes a route based on the computing capability of the computing container.

Optionally, the computing container may also inject the computing capability or the computing capability of the computing container and the identifier of the service or function into the routing domain in a form of the virtual link state. Then, after receiving the virtual link state, the network router diffuses the virtual link state to other network routers in the routing domain, and even to another neighboring routing domain.

Optionally, after computing the route, the network router may further generate a routing table based on the identifier of the service or function and the route.

It may be understood that the computing capability includes the computing capability parameter or a computing metric value, and the computing capability parameter includes at least one of a throughput, a server load, and a computing delay. The network capability includes a network metric value or a network parameter, and the network parameter includes at least one of a network bandwidth and a network delay.

In an example, an architecture of the routing domain may be shown in <FIG>. A set of nodes or vertices included in the network routing domain is {u, v, w, X, Y}, and a set of edges (Edge) connecting neighboring nodes is {(u, v) c1, (v, w) c2, (w, u) c3, (X, u) c4, (Y, v) c5}. In the network routing domain, the computing container (for example, a computing container X in which a function x is located and a computing container Y in which a function y is located) is also added, as a routing node, to a set of routing nodes. In this application file, such a special router may be referred to as the computing container <NUM>, and is used to distinguish from a conventional network router <NUM>. In <FIG>, nodes u, v, and w are each the network router <NUM>. In addition, a special edge is added to the network routing domain to serve as a virtual link between the computing container <NUM> and a neighboring network router <NUM>, where c4 and c5 are weighted values of such a special edge, and may also be referred to as a virtual link state. The virtual link state may include "a function or service ID" and "a throughput (Throughput), a computing delay (Compute Delay), and/or a server load (Server Load)" of a corresponding computing container, and may even include a related computing capability parameter such as central processing unit (central processing unit, CPU) usage or storage usage. However, a route computation principle in the routing domain shown in <FIG> may be shown in <FIG>. The computing container X is used as an example. The computing container X runs a routing protocol and initiates routing, so that the computing container X sends a computing capability of the computing container X to the network router u by using a routing protocol. The network router u sends the computing capability of the computing container X to another network router or computing container in the routing domain by using a routing protocol. Then, each network router or computing container computes a route separately. For example, the network router u sends the computing capability of the computing container X to the network router v and the network router w by using the routing protocol. In addition, the network router v sends the computing capability of the computing container X to the network router w and the computing container Y by using the routing protocol. In addition, the network router w may also send the computing capability of the computing capability X to the network router u and the network router v by using the routing protocol. Similarly, a computing capability of the computing container Y may also be diffused to each network router and computing container in the routing domain by using the routing protocol. Then, the network router u may compute a route from the network router u to the computing container X based on the computing capability of the computing container X and/or the network capability of the routing domain; the network router u may perform cloud computing to obtain a route from the network router u to the computing container Y by using the computing capability of the computing container Y and/or the network capability of the routing domain; the network router u may compute a route to the network router v based on link state information of the network router v and the network capability of the routing domain; and so on.

Specifically, a specific process in which the network router <NUM> or computing container <NUM> computes a route based on the computing capability and the network capability is as follows:.

In a possible implementation, the network router <NUM> or the computing container <NUM> obtains a computing metric value based on the computing capability parameter, and obtains a network metric value based on the network parameter. Then, the network router <NUM> or the computing container <NUM> computes the route based on the computing metric value and the network metric value. In addition, when the route is computed by using the computing metric value and the network metric value, comprehensive computation may be performed based on a specific service or function. For example, for a service that requires the computing capability, in a routing algorithm running on each node, the computing metric value is primarily used and the network metric value is secondarily used, to compute an optimal route; and for a conventional transmission-type service, because an edge computing capability is not required, in a routing algorithm running on each node, the network metric value is primarily used to compute an optimal route.

In another possible implementation, the network router <NUM> or the computing container <NUM> obtains a composite metric value through computation based on the computing capability parameter and the network parameter. Then, the network router <NUM> and the computing container <NUM> compute the route based on the composite metric value.

In another possible implementation, the network router <NUM> or the computing container <NUM> obtains a computing metric value through computation based on the computing capability parameter. Then, the network router <NUM> or the computing container <NUM> computes the route based on the computing metric value.

Optionally, the network router <NUM> or the computing container <NUM> obtains the network metric value through computation based on the network parameter by using a first formula or a nonlinear weighting algorithm.

The first formula is Network metric value = α<NUM> × Network bandwidth + γ<NUM>ΣNetwork delay, where α<NUM> and γ<NUM> are weighted values.

Optionally, the network router <NUM> or the computing container <NUM> obtains the computing metric value through computation based on the computing capability parameter by using a second formula or a nonlinear weighting algorithm.

The second formula is <MAT>, where α<NUM>, β<NUM>, β<NUM>, and γ<NUM> are weighted values.

Optionally, the network router <NUM> or the computing container <NUM> obtains the composite metric value through computation based on the computing capability parameter and the network parameter by using a third formula.

The third formula is: <MAT> <MAT>, where
α<NUM>, γ<NUM>, α<NUM>, β<NUM>, β<NUM>, and γ<NUM> are weighted values.

It may be understood that each weighted value in the first formula, the second formula, and the third formula may be appropriately set based on a service feature. For example, for a delay-sensitive service, a delay-related coefficient may be appropriately increased; and for a service that requires high bandwidth, a throughput-related or network bandwidth-related coefficient may be appropriately increased.

A computing capability of the computing container <NUM> is in a one-to-one correspondence with the identifier of the service or function. However, when a service or function is not instantiated in the computing container, the computing capability of the computing container <NUM> is in a one-to-one correspondence with a benchmark service or function identifier. That is, the computing container <NUM> may use the computing capability of the computing container <NUM> and the benchmark service or function identifier as a virtual link state for being diffused in the routing domain, so that each network router <NUM> or computing container <NUM> in the routing domain can determine a computing resource or storage resource suitable for the service or function through computation. In addition, after it is determined that the service or function is instantiated in the routing domain, the benchmark service or function identifier is replaced with the identifier of the service or function, and the identifier of the service or function and a computing capability parameter of the computing container in which the instantiation is performed are diffused in the routing domain. It may be understood that the identifier of the service or function may be a name or an identifier that is uncorrelated to a location; the identifier of the service or function is mapping of an information object; the identifier of the service or function is a function of processing an information object; the identifier of the service or function is a specific service; or the identifier of the service or function is a network address. A specific case is not limited herein.

In this embodiment of this application, the route computed by the network router is a route from the network router to each routing node in the routing domain, and the route computed by the computing container or application software or operating system is a route from the service or function consumer to each computing container.

In this embodiment of this application, the computing container <NUM> diffuses the computing capability of the computing container <NUM> and the identifier of the service or function in the routing domain, so that the computing capability is considered when a routing table is generated during route computation, thereby achieving optimal computation and network resource utilization. In addition, the computing container implements automatic allocation of computation, storage, and network resources, to adapt to a rapid service change or service mobility of the user. In this embodiment of this application, the network router performs route computation based on the computing capability of the computing container and the network parameter, to achieve optimal computation and network resource utilization.

Specifically, referring to <FIG>, an embodiment of this application provides a computing container <NUM>, including: an obtaining unit <NUM>, configured to obtain a computing capability or the computing capability and an identifier of a service or function; a running unit <NUM>, configured
to run a routing protocol, where the routing protocol is used to carry the computing capability or the computing capability and the identifier of the service or function that is/are obtained by the obtaining unit <NUM>; and a sending unit <NUM>, configured to send the computing capability or the computing capability and the identifier of the service or function to the network router by using the routing protocol run by the running unit <NUM>. It may be understood that the computing capability includes a computing metric value or a computing capability parameter, where the computing capability parameter includes at least one of a throughput, a computing delay, and a server load.

Optionally, the computing container <NUM> sends the computing capability or the computing capability and the identifier of the service or function, as a virtual link state, to the network router <NUM>.

Optionally, the computing container <NUM> further includes a computation unit <NUM>, configured to compute a route based on the computing capability, where the computing capability includes a computing capability parameter or a computing metric value, and the computing capability parameter includes at least one of a throughput, a server load, and a computing delay.

Optionally, the obtaining unit <NUM> of the computing container <NUM> is further configured to obtain a network capability of a routing domain in which the computing container <NUM> is located, where the network capability includes a network metric value or a network parameter, the network parameter includes at least one of a network bandwidth and a network delay, the computing capability includes a computing capability parameter or a computing metric value, and the computing capability parameter includes at least one of a throughput, a server load, and a computing delay.

The computation unit <NUM> is further configured to compute a route based on the computing capability and the network capability.

Optionally, the computation unit <NUM> is specifically configured to obtain the network metric value through computation based on the network parameter by using a first formula or a nonlinear weighting algorithm.

Optionally, the computation unit <NUM> is specifically configured to obtain the computing metric value through computation based on the computing capability parameter by using a second formula or a nonlinear weighting algorithm.

The second formula is <MAT>, where
α<NUM>, β<NUM>, β<NUM>. and γ<NUM> are weighted values.

Optionally, the computation unit <NUM> is specifically configured to: obtain a composite metric value through computation based on the computing capability parameter and the network parameter by using a third formula, and compute the route based on the composite metric value to generate a routing table.

The computing container <NUM> further includes a storage unit <NUM>. The storage unit <NUM> is configured to store the computing capability or the computing capability and the identifier of the service or function running in the computing container <NUM>, and the network capability.

Optionally, the computing container <NUM> further includes application software or an operating system. The application software or the operating system may be configured to: compute the route based on the computing capability, or compute the route based on the computing capability and the network capability.

The following describes the computing container <NUM> by using a specific functional block diagram. Specifically, referring to <FIG>, the computing container <NUM> obtains link state information of the computing container <NUM>. The link state information is used to indicate a computing capability of the computing container <NUM>, the computing capability may be a computing metric value or a computing capability parameter, and the computing capability parameter includes at least one piece of information of a throughput, a server load, and a computing delay. When the computing capability is the computing capability parameter, the computing container <NUM> may further obtain a computing metric value through computation based on the computing capability parameter by using the second formula, and store the computing metric value in a storage unit (which may also be referred to as a link state database) of the computing container <NUM>. It may be understood that the computing container <NUM> triggers a link state update when the computing metric value or the computing capability parameter substantially changes, to update the link state database. For example, when the computing metric value is less than a first threshold, the computing metric value is greater than a second threshold, or a parameter in the computing capability parameter is greater than or less than a preset threshold, the link state database of the computing container <NUM> is updated, or the computing capability parameter or the computing metric value is re-sent to a neighboring network router <NUM>. In addition, the computing container <NUM> may further receive a link state request (link state request, LSR) or link state update (link state update, LSU) packet sent by the neighboring network router <NUM>. The link state request may further carry a link state advertisement of the network router or a network parameter of the routing domain, and the LSU packet carries a to-be-updated directly-connected interface state of the neighboring network router. Then, the computing container <NUM> stores the link state advertisement of the network router and the network parameter of the routing domain. It may be understood that an agreed neighbor relationship is first established between the computing container <NUM> and the network router <NUM>. Then, the computing container <NUM> and the network router <NUM> start to exchange a link state advertisement (link state advertisement, LSA) with each other. The link state advertisement may be understood as an advertisement that is generated by each routing node and that is for describing a directly-connected interface state of the routing node (including an interface overhead, a relationship with a neighboring router, and the like). For the computing container in this embodiment of this application, the computing container generates an advertisement for describing a computing capability state of the computing container (including an identifier of a service or function and a computing capability of the computing container; and further including a relationship with a neighboring network router, and the like). Then, the computing container <NUM> maintains the link state database of the computing container <NUM>. To be specific, after receiving the link state advertisement, the computing container <NUM> updates a corresponding link state advertisement entry in the link state database. In brief, the computing container <NUM> places the collected link state advertisement in the routing domain into the link state database of the computing container <NUM>, so that the computing container <NUM> can clearly learn of a computation or storage resource topology of the entire routing domain by using the link state database. The computing container <NUM> may further generate a corresponding link state advertisement after triggering the link state update, and send the link state advertisement as a link state update packet to the neighboring network router. The computing container <NUM> may further compute a route based on a computing capability in the link state advertisement in the link state database. If a computing metric value and/or a network metric value already exist/exists in the link state advertisement, route computation is directly performed based on the computing metric value and the network capability to obtain a route from a service/function consumer to each computing container. If the link state advertisement carries a computing capability parameter and/or a network parameter, the computing container <NUM> first obtains a computing metric value based on the computing capability parameter, and obtains a network metric value based on the network parameter; and then computes the route based on the computing metric value and the network metric value. In this embodiment of this application, a route computation algorithm may be a shortest path first (shortest path first, SPF) algorithm or another algorithm. This is not specifically limited herein. The SPF is a core algorithm of an IGP-type routing protocol and is used to make decision on optimal route selection in a complex network. After computation using the SPF algorithm, each computing container computes a loop-free "tree" that covers the entire network, has a shortest path, and roots in a service or function consumer. With this "tree", the computing container actually learns of an optimal path from a service or function consumer to each computing container. Then, the computing container determines a specific computing container based on the route. If the computing container determines that the specific computing container is not the computing container, the computing container generates and outputs a location for re-instantiating a service or function. The location may be an identifier, a network address, or the like of the specific computing container. It may be understood that, when the computing container outputs information about the location, the receiver may be application layer software or an operating system. Therefore, instantiation or migration of the service or function is implemented.

In this embodiment, the application layer software or operating system in the computing container <NUM> may be considered as a special router. A functional block diagram of the application layer software or operating system may be shown in <FIG>. The application software or the operating system receives a link state request (link state request, LSR) or a link state update (link state update, LSU) packet of a neighboring network router or the computing container. The link state request may further carry a link state advertisement of the network router or a network parameter of the routing domain, and the LSU packet carries a to-be-updated direct interface state of the neighboring network router. Then, the application software or the operating system stores the link state advertisement of the network router and the network parameter of the routing domain. The computing capability may be a computing metric value or a computing capability parameter, and the computing capability parameter includes at least one piece of information of a throughput, a server load, and a computing delay. The network capability may be a network metric value or a network parameter, and the network parameter includes at least one piece of information of a network bandwidth or a network delay. When the computing capability is the computing capability parameter, the application software or the operating system may further obtain a computing metric value through computation based on the computing capability parameter by using the second formula, and store the computing metric value in a storage unit (which may also be referred to as a link state database) of the application software or the operating system. When the network capability is the network parameter, the application software or the operating system may alternatively obtain a network metric value through computation based on the network parameter by using a second formula, and store the network metric value in a storage unit (which may also be referred to as a link state database) of the application software or the operating system. It may be understood that the application software or the operating system triggers a link state update when the computing metric value, the computing capability parameter, the network metric value, or the network parameter substantially changes, to update the link state database. For example, when the computing metric value is less than a first threshold, the computing metric value is greater than a second threshold, or a parameter in the computing capability parameter is greater than or less than a preset threshold, the link state database of the application software or the operating system is updated, or the computing capability parameter or the computing metric value is re-sent to the neighboring network router or the computing container. It may be understood that an agreed neighbor relationship is first established between the application software or the operating system and the network router <NUM>. Then, the application software or the operating system and the network router <NUM> start to exchange a link state advertisement (link state advertisement, LSA) with each other. The link state advertisement may be understood as an advertisement that is generated by each routing node and that is for describing a direct interface state of the routing node (including an interface overhead, a relationship with a neighboring router, and the like). For the computing container in this embodiment of this application, the computing container generates an advertisement for describing a computing capability state of the computing container (including an identifier of a service or function and a computing capability of the computing container; and further including a relationship with a neighboring network router, and the like). The application software or the operating system maintains the link state database of the application software or the operating system. To be specific, after receiving the link state advertisement, the application software or the operating system updates a corresponding link state advertisement entry in the link state database. In brief, the application software or the operating system places the collected link state advertisement in the routing domain into the link state database of the application software or the operating system, so that the application software or the operating system can clearly learn of a computation or storage resource topology of the entire routing domain by owning the link state database. The application software or the operating system may further generate a corresponding link state advertisement after triggering the link state update, and send the link state advertisement as a link state update packet to the neighboring network router. The application software or the operating system may further compute a route based on a computing capability in the link state advertisement in the link state database. If a computing metric value and/or a network metric value already exist/exists in the link state advertisement, route computation is directly performed based on the computing metric value and the network capability to obtain a route from a service/function consumer to each computing container. If the link state advertisement carries a computing capability parameter and/or a network parameter, the application software or the operating system first obtains a computing metric value based on the computing capability parameter, and obtains a network metric value based on the network parameter; and then computes the route based on the computing metric value and the network metric value. In this embodiment of this application, a route computation algorithm may be a shortest path first (shortest path first, SPF) algorithm or another algorithm. This is not specifically limited herein. The SPF is a core algorithm of an IGP-type routing protocol and is used to make an optimal route selection decision in a complex network. After computation using the SPF algorithm, each computing container computes a loop-free "tree" that covers the entire network, has a shortest path, and roots in a service or function consumer. With this "tree", the computing container actually learns of an optimal path from a service or function consumer to each computing container. Then, the computing container determines a specific computing container based on the route. If the computing container determines that the specific computing container is not the computing container, the computing container generates and outputs a location for re-instantiating a service or function. The location may be an identifier, a network address, or the like of the specific computing container. It may be understood that, when the computing container outputs information about the location, the receiver may be application layer software or an operating system. Therefore, instantiation or migration of the service or function is implemented.

<FIG> is a possible schematic structural diagram of the computing container <NUM> according to the foregoing embodiment. The computing container <NUM> may include: a processor <NUM>, a computer-readable storage medium/memory <NUM>, a transceiver <NUM>, an input device <NUM>, an output device <NUM>, and a bus <NUM>. The processor, the transceiver, the computer-readable storage medium, and the like are connected by using the bus. A specific connection medium between the foregoing components is not limited in this embodiment of this application.

The transceiver <NUM> sends a computing capability to a network router <NUM>.

In an example, the processor <NUM> may include a baseband circuit, for example, may compute a route to generate a routing table. The transceiver <NUM> may include a radio frequency circuit, to perform processing such as modulation and amplification on link state information generated based on the computing capability, and then send the link state information to the network router.

In another example, the processor <NUM> may run an operating system to control a function between each device and each component. The transceiver <NUM> may include a baseband circuit and a radio frequency circuit.

It may be understood that <FIG> shows only a simplified design of the computing container. During actual application, the computing container may include any quantity of transceivers, processors, memories, and the like, and all computing containers that can implement this application are within the protection scope of this application.

The processor <NUM> in the computing container <NUM> may be a general-purpose processor, for example, a general-purpose central processing unit (CPU), a network processor (network processor, NP), or a microprocessor, or may be an application-specific integrated circuit (application-specific integrated circuit, ASIC), or one or more integrated circuits configured to control program execution in the solutions of this application, or may be a digital signal processor (digital signal processor, DSP), a field programmable gate array (field-programmable gate array, FPGA) or another programmable logic device, a discrete gate or a transistor logic device, or a discrete hardware component. Alternatively, the controller/processor may be a combination of processors implementing a computation function, for example, a combination of one or more microprocessors, or a combination of a DSP and a microprocessor. The processor usually performs logical and arithmetic operations based on program instructions stored in the memory.

The bus <NUM> may be a peripheral component interconnect (peripheral component interconnect, PCI) bus, an extended industry standard architecture (extended industry standard architecture, EISA) bus, and or the like. The bus may be classified into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used to represent the bus in <FIG>, but this does not mean that there is only one bus or only one type of bus.

The foregoing computer-readable storage medium/memory <NUM> may further store an operating system and another application program. Specifically, the program may include program code, and the program code includes computer operation instructions. More specifically, the memory may be a read-only memory (read-only memory, ROM), another type of static storage device that can store static information and instructions, a random access memory (random access memory, RAM), another type of dynamic storage device that can store information and instructions, a magnetic disk memory, or the like. The memory <NUM> may be a combination of the foregoing storage types. In addition, the computer-readable storage medium/memory may be located in the processor, or may be located outside the processor, or distributed on a plurality of entities including the processor or a processing circuit. The computer-readable storage medium/memory may be specifically embodied in a computer program product. For example, the computer program product may include a computer-readable medium in a packaging material.

Alternatively, an embodiment of this application further provides a universal processing system. For example, the universal processing system is usually referred to as a chip. The universal processing system includes one or more microprocessors that provide a processor function, and an external memory that provides at least a part of a storage medium. All these components are connected to another supporting circuit by using an external bus architecture. When instructions stored in the memory are executed by the processor, the processor is enabled to execute some or all steps of the computing container in the route computation method.

Method or algorithm steps described in combination with the content disclosed in this application may be implemented by hardware, or may be implemented by a processor by executing software instructions. The software instructions may be formed by a corresponding software module. The software module may be located in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable hard disk, a CD-ROM, or a storage medium of any other form known in the art. For example, a storage medium is coupled to a processor, so that the processor can read information from the storage medium or write information into the storage medium. Certainly, the storage medium may be a component of the processor. The processor and the storage medium may be located in an ASIC. In addition, the ASIC may be located in user equipment. Certainly, the processor and the storage medium may exist in the user equipment as discrete components.

It may be understood that, after the computing container generates the routing table, the computing container does not need to maintain the routing table or perform route forwarding.

In the embodiments of this application, the computing container diffuses the computing capability of the computing container and the identifier of the service or function in the routing domain, so that the computing capability is considered when the routing table is generated during route computation, thereby achieving optimal computation and network resource utilization. In addition, the computing container implements automatic allocation of computation, storage, and network resources, to adapt to a rapid service change or service mobility of the user.

Specifically, referring to <FIG>, an embodiment of this application provides a network router <NUM>, including: an obtaining unit <NUM>, configured to obtain a computing capability of a computing container, and obtain a network capability of a routing domain in which the network router <NUM> is located; and
a computation unit <NUM>, configured to compute a route based on the computing capability, or compute a route based on the computing capability and the network capability.

Optionally, the computing capability includes a computing capability parameter or a computing metric value, and the computing capability parameter includes at least one of a throughput, a server load, and a computing delay.

The network capability includes a network metric value or a network parameter, and the network parameter includes at least one of a network bandwidth and a network delay.

Optionally, the computation unit <NUM> is specifically configured to obtain the computing metric value based on the computing capability parameter; and compute the route based on the computing metric value.

Optionally, the computation unit <NUM> is specifically configured to obtain the computing metric value based on the computing capability parameter, and obtain the network metric value based on the network parameter; and compute the route based on the computing metric value and the network metric value.

The first formula is Network metric value = α<NUM> × Network bandwidth + γ<NUM>ΣNetwork delay, where
α<NUM> and γ<NUM> are weighted values.

Optionally, the computation unit <NUM> is specifically configured to: obtain a composite metric value through computation based on the computing capability parameter and the network parameter by using a third formula; and compute the route based on the composite metric value to generate a routing table.

The third formula is: <MAT> where
α<NUM>, γ<NUM>, α<NUM>, β<NUM>, β<NUM>, and γ<NUM> are weighted values.

Optionally, the network router <NUM> further includes a storage unit, configured to store the computing capability of the computing container <NUM> or the computing capability of the computing container <NUM> and an identifier of a service or function running in the computing container <NUM>, and the network capability of the routing domain.

Optionally, the network router <NUM> further includes a generation unit <NUM>. The generation unit <NUM> is configured to generate the routing table based on the identifier of the service or function and the route, and store the routing table in the storage unit.

The following describes the network router <NUM> by using a specific functional block diagram. Specifically, referring to <FIG>, the network router <NUM> obtains a link state of each interface of the network router <NUM>. Information about the link state is used to indicate a network capability of the routing domain. The network capability includes a network metric value or a network parameter. The network parameter includes at least one piece of information of a network bandwidth and a network delay. When the network capability is the network parameter, the network router <NUM> may further obtain a network metric value through computation based on the network parameter by using a first formula, and store the network metric value in a storage unit (which may also be referred to as a link state database) of the network router <NUM>. It may be understood that the network router <NUM> triggers a link state update when the network metric value or the network parameter substantially changes, to update the link state database. For example, when the network metric value is less than a first preset threshold or the network metric value is greater than a second preset threshold or a parameter in the network parameter is greater than a third preset threshold or less than a fourth preset threshold, the link state database of the network router <NUM> is updated or the network metric value or the network parameter is re-sent to a neighboring network router <NUM> or the computing container <NUM>. In addition, the network router <NUM> may further receive a link state request (link state request, LSR) or link state update (link state update, LSU) packet sent by the neighboring network router <NUM> or the computing container <NUM>. The link state request may further carry a link state advertisement of the neighboring network router or a network parameter of the routing domain or a link state advertisement of the computing container <NUM>, and the LSU packet carries a to-be-updated direct interface state of the neighboring network router. Then, the network router <NUM> stores the link state advertisement of the computing container <NUM> or the neighboring network router and the network parameter of the routing domain. It may be understood that an agreed neighbor relationship is first established between the computing container <NUM> and the network router <NUM>. Then, the computing container <NUM> and the network router <NUM> start to exchange a link state advertisement (link state advertisement, LSA) with each other. The link state advertisement may be understood as an advertisement that is generated by each routing node and that is for describing a direct interface state of the routing node (including an interface overhead, a relationship with a neighboring router, and the like). For the computing container in this embodiment of this application, the computing container generates an advertisement for describing a computing capability state of the computing container (including an identifier of a service or function and a computing capability of the computing container; and further including a relationship with a neighboring network router, and the like). Then, the network router <NUM> maintains the link state database of the network router <NUM>. To be specific, after receiving the link state advertisement, the network router <NUM> updates a corresponding link state advertisement entry in the link state database. In brief, the network router <NUM> places the collected link state advertisement in the routing domain into the link state database of the network router <NUM>, so that the network router <NUM> can clearly learn of a computation or resource storage topology of the entire routing domain by owning the link state database. The network router <NUM> may further generate a corresponding link state advertisement after triggering the link state update, and send the link state advertisement as a link state update packet to the neighboring network router or the computing container. The network router <NUM> computes a route based on a computing capability in the link state advertisement in the link state database. If a computing metric value and/or a network metric value already exist/exists in the link state advertisement, route computation is directly performed based on the computing metric value and the network capability to obtain a route from a service/function consumer to each computing container. If the link state advertisement carries a computing capability parameter and/or a network parameter, the network router <NUM> first obtains a computing metric value based on the computing capability parameter, and obtains a network metric value based on the network parameter; and then computes the route based on the computing metric value and the network metric value. In this embodiment of this application, a route computation algorithm may be a shortest path first (shortest path first, SPF) algorithm or another algorithm. This is not specifically limited herein. The SPF is a core algorithm of an IGP-type routing protocol and is used to make an optimal route selection decision in a complex network. After computation using the SPF algorithm, each computing container computes a loop-free tree that covers the entire network, has a shortest path, and roots in a service or function consumer.

<FIG> shows a possible schematic structural diagram of the network router <NUM> according to the foregoing embodiment. The network router <NUM> may include: a processor <NUM>, a computer-readable storage medium/memory <NUM>, a transceiver <NUM>, an input device <NUM>, an output device <NUM>, and a bus <NUM>. The processor, the transceiver, the computer-readable storage medium, and the like are connected by using the bus. A specific connection medium between the foregoing components is not limited in this embodiment of this application.

The transceiver <NUM> sends a link state request to the computing container <NUM>.

In an example, the processor <NUM> may include a baseband circuit, for example, may compute a route to generate a routing table. The transceiver <NUM> may include a radio frequency circuit, to perform processing such as modulation and amplification on the link state request, and then send the link state request to the computing container.

It can be understood that <FIG> shows only a simplified design of the network router. During actual application, the network router may include any quantity of transceivers, processors, memories, and the like, and all network routers that can implement this application are within the protection scope of this application.

The processor <NUM> in the network router <NUM> may be a general-purpose processor, for example, a general-purpose central processing unit (CPU), a network processor (network processor, NP), or a microprocessor, or may be an application-specific integrated circuit (application-specific integrated circuit, ASIC), or one or more integrated circuits configured to control program execution in the solutions of this application, or may be a digital signal processor (digital signal processor, DSP), a field programmable gate array (field-programmable gate array, FPGA) or another programmable logic device, a discrete gate or a transistor logic device, or a discrete hardware component. Alternatively, the controller/processor may be a combination of processors implementing a computation function, for example, a combination of one or more microprocessors, or a combination of a DSP and a microprocessor. The processor usually performs logical and arithmetic operations based on program instructions stored in the memory.

Alternatively, an embodiment of this application further provides a universal processing system. For example, the universal processing system is usually referred to as a chip. The universal processing system includes one or more microprocessors that provide a processor function, and an external memory that provides at least a part of a storage medium. All these components are connected to another supporting circuit by using an external bus architecture. When instructions stored in the memory are executed by the processor, the processor is enabled to perform some or all steps of the network router in the route computation method.

In this embodiment of this application, the network router performs route computation based on the computing capability of the computing container and the network parameter, to achieve optimal computation and network resource utilization.

For example, the unit division is merely logical function division and may be other division during actual implementation.

Claim 1:
A routing domain, comprising:
a computing container (<NUM>) and a network router (<NUM>), wherein
the network router (<NUM>) is a routing node that supports route computation;
the computing container (<NUM>) is connected to the network router (<NUM>) through a virtual link;
the computing container (<NUM>) is configured to: run a routing protocol, wherein the routing protocol is used to carry a computing capability of the computing container (<NUM>) or the computing capability of the computing container (<NUM>) and an identifier of a service or function; and send the computing capability of the computing container (<NUM>) or the computing capability of the computing container (<NUM>) and the identifier of the service or function to the network router (<NUM>) by using the routing protocol; and
the network router (<NUM>) is configured to: obtain the computing capability, and obtain a network capability of the routing domain; compute a route based on the computing capability; or compute a route based on the computing capability and the network capability; and diffuse the computing capability or the computing capability and the identifier of the service or function to each network router in the routing domain and/or to another routing domain.