WO2023273957A1 - 算力发布方法、算力更新方法及装置 - Google Patents
算力发布方法、算力更新方法及装置 Download PDFInfo
- Publication number
- WO2023273957A1 WO2023273957A1 PCT/CN2022/100104 CN2022100104W WO2023273957A1 WO 2023273957 A1 WO2023273957 A1 WO 2023273957A1 CN 2022100104 W CN2022100104 W CN 2022100104W WO 2023273957 A1 WO2023273957 A1 WO 2023273957A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- node
- message
- computing power
- app
- information
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 115
- 230000008859 change Effects 0.000 claims abstract description 8
- 230000004044 response Effects 0.000 claims abstract description 8
- 230000015654 memory Effects 0.000 claims description 89
- 238000004891 communication Methods 0.000 abstract description 31
- 238000012545 processing Methods 0.000 description 28
- 238000010586 diagram Methods 0.000 description 15
- 241000465502 Tobacco latent virus Species 0.000 description 12
- 238000004590 computer program Methods 0.000 description 12
- 230000008569 process Effects 0.000 description 11
- 230000003287 optical effect Effects 0.000 description 10
- 230000005540 biological transmission Effects 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 8
- 230000003068 static effect Effects 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 238000012546 transfer Methods 0.000 description 6
- 238000013528 artificial neural network Methods 0.000 description 4
- 238000001514 detection method Methods 0.000 description 4
- 239000004973 liquid crystal related substance Substances 0.000 description 4
- 101150053844 APP1 gene Proteins 0.000 description 2
- 101100055496 Arabidopsis thaliana APP2 gene Proteins 0.000 description 2
- 101100189105 Homo sapiens PABPC4 gene Proteins 0.000 description 2
- 102100039424 Polyadenylate-binding protein 4 Human genes 0.000 description 2
- 101100016250 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) GYL1 gene Proteins 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 2
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 101000596892 Homo sapiens Neurotrimin Proteins 0.000 description 1
- 102100035107 Neurotrimin Human genes 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000007792 addition Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/0816—Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0893—Assignment of logical groups to network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0894—Policy-based network configuration management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Definitions
- the present application relates to the field of communication technology, and in particular to a computing power publishing method, computing power updating method and device.
- Compute first networking means that the routing nodes in the network can perceive the real-time computing power of each service node in the network, and the routing node selects the appropriate service node to provide services for users based on the real-time computing power of each service node.
- the routing node perceives the real-time computing power of the service node as follows: the service node carries the computing power information in the routing message and publishes it, so that the routing node can obtain the computing power of each service node in the network.
- the service node When multiple applications (Application, APP) are deployed in the service node at the same time, and the service node allocates resources to each of the multiple APPs separately, the service node needs to publish computing power information for each APP separately.
- applications Application, APP
- This application provides a computing power publishing method, computing power updating method and device. This method makes it no longer necessary to release computing power information for each APP separately when computing power is updated, but releases computing power for all APPs at the granularity of the server information, avoiding the redundancy caused by publishing computing power information for each APP separately, thereby reducing the network load.
- the present application provides a computing power release method, which is executed by the first node, including: when the computing power of the first node changes, the first node generates a first message, and then the first message Sent to the second node, the first message includes the address of the first node and computing power information of the first node.
- the second node receives the first message, it updates the computing power information of the first application program APP according to the computing power information of the first node and the first corresponding relationship.
- the first corresponding relationship includes the computing power information of the first node and the first APP.
- the first APP is deployed on the first node.
- the first node when the first node releases the computing power, it only needs to publish at the granularity of the server, that is, after the computing power is updated, it only needs to be released once.
- the computing power of the APP with which the first node has a corresponding relationship is updated.
- the first node sends computing power information, it no longer needs to release computing power information separately for different APPs, avoiding the redundancy caused by the need to release computing power information for different APPs for each computing power update, and adopts coarse-grained ( Server granularity) computing power distribution solution solves the problem of heavy network load caused by computing power distribution in related technologies, reduces network flooding, and reduces network resources occupied by computing power distribution.
- the first node sends a second message to the second node, where the second message includes the foregoing first correspondence.
- the second message and the first message are different messages, indicating that the first correspondence and computing power information are sent separately.
- the second message is a routing message, that is, the first node sends a routing message to the second node, and the routing message includes the first corresponding relationship.
- the decoupling of the computing power information and the routing message is realized. That is, in this application, the second message is implemented by routing the message.
- the first node updates the route by sending a routing message (routing update message) when the first APP goes online, and cancels the route by sending a routing message when the first APP goes offline.
- the first correspondence is also sent by the first node to the second node.
- the first corresponding relationship and the aforementioned computing power information are sent separately, because the corresponding relationship is fixed, and sending separately can avoid repeatedly sending the corresponding relationship when updating the computing power information, thereby saving network resources and reducing network load.
- the first APP goes online includes but not limited to the situation that the first APP is started on the first node, or the deployment of the first APP is completed on the first node.
- the routing message includes the address information of the first APP, the address of the first node and next hop information, and the next hop information is used to forward the message to the address corresponding to the address information of the first APP.
- the address information of the first APP and the address of the first node constitute the aforementioned first corresponding relationship, that is, the corresponding relationship between the first APP and the first node.
- the address information of the first APP is the anycast address corresponding to the first APP, and the next hop information is used to forward the packet to the anycast address corresponding to the APP.
- sending the routing message from the first node to the second node includes: the first node sending the routing message to the second node through an IGP message or a BGP message.
- routing message is implemented using the IGP protocol or BGP, and the routing message field is described below using the BGP message as an example:
- the BGP protocol message includes an Ethernet header, an Internet Protocol IP header, a Transmission Control Protocol TCP header, a BGP data packet, and a frame check sequence FCS.
- the IP header includes fields such as source address and destination address, and the address information of the aforementioned first APP is located in the destination address field;
- the BGP data packet includes two parts of a BGP header and a BGP message, and the BGP message includes a routing attribute field, and the aforementioned first APP A node address and next hop information is located in the route attribute field.
- the second node after receiving the routing message, the second node obtains the address information of the first APP from the destination address field, and obtains the address of the first node from the routing attribute field, thereby obtaining the aforementioned first corresponding relationship.
- a second APP may also be deployed, the second APP and the first APP are different APPs, and the second APP and the first APP share resources on the first node. That is, the first node does not individually allocate resources to different APPs, and the resources on the first node are shared by these APPs.
- the second APP and the first APP share resources on the first node, which means that the second APP and the first APP share the central processing unit CPU resources, graphics processing unit GPU resources, and field programmable logic gate arrays in the first node.
- the second APP and the first APP may share all the resources in the first node, or only share some resources in the first node.
- the first node Since the second APP is also deployed on the first node, the first node also needs to send the correspondence between the first node and the second APP to the second node. That is, the method further includes: the first node sends a second correspondence to the second node, and the second correspondence includes a correspondence between the first node and the second APP.
- the second node receives the first message, in addition to updating the computing power information of the first APP, it also updates the computing power information of the second APP according to the computing power information of the first node and the second corresponding relationship.
- the sending method of the second corresponding relationship is the same as the sending method of the first corresponding relationship, that is, both are sent by routing message, and the format of the routing message carrying the second corresponding relationship is the same as that of the routing message carrying the first corresponding relationship.
- the format is the same.
- the second correspondence and the first correspondence may be sent through two routing messages, or may be sent through one routing message.
- the first node updates the routing by sending a routing message carrying the second corresponding relationship
- the second APP goes offline, the first node performs routing by sending a routing message carrying the second corresponding relationship. undo.
- the first message is implemented using an existing network protocol, or the first message is implemented using a new protocol.
- the first message is implemented by using an IGP message or a BGP message.
- the aforementioned generation of the first message is implemented in the following manner: the first node encapsulates the first node address and computing power information in an IGP message or a BGP message to obtain the first message.
- the first node encapsulates the computing power information in the type length value TLV field of the IGP message or the BGP message, and encapsulates the address of the first node in the network layer reachability message NLRI of the IGP message or the BGP message field.
- the first message is implemented by using a BGP update message.
- the computing power information is located in the routing attribute field of the BGP update message, and the address of the first node is located in the NLRI field.
- the routing attribute field includes subfields such as type, length, and value, that is, the aforementioned TLV field, and computing power information is encapsulated in the routing attribute field.
- the route attribute field usually also includes a flags field.
- each parameter corresponds to a set of TLVs.
- computing power information includes CPU information, GPU information, and connection information.
- CPU information, GPU information, and connection information are each Corresponds to a set of TVL.
- the first node includes a server or a virtual machine VM
- the second node includes a router
- the present application provides a computing power update method, the method is executed by the second node, including: the second node acquires a first correspondence, the first correspondence includes the correspondence between the first node and the first APP, The first APP is deployed on the first node; the second node receives the first message from the first node, and the first message includes the address of the first node and the computing power information of the first node; after obtaining the first corresponding relationship and the first message , the second node updates the computing power information of the first APP according to the first corresponding relationship and the computing power information of the first node.
- the computing power update here includes, but is not limited to, the modification, addition and deletion of computing power information.
- the second node After the second node receives the computing power information of the first node, it can update the computing power of the APP corresponding to the first node according to the corresponding relationship, for example, update the computing power information of the first APP. In this way, when the first node sends computing power information, it no longer needs to release computing power information for different APPs separately, avoiding the redundancy caused by the need to release computing power information for different APPs for each computing power update.
- Adopting a coarse-grained (server granularity) computing power distribution scheme solves the problem of heavy network load caused by computing power distribution in related technologies, reduces network flooding, and reduces network resources occupied by computing power distribution.
- the second node acquires the first correspondence in two ways including static configuration and dynamic acquisition.
- the dynamic acquisition method is as follows: the second node receives the second message sent by the first node, and the second message includes the first corresponding relationship.
- the second message is a routing message, that is, the second node receives the routing message sent by the first node, and the routing message includes the first correspondence.
- the routing message includes the address information of the first APP, the address of the first node and the next hop information, and the next hop information is used to forward the message to the address corresponding to the address information of the first APP, and the first node and the first
- the APP correspondence includes the correspondence between the address information of the first APP and the address of the first node.
- the aforementioned second node receives the routing message of the first node, including:
- the second node receives the IGP message or the BGP message, and the IGP message or the BGP message carries routing information.
- the method also includes:
- the second node acquires a second correspondence, the second correspondence includes a correspondence between the first node and the second APP, and the second APP is deployed on the first node;
- the second node updates the computing power information of the second APP according to the second corresponding relationship and the computing power information of the first node.
- the manner of obtaining the second correspondence is the same as the manner of obtaining the first correspondence.
- the first message is implemented using an existing network protocol, or the first message is implemented using a new protocol.
- the first message is implemented by using an IGP message or a BGP message. That is, the second node receives the first message from the first node, including:
- the second node receives the IGP message or the BGP message, and the IGP message or the BGP message carries the address of the first node and computing power information.
- the computing power information is located in the TLV field of the IGP message or the BGP message, and the address of the first node is located in the NLRI field of the IGP message or the BGP message.
- the present application provides a device for distributing computing power, the device comprising:
- a generating unit configured to generate a first message in response to a change in the computing power of the first node, where the first message includes the address of the first node and computing power information of the first node;
- a sending unit configured to send the first message to the second node, so that the second node updates the computing power information of the first application program APP according to the computing power information of the first node and the first correspondence, the first correspondence includes the first The corresponding relationship between the node and the first APP, where the first APP is deployed on the first node.
- the sending unit is further configured to send a second message to the second node, where the second message includes the first correspondence.
- the second message is a routing message
- the sending unit is configured to send the routing message to the second node, where the routing message includes the first correspondence.
- the routing message includes the address information of the first APP, the address of the first node and next hop information, and the next hop information is used to forward the message to the address corresponding to the address information of the first APP, and the first node and the first
- the APP correspondence includes the correspondence between the address information of the first APP and the address of the first node.
- the address information of the first APP is located in the destination address field of the routing message, and the first node address and next hop information are located in the routing attribute field of the routing message.
- the sending unit is configured to send the routing message to the second node through the first Interior Gateway Protocol IGP message or the first Border Gateway Protocol BGP message.
- a second APP is also deployed on the first node, the second APP and the first APP share resources of the first node, and the sending unit is also used to send a second correspondence to the second node, the second correspondence includes Correspondence between the first node and the second APP; the first message is also used to enable the second node to update the computing power information of the second APP according to the computing power information of the first node and the second corresponding relationship.
- the first node includes a server or a virtual machine VM.
- the sending unit is configured to encapsulate the first node address and computing power information in an IGP message or a BGP message to obtain the first message.
- the sending unit is configured to encapsulate the computing power information in the type length value TLV field of the IGP message or the BGP message, and encapsulate the first node address in the network layer reachability of the IGP message or the BGP message in the NLRI field of the message.
- the present application provides a device for updating computing power, the device comprising:
- An acquisition unit configured to acquire a first correspondence, the first correspondence includes a correspondence between the first node and the first APP, and the first APP is deployed on the first node;
- a receiving unit configured to receive a first message from the first node, where the first message includes the address of the first node and computing power information of the first node;
- An updating unit configured to update the computing power information of the first APP according to the first corresponding relationship and the computing power information of the first node.
- the acquiring unit is configured to receive a second message sent by the first node, where the second message includes the first correspondence.
- the second message is a routing message
- the obtaining unit is configured to receive the routing message sent by the first node, where the routing message includes the first correspondence.
- the routing message includes the address information of the first APP, the address of the first node and next hop information, and the next hop information is used to forward the message to the address corresponding to the address information of the first APP, and the first node and the first
- the APP correspondence includes the correspondence between the address information of the first APP and the address of the first node.
- the address information of the first APP is located in the destination address field of the routing message, and the first node address and next hop information are located in the routing attribute field of the routing message.
- the acquiring unit is configured to receive an IGP message or a BGP message, and the IGP message or the BGP message carries routing information.
- the obtaining unit is further configured to obtain a second correspondence, the second correspondence includes a correspondence between the first node and the second APP, the second APP is deployed on the first node, and the second APP and the first APP share resources of the first node;
- An updating unit configured to update the computing power information of the second APP according to the second corresponding relationship and the computing power information of the first node.
- the second node includes a router.
- the receiving unit is configured to receive an IGP message or a BGP message, where the IGP message or the BGP message carries the first node address and computing power information.
- the computing power information is located in the TLV field of the IGP message or the BGP message, and the address of the first node is located in the NLRI field of the IGP message or the BGP message.
- the present application provides a first node, the first node includes a processor and a memory; the memory is used to store software programs and modules, and the processor is stored in the memory by running or executing A software program and/or module, so that the first node implements the method in any possible implementation manner of the first aspect above.
- the present application provides a second node, the second node includes a processor and a memory; the memory is used to store software programs and modules, and the processor is stored in the memory by running or executing A software program and/or module, so that the second node implements the method in any possible implementation manner of the second aspect above.
- processors there are one or more processors, and one or more memories.
- the memory may be integrated with the processor, or the memory may be set separately from the processor.
- the memory can be a non-transitory (non-transitory) memory, such as a read-only memory (read only memory, ROM), which can be integrated with the processor on the same chip, or can be set in different On the chip, the embodiment of the present application does not limit the type of the memory and the configuration of the memory and the processor.
- a non-transitory memory such as a read-only memory (read only memory, ROM)
- ROM read only memory
- the present application provides a computing power distribution system, which includes the first node described in the fifth aspect and the second node described in the sixth aspect.
- the present application provides a computer program (product), the computer program (product) including: computer program code, when the computer program code is run by a computer, it causes the computer to execute the above-mentioned first aspect or The method in any possible implementation manner of the second aspect.
- the present application provides a computer-readable storage medium, the computer-readable storage medium is used to store program code executed by a processor, and the program code includes a A method in any of the possible implementations of .
- a chip including a processor, and the processor is used to call and execute instructions stored in the memory from the memory, so that the communication device installed with the chip executes the above-mentioned first aspect or the second aspect.
- another chip including: an input interface, an output interface, a processor, and a memory, the input interface, the output interface, the processor, and the memory are connected through an internal connection path, and the The processor is configured to execute the code in the memory, and when the code is executed, the processor is configured to execute the method in any possible implementation manner of the first aspect or the second aspect above.
- FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present application
- Fig. 2 is a flow chart of a computing power release method provided by the embodiment of the present application.
- Fig. 3 is a flow chart of a computing power update method provided by the embodiment of the present application.
- Fig. 4 is a flow chart of a computing power update method provided by the embodiment of the present application.
- FIG. 5 is a schematic diagram of a BGP packet format provided by an embodiment of the present application.
- FIG. 6 is a schematic diagram of an MP-BGP message format provided by an embodiment of the present application.
- Fig. 7 is a schematic diagram of the transmission process of the routing message and the first message provided by the embodiment of the present application.
- Fig. 8 is a block diagram of a computing power distributing device provided by an embodiment of the present application.
- Fig. 9 is a block diagram of a computing power updating device provided by an embodiment of the present application.
- Fig. 10 is a schematic structural diagram of the first node provided by the embodiment of the present application.
- FIG. 11 is a schematic structural diagram of a second node provided by an embodiment of the present application.
- FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present application.
- the scenario is a CFN network in a mobile edge computing (mobile edge computing, MEC) scenario
- the CFN network includes a first node, a second node, and a client.
- the first node is the application program (application, APP) server 40 in the figure, and application APPs are deployed on each APP server 40, and each APP corresponds to an anycast address (anycast), such as APP1 corresponds to anycast1, and APP2 corresponds to anycast2 .
- application program application, APP
- anycast anycast
- the second node includes an ingress (Ingress) router 20 in the figure.
- Ingress router 20 is the entrance of traffic in the CFN network, such as cell site gateway (cell site gateway, CSG) equipment;
- Egress router 30 is the outlet of traffic in the CFN network, such as data center gateway (data center gateway, DCGW) equipment; special case Under the circumstances, the same router may have both the functions of Ingress and Egress routers.
- the client 10 is close to the Ingress router 20, and the Ingress router 20 will receive the user request sent by the client 10, and the Ingress router 20 selects a suitable server to process the user request according to the routing table item, wherein the routing table item in the Ingress router 20 is based on Generated by routing messages and computing power information published by the first node. When the computing power information of the first node is updated, the routing entry may change.
- the service node when multiple APPs are deployed on the first node at the same time, the service node will allocate resources to each of the multiple APPs separately, and at the same time, the first node needs to publish computing power information for each APP.
- the publishing method of computing power in the related art will waste network resources, resulting in increased network load.
- the computing power information is carried in the routing message and sent, causing the routing message to be sent repeatedly every time the computing power information is released, further aggravating the problem of heavy network load.
- the first node may also be a virtual machine (virtual machine, VM), or other devices such as a router.
- VM virtual machine
- Fig. 2 is a flow chart of a computing power distribution method provided by the embodiment of the present application.
- the method can be executed by the first node in the application scenario, as shown in Figure 2, the method includes the following steps:
- the first message includes the address of the first node and computing power information of the first node.
- the first node address is a server IP address or a VM IP address.
- the computing power information includes central processing unit (central processing unit, CPU) information, graphics processing unit (graphics processing unit, GPU) information and connection (connection) information, etc.
- the CPU information includes the CPU model and real-time load, etc.
- the GPU information includes the GPU model and real-time load, etc.
- the connection information includes the maximum number of connections and the current number of connections.
- the first node sends a first message to the second node, so that the second node updates the computing power information of the first application program APP according to the computing power information of the first node and the first correspondence.
- the first correspondence includes a correspondence between the first node and the first APP, and the first APP is deployed on the first node.
- the first message is implemented by using an Interior Gateway Protocol (Interior Gateway Protocol, IGP) message or a Border Gateway Protocol (Border Gateway Protocol, BGP) message.
- IGP Interior Gateway Protocol
- BGP Border Gateway Protocol
- the first node when the first node releases the computing power, it only needs to publish at the granularity of the server, that is, after the computing power is updated, it only needs to publish once.
- the computing power of the APP corresponding to the relationship is updated.
- the first node sends computing power information, it no longer needs to release computing power separately for different APPs, avoiding the redundancy caused by the need to release computing power for different APPs for each computing power update, and adopts coarse-grained (server granularity) )’s computing power distribution solution solves the problem of heavy network load caused by computing power distribution in related technologies, reduces network flooding, and reduces network resources occupied by computing power distribution.
- the coarse-grained computing power publishing scheme means that, compared with publishing computing power information at the granularity of APPs, in this application, publishing computing power information at the granularity of servers, even if two or more APPs are deployed in the server, It is also only necessary to publish the computing power once, and there is no need to release the computing power for each APP separately.
- Fig. 3 is a flow chart of a computing power update method provided by an embodiment of the present application. This method can be executed by the second node in the application scenario, as shown in Figure 3, the method includes the following steps:
- the first correspondence includes a correspondence between the first node and the first APP, and the first APP is deployed on the first node.
- S42 The second node receives the first message from the first node.
- the first message includes the address of the first node and computing power information of the first node.
- the second node updates the computing power information of the first APP according to the first corresponding relationship and the computing power information of the first node.
- the second node determines the first APP according to the address of the first node and the first correspondence, and then updates the computing power information of the first APP based on the computing power information.
- the second node After the second node receives the computing power information released by the first node at the granularity of nodes, it can update the computing power of the APP corresponding to the first node according to the corresponding relationship.
- the first node sends computing power information, it no longer needs to release computing power separately for different APPs, avoiding the redundancy caused by the need to release computing power for different APPs for each computing power update, and adopts coarse-grained (server granularity) )’s computing power distribution solution solves the problem of heavy network load caused by computing power distribution in related technologies, reduces network flooding, and reduces network resources occupied by computing power distribution.
- Fig. 4 is a flow chart of a computing power update method provided by an embodiment of the present application. The method can be executed by the first node and the second node in the application scenario, as shown in Figure 4, the method includes the following steps:
- the first node sends a first routing message to the second node.
- the second node receives the first routing message sent by the first node.
- the first routing message includes a first correspondence
- the first correspondence includes a correspondence between the first node and the first APP
- the first APP is deployed on the first node
- the first routing message includes address information of the first APP, a first node address and next hop information, and the next hop information is used to forward the message to an address corresponding to the address information of the first APP.
- the first routing message is sent when the first APP goes online, that is, when the first APP goes online, the first node updates the routing by sending a routing message (routing update message), and when the first APP goes offline, the first node passes Send routing messages to revoke routing, and the refresh frequency is low.
- the correspondence between the first node and the first APP includes the correspondence between the address information of the first APP and the address of the first node, that is, the address information of the first APP and the address of the first node constitute the aforementioned first correspondence.
- the address information of the first APP is the anycast address corresponding to the first APP, and the next hop information is used to forward the packet to the anycast address corresponding to the APP.
- both the first node A and the first node B are installed with the application program C, and the first node A and the first node B have their own first node addresses, since both the first node A and the first node B are installed There is application C, so it also corresponds to the same anycast address.
- the first node receives routing messages of at least two first nodes corresponding to the same anycast address through a routing protocol.
- the first node sends the first routing message to the second node through an IGP packet or a BGP packet.
- the following table 1 is a format of a first routing message, see Table 1, the first routing message includes anycast address (anycast IP) of the first APP, next hop information (next hop) and first node address (server IP).
- the first routing message is implemented by using a BGP update (update) message.
- the second node includes an Ingress router.
- the first node sends the routing message, it sends the routing message and the first message to the egress router, and the egress router sends the routing message to the ingress router (the second node).
- the first node sends a routing message to the Egress router, it can use the BGP protocol.
- the Egress router sends a routing message to the second node, it can use BGP or multi-protocol extension BGP (Multi Protocol BGP, MP-BGP) protocol, that is, the second Nodes receive BGP or MP-BGP packets.
- BGP Multi Protocol BGP, MP-BGP
- the transmission process is as follows: the first node sends a routing message to the Egress router, and the Egress router will process the routing message after receiving the routing message, and then forward the processed routing message to the Ingress router;
- the transmission process is as follows: the first node sends a routing message to the Egress router. After the Egress router receives the routing message, it does not process the message on the route, but only performs the forwarding action, and finally the routing message Sent to the Ingress router.
- FIG. 5 is a schematic diagram of a BGP message format
- FIG. 6 is a schematic diagram of an MP-BGP message format.
- BGP message and MP-BGP message all comprise Ethernet header, Internet Protocol (Internet Protocol, IP) header, Transmission Control Protocol (Transmission Control Protocol, TCP) header, BGP packet And frame check sequence (Frame Check Sequence, FCS).
- a BGP data packet includes two parts: a BGP header and a BGP message.
- the IP header includes fields such as source address and destination address.
- a BGP message in a BGP packet, includes unreachable routes length (unfeasible routes length), unreachable routes (withdrawn routes), total path attribute length (total path attribute length), route attributes (path attributes) and network The Network Layer Reachability Information (NLRI) field.
- unreachable routes length unfeasible routes length
- unreachable routes withdrawn routes
- total path attribute length total path attribute length
- route attributes path attributes
- NLRI Network Layer Reachability Information
- the route attribute field includes subfields such as type (Type), length (Length) and value (Value), that is, TLV field.
- the route attribute field usually also includes a flag (Flag) field.
- the following table 2 shows the format of the routing attribute field. See Table 2.
- the routing attribute includes identification (Path attr.Flag), type (Path attr.Type), length (Path attr.Lenath) and value (Path attr.Value) .
- the BGP message includes address family identifier, subsequent address family identifier, next-hop network address length, next-hop network address, reserved, NTRI and routing attribute fields.
- the format of the route attribute field is the same as that in Table 2.
- the address information of the aforementioned first APP is located in the destination address field of the BGP message or MP-BGP message; the aforementioned first node address and next hop information are located in the BGP message or MP-BGP message in the route attribute field of the .
- each parameter corresponds to a set of TLVs, for example, the first node address corresponds to a set of TVLs.
- the second node after receiving the routing message, the second node obtains the address information of the first APP from the destination address field, and obtains the address of the first node from the routing attribute field, so as to obtain the aforementioned first corresponding relationship.
- the first correspondence may also be configured on the second node in a static configuration manner.
- the first node sends a second routing message to the second node.
- the second node receives the second routing message sent by the first node.
- the second routing message includes a second correspondence
- the second correspondence includes a correspondence between the first node and the second APP
- the second APP is deployed on the first node
- the second APP and the first APP share the information of the first node. resource.
- the publishing method and format of the second routing message are the same as those of the first routing message, and will not be repeated here.
- first correspondence and the second correspondence may also be included in the same routing message, and the first node sends the first correspondence and the second correspondence to the second node.
- the method further includes: the second node storing the first correspondence and the second correspondence.
- the first node In response to a change in the computing power of the first node, the first node generates a first message.
- the first message includes the address of the first node and computing power information of the first node.
- the first node periodically determines whether the computing power changes, and generates a first message when the computing power changes (for example, the change value exceeds a certain range).
- the first message is implemented using an existing network protocol, or the first message is implemented using a new protocol.
- the first message is implemented by using the IGP protocol or the BGP protocol (or the MP-BGP protocol).
- the aforementioned generation of the first message is implemented in the following manner: the first node address and computing power information are encapsulated in an IGP message or a BGP message to obtain the first message.
- the computing power information is encapsulated in the type length value TLV field of the IGP message or the BGP message
- the first node address is encapsulated in the network layer reachability information NLRI field of the IGP message or the BGP message.
- the first message is realized by using a BGP update (update) message.
- the computing power information is located in the routing attribute field of the BGP update message, and the address of the first node is located in the NLRI field.
- each parameter corresponds to a set of TLVs.
- computing power information includes CPU information, GPU information, and connection information.
- CPU information, GPU information, and connection information are each Corresponds to a set of TVL.
- the Value value of the routing attribute can be the number, model, load size, etc. of cores.
- the first node in addition to generating and sending the first message when the computing power is updated, the first node will also generate and send the first message when the first node goes online, publishing the initial computing power information.
- S54 The first node sends a first message to the second node.
- the second node receives the first message from the first node.
- the second node can usually receive at least two first messages sent by the first node.
- the first node when the first node sends the first message, it sends the first message to the egress router, and the egress router then sends the message to the ingress router. Subsequent steps S55-S59 are all executed by the Ingress router.
- the process of transmitting the first message between the first node and the Ingress router is the same as the process of transmitting the routing message between the first node and the Ingress router, which will not be repeated here.
- Fig. 7 shows the transmission process of the routing message and the first message in this application. See Figure 7: APP1 is deployed in server 1, server 2 and server 3, corresponding to anycast IP address anycastIP1, and APP2 is deployed in server 2, corresponding to anycast IP address anycastIP2.
- server 1 sends the routing message (anycastIP1+serverIP1+nexthop1) and the first message (serverIP1+computing power 1) to the egress router respectively, and then the egress router sends it to the ingress router.
- Servers 2 and 3 also send the routing message and the first message in the same way, and finally the Ingress router obtains the routing message and the first message of the above three servers, thereby performing the subsequent computing power update steps.
- the routing message is a relatively static information, which is released or revoked only when the business goes online and offline, and the frequency of update and release is low; the computing power information is updated and released frequently, by decoupling the computing power information and the routing message , so that the number of entries for each update of computing power information is smaller, which can reduce the load on the network.
- the second node updates the computing power information of the first APP according to the first corresponding relationship and the computing power information of the first node; the second node updates the computing power information of the second APP according to the second corresponding relationship and the computing power information of the first node. computing power information.
- the second node acquires the first corresponding relationship from the first routing message, and acquires the second corresponding relationship from the second routing message. For example, after the second node receives the first routing message, it obtains the address information of the first APP from the destination address field, and obtains the address of the first node from the routing attribute field, thereby obtaining the aforementioned first corresponding relationship; the second node receives After the second routing message, the routing information of the second APP is obtained from the destination address field, and the first node address is obtained from the routing attribute field, so as to obtain the aforementioned second corresponding relationship.
- the second node determines the first APP according to the address of the first node and the first correspondence, and then updates the computing power information of the first APP based on the computing power information.
- the second node determines the second APP according to the second node address and the second correspondence, and then updates the computing power information of the second APP based on the computing power information.
- the computing power information of the APP includes the anycast address of the APP, the first node where the APP is deployed, and the computing power information of the first node. Among them, there may be multiple items of the first node where the APP is deployed and the corresponding computing power information.
- the method may further include: the second node generates or updates the routing table entry of the APP's anycast address according to the computing power information of the APP.
- routing entries As an example, the generation of routing entries is as follows:
- the second node determines the first node whose computing power satisfies the condition as the target first node.
- the second node generates a routing entry of the routing information of the APP, and the routing entry includes an egress port of the second node, and the egress port of the second node can communicate with a next-hop device on a path to the target first node.
- the computing power satisfaction condition is determined according to the computing power threshold. For example, if the computing capability includes load, the condition may be that the load is less than or equal to 50%; if the computing capability includes the number of CPU cores, the preset condition may be that the number of CPU cores is greater than or equal to four.
- the second node After the routing entry is generated, when the second node receives the data packet sent by the APP client, it determines the egress port based on the routing entry corresponding to the anycast address of the APP, and then forwards the data packet.
- Fig. 8 is a block diagram of a device for distributing computing power provided by an embodiment of the present application.
- the device for distributing computing power can be implemented as all or part of the first node through software, hardware or a combination of the two, and the first node is the first node in the application scenario shown in FIG. 1 .
- the device for distributing computing power may include: a generating unit 601 and a sending unit 602 .
- the generating unit 601 is used to execute step S31 in FIG. 2 , that is, the generating unit 601 is used to generate a first message in response to a change in the computing power of the first node, and the first message includes the address of the first node and the address of the first node. computing power information;
- the sending unit 602 is used to execute step S32 in FIG. 2 , that is, the sending unit 602 is used to send the first message to the second node, so that the second node updates the first node according to the computing power information of the first node and the first corresponding relationship.
- the first corresponding relationship includes the corresponding relationship between the first node and the first APP, and the first APP is deployed on the first node.
- the generating unit 601 is also configured to execute step S53 in FIG. 4; the sending unit 602 is also configured to execute steps S51, S52, and S54 in FIG. 4.
- the sending unit 602 is further configured to send a second message to the second node, where the second message includes the first correspondence.
- the second message is a routing message
- the sending unit 602 is configured to send the routing message to the second node, where the routing message includes the first correspondence.
- the routing message includes the address information of the first APP, the address of the first node and next hop information, and the next hop information is used to forward the message to the address corresponding to the address information of the first APP, and the first node and the first
- the APP correspondence includes the correspondence between the address information of the first APP and the address of the first node.
- the address information of the first APP is located in the destination address field of the routing message, and the first node address and next hop information are located in the routing attribute field of the routing message.
- the sending unit 602 is configured to send the routing message to the second node through the first Interior Gateway Protocol IGP message or the first Border Gateway Protocol BGP message.
- a second APP is also deployed on the first node, and the second APP and the first APP share resources of the first node.
- the sending unit 602 is also configured to send the second correspondence to the second node.
- the second correspondence Including the correspondence between the first node and the second APP; the first message is also used to enable the second node to update the computing power information of the second APP according to the computing power information of the first node and the second corresponding relationship.
- the first node includes a server or a virtual machine VM.
- the sending unit 602 is configured to encapsulate the first node address and computing power information in an IGP message or a BGP message to obtain the first message.
- the sending unit 602 is configured to encapsulate the computing power information in the type length value TLV field of the IGP message or the BGP message, and encapsulate the address of the first node in the reachable network layer of the IGP message or the BGP message sex message NLRI field.
- Fig. 9 is a block diagram of a device for updating computing power provided by an embodiment of the present application.
- the device for updating computing power can be implemented as all or part of the second node through software, hardware or a combination of the two, and the second node is the second node in the application scenario shown in FIG. 1 .
- the device for updating computing power may include: an acquiring unit 701 , a receiving unit 702 and an updating unit 703 .
- the obtaining unit 701 is used to execute step S41 in FIG. on a node;
- the receiving unit 702 is configured to execute step S42 in FIG. 3 , that is, the receiving unit 702 is configured to receive a first message from the first node, and the first message includes the address of the first node and computing power information of the first node;
- the update unit 703 is configured to execute step S43 in FIG. 3 , that is, the update unit 703 is configured to update the computing power information of the first APP according to the first corresponding relationship and the computing power information of the first node.
- the acquiring unit 701 is also configured to execute steps S51 and S52 in FIG. 4; the receiving unit 702 is also configured to execute step S54 in FIG. 4; the updating unit 703 is also configured to execute step S55 in FIG. .
- the obtaining unit 701 is configured to receive a second message sent by the first node, where the second message includes the first correspondence.
- the second message is a routing message
- the obtaining unit 701 is configured to receive the routing message sent by the first node, where the routing message includes the first correspondence.
- the routing message includes the address information of the first APP, the address of the first node and next hop information, and the next hop information is used to forward the message to the address corresponding to the address information of the first APP, and the first node and the first
- the APP correspondence includes the correspondence between the address information of the first APP and the address of the first node.
- the address information of the first APP is located in the destination address field of the routing message, and the first node address and next hop information are located in the routing attribute field of the routing message.
- the obtaining unit 701 is configured to receive an IGP message or a BGP message, and the IGP message or the BGP message carries routing information.
- the obtaining unit 701 is further configured to obtain a second correspondence, the second correspondence includes a correspondence between the first node and the second APP, the second APP is deployed on the first node, and the second APP and the first APP Share the resources of the first node;
- An updating unit 703 configured to update the computing power information of the second APP according to the second corresponding relationship and the computing power information of the first node.
- the second node includes a router.
- the receiving unit 702 is configured to receive an IGP message or a BGP message, where the IGP message or the BGP message carries the first node address and computing power information.
- the computing power information is located in the TLV field of the IGP message or the BGP message, and the address of the first node is located in the NLRI field of the IGP message or the BGP message.
- Fig. 10 shows a schematic structural diagram of a first node 800 provided by an exemplary embodiment of the present application.
- the first node 800 shown in FIG. 10 is configured to perform the operations involved in the computing power publishing method shown in FIG. 2 and the operations involved in the computing power updating method shown in FIG. 4 .
- the first node 800 is, for example, a server, and the first node 800 may be implemented by a general bus architecture.
- the first node 800 includes at least one processor 801 , a memory 803 and at least one communication interface 804 .
- the processor 801 is, for example, a general-purpose central processing unit (central processing unit, CPU), a digital signal processor (digital signal processor, DSP), a network processor (network processor, NP), a graphics processing unit (Graphics Processing Unit, GPU), A neural network processor (neural-network processing units, NPU), a data processing unit (Data Processing Unit, DPU), a microprocessor, or one or more integrated circuits for implementing the solution of this application.
- the processor 801 includes an application-specific integrated circuit (application-specific integrated circuit, ASIC), a programmable logic device (programmable logic device, PLD) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.
- the PLD is, for example, a complex programmable logic device (complex programmable logic device, CPLD), a field-programmable gate array (field-programmable gate array, FPGA), a general array logic (generic array logic, GAL) or any combination thereof. It can realize or execute various logical blocks, modules and circuits described in conjunction with the disclosure of the embodiments of the present invention.
- the processor may also be a combination that implements computing functions, for example, a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
- the first node 800 further includes a bus.
- the bus is used to transfer information between the various components of the first node 800 .
- the bus may be a peripheral component interconnect standard (PCI for short) bus or an extended industry standard architecture (EISA for short) bus or the like.
- PCI peripheral component interconnect standard
- EISA extended industry standard architecture
- the bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 10 , but it does not mean that there is only one bus or one type of bus.
- the memory 803 is, for example, a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (random access memory, RAM) or a storage device that can store information and instructions.
- Other types of dynamic storage devices such as electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc Storage (including Compact Disc, Laser Disc, Optical Disc, Digital Versatile Disc, Blu-ray Disc, etc.), magnetic disk storage medium, or other magnetic storage device, or is capable of carrying or storing desired program code in the form of instructions or data structures and capable of Any other medium accessed by a computer, but not limited to.
- the memory 803 exists independently, for example, and is connected to the processor 801 via a bus.
- the memory 803 can also be integrated with the processor 801.
- the communication interface 804 uses any device such as a transceiver for communicating with other devices or a communication network.
- the communication network can be Ethernet, radio access network (RAN) or wireless local area networks (wireless local area networks, WLAN).
- the communication interface 804 may include a wired communication interface, and may also include a wireless communication interface.
- the communication interface 804 can be an Ethernet (Ethernet) interface, a Fast Ethernet (Fast Ethernet, FE) interface, a Gigabit Ethernet (Gigabit Ethernet, GE) interface, an asynchronous transfer mode (Asynchronous Transfer Mode, ATM) interface, a wireless local area network ( wireless local area networks, WLAN) interface, cellular network communication interface or a combination thereof.
- the Ethernet interface can be an optical interface, an electrical interface or a combination thereof.
- the communication interface 804 may be used for the first node 800 to communicate with other devices.
- the processor 801 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 10 . Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
- a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
- the first node 800 may include multiple processors, such as the processor 801 and the processor 805 shown in FIG. 10 .
- processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU).
- a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data such as computer program instructions.
- the first node 800 may further include an output device and an input device.
- Output devices are in communication with processor 801 and can display information in a variety of ways.
- the output device may be a liquid crystal display (liquid crystal display, LCD), a light emitting diode (light emitting diode, LED) display device, a cathode ray tube (cathode ray tube, CRT) display device, or a projector (projector).
- the input device communicates with the processor 801 and can receive user input in a variety of ways.
- the input device may be a mouse, a keyboard, a touch screen device, or a sensing device, among others.
- the memory 803 is used to store the program code 810 for implementing the solutions of the present application, and the processor 801 can execute the program code 810 stored in the memory 803. That is to say, the first node 800 can use the processor 801 and the program code 810 in the memory 803 to implement the computing power distribution method provided by the method embodiment.
- One or more software modules may be included in the program code 810 .
- the processor 801 itself may also store program codes or instructions for executing the solution of the present application.
- the first node 800 in the embodiment of the present application may correspond to the first network device in the above method embodiments, and the processor 801 in the first node 800 reads the instructions in the memory 803, so that the The illustrated first node 800 is capable of performing all or part of the operations performed by the first network device.
- the processor 801 is configured to send a detection message to at least one remote server through a communication interface, where the detection message includes a DHCP message or a DHCPv6 message; determine at least one remote server according to the response of the at least one remote server status.
- the first node 800 in this embodiment of the present application may correspond to the second network device in each of the above method embodiments, and the processor 801 in the first node 800 reads the instructions in the memory 803 to make the The first node 800 is capable of performing all or part of the operations performed by the second network device.
- the processor 801 is configured to receive indication information sent by the first network device through a communication interface; and determine a state of at least one remote server according to the indication information.
- the first node 800 may also correspond to the computing power distributing device shown in FIG. 8 above, and each functional module in the computing power distributing device is implemented by the software of the first node 800 .
- the functional modules included in the computing power distribution device are generated after the processor 801 of the first node 800 reads the program code 810 stored in the memory 803 .
- each step of the computing power publishing method shown in FIG. 2 and the computing power updating method shown in FIG. 4 is completed by an integrated logic circuit of hardware in the processor of the first node 800 or an instruction in the form of software.
- the steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
- the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
- the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, no detailed description is given here.
- Fig. 11 shows a schematic structural diagram of a second node 900 provided by an exemplary embodiment of the present application.
- the second node 900 shown in FIG. 11 is configured to perform operations involved in the computing power updating method shown in FIG. 3 and operations involved in the computing power updating method shown in FIG. 4 .
- the second node 900 is, for example, a router, a switch, etc., and the second node 900 may be implemented by a general bus architecture.
- the second node 900 includes at least one processor 901 , a memory 903 and at least one communication interface 904 .
- the processor 901 is, for example, a general-purpose central processing unit (central processing unit, CPU), a digital signal processor (digital signal processor, DSP), a network processor (network processor, NP), a graphics processing unit (Graphics Processing Unit, GPU), A neural network processor (neural-network processing units, NPU), a data processing unit (Data Processing Unit, DPU), a microprocessor, or one or more integrated circuits for implementing the solution of this application.
- the processor 901 includes an application-specific integrated circuit (application-specific integrated circuit, ASIC), a programmable logic device (programmable logic device, PLD) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof.
- the PLD is, for example, a complex programmable logic device (complex programmable logic device, CPLD), a field-programmable gate array (field-programmable gate array, FPGA), a general array logic (generic array logic, GAL) or any combination thereof. It can realize or execute various logical blocks, modules and circuits described in conjunction with the disclosure of the embodiments of the present invention.
- the processor may also be a combination that implements computing functions, for example, a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
- the second node 900 further includes a bus.
- the bus is used to transfer information between the various components of the second node 900 .
- the bus may be a peripheral component interconnect standard (PCI for short) bus or an extended industry standard architecture (EISA for short) bus or the like.
- PCI peripheral component interconnect standard
- EISA extended industry standard architecture
- the bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 11 , but it does not mean that there is only one bus or one type of bus.
- the memory 903 is, for example, a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (random access memory, RAM) or a memory that can store information and instructions.
- Other types of dynamic storage devices such as electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc Storage (including Compact Disc, Laser Disc, Optical Disc, Digital Versatile Disc, Blu-ray Disc, etc.), magnetic disk storage medium, or other magnetic storage device, or is capable of carrying or storing desired program code in the form of instructions or data structures and capable of Any other medium accessed by a computer, but not limited to.
- the memory 903 exists independently, for example, and is connected to the processor 901 via a bus.
- the memory 903 can also be integrated with the processor 901.
- the communication interface 904 uses any device such as a transceiver for communicating with other devices or a communication network.
- the communication network may be Ethernet, radio access network (RAN) or wireless local area networks (wireless local area networks, WLAN).
- the communication interface 904 may include a wired communication interface, and may also include a wireless communication interface.
- the communication interface 904 can be an Ethernet (Ethernet) interface, a Fast Ethernet (Fast Ethernet, FE) interface, a Gigabit Ethernet (Gigabit Ethernet, GE) interface, an Asynchronous Transfer Mode (Asynchronous Transfer Mode, ATM) interface, a wireless local area network ( wireless local area networks, WLAN) interface, cellular network communication interface or a combination thereof.
- the Ethernet interface can be an optical interface, an electrical interface or a combination thereof.
- the communication interface 904 may be used for the second node 900 to communicate with other devices.
- the processor 901 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 11 .
- Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
- a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
- the second node 900 may include multiple processors, such as the processor 901 and the processor 905 shown in FIG. 11 .
- processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU).
- a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data such as computer program instructions.
- the second node 900 may further include an output device and an input device.
- Output devices are in communication with processor 901 and can display information in a variety of ways.
- the output device may be a liquid crystal display (liquid crystal display, LCD), a light emitting diode (light emitting diode, LED) display device, a cathode ray tube (cathode ray tube, CRT) display device, or a projector (projector).
- the input device is in communication with the processor 901 and can receive user input in a variety of ways.
- the input device may be a mouse, a keyboard, a touch screen device, or a sensing device, among others.
- the memory 903 is used to store the program code 910 for implementing the solution of the present application, and the processor 901 can execute the program code 910 stored in the memory 903 . That is, the second node 900 can implement the computing power update method provided by the method embodiment through the processor 901 and the program code 910 in the memory 903 .
- One or more software modules may be included in the program code 910 .
- the processor 901 itself may also store program codes or instructions for executing the solution of the present application.
- the second node 900 in the embodiment of the present application may correspond to the first network device in each method embodiment above, and the processor 901 in the second node 900 reads the instructions in the memory 903, so that the The illustrated second node 900 is capable of performing all or part of the operations performed by the first network device.
- the processor 901 is configured to send a detection message to at least one remote server through a communication interface, where the detection message includes a DHCP message or a DHCPv6 message; determine at least one remote server according to the response of the at least one remote server status.
- the second node 900 in this embodiment of the present application may correspond to the second network device in each of the above method embodiments, and the processor 901 in the second node 900 reads the instructions in the memory 903 to make the The second node 900 is capable of performing all or part of the operations performed by the second network device.
- the processor 901 is configured to receive indication information sent by the first network device through a communication interface; and determine a state of at least one remote server according to the indication information.
- the second node 900 may also correspond to the computing power updating device shown in FIG. 9 above, and each functional module in the computing power updating device is implemented by the software of the second node 900 .
- the functional modules included in the computing power update device are generated after the processor 901 of the second node 900 reads the program code 910 stored in the memory 903 .
- the steps of the computing power updating method shown in FIG. 3 and the computing power updating method shown in FIG. 4 are completed by hardware integrated logic circuits or software instructions in the processor of the second node 900 .
- the steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
- the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
- the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, no detailed description is given here.
- the embodiment of the present application also provides a chip, including a processor, the processor is used to call from the memory and run the instructions stored in the memory, so that the communication device installed with the chip executes any one of the computing power release methods provided in the present application Or computing power update method.
- the embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor, and a memory, the input interface, the output interface, the processor, and the memory are connected through an internal connection path, and the processor is used to execute the code in the memory , when the code is executed, the processor is used to execute any one of the above computing power publishing methods or computing power updating methods.
- processor may be a CPU, or other general-purpose processors, DSP, ASIC, FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like.
- a general purpose processor may be a microprocessor or any conventional processor or the like. It should be noted that the processor may be a processor supporting the ARM architecture.
- processors there are one or more processors and one or more memories.
- the memory may be integrated with the processor, or the memory may be separated from the processor.
- the above-mentioned memory may include read-only memory and random-access memory, and provides instructions and data to the processor.
- Memory may also include non-volatile random access memory.
- the memory may also store reference blocks and target blocks.
- the memory can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory.
- the non-volatile memory may be ROM, PROM, EPROM, EEPROM or flash memory.
- Volatile memory can be RAM, which acts as external cache memory.
- many forms of RAM are available. For example, SRAM, DRAM, SDRAM, DDR SDRAM, ESDRAM, SLDRAM, and DR RAM.
- a computer-readable storage medium stores computer instructions.
- the computer device executes the above-mentioned Provided computing power release method or computing power update method.
- a computer program product containing instructions is also provided, which, when run on a computer device, causes the computer device to execute the computing power publishing method or computing power updating method provided above.
- all or part of them may be implemented by software, hardware, firmware or any combination thereof.
- software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
- the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the present application will be generated in whole or in part.
- the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
- the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, DSL) or wireless (eg, infrared, wireless, microwave, etc.) means.
- the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
- the available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a Solid State Disk).
- the program can be stored in a computer-readable storage medium.
- the above-mentioned The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, and the like.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请公开了一种算力发布方法、算力更新方法及装置,属于通信技术领域。所述方法包括:响应于第一节点的算力发生变化,所述第一节点生成第一消息,所述第一消息包括第一节点地址和第一节点的算力信息;所述第一节点向第二节点发送所述第一消息,以使得所述第二节点根据所述第一节点的算力信息以及第一对应关系更新第一应用程序APP的算力信息,所述第一对应关系包括所述第一节点和所述第一APP的对应关系,所述第一APP部署在所述第一节点上。
Description
本申请要求于2021年6月28日提交的申请号202110719057.7、申请名称为“算力发布方法、算力更新方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信技术领域,特别涉及一种算力发布方法、算力更新方法及装置。
算力优先网络(compute first networking,CFN)是指网络中的路由节点能够感知网络中各个服务节点的实时算力,路由节点基于各个服务节点的实时算力选择合适的服务节点为用户提供服务。
相关技术中,路由节点感知服务节点实时算力的方式如下:服务节点将算力信息携带在路由消息中进行发布,这样路由节点就能够获得网络中各个服务节点的算力。当服务节点中同时部署有多个应用程序(Application,APP),并且服务节点给这多个APP中的每个APP单独分配资源时,服务节点需要分别为每个APP单独发布算力信息。
发明内容
本申请提供了一种算力发布方法、算力更新方法及装置,该方法使得算力更新时不再需要为每个APP单独发布算力信息,而是以服务器粒度统一为所有APP发布算力信息,避免为每个APP单独发布算力信息造成的冗余,从而减小了网络负载。
第一方面,本申请提供了一种算力发布方法,该方法由第一节点执行,包括:在第一节点的算力发生变化时,第一节点生成第一消息,然后将该第一消息发送给第二节点,该第一消息包括第一节点地址和第一节点的算力信息。这样,第二节点接收到该第一消息后,根据第一节点的算力信息以及第一对应关系更新第一应用程序APP的算力信息,第一对应关系包括第一节点和第一APP的对应关系,第一APP部署在第一节点上。
这样,第一节点在算力发布时,只需要服务器粒度进行发布,也即算力更新后只需要发布一次,第二节点收到第一节点的算力信息后,根据对应关系即可对与第一节点存在对应关系的APP的算力进行更新。第一节点在发送算力信息时,不再需要针对不同的APP单独发布算力信息,避免了每次算力更新都需要针对不同的APP单独发布算力信息造成的冗余,采用粗粒度(服务器粒度)的算力发布方案,解决了相关技术中算力发布造成网络负载大的问题,减小网络泛洪量,降低了算力发布所占用的网络资源。
在本申请中,第一节点发送第一对应关系的方案如下:
第一节点向第二节点发送第二消息,第二消息包括前述第一对应关系。其中,第二消息和第一消息是不同的消息,说明第一对应关系和算力信息是分开发送的。
示例性地,第二消息为路由消息,也即第一节点向第二节点发送路由消息,路由消息包 括第一对应关系,这种情况下实现了算力信息和路由消息的解耦。也即,在本申请中第二消息是通过路由消息实现的。
通常,在第一APP上线时第一节点通过发送路由消息(路由更新消息)进行路由的更新,在第一APP下线时第一节点通过发送路由消息进行路由的撤销。在本申请中,第一对应关系也是由第一节点发送给第二节点的。并且,第一对应关系和前述算力信息是分开发送的,因为对应关系是固定的,分开发送可以避免在更新算力信息时重复发送该对应关系,从而节省网络资源,减小网络负载。
其中,第一APP上线包括但不限于第一APP在第一节点中启动,或者在第一节点中完成第一APP的部署等情况。
示例性地,路由消息包括第一APP的地址信息、第一节点地址和下一跳信息,下一跳信息用于向第一APP的地址信息对应的地址转发报文。
其中,第一APP的地址信息和第一节点地址构成前述第一对应关系,也即第一APP和第一节点的对应关系。
示例性地,第一APP的地址信息为第一APP对应的任播地址,则下一跳信息用于向该APP对应的任播地址转发报文。
在本申请中,第一节点向第二节点发送路由消息,包括:第一节点通过内部网关协议IGP报文或边界网关协议BGP报文向第二节点发送路由消息。
也即,该路由消息采用IGP协议或BGP实现,下面以BGP报文为例对路由消息字段进行说明:
BGP协议报文包括以太网头部、互联网协议IP头部、传输控制协议TCP头部、BGP数据包和帧校验序列FCS。
其中,IP头部包括源地址、目的地址等字段,前述第一APP的地址信息位于目的地址字段中;BGP数据包包括BGP头部和BGP消息两个部分,BGP消息包括路由属性字段,前述第一节点地址和下一跳信息位于路由属性字段中。
相应地,第二节点接收到该路由消息后,从目的地址字段中获得第一APP的地址信息,从路由属性字段中获得第一节点地址,从而得到前述第一对应关系。
可选地,第一节点上除了部署第一APP外,还可以部署有第二APP,第二APP和第一APP是不同的APP,第二APP和第一APP共享第一节点上的资源,也即第一节点没有给不同的APP单独分配资源,第一节点上的资源是这些APP共用的。这里,第二APP和第一APP共享第一节点上的资源,是指第二APP和第一APP共享第一节点中的中央处理器CPU资源、图形处理器GPU资源、现场可编程逻辑门阵列FPGA资源、存储资源等各种资源,第二APP和第一APP既可以共享第一节点中的全部资源,也可以仅共享第一节点中的部分资源。
由于第一节点上还布置了第二APP,因此,第一节点还需要将第一节点和第二APP的对应关系发送给第二节点。也即,该方法还包括:第一节点向第二节点发送第二对应关系,第二对应关系包括第一节点和第二APP的对应关系。同样地,第二节点收到第一消息时,除了前述更新第一APP的算力信息外,还根据第一节点的算力信息以及第二对应关系更新第二APP的算力信息。
示例性地,第二对应关系的发送方式与第一对应关系的发送方式相同,也即均采用路由消息发送,并且携带第二对应关系的路由消息的格式和携带第一对应关系的路由消息的格式 相同。第二对应关系和第一对应关系可以通过两条路由消息发送,也可以通过一条路由消息发送。同样地,在第二APP上线时第一节点通过发送携带第二对应关系的路由消息进行路由的更新,在第二APP下线时第一节点通过发送携带第二对应关系的路由消息进行路由的撤销。
从这里可以看出,采用本申请提供的方案,在算力信息更新时,无需重复为第一APP和第二APP更新算力信息,即可实现第二节点中第一APP和第二APP的算力更新。
在本申请可能的实现方式中,第一消息采用已有的网络协议实现,或者第一消息采用新的协议实现。
示例性地,第一消息采用IGP报文或者BGP报文实现。
也即,前述生成第一消息采用如下方式实现:第一节点将第一节点地址和算力信息封装在IGP报文或BGP报文中,得到第一消息。
示例性地,第一节点将算力信息封装在IGP报文或BGP报文的类型长度值TLV字段中,将第一节点地址封装在IGP报文或BGP报文的网络层可达性消息NLRI字段中。
以BGP报文为例,第一消息采用BGP更新报文实现。
其中,算力信息位于BGP更新报文的路由属性字段中,第一节点地址位于NLRI字段中。
其中,路由属性字段包括类型、长度和值等子字段,也即前述TLV字段,算力信息封装在该路由属性字段中。路由属性字段通常还包括标志字段。
在将算力信息封装在路由属性字段中时,每个参数均对应一组TLV,例如算力信息包括CPU信息、GPU信息和连接信息等,则这里的CPU信息、GPU信息和连接信息每个对应一组TVL。
示例性地,第一节点包括服务器或者虚拟机VM,第二节点包括路由器。
第二方面,本申请提供了一种算力更新方法,该方法由第二节点执行,包括:第二节点获取第一对应关系,第一对应关系包括第一节点和第一APP的对应关系,第一APP部署在第一节点上;第二节点接收第一节点的第一消息,第一消息包括第一节点地址和第一节点的算力信息;在获得第一对应关系和第一消息后,第二节点根据第一对应关系和第一节点的算力信息,更新第一APP的算力信息。
这里的算力更新包括但不限于对算力信息的修改、新增和删除等。
第二节点在收到第一节点的算力信息后,根据对应关系即可对与第一节点存在对应关系的APP的算力进行更新,比如对第一APP的算力信息进行更新。这样,就使得第一节点在发送算力信息时,不再需要针对不同的APP单独发布算力信息,避免了每次算力更新都需要针对不同的APP单独发布算力信息造成的冗余,采用粗粒度(服务器粒度)的算力发布方案,解决了相关技术中算力发布造成网络负载大的问题,减小网络泛洪量,降低了算力发布所占用的网络资源。
在本申请中,第二节点获取第一对应关系包括的方式包括静态配置和动态获取两种。其中,动态获取方式如下:第二节点接收第一节点发送的第二消息,第二消息包括第一对应关系。
示例性地,第二消息为路由消息,也即第二节点接收第一节点发送的路由消息,路由消息包括第一对应关系。
示例性地,路由消息包括第一APP的地址信息、第一节点地址和下一跳信息,下一跳信息用于向第一APP的地址信息对应的地址转发报文,第一节点和第一APP的对应关系包括 第一APP的地址信息和第一节点地址的对应关系。
前述第二节点接收第一节点的路由消息,包括:
第二节点接收IGP报文或BGP报文,IGP报文或BGP报文中携带有路由消息。
可选地,该方法还包括:
第二节点获取第二对应关系,第二对应关系包括第一节点和第二APP的对应关系,第二APP部署在第一节点上;
第二节点根据第二对应关系和第一节点的算力信息,更新第二APP的算力信息。
这里,第二对应关系的获取方式和第一对应关系的获取方式相同。
在本申请可能的实现方式中,第一消息采用已有的网络协议实现,或者第一消息采用新的协议实现。
示例性地,第一消息采用IGP报文或者BGP报文实现。也即,第二节点接收第一节点的第一消息,包括:
第二节点接收IGP报文或BGP报文,IGP报文或BGP报文中携带有第一节点地址和算力信息。
示例性地,算力信息位于IGP报文或BGP报文的TLV字段中,第一节点地址位于IGP报文或BGP报文的NLRI字段中。
第三方面,本申请提供了一种算力发布装置,所述装置包括:
生成单元,用于响应于第一节点的算力发生变化,生成第一消息,第一消息包括第一节点地址和第一节点的算力信息;
发送单元,用于向第二节点发送第一消息,以使得第二节点根据第一节点的算力信息以及第一对应关系更新第一应用程序APP的算力信息,第一对应关系包括第一节点和第一APP的对应关系,第一APP部署在第一节点上。
可选地,发送单元,还用于向第二节点发送第二消息,第二消息包括第一对应关系。
可选地,第二消息为路由消息,发送单元,用于向第二节点发送路由消息,路由消息包括第一对应关系。
可选地,路由消息包括第一APP的地址信息、第一节点地址和下一跳信息,下一跳信息用于向第一APP的地址信息对应的地址转发报文,第一节点和第一APP的对应关系包括第一APP的地址信息和第一节点地址的对应关系。
可选地,第一APP的地址信息位于路由消息的目的地址字段中,第一节点地址和下一跳信息位于路由消息的路由属性字段中。
可选地,发送单元,用于通过第一内部网关协议IGP报文或第一边界网关协议BGP报文向第二节点发送路由消息。
可选地,第一节点上还部署有第二APP,第二APP和第一APP共享第一节点的资源,发送单元,还用于向第二节点发送第二对应关系,第二对应关系包括第一节点和第二APP的对应关系;第一消息还用于使第二节点根据第一节点的算力信息以及第二对应关系更新第二APP的算力信息。
可选地,第一节点包括服务器或者虚拟机VM。
可选地,发送单元,用于将第一节点地址和算力信息封装在IGP报文或BGP报文中,得到第一消息。
可选地,发送单元,用于将算力信息封装在IGP报文或BGP报文的类型长度值TLV字段中,将第一节点地址封装在IGP报文或BGP报文的网络层可达性消息NLRI字段中。
第四方面,本申请提供了一种算力更新装置,所述装置包括:
获取单元,用于获取第一对应关系,第一对应关系包括第一节点和第一APP的对应关系,第一APP部署在第一节点上;
接收单元,用于接收第一节点的第一消息,第一消息包括第一节点地址和第一节点的算力信息;
更新单元,用于根据第一对应关系和第一节点的算力信息,更新第一APP的算力信息。
可选地,获取单元,用于接收第一节点发送的第二消息,第二消息包括第一对应关系。
可选地,第二消息为路由消息,获取单元,用于接收第一节点发送的路由消息,路由消息包括第一对应关系。
可选地,路由消息包括第一APP的地址信息、第一节点地址和下一跳信息,下一跳信息用于向第一APP的地址信息对应的地址转发报文,第一节点和第一APP的对应关系包括第一APP的地址信息和第一节点地址的对应关系。
可选地,第一APP的地址信息位于路由消息的目的地址字段中,第一节点地址和下一跳信息位于路由消息的路由属性字段中。
可选地,获取单元,用于接收IGP报文或BGP报文,IGP报文或BGP报文中携带有路由消息。
可选地,获取单元,还用于获取第二对应关系,第二对应关系包括第一节点和第二APP的对应关系,第二APP部署在第一节点上,第二APP和第一APP共享第一节点的资源;
更新单元,用于根据第二对应关系和第一节点的算力信息,更新第二APP的算力信息。
可选地,第二节点包括路由器。
可选地,接收单元,用于接收IGP报文或BGP报文,IGP报文或BGP报文中携带有第一节点地址和算力信息。
可选地,算力信息位于IGP报文或BGP报文的TLV字段中,第一节点地址位于IGP报文或BGP报文的NLRI字段中。
第五方面,本申请提供了一种第一节点,所述第一节点包括处理器和存储器;所述存储器用于存储软件程序以及模块,所述处理器通过运行或执行存储在所述存储器内的软件程序和/或模块,使所述第一节点实现上述第一方面的任一种可能的实施方式中的方法。
第六方面,本申请提供了一种第二节点,所述第二节点包括处理器和存储器;所述存储器用于存储软件程序以及模块,所述处理器通过运行或执行存储在所述存储器内的软件程序和/或模块,使所述第二节点实现上述第二方面的任一种可能的实施方式中的方法。
可选地,所述处理器为一个或多个,所述存储器为一个或多个。
可选地,所述存储器可以与所述处理器集成在一起,或者所述存储器与处理器分离设置。
在具体实现过程中,存储器可以为非瞬时性(non-transitory)存储器,例如只读存储器(read only memory,ROM),其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请实施例对存储器的类型以及存储器与处理器的设置方式不做限定。
第七方面,本申请提供了一种算力发布系统,该系统包括第五方面所述的第一节点以及第六方面所述的第二节点。
第八方面,本申请提供了一种计算机程序(产品),所述计算机程序(产品)包括:计算机程序代码,当所述计算机程序代码被计算机运行时,使得所述计算机执行上述第一方面或第二方面的任一种可能的实施方式中的方法。
第九方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储处理器所执行的程序代码,所述程序代码包括用于实现上述第一方面或第二方面的任一种可能的实施方式中的方法。
第十方面,提供了一种芯片,包括处理器,处理器用于从存储器中调用并运行所述存储器中存储的指令,使得安装有所述芯片的通信设备执行上述第一方面或第二方面的任一种可能的实施方式中的方法。
第十一方面,提供另一种芯片,包括:输入接口、输出接口、处理器和存储器,所述输入接口、输出接口、所述处理器以及所述存储器之间通过内部连接通路相连,所述处理器用于执行所述存储器中的代码,当所述代码被执行时,所述处理器用于执行上述第一方面或第二方面的任一种可能的实施方式中的方法。
图1是本申请实施例提供的一种应用场景的示意图;
图2是本申请实施例提供的一种算力发布方法的流程图;
图3是本申请实施例提供的一种算力更新方法的流程图;
图4是本申请实施例提供的一种算力更新方法的流程图;
图5是本申请实施例提供的一种BGP报文格式示意图;
图6是本申请实施例提供的一种MP-BGP报文格式示意图;
图7是本申请实施例提供的路由消息和第一消息的传输过程示意图;
图8是本申请实施例提供的一种算力发布装置的框图;
图9是本申请实施例提供的一种算力更新装置的框图;
图10是本申请实施例提供的第一节点的结构示意图;
图11是本申请实施例提供的第二节点的结构示意图。
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
为便于对本申请实施例提供的技术方案的理解,首先介绍一下本申请的应用场景。
图1是本申请实施例所提供的应用场景的示意图。参见图1,该场景为移动边缘计算(mobile edge computing,MEC)场景中的CFN网络,该CFN网络包括第一节点、第二节点和客户端。
其中,第一节点为图中的应用程序(application,APP)服务器40,各个APP服务器40上均部署有应用APP,每个APP对应一个任播地址(anycast),例如APP1对应anycast1,APP2对应anycast2。
第二节点包括图中的入口(Ingress)路由器20。Ingress路由器20是CFN网络中流量的入口,例如小区站点网关(cell site gateway,CSG)设备;Egress路由器30是CFN网络中流 量的出口,例如数据中心网关(data center gateway,DCGW)设备;特殊情况下,同一个路由器可能同时具有Ingress和Egress路由器的功能。客户端10靠近Ingress路由器20,Ingress路由器20会收到客户端10发到的用户请求,Ingress路由器20根据路由表项选择合适的服务器处理该用户请求,其中Ingress路由器20中的路由表项是基于第一节点发布的路由消息和算力信息生成的。当第一节点的算力信息更新时,该路由表项则可能发生变化。
相关技术中,当第一节点中同时部署有多个APP时,服务节点会给这多个APP中的每个APP单独分配资源,同时第一节点需要分别为每个APP发布算力信息。但是,当服务节点中的多个APP共享服务节点中的算力时,相关技术中的这种算力发布方式会浪费网络资源,导致网络负载增大。
另外,相关技术中,算力信息携带在路由消息中进行发送,造成每次发布算力信息都会重复发送路由消息,进一步加重网络负载大的问题。
在其他实现方式中,第一节点还可以为虚拟机(virtual machine,VM),或者为路由器等其他设备。
图2是本申请实施例提供的一种算力发布方法的流程图。该方法可以由应用场景中的第一节点执行,如图2所示,该方法包括如下步骤:
S31:响应于第一节点的算力发生变化,第一节点生成第一消息。
其中,第一消息包括第一节点地址和第一节点的算力信息。
示例性地,第一节点地址为服务器IP地址或者VM IP地址。算力信息包括中央处理器(central processing unit,CPU)信息、图形处理器(graphics processing unit,GPU)信息和连接(connection)信息等。
其中,CPU信息包括CPU型号和实时负载等,GPU信息包括GPU型号和实时负载等,连接信息包括最大连接数和当前连接数等。
S32:第一节点向第二节点发送第一消息,以使得第二节点根据第一节点的算力信息以及第一对应关系更新第一应用程序APP的算力信息。
其中,第一对应关系包括第一节点和第一APP的对应关系,第一APP部署在第一节点上。
示例性地,第一消息采用内部网关协议(interior Gateway Protocol,IGP)报文或者边界网关协议(Border Gateway Protocol,BGP)报文实现。
这样,第一节点在算力发布时,只需要服务器粒度进行发布,也即算力更新后只需要发布一次,第二节点收到算力信息后,根据对应关系即可对与第一节点存在对应关系的APP的算力进行更新。第一节点在发送算力信息时,不再需要针对不同的APP单独发布算力,避免了每次算力更新都需要针对不同的APP单独发布算力造成的冗余,采用粗粒度(服务器粒度)的算力发布方案,解决了相关技术中算力发布造成网络负载大的问题,减小网络泛洪量,降低了算力发布所占用的网络资源。
这里,粗粒度的算力发布方案是指,相比于以APP的粒度进行算力信息发布,本申请中,以服务器粒度进行算力信息发布,即使服务器中部署有两个或多个APP,也只需发布一次算力,无需单独为每个APP发布一次算力。
图3是本申请实施例提供的一种算力更新方法的流程图。该方法可以由应用场景中的第二节点执行,如图3所示,该方法包括如下步骤:
S41:第二节点获取第一对应关系。
其中,第一对应关系包括第一节点和第一APP的对应关系,第一APP部署在第一节点上。
S42:第二节点接收第一节点的第一消息。
示例性地,第一消息包括第一节点地址和第一节点的算力信息。
S43:第二节点根据第一对应关系和第一节点的算力信息,更新第一APP的算力信息。
例如,第二节点根据第一节点地址和第一对应关系确定出第一APP,然后基于算力信息更新该第一APP的算力信息。
这里,第二节点接收到第一节点以节点的粒度发布的算力信息后,根据对应关系即可对与第一节点存在对应关系的APP的算力进行更新。第一节点在发送算力信息时,不再需要针对不同的APP单独发布算力,避免了每次算力更新都需要针对不同的APP单独发布算力造成的冗余,采用粗粒度(服务器粒度)的算力发布方案,解决了相关技术中算力发布造成网络负载大的问题,减小网络泛洪量,降低了算力发布所占用的网络资源。
图4是本申请实施例提供的一种算力更新方法的流程图。该方法可以由应用场景中的第一节点和第二节点执行,如图4所示,该方法包括如下步骤:
S51:第一节点向第二节点发送第一路由消息。第二节点接收第一节点发送的第一路由消息。
其中,第一路由消息包括第一对应关系,第一对应关系包括第一节点和第一APP的对应关系,第一APP部署在第一节点上。
示例性地,第一路由消息包括第一APP的地址信息、第一节点地址和下一跳信息,下一跳信息用于向第一APP的地址信息对应的地址转发报文。该第一路由消息是第一APP上线时发送的,也即在第一APP上线时第一节点通过发送路由消息(路由更新消息)进行路由的更新,在第一APP下线时第一节点通过发送路由消息进行路由的撤销,刷新频率低。
其中,第一节点和第一APP的对应关系包括第一APP的地址信息和第一节点地址的对应关系,也即第一APP的地址信息、第一节点地址构成前述第一对应关系。
示例性地,第一APP的地址信息为第一APP对应的任播地址,则下一跳信息用于向该APP对应的任播地址转发报文。
例如,第一节点A和第一节点B中均安装有应用程序C,第一节点A和第一节点B除了具有各自的第一节点地址外,由于第一节点A和第一节点B都安装有应用程序C,因此还对应一个相同的任播地址。
在本申请中,第一节点通过路由协议接收到同一任播地址对应的至少两个第一节点的路由消息。
示例性地,第一节点通过IGP报文或BGP报文向第二节点发送第一路由消息。
下表1是一种第一路由消息的格式,参见表1,该第一路由消息包括第一APP的任播地址(anycast IP)、下一跳信息(next hop)和第一节点地址(server IP)。
表1
anycast IP | next hop | server IP |
anycastIP1 | nexthop1 | server IP1 |
示例性地,第一路由消息采用BGP更新(update)报文实现。
下面以BGP协议为例,对第一路由消息中各个字段在BGP报文中的位置进行说明。
在本申请中,第二节点包括Ingress路由器。第一节点发送路由消息时,将路由消息和第一消息发送给Egress路由器,Egress路由器再发送给Ingress路由器(第二节点)。第一节点向Egress路由器发送路由消息时,可以采用BGP协议,Egress路由器向第二节点发送路由消息时,可以采用BGP或多协议扩展BGP(Multi Protocol BGP,MP-BGP)协议,也即第二节点接收到的是BGP或MP-BGP报文。
这里需要说明的是,路由消息在第一节点和Ingress路由器之间传输时,会经过Egress路由器。在一种实现方式中,该传输的过程如下:第一节点向Egress路由器发送路由消息,Egress路由器接收到该路由消息后,会处理该路由消息,然后将经过处理的路由消息转发给Ingress路由器;在另一种实现方式中,该传输的过程如下:第一节点向Egress路由器发送路由消息,Egress路由器接收到该路由消息后,不处理该路有消息,只执行转发动作,最终将该路由消息发送到Ingress路由器。
下面结合图5和图6分别对这两种格式报文进行介绍:图5是BGP报文格式示意图,图6是MP-BGP报文格式示意图。
参见图5和图6,BGP报文和MP-BGP报文均包括以太网头部、互联网协议(Internet Protocol,IP)头部、传输控制协议(Transmission Control Protocol,TCP)头部、BGP数据包和帧校验序列(Frame Check Sequence,FCS)。BGP数据包包括BGP头部和BGP消息两个部分。
示例性地,IP头部包括源地址、目的地址等字段。
参见图5,在BGP报文中,BGP消息包括不可达路由长度(unfeasible routes length)、不可达路由(withdrawn routes)、路由属性总长度(total path attribute length)、路由属性(path attributes)和网络层可达性消息(Network Layer Reachability Information,NLRI)字段。
其中,路由属性字段包括类型(Type)、长度(Length)和值(Value)等子字段,也即TLV字段。路由属性字段通常还包括标志(Flag)字段。
下表2示出了路由属性字段的格式,参见表2,路由属性包括标识(Path attr.Flag)、类型(Path attr.Type)、长度(Path attr.Lenath)和值(Path attr.Value)。
表2
Path attr.Flag | Path attr.Type | Path attr.Lenath | Path attr.Value |
1字节 | 1字节 | 1字节 | 4字节(IPv4)/16字节(IPv6) |
参见图6,在MP-BGP报文中,BGP消息包括地址族标识符、后续地址族标识符、下一跳网络地址长度、下一跳网络地址、保留、NTRI和路由属性字段。其中路由属性字段格式与表2相同。
在本申请实施例中,前述第一APP的地址信息位于BGP报文或者MP-BGP报文的目的地址字段中;前述第一节点地址和下一跳信息位于BGP报文或者MP-BGP报文的路由属性字段中。
在将第一节点地址和下一跳信息封装在路由属性字段中时,每个参数均对应一组TLV,例如第一节点地址对应一组TVL。
相应地,第二节点接收到该路由消息后,从目的地址字段中获得第一APP的地址信息,从路由属性字段中获得第一节点地址,即可得到前述第一对应关系。
在本申请的其他实现方式中,第一对应关系也可以采用静态配置的方式配置在第二节点上。
S52:第一节点向第二节点发送第二路由消息。第二节点接收第一节点发送的第二路由消息。
其中,第二路由消息包括第二对应关系,第二对应关系包括第一节点和第二APP的对应关系,第二APP部署在第一节点上,第二APP和第一APP共享第一节点的资源。
这里,第二路由消息的发布方式及格式等与第一路由消息相同,这里不做赘述。
在本申请的另一种实现方式中,上述第一对应关系和第二对应关系还可以包含在同一个路由消息中,第一节点通过一个路由消息将第一对应关系和第二对应关系发送给第二节点。
可选地,该方法还包括:第二节点保存上述第一对应关系和第二对应关系。
S53:响应于第一节点的算力发生变化,第一节点生成第一消息。第一消息包括第一节点地址和第一节点的算力信息。
第一节点以周期方式确定算力是否发生变化,在算力发生变化(例如变化值超过一定范围)则生成第一消息。
在本申请可能的实现方式中,第一消息采用已有的网络协议实现,或者第一消息采用新的协议实现。
示例性地,第一消息采用IGP协议或者BGP协议(或MP-BGP协议)实现。
也即,前述生成第一消息采用如下方式实现:将第一节点地址和算力信息封装在IGP报文或BGP报文中,得到第一消息。
示例性地,将算力信息封装在IGP报文或BGP报文的类型长度值TLV字段中,将第一节点地址封装在IGP报文或BGP报文的网络层可达性消息NLRI字段中。
以BGP报文为例,第一消息采用BGP更新(update)报文实现。
其中,算力信息位于BGP更新报文的路由属性字段中,第一节点地址位于NLRI字段中。
在将算力信息封装在路由属性字段中时,每个参数均对应一组TLV,例如算力信息包括CPU信息、GPU信息和连接信息等,则这里的CPU信息、GPU信息和连接信息每个对应一组TVL。
对于算力信息中的参数,路由属性的Value值可以为核心的数量、型号、负载大小等。
需要说明的是,除了算力更新时第一节点会生成并发送第一消息,以进行算力更新外,在第一节点上线时,第一节点也会生成并发送第一消息,发布初始的算力信息。
S54:第一节点向第二节点发送第一消息。第二节点接收第一节点的第一消息。
在算力优先网络中,第二节点通常可以接收到至少两个第一节点发送的第一消息。
在本申请中,第一节点发送第一消息时,将第一消息发送给Egress路由器,Egress路由器再发送给Ingress路由器。后续步骤S55~S59均由Ingress路由器执行。其中,第一消息在第一节点和Ingress路由器之间传输的过程,与路由消息在第一节点和Ingress路由器之间传输的过程相同,这里不再赘述。
图7示出了本申请中路由消息和第一消息的传输过程。参见图7:服务器1、服务器2和服务器3中均部署有APP1,对应任播地址anycastIP1,服务器2中还部署有APP2,对应任波地址anycastIP2。
以服务器1为例,服务器1分别发送路由消息(anycastIP1+serverIP1+nexthop1)和第一 消息(serverIP1+算力1)到Egress路由器,再由Egress路由器发送给Ingress路由器。服务器2和3也以相同的方式发送路由消息和第一消息,最终Ingress路由器获得上述3个服务器的路由消息和第一消息,从而执行后续算力更新步骤。
在本申请中,路由消息作为一种相对静态的信息,只有在业务上下线时才会发布或撤销,更新发布频率低;算力信息更新与发布频繁,通过将算力信息和路由消息解耦,使得算力信息每次更新的条目数更少,能够减小网络的负载。
S55:第二节点根据第一对应关系和第一节点的算力信息,更新第一APP的算力信息;第二节点根据第二对应关系和第一节点的算力信息,更新第二APP的算力信息。
示例性地,第二节点从第一路由消息中获取第一对应关系,从第二路由消息中获取第二对应关系。比如,第二节点接收到第一路由消息后,从目的地址字段中获得第一APP的地址信息,从路由属性字段中获得第一节点地址,从而得到前述第一对应关系;第二节点接收到第二路由消息后,从目的地址字段中获得第二APP的路由信息,从路由属性字段中获得第一节点地址,从而得到前述第二对应关系。
例如,第二节点根据第一节点地址和第一对应关系确定出第一APP,然后基于算力信息更新该第一APP的算力信息。第二节点根据第二节点地址和第二对应关系确定出第二APP,然后基于算力信息更新该第二APP的算力信息。
也即,根据上述对应关系可以确定该算力信息对应哪些APP,然后对这些APP的算力信息进行更新。
在第二节点中,APP的算力信息,包括APP的任播地址、部署该APP的第一节点、以及该第一节点的算力信息。其中,部署该APP的第一节点以及对应的算力信息可以有多项。
可选地,该方法还可以包括:第二节点根据一个APP的算力信息,生成或更新该APP的任播地址的路由表项。
以生成路由表项为例,路由表项的生成方式如下:
第二节点根据同一个APP的算力信息,将算力满足条件的第一节点确定为目标第一节点。第二节点生成该APP的路由信息的路由表项,路由表项包括第二节点的出端口,第二节点的出端口能够与到目标第一节点的路径上的下一跳设备通信。
这里,算力满足条件根据运算能力的阈值进行确定。例如,若运算能力包括负载,则该条件可以例如是负载小于或等于百分之五十;若运算能力包括CPU的核数,则该预设条件可以例如是CPU核数大于或等于四个。
在生成该路由表项后,当第二节点收到APP客户端发送的数据报文时,基于该APP的任播地址对应的路由表项确定出端口,然后转发该数据报文。
图8是本申请实施例提供的一种算力发布装置的框图。该算力发布装置可以通过软件、硬件或者两者的结合实现成为第一节点的全部或者一部分,该第一节点为图1所示的应用场景中的第一节点。该算力发布装置可以包括:生成单元601和发送单元602。
其中,生成单元601用于执行图2中的步骤S31,也即生成单元601用于响应于第一节点的算力发生变化,生成第一消息,第一消息包括第一节点地址和第一节点的算力信息;
发送单元602用于执行图2中的步骤S32,也即发送单元602用于向第二节点发送第一消息,以使得第二节点根据第一节点的算力信息以及第一对应关系更新第一应用程序APP的 算力信息,第一对应关系包括第一节点和第一APP的对应关系,第一APP部署在第一节点上。
可选地,该生成单元601还用于执行图4中的步骤S53;该发送单元602还用于执行图4中的步骤S51、S52、S54。
可选地,发送单元602,还用于向第二节点发送第二消息,第二消息包括第一对应关系。
可选地,第二消息为路由消息,发送单元602,用于向第二节点发送路由消息,路由消息包括第一对应关系。
可选地,路由消息包括第一APP的地址信息、第一节点地址和下一跳信息,下一跳信息用于向第一APP的地址信息对应的地址转发报文,第一节点和第一APP的对应关系包括第一APP的地址信息和第一节点地址的对应关系。
可选地,第一APP的地址信息位于路由消息的目的地址字段中,第一节点地址和下一跳信息位于路由消息的路由属性字段中。
可选地,发送单元602,用于通过第一内部网关协议IGP报文或第一边界网关协议BGP报文向第二节点发送路由消息。
可选地,第一节点上还部署有第二APP,第二APP和第一APP共享第一节点的资源,发送单元602,还用于向第二节点发送第二对应关系,第二对应关系包括第一节点和第二APP的对应关系;第一消息还用于使第二节点根据第一节点的算力信息以及第二对应关系更新第二APP的算力信息。
可选地,第一节点包括服务器或者虚拟机VM。
可选地,发送单元602,用于将第一节点地址和算力信息封装在IGP报文或BGP报文中,得到第一消息。
可选地,发送单元602,用于将算力信息封装在IGP报文或BGP报文的类型长度值TLV字段中,将第一节点地址封装在IGP报文或BGP报文的网络层可达性消息NLRI字段中。
图9是本申请实施例提供的一种算力更新装置的框图。该算力更新装置可以通过软件、硬件或者两者的结合实现成为第二节点的全部或者一部分,该第二节点为图1所示的应用场景中的第二节点。该算力更新装置可以包括:获取单元701、接收单元702和更新单元703。
其中,获取单元701用于执行图3中的步骤S41,也即获取单元701用于获取第一对应关系,第一对应关系包括第一节点和第一APP的对应关系,第一APP部署在第一节点上;
接收单元702用于执行图3中的步骤S42,也即接收单元702用于接收第一节点的第一消息,第一消息包括第一节点地址和第一节点的算力信息;
更新单元703用于执行图3中的步骤S43,也即更新单元703用于根据第一对应关系和第一节点的算力信息,更新第一APP的算力信息。
可选地,该获取单元701还用于执行图4中的步骤S51、S52;该接收单元702还用于执行图4中的步骤S54;该更新单元703还用于执行图4中的步骤S55。
可选地,获取单元701,用于接收第一节点发送的第二消息,第二消息包括第一对应关系。
可选地,第二消息为路由消息,获取单元701,用于接收第一节点发送的路由消息,路由消息包括第一对应关系。
可选地,路由消息包括第一APP的地址信息、第一节点地址和下一跳信息,下一跳信息用于向第一APP的地址信息对应的地址转发报文,第一节点和第一APP的对应关系包括第一APP的地址信息和第一节点地址的对应关系。
可选地,第一APP的地址信息位于路由消息的目的地址字段中,第一节点地址和下一跳信息位于路由消息的路由属性字段中。
可选地,获取单元701,用于接收IGP报文或BGP报文,IGP报文或BGP报文中携带有路由消息。
可选地,获取单元701,还用于获取第二对应关系,第二对应关系包括第一节点和第二APP的对应关系,第二APP部署在第一节点上,第二APP和第一APP共享第一节点的资源;
更新单元703,用于根据第二对应关系和第一节点的算力信息,更新第二APP的算力信息。
可选地,第二节点包括路由器。
可选地,接收单元702,用于接收IGP报文或BGP报文,IGP报文或BGP报文中携带有第一节点地址和算力信息。
可选地,算力信息位于IGP报文或BGP报文的TLV字段中,第一节点地址位于IGP报文或BGP报文的NLRI字段中。
需要说明的是:上述实施例提供的算力发布装置或算力更新装置在工作时,仅以上述各功能单元的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元完成,即将设备的内部结构划分成不同的功能单元,以完成以上描述的全部或者部分功能。另外,上述实施例提供的算力发布装置与算力发布方法实施例属于同一构思,上述实施例提供的算力更新装置与算力更新方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
上述各个附图对应的流程的描述各有侧重,某个流程中没有详述的部分,可以参见其他流程的相关描述。
图10示出了本申请一个示例性实施例提供的第一节点800的结构示意图。图10所示的第一节点800用于执行上述图2所示的算力发布方法所涉及的操作,以及图4所示的算力更新方法所涉及的操作。该第一节点800例如是服务器等,该第一节点800可以由一般性的总线体系结构来实现。
如图10所示,第一节点800包括至少一个处理器801、存储器803以及至少一个通信接口804。
处理器801例如是通用中央处理器(central processing unit,CPU)、数字信号处理器(digital signal processor,DSP)、网络处理器(network processer,NP)、图形处理器(Graphics Processing Unit,GPU)、神经网络处理器(neural-network processing units,NPU)、数据处理单元(Data Processing Unit,DPU)、微处理器或者一个或多个用于实现本申请方案的集成电路。例如,处理器801包括专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。PLD例如是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。其可以实现或执行结合本发明实施例公开内容所描述的各种逻辑方框、模块和电路。所述处理器也可以是实现计算功能的组合,例如包括一个或多个微处理器组合,DSP和微处理器的组合等等。
可选的,第一节点800还包括总线。总线用于在第一节点800的各组件之间传送信息。总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图10中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
存储器803例如是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,又如是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,又如是电可擦可编程只读存储器(electrically erasable programmable read-only Memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器803例如是独立存在,并通过总线与处理器801相连接。存储器803也可以和处理器801集成在一起。
通信接口804使用任何收发器一类的装置,用于与其它设备或通信网络通信,通信网络可以为以太网、无线接入网(RAN)或无线局域网(wireless local area networks,WLAN)等。通信接口804可以包括有线通信接口,还可以包括无线通信接口。具体的,通信接口804可以为以太(Ethernet)接口、快速以太(Fast Ethernet,FE)接口、千兆以太(Gigabit Ethernet,GE)接口,异步传输模式(Asynchronous Transfer Mode,ATM)接口,无线局域网(wireless local area networks,WLAN)接口,蜂窝网络通信接口或其组合。以太网接口可以是光接口,电接口或其组合。在本申请实施例中,通信接口804可以用于第一节点800与其他设备进行通信。
在具体实现中,作为一种实施例,处理器801可以包括一个或多个CPU,如图10中所示的CPU0和CPU1。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,第一节点800可以包括多个处理器,如图10中所示的处理器801和处理器805。这些处理器中的每一个可以是一个单核处理器(single-CPU),也可以是一个多核处理器(multi-CPU)。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,第一节点800还可以包括输出设备和输入设备。输出设备和处理器801通信,可以以多种方式来显示信息。例如,输出设备可以是液晶显示器(liquid crystal display,LCD)、发光二级管(light emitting diode,LED)显示设备、阴极射线管(cathode ray tube,CRT)显示设备或投影仪(projector)等。输入设备和处理器801通信,可以以多种方式接收用户的输入。例如,输入设备可以是鼠标、键盘、触摸屏设备或传感设备等。
在一些实施例中,存储器803用于存储执行本申请方案的程序代码810,处理器801可 以执行存储器803中存储的程序代码810。也即是,第一节点800可以通过处理器801以及存储器803中的程序代码810,来实现方法实施例提供的算力发布方法。程序代码810中可以包括一个或多个软件模块。可选地,处理器801自身也可以存储执行本申请方案的程序代码或指令。
在具体实施例中,本申请实施例的第一节点800可对应于上述各个方法实施例中的第一网络设备,第一节点800中的处理器801读取存储器803中的指令,使图10所示的第一节点800能够执行第一网络设备所执行的全部或部分操作。
具体的,处理器801用于通过通信接口向至少一个远端服务器发送探测报文,该探测报文包括DHCP报文或DHCPv6报文;根据至少一个远端服务器的响应情况确定至少一个远端服务器的状态。
其他可选的实施方式,为了简洁,在此不再赘述。
又例如,本申请实施例的第一节点800可对应于上述各个方法实施例中的第二网络设备,第一节点800中的处理器801读取存储器803中的指令,使图10所示的第一节点800能够执行第二网络设备所执行的全部或部分操作。
具体的,处理器801用于通过通信接口接收第一网络设备发送的指示信息;根据指示信息确定至少一个远端服务器的状态。
其他可选的实施方式,为了简洁,在此不再赘述。
第一节点800还可以对应于上述图8所示的算力发布装置,算力发布装置中的每个功能模块采用第一节点800的软件实现。换句话说,算力发布装置包括的功能模块为第一节点800的处理器801读取存储器803中存储的程序代码810后生成的。
其中,图2所示的算力发布方法、图4所示的算力更新方法的各步骤通过第一节点800的处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤,为避免重复,这里不再详细描述。
图11示出了本申请一个示例性实施例提供的第二节点900的结构示意图。图11所示的第二节点900用于执行上述图3所示的算力更新方法所涉及的操作,以及图4所示的算力更新方法所涉及的操作。该第二节点900例如是路由器、交换机等,该第二节点900可以由一般性的总线体系结构来实现。
如图11所示,第二节点900包括至少一个处理器901、存储器903以及至少一个通信接口904。
处理器901例如是通用中央处理器(central processing unit,CPU)、数字信号处理器(digital signal processor,DSP)、网络处理器(network processer,NP)、图形处理器(Graphics Processing Unit,GPU)、神经网络处理器(neural-network processing units,NPU)、数据处理单元(Data Processing Unit,DPU)、微处理器或者一个或多个用于实现本申请方案的集成电路。例如,处理器901包括专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部 件或者其任意组合。PLD例如是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。其可以实现或执行结合本发明实施例公开内容所描述的各种逻辑方框、模块和电路。所述处理器也可以是实现计算功能的组合,例如包括一个或多个微处理器组合,DSP和微处理器的组合等等。
可选的,第二节点900还包括总线。总线用于在第二节点900的各组件之间传送信息。总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图11中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
存储器903例如是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,又如是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,又如是电可擦可编程只读存储器(electrically erasable programmable read-only Memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器903例如是独立存在,并通过总线与处理器901相连接。存储器903也可以和处理器901集成在一起。
通信接口904使用任何收发器一类的装置,用于与其它设备或通信网络通信,通信网络可以为以太网、无线接入网(RAN)或无线局域网(wireless local area networks,WLAN)等。通信接口904可以包括有线通信接口,还可以包括无线通信接口。具体的,通信接口904可以为以太(Ethernet)接口、快速以太(Fast Ethernet,FE)接口、千兆以太(Gigabit Ethernet,GE)接口,异步传输模式(Asynchronous Transfer Mode,ATM)接口,无线局域网(wireless local area networks,WLAN)接口,蜂窝网络通信接口或其组合。以太网接口可以是光接口,电接口或其组合。在本申请实施例中,通信接口904可以用于第二节点900与其他设备进行通信。
在具体实现中,作为一种实施例,处理器901可以包括一个或多个CPU,如图11中所示的CPU0和CPU1。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,第二节点900可以包括多个处理器,如图11中所示的处理器901和处理器905。这些处理器中的每一个可以是一个单核处理器(single-CPU),也可以是一个多核处理器(multi-CPU)。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,第二节点900还可以包括输出设备和输入设备。输出设备和处理器901通信,可以以多种方式来显示信息。例如,输出设备可以是液晶显示器(liquid crystal display,LCD)、发光二级管(light emitting diode,LED)显示设备、阴极射线管(cathode ray tube,CRT)显示设备或投影仪(projector)等。输入设备和处理器901通信,可以以多 种方式接收用户的输入。例如,输入设备可以是鼠标、键盘、触摸屏设备或传感设备等。
在一些实施例中,存储器903用于存储执行本申请方案的程序代码910,处理器901可以执行存储器903中存储的程序代码910。也即是,第二节点900可以通过处理器901以及存储器903中的程序代码910,来实现方法实施例提供的算力更新方法。程序代码910中可以包括一个或多个软件模块。可选地,处理器901自身也可以存储执行本申请方案的程序代码或指令。
在具体实施例中,本申请实施例的第二节点900可对应于上述各个方法实施例中的第一网络设备,第二节点900中的处理器901读取存储器903中的指令,使图11所示的第二节点900能够执行第一网络设备所执行的全部或部分操作。
具体的,处理器901用于通过通信接口向至少一个远端服务器发送探测报文,该探测报文包括DHCP报文或DHCPv6报文;根据至少一个远端服务器的响应情况确定至少一个远端服务器的状态。
其他可选的实施方式,为了简洁,在此不再赘述。
又例如,本申请实施例的第二节点900可对应于上述各个方法实施例中的第二网络设备,第二节点900中的处理器901读取存储器903中的指令,使图11所示的第二节点900能够执行第二网络设备所执行的全部或部分操作。
具体的,处理器901用于通过通信接口接收第一网络设备发送的指示信息;根据指示信息确定至少一个远端服务器的状态。
其他可选的实施方式,为了简洁,在此不再赘述。
第二节点900还可以对应于上述图9所示的算力更新装置,算力更新装置中的每个功能模块采用第二节点900的软件实现。换句话说,算力更新装置包括的功能模块为第二节点900的处理器901读取存储器903中存储的程序代码910后生成的。
其中,图3所示的算力更新方法、图4所示的算力更新方法的各步骤通过第二节点900的处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤,为避免重复,这里不再详细描述。
本申请实施例还提供了一种芯片,包括处理器,处理器用于从存储器中调用并运行存储器中存储的指令,使得安装有芯片的通信设备执行本申请提供的任一种的算力发布方法或算力更新方法。
本申请实施例还提供了一种芯片,包括:输入接口、输出接口、处理器和存储器,输入接口、输出接口、处理器以及存储器之间通过内部连接通路相连,处理器用于执行存储器中的代码,当代码被执行时,处理器用于执行上述任一种的算力发布方法或算力更新方法。
应理解的是,上述处理器可以是CPU,还可以是其他通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者是任何常规的处理器等。值得说明的是,处理器可以是支持ARM架构的处理器。
进一步地,在一种可选的实施例中,上述处理器为一个或多个,存储器为一个或多个。可选地,存储器可以与处理器集成在一起,或者存储器与处理器分离设置。上述存储器可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器还可以包括非易失性随机存取存储器。例如,存储器还可以存储参考块和目标块。
该存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是ROM、PROM、EPROM、EEPROM或闪存。易失性存储器可以是RAM,其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用。例如,SRAM、DRAM、SDRAM、DDR SDRAM、ESDRAM、SLDRAM和DR RAM。
本申请实施例中,还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机指令,当计算机可读存储介质中存储的计算机指令被计算机设备执行时,使得计算机设备执行上述所提供的算力发布方法或算力更新方法。
本申请实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机设备上运行时,使得计算机设备执行上述所提供的算力发布方法或算力更新方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk)等。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请的可选实施例,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应该以权利要求的保护范围为准。
Claims (22)
- 一种算力发布方法,其特征在于,所述方法包括:响应于第一节点的算力发生变化,所述第一节点生成第一消息,所述第一消息包括第一节点地址和第一节点的算力信息;所述第一节点向第二节点发送所述第一消息,以使得所述第二节点根据所述第一节点的算力信息以及第一对应关系更新第一应用程序APP的算力信息,所述第一对应关系包括所述第一节点和所述第一APP的对应关系,所述第一APP部署在所述第一节点上。
- 根据权利要求1所述的算力发布方法,其特征在于,所述方法还包括:所述第一节点向所述第二节点发送第二消息,所述第二消息包括所述第一对应关系。
- 根据权利要求2所述的算力发布方法,其特征在于,所述第二消息为路由消息,所述第一节点向所述第二节点发送第二消息,包括:所述第一节点向所述第二节点发送所述路由消息,所述路由消息包括所述第一对应关系。
- 根据权利要求3所述的算力发布方法,其特征在于,所述路由消息包括所述第一APP的地址信息、所述第一节点地址和下一跳信息,所述下一跳信息用于向所述第一APP的地址信息对应的地址转发报文,所述第一节点和所述第一APP的对应关系包括所述第一APP的地址信息和所述第一节点地址的对应关系。
- 根据权利要求4所述的算力发布方法,其特征在于,所述第一APP的地址信息位于所述路由消息的目的地址字段中,所述第一节点地址和下一跳信息位于所述路由消息的路由属性字段中。
- 根据权利要求3至5任一项所述的算力发布方法,其特征在于,所述第一节点向所述第二节点发送路由消息,包括:所述第一节点通过内部网关协议IGP报文或边界网关协议BGP报文向所述第二节点发送所述路由消息。
- 根据权利要求1至6任一项所述的算力发布方法,其特征在于,所述第一节点上还部署有第二APP,所述第二APP和所述第一APP共享所述第一节点的资源,所述方法还包括:所述第一节点向所述第二节点发送第二对应关系,所述第二对应关系包括所述第一节点和所述第二APP的对应关系;所述第一消息还用于使所述第二节点根据所述第一节点的算力信息以及所述第二对应关系更新所述第二APP的算力信息。
- 根据权利要求1至7任一项所述的算力发布方法,其特征在于,所述第一节点包括服务器或者虚拟机VM。
- 根据权利要求1至8任一项所述的算力发布方法,其特征在于,所述第一节点生成第一消息,包括:所述第一节点将所述第一节点地址和算力信息封装在IGP报文或BGP报文中,得到所述第一消息。
- 一种算力更新方法,其特征在于,所述方法包括:第二节点获取第一对应关系,所述第一对应关系包括第一节点和第一APP的对应关系,所述第一APP部署在第一节点上;所述第二节点接收所述第一节点的第一消息,所述第一消息包括所述第一节点地址和所 述第一节点的算力信息;所述第二节点根据所述第一对应关系和所述第一节点的算力信息,更新所述第一APP的算力信息。
- 根据权利要求10所述的算力更新方法,其特征在于,所述第二节点获取第一对应关系,包括:所述第二节点接收所述第一节点发送的第二消息,所述第二消息包括所述第一对应关系。
- 根据权利要求11所述的算力更新方法,其特征在于,所述第二消息为路由消息,所述第二节点接收所述第一节点的第二消息,包括:所述第二节点接收所述第一节点发送的所述路由消息,所述路由消息包括所述第一对应关系。
- 根据权利要求12所述的算力更新方法,其特征在于,所述路由消息包括所述第一APP的地址信息、所述第一节点地址和下一跳信息,所述下一跳信息用于向所述第一APP的地址信息对应的地址转发报文,所述第一节点和所述第一APP的对应关系包括所述第一APP的地址信息和所述第一节点地址的对应关系。
- 根据权利要求13所述的算力更新方法,其特征在于,所述第一APP的地址信息位于所述路由消息的目的地址字段中,所述第一节点地址和下一跳信息位于所述路由消息的路由属性字段中。
- 根据权利要求12至14任一项所述的算力更新方法,其特征在于,所述第二节点接收所述第一节点的路由消息,包括:所述第二节点接收IGP报文或BGP报文,所述IGP报文或BGP报文中携带有所述路由消息。
- 根据权利要求10至15任一项所述的算力更新方法,其特征在于,所述方法还包括:所述第二节点获取第二对应关系,所述第二对应关系包括所述第一节点和第二APP的对应关系,所述第二APP部署在所述第一节点上,所述第二APP和所述第一APP共享所述第一节点的资源;所述第二节点根据所述第二对应关系和所述第一节点的算力信息,更新所述第二APP的算力信息。
- 根据权利要求10至16任一项所述的算力更新方法,其特征在于,所述第二节点包括路由器。
- 根据权利要求10至17任一项所述的算力更新方法,其特征在于,所述第二节点接收所述第一节点的第一消息,包括:所述第二节点接收IGP报文或BGP报文,所述IGP报文或BGP报文中携带有所述第一节点地址和算力信息。
- 一种第一节点,其特征在于,所述第一节点包括处理器和存储器;所述存储器用于存储软件程序,所述处理器通过执行存储在所述存储器内的软件程序,以使得所述第一节点实现如权利要求1至9任一项所述的方法。
- 一种第二节点,其特征在于,所述第二节点包括处理器和存储器;所述存储器用于存储软件程序,所述处理器通过执行存储在所述存储器内的软件程序,以使得所述第二节点实现如权利要求10至18任一项所述的方法。
- 一种算力发布系统,其特征在于,所述算力发布信息包括第一节点和第二节点,所述第一节点用于执行如权利要求1至9任一项所述的方法,所述第二节点用于执行如权利要求10至18任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储处理器所执行的程序代码,所述程序代码包括用于实现如权利要求1至9任一项所述的方法的指令,或者所述程序代码包括用于实现如权利要求10至18任一项所述的方法的指令。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110719057.7 | 2021-06-28 | ||
CN202110719057.7A CN115604106A (zh) | 2021-06-28 | 2021-06-28 | 算力发布方法、算力更新方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023273957A1 true WO2023273957A1 (zh) | 2023-01-05 |
Family
ID=84691258
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/100104 WO2023273957A1 (zh) | 2021-06-28 | 2022-06-21 | 算力发布方法、算力更新方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115604106A (zh) |
WO (1) | WO2023273957A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116743878A (zh) * | 2023-08-14 | 2023-09-12 | 新华三技术有限公司 | 算力注册方法、装置、计算机设备及存储介质 |
WO2024174667A1 (zh) * | 2023-02-24 | 2024-08-29 | 华为技术有限公司 | 网络中数据传输的方法、装置、设备和存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109062687A (zh) * | 2018-07-10 | 2018-12-21 | 矩阵元技术(深圳)有限公司 | 用于p2p网络的计算资源查找方法及装置 |
CN112346854A (zh) * | 2020-09-28 | 2021-02-09 | 北京大学深圳研究生院 | 一种分层协同决策的网内资源调度方法及系统、存储介质 |
CN112465359A (zh) * | 2020-12-01 | 2021-03-09 | 中国联合网络通信集团有限公司 | 算力调用方法和装置 |
US20210191702A1 (en) * | 2018-10-12 | 2021-06-24 | Alibaba Group Holding Limited | Blockchain Node Service Deployment Method, Apparatus and System, and Computing Device and Medium |
-
2021
- 2021-06-28 CN CN202110719057.7A patent/CN115604106A/zh active Pending
-
2022
- 2022-06-21 WO PCT/CN2022/100104 patent/WO2023273957A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109062687A (zh) * | 2018-07-10 | 2018-12-21 | 矩阵元技术(深圳)有限公司 | 用于p2p网络的计算资源查找方法及装置 |
US20210191702A1 (en) * | 2018-10-12 | 2021-06-24 | Alibaba Group Holding Limited | Blockchain Node Service Deployment Method, Apparatus and System, and Computing Device and Medium |
CN112346854A (zh) * | 2020-09-28 | 2021-02-09 | 北京大学深圳研究生院 | 一种分层协同决策的网内资源调度方法及系统、存储介质 |
CN112465359A (zh) * | 2020-12-01 | 2021-03-09 | 中国联合网络通信集团有限公司 | 算力调用方法和装置 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024174667A1 (zh) * | 2023-02-24 | 2024-08-29 | 华为技术有限公司 | 网络中数据传输的方法、装置、设备和存储介质 |
CN116743878A (zh) * | 2023-08-14 | 2023-09-12 | 新华三技术有限公司 | 算力注册方法、装置、计算机设备及存储介质 |
CN116743878B (zh) * | 2023-08-14 | 2023-10-27 | 新华三技术有限公司 | 算力注册方法、装置、计算机设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN115604106A (zh) | 2023-01-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112470436B (zh) | 用于提供多云连通性的系统、方法、以及计算机可读介质 | |
US11082342B2 (en) | System and method to facilitate content forwarding using Bit Index Explicit Replication (BIER) in an Information-Centric Networking (ICN) environment | |
US8750288B2 (en) | Physical path determination for virtual network packet flows | |
US11218537B2 (en) | Load balancing in distributed computing systems | |
TWI744359B (zh) | 一種資料傳輸的方法及網路設備 | |
US8755377B2 (en) | Facilitating operation of one or more virtual networks | |
US9374270B2 (en) | Multicast service in virtual networks | |
US20150358232A1 (en) | Packet Forwarding Method and VXLAN Gateway | |
WO2023273957A1 (zh) | 算力发布方法、算力更新方法及装置 | |
WO2019184752A1 (zh) | 网络设备的管理方法、装置及系统 | |
WO2020156166A1 (zh) | 用于处理报文的方法和装置 | |
WO2017113300A1 (zh) | 路由确定方法、网络配置方法以及相关装置 | |
WO2022001669A1 (zh) | 建立vxlan隧道的方法及相关设备 | |
WO2021143279A1 (zh) | 段路由业务处理方法和装置、路由设备及存储介质 | |
US20230269164A1 (en) | Method and apparatus for sending route calculation information, device, and storage medium | |
US20230327986A1 (en) | Route Advertisement Method, Apparatus, and System | |
US20230353479A1 (en) | Edge Computing Data and Service Discovery Using an Interior Gateway Protocol (IGP) | |
CN113162779B (zh) | 一种多云互联的方法及设备 | |
US11621915B2 (en) | Packet forwarding method, route sending and receiving method, and apparatus | |
US8855015B2 (en) | Techniques for generic pruning in a trill network | |
CN108282404B (zh) | 一种路由生成方法、装置及系统 | |
WO2023093513A1 (zh) | 路径感知方法、装置及系统 | |
CN113472912B (zh) | 一种arp缓存表项的更新方法、vtep、vm及装置 | |
CN114157455A (zh) | 一种数据传输方法、装置、设备以及存储介质 | |
CN114513485A (zh) | 获取映射规则的方法、装置、设备、系统及可读存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22831775 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 22831775 Country of ref document: EP Kind code of ref document: A1 |