WO2023174288A1 - Communication method, apparatus and system, and storage medium - Google Patents

Communication method, apparatus and system, and storage medium Download PDF

Info

Publication number
WO2023174288A1
WO2023174288A1 PCT/CN2023/081386 CN2023081386W WO2023174288A1 WO 2023174288 A1 WO2023174288 A1 WO 2023174288A1 CN 2023081386 W CN2023081386 W CN 2023081386W WO 2023174288 A1 WO2023174288 A1 WO 2023174288A1
Authority
WO
WIPO (PCT)
Prior art keywords
energy
message
energy type
notification message
network
Prior art date
Application number
PCT/CN2023/081386
Other languages
French (fr)
Chinese (zh)
Inventor
杨悦
宋跃忠
陈霞
耿男
毛健炜
宋健
金闽伟
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023174288A1 publication Critical patent/WO2023174288A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • H04W28/065Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information using assembly or disassembly of packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/04Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources

Definitions

  • the present application relates to the field of communication, and in particular to a communication method, device, system and storage medium.
  • the power supply energy for equipment in communication networks is divided into renewable energy and non-renewable energy.
  • Current renewable electricity energy includes wind power energy, hydropower energy and solar power energy.
  • Renewable electric energy does not require human participation and can be recycled in nature.
  • Non-renewable electricity energy includes coal power energy, etc.
  • Non-renewable energy comes from fossil fuels such as coal or petroleum.
  • Communication networks include a large number of devices, some of which are powered by renewable energy and some of which are powered by non-renewable energy. If the utilization rate of renewable energy in the communication network is high, the communication network will become lower carbon and environmentally friendly. Therefore, how to improve the utilization rate of renewable energy is an urgent problem that needs to be solved.
  • This application provides a communication method, device, system and storage medium to improve the utilization rate of renewable energy.
  • the present application provides a communication method, which method is applied to a network system including a first device and a second device.
  • the first device determines a first energy type of the energy supplied by the first device.
  • the first device is a network device with a message forwarding function in the communication network, and the first energy type is renewable energy.
  • the first device sends a first notification message, and the first notification message indicates the first energy type.
  • the first notification message indicates the first energy type of the power supply energy of the first device, where the first energy type is renewable energy.
  • the second device that receives the first notification message can learn that the energy type of the power supply energy of the first device is the first energy type based on the first notification message, and update the routing information on the second device accordingly.
  • One-hop routing uses the first device powered by renewable energy to forward more network traffic. This not only reduces the energy consumption of the communication network, but also improves the utilization of renewable energy, making the communication network low-carbon and environmentally friendly.
  • the first device when the energy type of the power supply energy of the first device changes from the first energy type to the second energy type, the first device sends a second notification message, and the second energy type is non-renewable energy.
  • the second notification message indicates the second energy type. Since the second notification message indicates the second energy type of the power supply energy of the first device, the second device that receives the second notification message can learn based on the second notification message that the energy type of the power supply energy of the first device has changed to non- renewable energy, thereby performing route recovery based on the second advertisement message.
  • the first advertisement message includes identification information of a link with the first device as an endpoint and a first cost value of the link, where the first cost value corresponds to the first energy type. .
  • the Internet has become low-carbon and environmentally friendly.
  • the first advertisement message is an interior gateway protocol IGP message
  • the first advertisement message includes a link status type length value TLV or a node status TLV
  • the first cost value is carried on the link Status TLV or the node status TLV.
  • the first advertisement message includes the first cost value
  • the first device can advertise the first energy type to other devices in the AS domain where the first device is located.
  • the first notification message is an IGP message
  • the first notification message includes an energy saving factor TLV
  • the energy saving factor TLV is an extended TLV
  • the energy saving factor TLV includes the first cost value.
  • the first advertisement message includes the first cost value
  • the first device can advertise the first energy type to other devices in the AS domain where the first device is located.
  • the first notification message when the first notification message is an IGP message, when the energy type of the power supply energy of the first device changes from the first energy type to the second energy type, the first device sends The second notification message, the second energy type is non-renewable energy, the second notification message indicates the second energy type, the second notification message is an IGP message, the second notification message includes the identification information of the link and the second notification message.
  • Two cost values the second cost value corresponds to the second energy type. This causes the second advertisement message to indicate the second energy type. Since the second cost value corresponds to the second energy type, the second device can perform route recovery based on the second cost value.
  • the first The first device and the second device are devices in the same autonomous system AS domain.
  • the first advertisement message is a Border Gateway Protocol BGP message
  • the first advertisement message is used to carry device attributes
  • the first advertisement message includes a first new router attribute field
  • the first The new router attribute field includes the first energy type.
  • the first advertisement message indicates the first energy type
  • the second device can aggregate as much network traffic of the communication network as possible to the first device based on the first energy type included in the first newly added router attribute field to improve the efficiency of the communication network.
  • the utilization of renewable energy makes communication networks low-carbon and environmentally friendly.
  • the first device when the energy type of the energy supplied by the first device changes from the first energy type to the second energy type, the first device sends a second notification message, and the second energy type is non-renewable.
  • the second advertisement message indicates the second energy type
  • the second advertisement message is a BGP message
  • the second advertisement message is used to carry the attributes of the device
  • the second advertisement message includes a second new router attribute field
  • Two new router attribute fields include the second energy type. This causes the second advertisement message to indicate the second energy type.
  • the second device can perform route recovery based on the second energy type included in the second newly added router attribute field.
  • the first advertisement message is a Border Gateway Protocol BGP message
  • the first advertisement message is For carrying the Segment Routing Interconnection Protocol version 6 policy SRv6 Policy
  • the first advertisement message includes a first color field
  • the first color field includes a first energy type.
  • the first notification message indicates the first energy type
  • the second device can aggregate as much network traffic of the communication network as possible to the first device based on the first energy type included in the first color field to increase renewable energy.
  • the utilization rate makes the communication network low-carbon and environmentally friendly.
  • the first newly added router attribute field and the first color field are distinguished by type Type, type code Typecode, address family flag AFI or sub-address family flag SAFI.
  • the Type included in the first newly added router attribute field is different from the Type included in the first color field
  • the Typecode included in the first newly added router attribute field is different from the Typecode included in the first color field
  • the first newly added router attribute field includes The AFI and the AFI included in the first color field are different.
  • the SAFI included in the first newly added router attribute field and the SAFI included in the first color field are different, so that the second device can identify the first newly added router attribute field and the first color field in the first advertisement message.
  • the first device when the energy type of the energy supplied by the first device changes from the first energy type to the second energy type, the first device sends a second notification message, and the second energy type is non-renewable.
  • the second advertisement message indicates the second energy type
  • the second advertisement message is a BGP message
  • the second advertisement message is used to carry SRv6 Policy
  • the second advertisement message includes a second color field
  • the second color field includes Second energy type.
  • the second advertisement message indicates the second energy type, and the second device performs route recovery based on the second energy type included in the second color field.
  • the value of the first color field is a first value
  • the first value indicates the first energy type
  • the value of the second color field is a second value
  • the second value Indicates the secondary energy type.
  • the color field thereby indicates the type of energy source powering the first device.
  • the value of the first color field is a wind power color value, and the wind power color value indicates that the first energy type is wind power energy.
  • the value of the first color field is a hydropower color value, and the hydropower color value indicates that the first energy type is hydropower energy.
  • the value of the first color field is a solar color value, and the solar color value indicates that the first energy type is solar electric energy. This allows different renewable energy sources to be indicated via the first color field.
  • the first advertisement message is a BGP message
  • the first advertisement message includes a first path attribute field
  • the first path attribute field includes first routing information
  • the first routing information includes first The energy type
  • the first routing information is the routing information saved on the first device.
  • the first advertisement message indicates the first energy type
  • the second device can aggregate as much network traffic of the communication network as possible to the first device based on the first routing information included in the first path attribute field to improve regeneration. Energy utilization makes communication networks low-carbon and environmentally friendly.
  • the first device when the energy type of the energy supplied by the first device changes from the first energy type to the second energy type, the first device sends a second notification message, and the second energy type is non-renewable.
  • the second advertisement message indicates the second energy type
  • the second advertisement message is a BGP message
  • the second advertisement message includes a second path attribute field
  • the second path attribute field includes second routing information
  • the second routing information including the second energy type and the first routing information except content beyond the first energy type.
  • the second advertisement message indicates the second energy type, and the second device performs route recovery based on the second routing information included in the second path attribute field.
  • the first advertisement message is a BGP message
  • the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the first energy type
  • the first routing information is the first energy type. Routing information saved on a device.
  • the first advertisement message indicates the first energy type, and the path priority of routing information corresponding to the same first energy type can be uniformly managed based on the community attribute value, thereby improving operation and maintenance efficiency.
  • the first device when the energy type of the energy supplied by the first device changes from the first energy type to the second energy type, the first device sends a second notification message, and the second energy type is non-renewable.
  • the second advertisement message indicates the second energy type
  • the second advertisement message is a BGP message
  • the community attribute of the second advertisement message indicates that the energy type corresponding to the first routing information is the second energy type.
  • the second advertisement message indicates the second energy type, and the path priority of routing information corresponding to the second energy type can be uniformly managed based on the community attribute, thereby improving operation and maintenance efficiency.
  • the first advertisement message is a BGP message
  • the first advertisement message is used to announce routes to neighbors
  • the first autonomous system path AS-Path field of the first advertisement message includes m
  • m is a multiple value corresponding to the first energy type
  • m is an integer greater than 0
  • the AS number is used to identify the AS domain where the first device is located.
  • the first energy type is indicated by the length of the AS number, enriching the way of indicating the first energy type.
  • the first device when the energy type of the energy supplied by the first device changes from the first energy type to the second energy type, the first device sends a second notification message, and the second energy type is non-renewable.
  • the second advertisement message indicates the second energy type.
  • the second advertisement message is a BGP message.
  • the second advertisement message is used to announce routes to neighbors.
  • the second AS-Path field of the second advertisement message includes n In the AS number, n is a multiple value corresponding to the second energy type, n is an integer greater than 0, and m is not equal to n. In this way, the length of the AS number is used to indicate the second energy type, enriching the way of indicating the second energy type.
  • the first device and the second device are devices in two different AS domains.
  • the first device receives capability information of the second device, where the capability information is used to indicate that the second device has the capability to process the first notification message.
  • the first device determines that the second device has the capability based on the capability information, the first device sends a first notification message. This avoids sending the first notification message to the second device when the second device does not have the capability, thereby avoiding wasting network bandwidth resources.
  • the first device sends the first notification message when the energy types of the energy supplied by the first device determined in multiple consecutive cycles are all the first energy type.
  • the energy type of the power supply energy of the first device is the first energy type for multiple consecutive cycles, it indicates that the current renewable energy is relatively stable and can provide stable power supply energy to the first device.
  • the first device sends the first notification message indicating the first energy type, so that not only can Reducing the number of sending notification messages can also avoid frequent adjustments to the transmission path of network traffic in the communication network.
  • the first device when the first device does not receive network traffic to be forwarded in the first time period, the first device shuts down or sleeps. After the first device is shut down or hibernated, it consumes the least energy, which can save energy.
  • the first device is powered on at a set time. If the first device receives network traffic within a set time period after being powered on, the first device remains powered on and working. In this way, the first device can forward the received network traffic to avoid affecting the transmission of the network traffic.
  • this application provides a communication method, which method is applied to a network system including a first device and a second device.
  • the second device receives a first notification message, and the first notification message
  • the article indicates that the energy type of the power supply energy of the first device is the first energy type, the first energy type is renewable energy, and the first device is a network device with a message forwarding function in the communication network.
  • the second device determines a transmission path of the first network traffic based on the first advertisement message, and the transmission path of the first network traffic passes through the first device.
  • the second device determines the transmission path of the first network traffic based on the first notification message, and the transmission path of the first network traffic passes through the first device. In this way, the second device can use the first device powered by renewable energy to forward more network traffic, which not only reduces the energy consumption of the communication network, but also improves the utilization rate of renewable energy, making the communication network low-carbon and environmentally friendly.
  • the second device receives a second notification message, and the second notification message indicates that the energy type of the energy supplied by the first device is the second energy type, and the second energy type is non-renewable energy.
  • the second device determines the transmission path of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device. Since the second notification message indicates that the power supply energy of the first device is non-renewable energy, the second device determines the transmission path of the second network traffic based on the second notification message, so that the transmission path of the second network traffic does not pass through the first device, This enables route recovery.
  • the first advertisement message includes identification information of a link with the first device as an endpoint and a first cost value of the link, where the first cost value corresponds to the first energy type. .
  • the Internet has become low-carbon and environmentally friendly.
  • the first advertisement message is an interior gateway protocol IGP message
  • the first advertisement message includes a link status type length value TLV or a node status TLV
  • the first cost value is carried on the link Status TLV or the node status TLV.
  • the first notification message includes the first cost value, which enriches the way of carrying the first cost value.
  • the first advertisement message is an interior gateway protocol IGP message, and the first advertisement message includes an energy saving factor TLV.
  • the energy saving factor TLV is an extended TLV.
  • the energy saving factor TLV includes a first cost. value.
  • the first notification message includes the first cost value, which enriches the way of carrying the first cost value.
  • the second device receives a second notification message, and the second notification message indicates that the energy type of the energy supplied by the first device is the second energy type, and the second energy type is non-renewable energy
  • the second advertisement message is an IGP message, and the second advertisement message includes identification information of the link and a second cost value, and the second cost value corresponds to the second energy type.
  • the second device determines the transmission path of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device. This causes the second advertisement message to indicate the second energy type. Since the second cost value corresponds to the second energy type, the second device performs route recovery based on the second cost value.
  • the first The device and the second device are devices in the same autonomous system AS domain.
  • the first advertisement message is a Border Gateway Protocol BGP message
  • the first advertisement message is used to carry device attributes
  • the first advertisement message includes a first new router attribute field
  • the first The new router attribute field includes the first energy type.
  • the first advertisement message indicates the first energy type
  • the second device can aggregate as much network traffic of the communication network as possible to the first device based on the first energy type included in the first newly added router attribute field to improve the efficiency of the communication network.
  • the utilization of renewable energy makes communication networks low-carbon and environmentally friendly.
  • the second device receives a second notification message, and the second notification message indicates that the energy type of the energy supplied by the first device is the second energy type, and the second energy type is non-renewable energy
  • the second advertisement message is a BGP message, and the second advertisement message is used to carry attributes of the device.
  • the second advertisement message includes a second new router attribute field, and the second new router attribute field includes a second energy type.
  • the second device determines the transmission path of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device. This causes the second advertisement message to indicate the second energy type.
  • the second device performs route recovery based on the second energy type included in the second newly added router attribute field.
  • the first advertisement message is a Border Gateway Protocol BGP message, and the first advertisement message is used to carry the Segment Routing Interconnection Protocol version 6 policy SRv6 Policy, and the first advertisement message includes and a color field, the first color field including the first energy type.
  • the first notification message indicates the first energy type
  • the second device can aggregate as much network traffic of the communication network as possible to the first device based on the first energy type included in the first color field to increase renewable energy.
  • the utilization rate makes the communication network low-carbon and environmentally friendly.
  • the first newly added router attribute field and the first color field are distinguished by type, type code, address family flag AFI or sub-address family flag SAFI.
  • the Type included in the first newly added router attribute field is different from the Type included in the first color field
  • the Typecode included in the first newly added router attribute field is different from the Typecode included in the first color field
  • the first newly added router attribute field includes The AFI and the AFI included in the first color field are different.
  • the SAFI included in the first newly added router attribute field and the SAFI included in the first color field are different, so that the second device can identify the first newly added router attribute field and the first color field in the first advertisement message.
  • the second device receives a second notification message, and the second notification message indicates that the first device
  • the energy type of the power supply energy is the second energy type, and the second energy type is non-renewable energy.
  • the second notification message is a BGP message.
  • the second notification message is used to carry the SRv6 Policy.
  • the second notification message includes the second A color field, a second color field including a second energy type.
  • the second device determines the transmission path of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device. In this way, the second advertisement message indicates the second energy type, and the second device performs route recovery based on the second energy type included in the second color field.
  • the value of the first color field is a first value
  • the first value indicates the first energy type
  • the value of the second color field is a second value
  • the second value Indicates the secondary energy type.
  • the color field thereby indicates the type of energy source powering the first device.
  • the value of the first color field is a wind power color value, and the wind power color value indicates that the first energy type is wind power energy.
  • the value of the first color field is a hydropower color value, and the hydropower color value indicates that the first energy type is hydropower energy.
  • the value of the first color field is a solar color value, and the solar color value indicates that the first energy type is solar electric energy. This allows different renewable energy sources to be indicated via the first color field.
  • the first advertisement message is a BGP message
  • the first advertisement message includes a first path attribute field
  • the first path attribute field includes first routing information
  • the first routing information includes first The energy type
  • the first routing information is the routing information saved on the first device.
  • the first advertisement message indicates the first energy type
  • the second device can aggregate as much network traffic of the communication network as possible to the first device based on the first routing information included in the first path attribute field to improve regeneration. Energy utilization makes communication networks low-carbon and environmentally friendly.
  • the second device receives a second notification message, and the second notification message indicates that the energy type of the energy supplied by the first device is the second energy type, and the second energy type is non-renewable energy
  • the second advertisement message is a BGP message.
  • the second advertisement message includes a second path attribute field.
  • the second path attribute field includes second routing information.
  • the second routing information includes the second energy type and the first routing information. Content other than an energy type.
  • the second device determines the transmission path of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device. In this way, the second advertisement message indicates the second energy type, and the second device performs route recovery based on the second routing information included in the second path attribute field.
  • the first advertisement message is a BGP message
  • the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the first energy type
  • the first routing information is the first energy type. Routing information saved on a device.
  • the first advertisement message indicates the first energy type, and the path priority of routing information corresponding to the same first energy type can be uniformly managed based on the community attribute value, thereby improving operation and maintenance efficiency.
  • the community attribute of the first advertisement message indicates that the first energy type corresponding to the first routing information is a subtype of renewable energy, and the subtype includes wind power energy, hydropower energy, and solar energy. at least one of.
  • the second device receives a second notification message, and the second notification message indicates that the energy type of the energy supplied by the first device is the second energy type, and the second energy type is non-renewable energy
  • the second advertisement message is a BGP message
  • the community attribute of the second advertisement message indicates that the energy type corresponding to the first routing information is the second energy type.
  • the second device determines the transmission path of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device. In this way, the second advertisement message indicates the second energy type, and the path priority of routing information corresponding to the second energy type can be uniformly managed based on the community attribute, thereby improving operation and maintenance efficiency.
  • the first advertisement message is a BGP message
  • the first advertisement message is used to announce routes to neighbors
  • the first autonomous system path AS-Path field of the first advertisement message includes m
  • m is a multiple value corresponding to the first energy type
  • m is an integer greater than 0
  • the AS number is used to identify the AS domain where the first device is located.
  • the first energy type is indicated by the length of the AS number, enriching the way of indicating the first energy type.
  • the second device receives a second notification message, and the second notification message indicates that the energy type of the energy supplied by the first device is the second energy type, and the second energy type is non-renewable energy
  • the second advertisement message is a BGP message.
  • the second advertisement message is used to announce routes to neighbors.
  • the second AS-Path field of the second advertisement message includes n AS numbers, where n corresponds to the second energy type. Multiple value, n is an integer greater than 0, m is not equal to n.
  • the second device determines the transmission path of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device. In this way, the length of the AS number is used to indicate the second energy type, enriching the way of indicating the second energy type.
  • the first device and the second device are devices in two different AS domains.
  • the second device sends capability information of the second device to the first device, where the capability information is used to indicate that the second device has the capability to process the first notification packet. This prevents the first device from sending the first notification message to the second device when the second device does not have the capability, thereby avoiding waste of network resources.
  • the second device is a network device with a packet forwarding function in the communication network
  • the second device includes third routing information
  • the next hop device indicated by the third routing information is not the first device.
  • the next hop device does not include routing information that can reach the first device
  • the destination device indicated by the third routing information is the same as the destination device of the first network traffic.
  • the second device replaces the next hop device indicated by the third routing information with a third device based on the first advertisement message, and the third device is the first device or the third device includes routing information that can reach the first device. In this way, by modifying the routing information saved on the second device, the second device can use the first device to forward more network traffic.
  • the second device is a network device with a packet forwarding function in the communication network
  • the second device includes fourth routing information
  • the next hop device indicated by the fourth routing information is the first device.
  • the next hop device includes routing information that can reach the first device
  • the destination device indicated by the fourth routing information is the same as the destination device of the second network traffic.
  • the second device replaces the next hop device indicated by the fourth routing information with the fourth device based on the second advertisement message.
  • the fourth device is not the first device or the fourth device does not include routing information that can reach the first device, thereby achieving Routing restored.
  • the second device establishes a transmission path of the first network traffic based on the first advertisement message and the destination address of the first network traffic. Since the path of the first network traffic passes through the first device, the first device forwards more network traffic.
  • the second device establishes a transmission path of the second network traffic based on the second advertisement message and the destination address of the second network traffic. Since the transmission path of the second network traffic does not pass through the first device, route recovery is achieved.
  • the second device is a controller or the second device is a head node of a transmission path of the first network traffic.
  • this application provides a communication device for performing the method in the first aspect or any possible implementation of the first aspect.
  • the apparatus includes a module for performing the method in the first aspect or any possible implementation of the first aspect.
  • this application provides a communication device for performing the method in the second aspect or any possible implementation of the second aspect.
  • the apparatus includes a module for performing the method in the second aspect or any possible implementation of the second aspect.
  • the present application provides a communication device, which includes a processor and a memory.
  • the processor and the memory may be connected through internal connections.
  • the memory is used to store programs, and the processor is used to execute the programs in the memory, so that the device completes the method in the first aspect or any possible implementation of the first aspect.
  • the present application provides a communication device, which includes a processor and a memory.
  • the processor and the memory may be connected through internal connections.
  • the memory is used to store programs, and the processor is used to execute the programs in the memory, so that the device completes the method in the second aspect or any possible implementation of the second aspect.
  • the present application provides a computer program product.
  • the computer program product includes a computer program stored in a computer-readable storage medium, and the computing program is loaded by a processor to implement the first aspect and the third aspect.
  • the present application provides a computer-readable storage medium for storing a computer program, which is loaded by a processor to execute the first aspect, the second aspect, any possible implementation of the first aspect, or The second aspect is any possible implementation method.
  • embodiments of the present application provide a chip, including a memory and a processor.
  • the memory is used to store computer instructions
  • the processor is used to call and run the computer instructions from the memory to execute the above first and second aspects.
  • the present application provides a communication system.
  • the system includes the device described in the third aspect and the device described in the fourth aspect, or the system includes the device described in the fifth aspect and the sixth aspect. the equipment described.
  • Figure 1 is a schematic structural diagram of a communication network provided by an embodiment of the present application.
  • Figure 2 is a schematic diagram of network traffic in a communication network provided by an embodiment of the present application.
  • Figure 3 is a schematic structural diagram of another communication network provided by an embodiment of the present application.
  • Figure 4 is a flow chart of a communication method provided by an embodiment of the present application.
  • Figure 5 is a flow chart of another communication method provided by an embodiment of the present application.
  • Figure 6 is a flow chart of another communication method provided by an embodiment of the present application.
  • Figure 7 is a schematic structural diagram of another communication network provided by an embodiment of the present application.
  • Figure 8 is a schematic structural diagram of another communication network provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of an energy saving factor TLV provided by an embodiment of the present application.
  • Figure 10 is a schematic structural diagram of another communication network provided by an embodiment of the present application.
  • Figure 11 is a schematic structural diagram of another communication network provided by an embodiment of the present application.
  • Figure 12 is a schematic diagram of a color field provided by an embodiment of the present application.
  • Figure 13 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • Figure 14 is a schematic structural diagram of another communication device provided by an embodiment of the present application.
  • Figure 15 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • Figure 16 is a schematic structural diagram of another communication device provided by an embodiment of the present application.
  • Figure 17 is a schematic structural diagram of a communication system provided by an embodiment of the present application.
  • the communication network includes multiple autonomous system (AS) domains.
  • AS autonomous system
  • Network devices within the AS domain use (interior gateway protocol, interior gateway protocol) IGP to exchange routing information.
  • Network devices belonging to different AS domains use border gateway protocol (border gateway protocol). , BGP) to exchange routing information.
  • border gateway protocol border gateway protocol
  • IGP is a protocol for exchanging routing information between network devices within an AS domain and runs in small or medium-sized networks.
  • IGP includes open shortest path first (OSPF), routing information protocol (routing information protocol, RIP), intermediate system-to-intermediate system (IS-IS), interior gateway routing protocol ( protocols such as interior gateway routing protocol (IGRP) and/or enhanced interior gateway routing protocol (enhanced interior gateway routing protocol (EIGRP)).
  • OSPF open shortest path first
  • routing information protocol routing information protocol
  • IS-IS intermediate system-to-intermediate system
  • IGP interior gateway routing protocol
  • protocols such as interior gateway routing protocol (IGRP) and/or enhanced interior gateway routing protocol (enhanced interior gateway routing protocol (EIGRP)
  • OSPF open shortest path first
  • RIP routing information protocol
  • IS-IS intermediate system-to-intermediate system
  • IGRP interior gateway routing protocol
  • EIGRP enhanced interior gateway routing protocol
  • OSPF is a commonly used link state-based IGP routing protocol with scalability.
  • OSPF has a link status notification function that can advertise link status throughout the entire network.
  • OSPF uses LSA to save the status of links in the communication network.
  • LSA is a data structure that saves the status of the link.
  • the status of the link includes parameters such as the link's weight and/or priority.
  • LSA guarantee It exists in the database of the network device, which is also called the link state database.
  • the network device uses the shortest path first (SPF) algorithm to calculate routes to other network devices based on the information in the link state database.
  • SPPF shortest path first
  • the process of the router using OSPF to calculate routes includes the following processes.
  • Step 1 The router initializes the router's own data structure and waits for the low-level protocol (data link layer) to prompt whether the interface is in working state.
  • the interface is an interface on the router.
  • Step 2 When the low-level protocol prompts that the interface is in working status, the router confirms that the interface is working properly, and then establishes neighbor relationships by exchanging hello (HELLO) messages with other routers.
  • HELLO hello
  • Step 3 The router uses OSPF to exchange link information with other routers by sending and receiving LSAs.
  • Step 4 Based on the node link relationship and the cost value of the link, the router calculates the shortest path between itself and other routers as a route.
  • BGP is an autonomous system routing protocol that runs on the Transmission Control Protocol (TCP).
  • TCP Transmission Control Protocol
  • BGP is a protocol designed to handle networks the size of the Internet. It is also a protocol that can properly handle multiple connections between unrelated routing domains.
  • BGP has the concept of path attributes, which are used to describe BGP routes and serve as the main parameters for routing decisions.
  • path attributes There are four types of path attributes, recognized mandatory, recognized self-determination, optional transitive and optional non-transitive.
  • recognized mandatory attributes include AS_Path
  • optional transfer attributes include the Community attribute.
  • AS-Path BGP's Autonomous System Path
  • AS_Path uses a string of AS numbers to describe the path or route to the specified destination AS domain.
  • AS_Path adds its own AS number to AS_Path.
  • AS_Path Each time the route passes through an AS area, an AS number will be added to the AS_Path to indicate the priority of the path. The more AS numbers are superimposed, the more ASs passed through, and the lower the priority of this route.
  • the BGP community attribute is an optional transitive attribute. Routers that do not support this attribute will pass the community attribute value intact to downstream BGP neighbors (provided that the community attribute is configured to be passed).
  • the community attribute of BGP can simplify the matching of identical route entries by routers in the network. For example, all routers in a large network need to match the same routing entries. If access control lists (ACLs, ACL) or prefix lists are used for matching, the workload will be relatively large, so on one router, the corresponding The routing entries are marked with the community attribute value, and the routing entries are indirectly matched on other routers by matching the community attribute value, thereby simplifying the matching work of the routing entries.
  • the less network traffic transmitted by the network device the lower the power consumption of the network device.
  • the transmission path of the network traffic is adjusted so that the network traffic in the communication network is aggregated to a small number of network devices in the communication network.
  • the network traffic transmitted on the other network devices will be reduced.
  • the other network devices shut down or go into sleep, thus reducing the energy consumption of the communication network.
  • the following method can be used to aggregate network traffic in the communication network to a small number of network devices in the communication network, thereby reducing energy consumption of the communication network.
  • Method 1 Calculate the energy consumption of the device based on the logical basis that traffic changes will affect power consumption.
  • the OSPF protocol is used to extend the type length value (TLV) of link energy consumption, and the calculation result is carried in the TLV.
  • TLV type length value
  • Method 2 Through controller traffic engineering, the design re-adjusts the traffic path based on the traffic demand and the remaining bandwidth of each network link and trunk. Eventually, the traffic in the network is aggregated to fewer links, so that the traffic of some links in the communication network is 0, and the routers connected to this part of the link are shut down/sleep to achieve energy saving effects. Among them, trunk is a logical interface bound together by multiple links.
  • Method 3 With the lowest power consumption in the entire network as the goal, calculate the power consumption of the entire network, and finally select the route with the lowest power consumption. Prioritize the use of selected routes to transmit data, reducing the energy consumption of the communication network.
  • the power supply energy supplying the network device may be renewable energy or non-renewable energy.
  • the network traffic is prioritized to be converged on network devices whose power supply energy is renewable energy, this will not only reduce the energy consumption of the communication network, but also improve the efficiency of the communication network.
  • the utilization rate of renewable energy makes the communication network low-carbon and environmentally friendly.
  • the renewable energy includes one or more of hydropower energy, wind power energy, solar power energy, etc.
  • Non-renewable energy comes from fossil fuels such as coal or petroleum.
  • non-renewable energy includes coal power energy.
  • renewable energy is affected by objective factors such as weather and has certain instability. For example, wind power energy is unstable due to weather changes, and solar power energy is unavailable at night.
  • the network equipment of the communication network uses smart grid interface technology to dynamically select power supply energy. For example, when renewable energy is stable, network equipment chooses renewable energy as its own power supply energy; when renewable energy is unstable, network equipment chooses non-renewable energy as its own power supply energy.
  • an embodiment of the present application provides a communication network 100.
  • the communication network 100 includes multiple network devices, and two adjacent network devices may be connected through a link.
  • the communication network 100 includes network device 1 , network device 2 , network device 3 , network device 3 , network device 4 , network device 5 , network device 6 and network device 7 .
  • network devices adjacent to network device 2 include network device 1, network device 3, and network device 5.
  • Network device 2 is connected to network device 1, network device 3, and network device 5 respectively. Use links to connect.
  • the communication network 100 includes multiple AS domains, each AS domain including multiple network devices.
  • the communication network 100 includes AS domain 1 and AS domain 2.
  • AS domain 1 includes network device 1, network device 2, network device 3 and network device 5.
  • AS domain 2 includes network device 4, network device 6 and Network equipment7.
  • the network devices in the communication network 100 have a message forwarding function.
  • the network devices in the communication network 100 include routers and/or switches.
  • network device 1 receives network traffic 1, source device 1 of network traffic 1 is connected to network device 1, and destination device 1 of network traffic 1 is connected to network device 7.
  • network device 1 forwards network traffic 1 from source device 1 to network device 2
  • network device 2 receives network traffic 1 and forwards network traffic 1 to network device 3
  • network device 3 receives network traffic 1 and forwards network traffic to network device 4.
  • Network device 4 receives network traffic 1 and forwards network traffic 1 to network device 7.
  • Network device 7 receives network traffic 1 and forwards network traffic 1 to destination device 1.
  • communication network 100 also includes a controller 8 that communicates with one or more network devices in communication network 100 .
  • the controller 8 is used to control and/or manage network devices in the communication network 100. For example, the controller 8 determines a transmission path for transmitting network traffic in the communication network 100, and sends a message to the communication network through which the transmission path passes.
  • One or more network devices in 100 issue routing information related to the transmission path, so that the one or more network devices forward the network network traffic.
  • the controller 8 receives a path establishment request sent by the source device 1.
  • the path establishment request includes the destination address of the network traffic 1 (which is the address of the destination device 1).
  • Based on The destination address calculates a transmission path between source device 1 and destination device 1, which passes through network device 1, network device 2, network device 3, network device 4 and network device 7.
  • the controller 8 delivers the routing information related to the transmission path to the network device 1, the network device 2, the network device 3, the network device 4 and the network device 7. In this way, after receiving the network traffic 1 sent by the source device 1, the network device 1 uses the transmission path to send the network traffic 1 to the destination device 1.
  • the network device For each network device in the communication network 100, the network device includes a power interface through which power is supplied to the network device.
  • the energy type of the power supply for the network device may be renewable energy or non-renewable energy.
  • the network equipment in the communication network 100 can be divided into two parts according to the energy type of the power supply energy.
  • the two parts of network equipment are called the first part of network equipment and the second part of network equipment respectively.
  • the energy type of the first part of the network equipment power supply energy is renewable energy
  • the energy type of the second part of the network equipment power supply energy is non-renewable energy.
  • Renewable energy includes wind power energy, hydropower energy, solar power energy, tidal power power energy and/or geothermal power power energy, etc., so for any network device in the first part of the network device, the energy type of the network device power supply energy may be Wind power energy may be hydropower energy, solar power energy, tidal power power, or geothermal power energy, etc.
  • the stability of renewable energy is poor.
  • solar power energy only stable solar power energy can be provided for network equipment on a clear day due to sufficient sunlight, but it cannot be provided at other times (such as night, cloudy or rainy days, etc.) Provide stable solar power energy for network equipment.
  • hydropower energy there is often sufficient hydropower energy in seasons with abundant rain.
  • the communication network 100 may have more network equipment.
  • the energy type of power supply energy is hydropower energy.
  • the communication network 100 may have a small number of network devices that are powered by hydropower energy.
  • stable wind power energy can be provided for network equipment only during windy periods, but stable wind power energy cannot be provided for network equipment during non-windy periods.
  • the energy type of the energy supplied by the network device may be renewable energy during a period of time, and the energy type of the energy supplied by the network device during another period of time.
  • the type may change from renewable to non-renewable energy.
  • solar power energy the energy type of the power supply energy for the network equipment during the clear day is solar power energy, and at night the energy type of the power supply energy for the network equipment changes to coal power energy.
  • the energy type of the energy supplied by the network equipment in the communication network 100 may be constantly changing, in this embodiment of the present application, the energy type of the energy supplied by the network equipment in the communication network 100 is determined.
  • the transmission path of the network traffic transmitted in the communication network 100 is adjusted based on the energy type, so that the network traffic in the communication network 100 can be converged on network equipment powered by renewable energy. In this way, the renewable energy utilization rate of the communication network 100 is improved, making the communication network 100 more low-carbon and environmentally friendly.
  • the detailed implementation process please refer to any of the embodiments introduced below.
  • an embodiment of the present application provides a communication method 400.
  • the method 400 is applied to the communication network 100 shown in Figure 1, Figure 2 or Figure 3, and includes the following process.
  • Step 401 The first device determines the first energy type of the power supply energy of the first device.
  • the first device is a network device with a message forwarding function in the communication network, and the first energy type is renewable energy.
  • the first device periodically determines the energy type of the energy supplied by the first device.
  • Step 402 The first device sends a first notification message, and the first notification message indicates the first energy type.
  • Step 403 The second device receives the first notification message, and determines the transmission path of the first network traffic based on the first notification message. The transmission path of the first network traffic passes through the first device.
  • the first device when the determined energy type is the first energy type, the first device indicates that the power supply energy of the first device is renewable energy. However, as time goes by, the renewable energy becomes unstable, and the first device may switch the power supply energy of the first device from renewable energy to non-renewable energy. That is to say, after step 401, the first device determines that the energy type of the energy supplied by the first device may change to the second energy type, and the second energy type is non-renewable energy.
  • the first device sends a second notification message when the determined energy type is the second energy type, the second notification message indicates the second energy type, and the second energy type is non-renewable energy.
  • the communication method 400 may also include the following steps 404-405.
  • Step 404 When the determined energy type changes from the first energy type to the second energy type, the first device sends a second notification message, and the second notification message indicates the second energy type.
  • Step 405 The second device receives the second notification message and determines the transmission path of the second network traffic based on the second notification message. The transmission path of the second network traffic does not pass through the first device.
  • the first device sends the first notification message when the determined energy type is the first energy type, and stops sending the first notification message when the determined energy type changes from the first energy type to the second energy type, At the same time, the second notification message will not be sent.
  • the communication method 400 may also include the following step 406.
  • Step 406 When the duration of not receiving the first notification message reaches the specified duration threshold, the second device determines the transmission path of the second network traffic. The transmission path of the second network traffic does not pass through the first device.
  • the first device since the first device can determine the energy type of the energy supplied by the first device, when the determined energy type is the first energy type, it sends the first notification message, and the first notification message indicates the first energy type. for renewable energy.
  • the second device receives the first notification message and determines the transmission path of the first network traffic based on the first notification message.
  • the transmission path of the first network traffic passes through the first device, so that the first device can receive and forward the first network traffic. First network traffic.
  • the first energy type of the power supply energy of the first device is renewable energy
  • as much network traffic as possible can be adjusted to the first device powered by renewable energy based on the energy type of the power supply energy of the first device, so as to allow the third One device forwards more network traffic, improves the utilization of renewable energy, and makes the communication network more low-carbon and environmentally friendly.
  • the first device periodically determines the energy type of the energy supplied by the first device based on the first period length.
  • the first period length is a specified time length.
  • the first period length is a time length configured according to actual needs.
  • the controller may configure the first period length on the first device based on actual needs.
  • the first device includes a power interface, which is connected to power sources of different energy types.
  • the first device detects the power energy currently supplying power to the power interface of the first device, and obtains the energy type of the power supply energy of the first device. .
  • the first device determines that the energy type of the energy supplied by the first device is the first energy type.
  • the first type of energy is renewable energy.
  • Renewable energy includes a variety of energy sources, including wind power energy, hydropower energy and solar power energy. Source et al. There are multiple types of first energy types, and the multiple first energy types are wind power energy, hydropower energy, solar power energy, etc.
  • the first device is the network device 5 in the communication network 100
  • the power supply energy of the network device 5 is coal and electricity energy.
  • the network device 5 determines that the first energy type of the power supply energy of the network device 5 is hydropower energy.
  • the first device sends a first notification message indicating the first energy type to the second device, and the first notification message is used to notify the second device that the energy type of the power supply energy of the first device is the first Energy type.
  • the first device sends a second notification message indicating the second energy type to the second device.
  • the second notification message corresponds to the first notification message.
  • the first device sends a notification message when determining the energy type of the energy supplied by the first device.
  • the first device determines that the energy types of the energy supplied by the first device are the same in multiple consecutive cycles and sends a notification message indicating the determined energy type.
  • step 402 the first device sends the first notification message in the following two ways.
  • the two ways are respectively.
  • the first device determines that the energy type of the energy supplied by the first device is the first energy type, the first device sends a first notification message indicating the first energy type.
  • the first device when the first device determines that the energy type of the energy supplied by the first device is the first energy type, the first device sends the first notification message.
  • the first device determines that the energy type of the energy supplied by the first device changes from the first energy type to the second energy type, the first device stops sending the first notification message, and the second energy type is non-renewable energy.
  • the first device may not send a second notification message indicating the second energy type, so that when the second device does not receive the first notification message for multiple cycles, the second device determines that the first device is powered by The energy type of the energy source changes from the first energy type to the second energy type.
  • the first device sends a second notification message indicating the second energy type.
  • the first device determines that the energy type of the energy supplied by the first device is the first energy type for multiple consecutive cycles, the first device sends a first notification message indicating the first energy type.
  • step 404 after the energy type determined by the first device changes from the first energy type to the second energy type and the energy types determined in multiple consecutive periods are all the second energy type, the first device sends A second notification message used to indicate the second energy type.
  • the first device when the first energy type determined by the first device in multiple consecutive cycles is the same, the first device sends a first notification message indicating the first energy type.
  • the first energy type determined by the first device in multiple consecutive cycles is the same, which means that the first energy type determined by the first device in multiple consecutive cycles is the same renewable energy source, and it means that this renewable energy source is relatively stable at present, Able to continuously power the first device.
  • the first device when the first energy type determined by the first device for X consecutive periods is hydroelectric energy, the first device sends a first notification message, and the first notification message is used to indicate that the first energy type is hydropower energy, and X is An integer greater than 1 indicates that the current hydropower energy is relatively stable and can continue to provide hydropower energy to the first device.
  • the first device sends a first notification message.
  • the first notification message is used to indicate that the first energy type is wind power energy, indicating the current wind power energy. It is relatively stable and can continue to provide wind power energy to the first equipment.
  • the first energy type determined by the first device for X consecutive periods is solar power energy.
  • the first device sends a first notification message.
  • the first notification message is used to indicate that the first energy type is solar power energy, indicating the current solar power. The energy is relatively stable and can continuously provide solar power energy to the first equipment.
  • X is a specified integer value, or X is an integer value configured according to actual requirements.
  • the controller configures the value of X on the first device according to actual requirements.
  • the first device determines that the energy type of the power supply energy of the first device is the first energy type for multiple consecutive cycles, it indicates that the current renewable energy is relatively stable and can provide stable power supply energy to the first device.
  • the first device sends the first notification message indicating the first energy type, which not only reduces the number of sending notification messages, but also avoids frequent adjustment of the transmission path of network traffic in the communication network.
  • the first device when the power supply energy of the first device changes, the first device sends a first notification message or a second notification message to notify the power supply energy of the first device.
  • the first device Before performing step 401, the first device records the energy type of the energy supplied by the first device before the current one. For the above first method, in step 402, the first device determines that the energy type of the energy supplied by the first device is the first energy type. If the energy type recorded by the first device is different from the first energy type, the first device sends the first energy type. A notification message is sent, and the recorded energy type is updated to the first energy type. If the energy type recorded by the first device is the same as the first energy type, stop sending the first notification message.
  • step 404 when the first device determines that the energy type of the energy supplied by the first device is the second energy type, if the energy type recorded by the first device is different from the second energy type, the first device sends a second notification report document and update the recorded energy type to the second energy type. If the energy type recorded by the first device is the same as the second energy type, then stop sending the second notification message.
  • step 402 after the first device determines that the energy type of the energy supplied by the first device is the first energy type in multiple consecutive cycles, if the energy type recorded by the first device and the first energy type Differently, the first device sends a first notification message and updates the recorded energy type to the first energy type. If the energy type recorded by the first device is the same as the first energy type, stop sending the first notification message.
  • step 404 after the first device determines that the energy type of the energy supplied by the first device is the second energy type in multiple consecutive cycles, if the energy type recorded by the first device is different from the second energy type, it means After the energy type determined by the first device changes from the first energy type to the second energy type and the energy types determined in multiple consecutive cycles are all the second energy type, the first device sends a second notification message and The recorded energy type is updated to the second energy type. If the energy type recorded by the first device is the same as the second energy type, then stop sending the second notification message.
  • step 402 there may be the following three relationships between the first device and the second device.
  • the first relationship is that the first device and the second device are devices in the same AS domain.
  • the AS domain is called the first AS domain, that is, the first device and the second device are both located in the first AS domain.
  • the second relationship is that the first device and the second device are devices in two different AS domains.
  • the AS domain where the first device is located is called the first AS domain
  • the AS domain where the second device is located is called the first AS domain.
  • the second AS domain, the first AS domain and the second AS domain are different.
  • the third relationship is that the first device is a device in the first AS domain, and the second device is a controller.
  • the first device and the second device are both devices in the first AS domain, and the second device includes other devices in the first AS domain except the first device. That is to say: the first device sends the first notification message to the device in the first AS domain.
  • the first advertisement message is an IGP message, and the first device broadcasts it to The device broadcasts a first advertisement message.
  • the first advertisement message includes identification information of a link with the first device as an endpoint and a first cost (cost) value of the link.
  • the first cost value corresponds to the first energy type. .
  • the IGP message is an OSPF message and/or an IS-IS message.
  • the link includes two endpoints, one of which is the first device and the other endpoint is a neighbor device of the first device, and the identification information of the link includes the device identifier of the first device and the device identifier of the neighbor device.
  • the device identification of the first device includes the address and/or serial number of the first device
  • the device identification of the neighbor device includes the address and/or serial number of the neighbor device.
  • the first advertisement message includes a first TLV
  • the first TLV includes identification information of the link and/or a first cost value of the link.
  • the first TLV is a first link status TLV or a first node status TLV. That is, the first advertisement message includes the first link status TLV, and the first link status TLV includes the identification information of the link and/or the first cost value of the link. Alternatively, the first notification message includes a first node status TLV, and the first node status TLV includes identification information of the link and/or a first cost value of the link.
  • the first device After the first device determines that the energy type of the energy supplied by the first device is the first energy type, the first device generates the first notification message. At this time, the first link status TLV in the first notification message includes the The third cost value of the link.
  • the third cost value is the cost value configured in advance for the link. Before sending the first advertisement message, the first device reduces the third cost value to obtain the first cost value, so that the first link status TLV in the first advertisement message includes the first cost value of the link. or,
  • the first device After the first device determines that the energy type of the energy supplied by the first device is the first energy type, the first device generates a first notification message. At this time, the first node status TLV of the first notification message includes the first node status TLV of the link. Three cost values. Before sending the first advertisement message, the first device reduces the third cost value to obtain the first cost value, so that the first node status TLV in the first advertisement message includes the first cost value of the link.
  • the first device may adopt any one of the following methods 1 to 3 to reduce the third cost value to obtain the first cost value, where the methods 1 to 3 are respectively.
  • the first device includes an energy saving factor corresponding to the first energy type (renewable energy).
  • the energy saving factor corresponding to the first energy type is a decimal greater than 0 and less than 1, and the link in the first notification message is The third cost value is multiplied by the energy saving factor corresponding to the first energy type to obtain the first cost value.
  • the energy saving factors corresponding to each first energy type are the same, or the energy saving factors corresponding to each first energy type are different.
  • the plurality of first energy types include hydropower energy, wind power energy, solar power energy, and the like.
  • the energy saving factor corresponding to hydropower energy is "0.5"
  • the energy saving factor corresponding to wind power energy is “0.5”
  • the energy saving factor corresponding to solar power energy is “0.5”, etc.
  • the energy saving factor corresponding to each first energy type is "0.5” .
  • the energy-saving factor corresponding to hydropower energy is "0.7"
  • the energy-saving factor corresponding to wind power energy is 0.6
  • the energy-saving factor corresponding to solar power energy is "0.5", etc.
  • the energy-saving factor corresponding to each first energy type is different.
  • the link with network device 5 as the endpoint includes link 1 and link 2.
  • the third cost value configured in advance for link 1 is 1, and the third cost value configured for link 2 is 1. .
  • the network device 5 determines that the energy type of the power supply energy of the network device 5 is hydroelectric energy, and generates a first notification message.
  • the first node status TLV of the first notification message includes the identification information of link 1 and the third cost value "1", and the identification information of link 2 and the third cost value "1".
  • the first device multiplies the third cost value "1" of link 1 in the first advertisement message by the energy saving factor "0.5" corresponding to the hydropower energy to obtain the first cost value "0.5" of link 1, and adds the first cost value "0.5” to link 1.
  • the third cost value "1" of link 2 in a notification message is multiplied by the energy saving factor "0.5” corresponding to hydropower energy to obtain the first cost value "0.5” of link 2.
  • Network device 5 broadcasts the first notification message to the network devices in AS domain 1.
  • Method 2 For the third cost value included in the first advertisement message, the first device sets the value of the highest Y bit of the third cost value to 0 to obtain the first cost value, Y is an integer greater than 0, and Y is less than the number of bits included in the third cost value.
  • Method 3 The first device includes an offset value corresponding to the first energy type (renewable energy). For the third cost value included in the first notification message, the first device reduces the third cost value corresponding to the first energy type. The offset value gets the first cost value.
  • the offset values corresponding to each first energy type are the same, or the offset values corresponding to each first energy type are different.
  • the offset value corresponding to hydropower energy is "0.5”
  • the offset value corresponding to wind power energy is “0.5”
  • the offset value corresponding to solar power energy is “0.5”, etc., that is, the offset value corresponding to each first energy type
  • the shift values are the same.
  • the offset value corresponding to hydropower energy is "0.7”
  • the offset value corresponding to wind power energy is "0.6”
  • the offset value corresponding to solar power energy is "0.5", etc., that is, the offset value corresponding to each first energy type
  • the shift values are different.
  • the first TLV is a first energy-saving factor TLV
  • the first energy-saving factor TLV is a TLV extended in the first advertisement message. That is, the first energy saving factor TLV in the first advertisement message includes the identification information of the link and/or the first cost value of the link.
  • Each first energy type corresponds to a first energy saving factor TLV.
  • the first energy saving factor TLV includes the identification information of the link. and/or the first cost value corresponding to the first energy type.
  • the first notification message includes the first energy saving factor TLV corresponding to the wind power energy.
  • the first energy saving factor TLV includes type (Type), length (Length) and There are three subfields of value (Value).
  • the Value subfield of the first energy saving factor TLV includes the first cost value corresponding to the wind power energy.
  • the first notification message when the first energy type is hydropower energy, the first notification message includes the first energy saving factor TLV corresponding to the hydropower energy.
  • the first energy saving factor TLV includes three subfields: Type, Length and Value.
  • the first The Value subfield of the energy saving factor TLV includes the first cost value corresponding to hydropower energy.
  • the first notification message when the first energy type is solar electric energy, the first notification message includes the first energy saving factor TLV corresponding to the solar electric energy.
  • the first energy saving factor TLV includes three subfields: Type, Length and Value.
  • the Value subfield of the first energy saving factor TLV includes the first cost value corresponding to the solar power energy.
  • the first notification message may also include a first node status TLV, and the first node status TLV includes identification information of the link and/or a third cost value.
  • the first advertisement message may also include a first link status TLV, and the first link status TLV includes identification information of the link and/or a third cost value. That is to say, the first advertisement message includes both the first node status TLV and the first energy saving factor TLV, or the first advertisement message includes both the first link status TLV and the first energy saving factor TLV.
  • the first cost value in the first notification message is smaller than the third cost value.
  • the two fields are distinguished by the type of the field (Type), and the first link status TLV includes the type of the first link status TLV.
  • the first energy saving factor TLV includes the type of the first energy saving factor TLV, and the two fields include different types.
  • the two fields of the first node status TLV and the first energy saving factor TLV are distinguished by the type of the field.
  • the first node status TLV includes the type of the first node status TLV
  • the first energy saving factor TLV Including the type of the first energy-saving factor TLV, the two fields include different types.
  • the first TLV includes a first sub-TLV and a second sub-TLV, and the first sub-TLV
  • the TLV includes identification information of the link
  • the second sub-TLV includes the first cost value
  • the second advertisement message is the same as the first advertisement message and is also an IGP message.
  • the first device sends the second advertisement message to the device in the first AS domain.
  • the first device broadcasts a second notification message to the devices in the first AS domain in a broadcast manner.
  • the second notification message includes identification information of a link with the first device as an endpoint and a second cost of the link. value, and the second cost value corresponds to the second energy type.
  • the second advertisement message includes a second TLV
  • the second TLV includes identification information of the link and/or a second cost value of the link.
  • the second TLV is a second link status TLV or a second node status TLV.
  • the first advertisement message includes the first link status TLV
  • the second advertisement message includes the second link status TLV
  • the second link status TLV includes the identification information of the link and/or the third link status of the link. 2 cost value.
  • the second notification message includes the second node status TLV
  • the second node status TLV includes the identification information of the link and/or the second node status TLV of the link. cost value.
  • the first device After the first device determines that the energy type of the energy supplied by the first device is the second energy type, the first device generates a second notification message. At this time, the second link status TLV of the second notification message includes the link status TLV. The third cost value of the road. Before sending the second advertisement message, the first device adds the third cost value to obtain the second cost value, so that the second link status TLV in the second advertisement message includes the second cost value of the link. or,
  • the first device After the first device determines that the energy type of the energy supplied by the first device is the second energy type, the first device generates a second notification message. At this time, the second node status TLV in the second notification message includes the link's The third cost value. Before sending the second advertisement message, the first device adds the third cost value to obtain the second cost value, so that the second node status TLV in the second advertisement message includes the second cost value of the link.
  • the first device may adopt any one of the following methods A to C to add the third cost value to obtain the second cost value.
  • the methods A to C are respectively.
  • the first device includes an energy saving factor corresponding to the second energy type (non-renewable energy), the energy saving factor corresponding to the second energy type is a value greater than 1, and the third element of the link in the second notification message is The cost value is multiplied by the energy saving factor corresponding to the second energy type to obtain the second cost value.
  • the energy saving factor corresponding to the second energy type is a value greater than 1
  • the third element of the link in the second notification message is The cost value is multiplied by the energy saving factor corresponding to the second energy type to obtain the second cost value.
  • the link with network device 5 as the endpoint includes link 1 and link 2.
  • the third cost value configured in advance for link 1 is 1, and the third cost value configured for link 2 is 1.
  • Network device 5 determines that the energy type of the power supply energy of network device 5 is coal and electricity energy, and generates a second notification message.
  • the first node status TLV in the second notification message includes the identification information of link 1 and the third cost value "1 ”, as well as the identification information of link 2 and the third cost value “1”. Assume that the energy saving factor corresponding to coal power energy is "1.5".
  • the first device multiplies the third cost value "1" of link 1 in the second notification message by the energy saving factor "1.5” corresponding to coal power energy to obtain the link
  • the second cost value "1.5” of link 1 and the third cost value "1" of link 2 in the second notification message are multiplied by the energy saving factor "1.5” corresponding to the coal power energy to obtain the third cost value of link 2.
  • the second cost value is "1.5".
  • Network device 5 broadcasts the second notification message to the network devices in AS domain 1.
  • Method B for the third cost value included in the second advertisement message, the first device sets the value of the highest Z bit of the third cost value to 1 to obtain the second cost value, Z is an integer greater than 0, and Z is less than the number of bits included in the third cost value.
  • the first device includes an offset value corresponding to the second energy type (non-renewable energy). For the third cost value included in the second notification message, the first device increases the third cost value corresponding to the second energy type. The offset value gets the second cost value.
  • the second TLV is a second energy-saving factor TLV
  • the second energy-saving factor TLV is a TLV extended in the second advertisement message. That is, the second energy-saving factor TLV in the second advertisement message includes the identification information of the link and/or the second cost value.
  • the second notification message may also include a second node status TLV, and the second node status TLV includes the identification information of the link and/or the link's The third cost value; and/or the second advertisement message may also include a second link status TLV, and the second link status TLV includes identification information of the link and/or a third cost value of the link. That is to say, the second advertisement message includes the second node status TLV and the second energy saving factor TLV at the same time, or the second advertisement message includes the second link status TLV and the second energy saving factor TLV at the same time.
  • the second cost value in the second notification message is greater than the third cost value.
  • the two fields are distinguished by the type of the field (Type), and the second link state TLV includes the type of the second link state TLV.
  • the second energy-saving factor TLV includes the type of the second energy-saving factor TLV, and the two fields include different types.
  • the two fields of the second node status TLV and the second energy saving factor TLV are distinguished by the type of the field.
  • the second node status TLV includes the type of the second node status TLV
  • the second energy saving factor TLV Including the type of the second energy-saving factor TLV, the two fields include different types.
  • the second TLV includes a third sub-TLV and a fourth sub-TLV
  • the third sub-TLV Includes identification information of the link
  • the fourth sub-TLV includes the second cost value
  • the first TLV in the first advertisement message and the second TLV in the second advertisement message are TLVs of the same type. That is, when the first TLV is the first node status TLV, the second TLV is the second node status TLV; when the first TLV is the first link status TLV, the second TLV is the second link status TLV; when the first TLV is the first link status TLV, When the TLV is the first energy-saving factor TLV, the second TLV is the second energy-saving factor TLV.
  • the first device is a device in the first AS domain
  • the second device is a device in the second AS domain. That is to say, the first device sends the first notification message to the device in the second AS domain.
  • the second device Before the first device sends the first notification message, the second device sends capability information of the second device to the first device, where the capability information is used to indicate that the second device has the capability to process the first notification message.
  • the first device receives the capability information and determines based on the capability information that the second device has the ability to process the first notification message, it sends the first notification message to the second device.
  • the first advertisement message is a BGP message
  • the second advertisement message like the first advertisement message, is also a BGP message.
  • the first device sends a second notification message to the device in the second AS domain.
  • the first device is a device in the first AS domain, and the second device is the controller. That is to say, the first device sends the first notification message to the controller.
  • the controller Before the first device sends the first notification message, the controller sends the controller's capability information to the first device, and the capability information is used to indicate that the controller has the ability to process the first notification message.
  • the first device receives the capability information and determines that the controller has the capability to process the first notification message based on the capability information, it sends the first notification message to the controller.
  • the first advertisement message is a BGP message
  • the second advertisement message like the first advertisement message, is also a BGP message.
  • the first device sends a second notification message to the controller.
  • the first notification message is used to indicate that the energy type of the power supply energy of the first device is the first energy type
  • the second notification message is used to indicate the energy type of the power supply energy of the first device.
  • the type is the second energy type.
  • the first advertisement message is used to indicate that the energy type corresponding to the routing information saved by the first device is the first energy type
  • the second advertisement message is used to indicate that the energy type corresponding to the routing information saved by the first device is the first energy type.
  • the energy type is a second energy type.
  • any one of the following methods 1 to 3 is used to make the first notification message indicate the first energy type, and to make the second notification message indicate the second energy type.
  • the first advertisement message is used to carry device attributes.
  • the first advertisement message includes a first newly added router attribute field, and the first newly added router attribute field includes a first energy type.
  • a new device attribute is added.
  • the device attribute is the energy type of the power supply energy of the first device.
  • the first new router attribute field is a device attribute field expanded in the first advertisement message.
  • the first new router attribute field is a device attribute field expanded in the first advertisement message.
  • the router attribute field includes an energy type (first energy type) of power supply energy for the first device.
  • the network device 5 determines that the energy type of the power supply of the network device 5 is hydropower energy, and generates a first notification message.
  • the first notification message includes the first newly added router attribute field.
  • the first energy type included in the first newly added router attribute field is hydroelectric energy.
  • the network device 5 sends the first notification message to the controller.
  • the second advertisement message is also used to carry attributes of the device.
  • the second advertisement message includes a second new router attribute field, and a second new router attribute field. Includes secondary energy type.
  • the second newly added router attribute field is a device attribute field extended in the second advertisement message.
  • the second notification message includes a second newly added router attribute field. 2.
  • the second energy type included in the newly added router attribute field is coal and electricity energy.
  • the network device 5 sends a second notification message to the controller.
  • the first advertisement message is used to carry the segment routing internet protocol version 6, SRv6 Policy.
  • the first advertisement message includes the first color field, and the first color field includes the first Energy type.
  • the value of the first color field is a first value, and the first value is used to indicate the first energy type.
  • the first color field is a TLV field.
  • the first energy type can be divided into types such as hydropower energy, wind power energy or solar power energy.
  • the first color field is the TLV field corresponding to wind power energy, or, referring to Figure 12(b), the first color field is the TLV field corresponding to hydropower energy, or, referring to Figure 12(c), the One color field is the TLV field corresponding to the solar power energy.
  • the values of the first color field are different, and the first energy types indicated by the first color field are different.
  • the first value includes the color value of wind power, the color value of hydropower, or the color value of solar energy, etc.
  • the color value of wind power is used to indicate wind power energy
  • the color value of hydropower is used to indicate hydropower energy
  • the color value of solar energy is used to indicate Solar electric energy.
  • the color value of wind power is 1, which indicates wind power energy
  • the color value of hydropower is 2, which indicates hydropower energy
  • the color value of solar energy is 3, which indicates solar electric energy.
  • the wind power color value, hydropower color value and solar power color value may also have other values, which will not be listed one by one here.
  • the network device 5 determines that the energy type of the energy supplied by the network device 5 is hydropower energy, and generates a first notification message.
  • the first notification message includes a first color field, and the first notification message includes a first color field.
  • the value of the color field is 2, indicating that the first energy type is hydropower energy.
  • the network device 5 sends the first notification message to the controller.
  • the second notification message is also used to carry the SRv6Policy.
  • the second notification message includes a second color field, and the second color field includes the second energy type.
  • the value of the second color field is a second value, and the second value is used to indicate the second energy type.
  • the network device 5 determines that the energy type of the power supply energy of the network device 5 has changed from hydropower energy to coal power energy, and generates a second notification message.
  • the second notification message includes a second color field, and the second color field The value of is 4, 4 indicates that the first energy type is coal power energy.
  • the network device 5 sends a second notification message to the controller.
  • the first newly added router attribute field may include the type of the first newly added router attribute field, and the first color field may include the type of the first color field, but the two fields include different types.
  • the first newly added router attribute field may include the type code of the first newly added router attribute field, and the first color field may include the type code of the first color field, but the two fields include different type codes.
  • the first newly added router attribute field may include AFI, and the first color field may include AFI, but the AFIs included in the two fields are different.
  • the first newly added router attribute field may include SAFI, and the first color field may include SAFI, but the SAFI included in the two fields are different.
  • the second newly added router attribute field and the second color field can also be distinguished by type, type code, AFI or SAFI.
  • method 2 extend the meaning of the color field in the SR Policy of BGP or path computation element communication protocol (PCEP) so that the value of the color field can be the first value mentioned above or second value.
  • the color field is used to carry the energy type of the power supply energy of the first device, and the color field is the first color field in the first notification message or the second color field in the second notification message.
  • the color field is the policy color (Policy Color) field in the Segment Routing Internet Protocol version 6 policy network layer reachability information (SR Policy network layer reachability information, SR Policy NLRI).
  • Policy Color Policy color
  • SR Policy network layer reachability information SR Policy NLRI
  • SR Policy NLRI is BGP's multi-protocol reachable network layer reachability information (multi protocol_REACH_NLRI, MP_REACH_NLRI) or multi-protocol unreachable network layer reachability information (multi protocol_UNREACH_NLRI, MP_UNREACH_NLRI).
  • method 2 extend the meaning of the color value (Color Value) in the color extended community (Color Extended Community) in the BGP Opaque Extended Community (BGP Opaque Extended Community), so that the value of the Color Extended Community is The above-mentioned first value or second value.
  • the Color Extended Community is used to carry the energy type of the power supply energy of the first device, and the Color Extended Community is the first color field in the first notification message or the second color field in the second notification message.
  • the first advertisement message is used to announce routes to neighbors.
  • the first AS-Path field of the first advertisement message includes m identical AS numbers, m is a multiple value corresponding to the first energy type, and m is An integer greater than 0, the AS number is used to identify the AS domain where the first device is located, that is, the AS number is the AS number of the first AS domain.
  • the length of the AS number of each AS domain in the communication network is the specified length, that is, the length of the AS number of each AS domain is equal.
  • the first advertisement message includes a first AS-Path field, and the first AS-Path field is used to carry an AS number.
  • m identical AS numbers are included in the first AS-Path field, and the m identical AS numbers are treated as a whole in the first AS-Path field, that is, the m identical AS numbers are regarded as An AS number whose length is m times the specified length.
  • the first device when the first device determines that the energy type of the energy supplied by the first device is the first energy type, the first device generates a first notification message, obtains m corresponding to the first energy type, and in the first notification message Add m AS numbers of the first AS domain to the first AS-Path field.
  • the length of the first AS-Path field is equal to the total length of the m AS numbers, so that the length of the AS number included in the first AS-Path field corresponds to the first energy type. or,
  • the first device receives the third communication message sent by other network devices (such as the upstream network device of the first device).
  • the third notification message includes the first AS-Path field, and the first AS-Path field includes the AS number of the first AS domain.
  • the first device determines that the energy type of the energy supplied by the first device is the first energy type, the first device obtains m corresponding to the first energy type, and adds m- in the first AS-Path field of the third notification message. 1 AS number of the first AS domain to obtain the first notification message.
  • the length of the first AS-Path field of the first advertisement message is equal to the total length of the m AS numbers, so that the length of the AS number included in the first AS-Path field corresponds to the first energy type.
  • the value of m corresponding to wind power energy is 1, the value of m corresponding to hydropower energy is 2, and the value of m corresponding to solar power energy is 3.
  • the value of m corresponding to wind power energy and the value of m corresponding to hydropower energy are The value of m corresponding to the solar power energy may also be other integer values, which will not be listed one by one here.
  • the AS number of the first AS domain is 300. If the first energy type determined by the first device is wind power energy, the first device adds the AS number in the first AS-Path field in the first notification message, That is, the first AS-Path field includes 300, and the length of the first AP-Path field is equal to the specified length. If the first energy type determined by the first device is hydroelectric energy, the first device adds two AS numbers in the first AS-Path field in the first notification message, that is, the first AS-Path field includes 300, 300, the length of the first AP-Path field is equal to twice the specified length.
  • the first device adds three AS numbers in the first AS-Path field in the first notification message, that is, the first AS-Path field includes 300 , 300, 300, The length of the first AP-Path field is equal to three times the specified length.
  • the second advertisement message is also used to announce the route to the neighbor.
  • the second AS-Path field of the second advertisement message includes n identical AS numbers. , n is a multiple value corresponding to the second energy type, and n is an integer greater than 0.
  • the first device determines that the energy type of the energy supplied by the first device is the second energy type
  • the first device generates a second notification message
  • the first device obtains n corresponding to the second energy type
  • the second Add n AS numbers of the first AS domain to the second AS-Path field of the notification message.
  • the n AS numbers are treated as a whole in the second AS-Path field, that is, as one AS number, so that the length of the AS number included in the second AS-Path field is equal to the total length of the n AS numbers, so that The AS number length included in the second AS-Path field corresponds to the second energy type.
  • n corresponding to coal power energy is 4.
  • the value of n corresponding to coal power energy may also be other integer values, which will not be listed one by one here.
  • the AS number of the first AS domain is 300. If the first device determines that the energy type of the power supply energy of the first device has changed from wind power energy to coal power energy, the first device generates a second notification message.
  • the second notification report Four AS numbers are added to the second AS-Path field in this article, that is, the second AS-Path field includes 300, 300, 300, 300, and the length of the first AP-Path field is equal to four times the specified length.
  • any one of the following methods a to b is used to make the first advertisement message indicate that the energy type corresponding to the routing information saved by the first device is the first energy type, and to make the second advertisement message indicate that the energy type is the first energy type.
  • the energy type corresponding to the routing information saved by a device is the second energy type.
  • the first advertisement message includes a first path attribute field
  • the first path attribute field includes first routing information
  • the first routing information includes a first energy type
  • the first routing information is routing information saved on the first device.
  • a path attribute (path attribute) is extended in each routing information saved on the first device, and the path attribute is the energy type of the power supply energy of the first device.
  • the routing information is called is the first routing information.
  • the first device updates the energy type of the energy supplied by the first device included in the first routing information to the first energy type.
  • the first device changes the first energy type included in the first routing information.
  • the energy type is replaced with a second energy type
  • the second advertisement message includes a second path attribute field
  • the second path attribute field includes second routing information.
  • the second routing information includes the second energy type and content in the first routing information other than the first energy type.
  • the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the first energy type, and the first routing information is routing information stored on the first device.
  • the first notification message includes a first community attribute field, and the first community attribute value included in the first community attribute field corresponds to the first energy type. That is to say, the first community attribute field corresponds to the first energy type, and the first community attribute field also includes routing information (first routing information) saved on the first device. In this way, the community attribute of the first advertisement message is implemented. Indicates that the energy type corresponding to the first routing information is the first energy type.
  • the community attribute value corresponding to each first energy type is different.
  • the community attribute value corresponding to wind power energy is 300
  • the community attribute value corresponding to hydropower energy is 100
  • the community attribute value corresponding to solar power energy is 100.
  • the corresponding community attribute value is 50.
  • the community attribute value corresponding to wind power energy, the community attribute value corresponding to hydropower energy, and the community attribute value corresponding to solar power energy may also have other values, which will not be explained one by one here.
  • the first device determines a first energy type
  • the first device if the first device needs to notify the first energy type, the first device generates a first notification message, and in the first notification message, the first energy type is
  • the first community attribute value included in a community attribute field is equal to the community attribute value corresponding to the first energy type, and the first community attribute field in the first advertisement message also includes routing information saved on the first device.
  • the path priority of routing information corresponding to the same energy type can be managed uniformly based on the community attribute value.
  • wind power energy, hydropower energy and solar power energy have different stability or different prices in different time periods or in different regions.
  • the controller uses the community attribute value corresponding to the wind power energy to uniformly increase the routing information path corresponding to the wind power energy on each network device in the region.
  • the controller executes all routing information corresponding to the community attribute value first, thereby improving operation and maintenance efficiency.
  • the community attribute of the second advertisement message indicates that the energy type corresponding to the first routing information is the second energy type.
  • the second notification message includes a second community attribute field, and the second community attribute value included in the second community attribute field corresponds to the second energy type. That is to say, the second community attribute field corresponds to the second energy type, and the second community attribute field also includes the routing information (first routing information) saved on the first device. In this way, the community attribute of the second advertisement message is implemented. Indicates that the energy type corresponding to the first routing information is the second energy type.
  • the first device determines that the energy type of the energy supplied by the first device is the second energy type
  • the first device needs to notify the second energy type
  • the first device generates a second notification message
  • the second notification message The second community attribute value included in the second community attribute field in the message is equal to the community attribute corresponding to the second energy type. value, and the second community attribute field in the second advertisement message also includes routing information saved on the first device.
  • the relationship between the first device and the second device is the above-mentioned first relationship, and the first device and the second device are devices in the same AS domain.
  • the second device is a network device with a message forwarding function in the communication network
  • the second device includes third routing information
  • the next hop device indicated by the third routing information is not the first device or the next hop.
  • the device does not include routing information that can reach the first device.
  • the destination device indicated by the third routing information is the same as the destination device of the first network traffic.
  • the first network traffic is network traffic to be forwarded by the second device.
  • the second device replaces the next hop device indicated by the third routing information with a third device based on the first advertisement message.
  • the third device is the first device or the third device includes a route that can reach the first device. Information such that the transmission path for transmitting the first network traffic passes through the first device.
  • At least one routing information is stored on the second device.
  • the second device receives the first advertisement message.
  • the first advertisement message includes the identification information of the link with the first device as the endpoint and the first cost of the link.
  • the second device can also obtain the link in the first AS domain.
  • the transmission path passes through a link with the first device as the endpoint, it is determined whether the next hop device indicated by the routing information is the third device, the third device is the first device, or the third device includes a link that can reach the first device. routing information. If the next-hop device indicated by the routing information is not the third device, use the routing information as the third routing information, and replace the next-hop device indicated by the third routing information with the third device. In this way, when the second device receives the first network traffic that needs to be sent to the destination device, the second device sends the first network traffic to the first device based on the third routing information. The first device receives the first network traffic and sends the first network traffic to the destination device. This increases the number of network traffic forwarded on the first device, which not only reduces the energy consumption of the communication network, but also improves the utilization rate of renewable energy. .
  • network device 2 receives a first notification message sent by network device 5.
  • the first notification message includes identification information of link 1 with network device 5 as the endpoint and the first cost value of link 1. “0.5” as well as the identification information of link 2 ending with network device 5 and the first cost value of link 2 “0.5”.
  • network device 2 also obtains the cost value of link 3 as "2”, and assumes that network device 2 stores routing information.
  • the destination device indicated by the routing information is destination device 1, but the next destination device indicated by the routing information is The hop device is network device 3.
  • Network device 2 calculates that it can reach destination device 1 based on the address of destination device 1, the first cost value "0.5” of link 2, the first cost value "0.5” of link 1, and the cost value "2" of link 3.
  • the transmission path passes through network device 5, network device 6 and network device 7. That is to say, the transmission path passes through link 2 and link 1 with network device 5 as the end.
  • Network device 2 uses this routing information as the third routing information, and the next hop device indicated by the third routing information is network device 3. Replace network device 5.
  • network device 2 receives network traffic 1, the destination device of network traffic 1 is destination device 1.
  • Network device 2 sends network traffic 1 to network device 5 based on the third routing information, and network device 5 then sends the network traffic 1 to the destination device.
  • Device 1 sends network traffic 1.
  • the first notification message includes the first node status TLV
  • the second device identifies the first node status TLV in the first notification message, and obtains the identification information of the link included in the first node status TLV and the link The first cost value of the road.
  • the first notification message includes the first link status TLV
  • the second device identifies the first link status TLV in the first notification packet, and obtains the identification information of the link included in the first link status TLV and the The first cost value of the link.
  • the first notification message includes a first energy saving factor TLV and a first node status TLV.
  • the type included in the first energy saving factor TLV and the type included in the first node status TLV are different, so that the second device can perform the first notification in the first notification message.
  • Identification in the message The first energy saving factor TLV and the first node status TLV are obtained, and the first energy saving factor TLV is selected from the first energy saving factor TLV and the first node status TLV. or,
  • the first notification message includes a first energy saving factor TLV and a first link status TLV.
  • the type included in the first energy saving factor TLV and the type included in the first link status TLV are different, so that the second device is in the first
  • the first energy saving factor TLV and the first link status TLV are identified in the notification message, and the first energy saving factor TLV is selected from the first energy saving factor TLV and the first link status TLV. Obtain the identification information of the link included in the selected first energy-saving factor TLV and the first cost value of the link.
  • the relationship between the first device and the second device is the above-mentioned second relationship or the third relationship.
  • the second device receives the first notification message based on the first notification message and the first network traffic.
  • the destination address establishes a transmission path of the first network traffic, and the transmission path of the first network traffic passes through the first device.
  • the relationship between the first device and the second device is the above-mentioned second relationship
  • the second device and the first device are devices in two different AS domains
  • the second device has a message forwarding function.
  • the first network traffic is network traffic currently being transmitted by the second device and whose transmission path does not pass through the first device.
  • the first network traffic is network traffic that requires the second device to establish a transmission path
  • the second device is the head node of the transmission path. After the second device establishes a transmission path for the first network traffic, when receiving the first network traffic, the second device uses the transmission path to forward the received first network traffic. or,
  • the relationship between the first device and the second device is the above-mentioned third relationship
  • the second device is a controller
  • the first network traffic is network traffic that requires the controller to establish a transmission path
  • the third A network traffic is network traffic that is currently being transmitted in the communication network and whose transmission path does not pass through the first device.
  • the controller After the controller establishes the transmission path of the first network traffic, the controller issues the transmission path. For any network device on the transmission path, when the network device receives the first network traffic, it forwards the received first network traffic to the next hop device, and the next hop device is a node on the transmission path.
  • the so-called network traffic currently being transmitted refers to that a transmission path for the network traffic has been established at present, and the data of the network traffic may be transmitted using the transmission path at present, but all the data of the network traffic has not been transmitted yet.
  • the so-called network traffic that requires a second device (for the above-mentioned network device (such as a head node) or controller with a message forwarding function) to establish a transmission path means that the second device receives a path establishment request sent by the source device of the network traffic, This path establishment request is used to request the second device to establish a transmission path for the network traffic, but currently the second device has not established a transmission path for the network traffic; or, the transmission path of the network traffic is abnormal, and the network needs to be re-established. Traffic establishes a transmission path.
  • the transmission path established by the second device for the first network traffic passes through the first device, thus adjusting the network traffic being transmitted in the communication network to the first network traffic.
  • the device is forwarded by the first device, thereby increasing the number of network traffic forwarded on the first device, thereby improving the utilization rate of renewable energy.
  • the transmission path established by the second device for the first network traffic passes through the first device, which also increases the number of network traffic forwarded on the first device, thereby improving the utilization of renewable energy. Rate.
  • the first advertisement message indicates that the energy type of the energy supplied by the first device is the first energy type, or the first advertisement message indicates that the energy type corresponding to the first routing information stored on the first device is the first energy type.
  • the first notification message indicates that the energy type of the power supply energy of the first device is the first energy type
  • the first notification message indicates that the energy type of the power supply energy of the first device is the first energy type
  • the second device determines, based on the first notification message, that the energy type of the energy supplied by the first device is the first energy type. Select a network flow, and determine whether the network flow can be transmitted to the destination address through the first device based on the destination address of the network flow. If the network traffic can be transmitted to the destination address through the first device, the network traffic is regarded as the first network traffic. Based on the destination address of the first network traffic, a transmission path through the first device is established, and the transmission path is used as the transmission path of the first network traffic.
  • the second device when the second device is a network device with a packet forwarding function, the second device selects a network traffic from the network traffic that is being transmitted on the second device and whose transmission path does not pass through the first device, and/or , select one network traffic from the network traffic that requires the second device to establish a transmission path.
  • the second device when the second device is a controller, the second device selects a network traffic from the network traffic that is being transmitted in the communication network and whose transmission path does not pass through the first device, and/or, from a network traffic that requires the second device to establish a transmission path. Select a network flow among the network flows.
  • the controller receives a first notification message sent by the network device 5, and the first notification message indicates that the first energy type of the network device 5 is hydroelectric energy. Based on the first notification message, the controller determines that the energy type of the power supply energy of the network device 5 is hydroelectric energy.
  • the communication network is currently transmitting network traffic 1.
  • the transmission path of network traffic 1 does not pass through network device 5.
  • the destination address of network traffic 1 is the address of destination device 1.
  • the controller determines that the network flow 1 can be transmitted to the destination address through the network device 5, establishes a transmission path through the network device 5, and uses the transmission path as the transmission path of the network flow 1.
  • the nodes on the transmission path include network device 1, network device 2, network device 5, network device 6 and network device 7.
  • the first device may use the above method 1 to cause the first notification message to indicate that the energy type of the energy supplied by the first device is the first energy type.
  • the first advertisement message includes a first newly added router attribute field, and the first newly added router attribute field includes a first energy type.
  • the second device determines that the energy type of the energy supplied by the first device is the first energy type.
  • the controller receives a first notification message sent by the network device 5.
  • the first notification message includes a first newly added router attribute field, and the first newly added router attribute field includes a first energy source of the network device 5.
  • the type is hydroelectric energy.
  • the controller determines that the energy type of the power supply energy of the network device 5 is hydroelectric energy.
  • the first device may use the above method 2 to cause the first notification message to indicate that the energy type of the energy supplied by the first device is the first energy type.
  • the first notification message includes a first color field, and the value of the first color field is the first value.
  • the second device parses the first value from the first color field included in the first notification message, and determines based on the first value that the energy type of the energy supplied by the first device is the first energy type.
  • the controller receives a first notification message sent by the network device 5.
  • the first notification message includes a first color field, and the value of the first color field is "2". Based on the value "2" of the first color field included in the first notification message, the controller determines that the energy type of the power supply energy of the network device 5 is hydroelectric energy.
  • the value of the first color field is different, and the energy type determined by the second device is different.
  • the value of the first color field is the hydroelectric color value, and the energy type determined by the second device is hydroelectric energy.
  • the value of the first color field is the color value of wind power, and the energy type determined by the second device is wind power energy.
  • the value of the first color field is a solar color value, and the energy type determined by the second device is solar power energy.
  • the second device may establish at least one SRv6 path for transmitting the first network traffic.
  • the second device may receive the first One demand information, the first demand information includes a certain first energy type, and the first demand information is used to instruct the second device to preferentially use network devices whose power supply energy type is the first energy type to forward network traffic.
  • the operation of the second device to establish the transmission path of the first network traffic is: after the second device receives the first network traffic, the second device selects the first network from the at least one SRv6 path based on the first requirement information.
  • the energy type of the power supply energy of one or more network devices on the transmission path of the first network traffic is the first energy type.
  • the first device may use the above method 3 to cause the first notification message to indicate that the energy type of the energy supplied by the first device is the first energy type.
  • the first notification message includes a first AS-Path field
  • the second device determines the first energy type of the power supply energy of the first device based on the length of the AS number included in the first AS-Path field.
  • the second device identifies the first AS-Path field in the first advertisement message and obtains the length of the first AS-Path field as the length of the AS number.
  • the controller receives a first notification message sent by network device 5.
  • the first notification message includes a first AS-Path field, and the first AS-Path field includes 300, 300, first AP-Path
  • the length of the field is equal to twice the specified length.
  • the controller identifies the first AS-Path field in the first advertisement message and obtains the length of the first AS-Path field as the length of the AS number.
  • the length of the AS number is twice the specified length. Based on the length of the AS number, it is determined that the first energy type of the power supply energy for the network device 5 is hydropower energy.
  • the process of the second device establishing the transmission path of the first network traffic is:
  • the second device determines that the energy type corresponding to the first routing information is the first energy type based on the first advertisement message.
  • the second device selects a network flow as the first network flow.
  • the destination device of the first network flow is consistent with the first routing information indication.
  • the destination devices are the same, and a transmission path of the first network traffic passing through the first device is established based on the destination address of the first network traffic.
  • the second device when the second device is a network device with a packet forwarding function, the second device selects the destination device and the first routing information from the network traffic that is being transmitted on the second device and whose transmission path does not pass through the first device. Indicates that the destination device is the same network traffic as the first network traffic. And/or, the second device selects, from the network traffic that requires the second device to establish a transmission path, a network traffic whose destination device is the same as the destination device indicated by the first routing information as the first network traffic. The second device establishes a transmission path of the first network flow based on the destination address of the first network flow.
  • the transmission path of the first network flow includes a path from the second device to the first device and a path from the first device to the destination device. or,
  • the second device selects a network where the destination device is the same as the destination device indicated by the first routing information from the network traffic that is being transmitted in the communication network and whose transmission path does not pass through the first device. traffic as first network traffic. And/or, the second device selects a network traffic between the destination device and the destination device indicated by the first routing information as the first network traffic from the network traffic requiring the second device to establish a transmission path. The second device establishes a transmission path of the first network traffic based on the destination address of the first network traffic.
  • the transmission path of the first network traffic includes a path from the source device of the first network traffic to the first device and a path from the first device to the destination device. path.
  • the first device may use the above method a to cause the first advertisement message to indicate that the energy type corresponding to the first routing information stored on the first device is the first energy type.
  • the first advertisement message includes a first path attribute field
  • the first path attribute field includes first routing information
  • the first routing information includes the first energy type.
  • the second device reads the first routing information from the first advertisement message, and determines that the energy type corresponding to the first routing information is the first energy type based on the first energy type included in the first routing information.
  • the first device may use the above method b to cause the first notification message to indicate on the first device
  • the energy type corresponding to the saved first routing information is the first energy type.
  • the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the first energy type.
  • the second device parses the first community attribute value and the first routing information from the first community attribute field of the first advertisement message.
  • the first community attribute value corresponds to the first energy type, and adds the energy type corresponding to the first routing information. Determine the first energy type corresponding to the first community attribute value.
  • the relationship between the first device and the second device is the above-mentioned first relationship, and the first device and the second device are devices in the same AS domain.
  • the second device is a network device with a message forwarding function in the communication network
  • the second device includes fourth routing information
  • the next hop device indicated by the fourth routing information is the first device or the next hop.
  • the device includes routing information that can reach the first device.
  • the destination device indicated by the fourth routing information is the same as the destination device of the second network traffic.
  • the second network traffic is network traffic to be forwarded by the second device.
  • the second device replaces the next hop device indicated by the fourth routing information with a fourth device based on the second advertisement message.
  • the fourth device is not the first device or the fourth device does not include a path that can reach the first device. Routing information such that the transmission path for transmitting the second network traffic does not pass through the first device.
  • At least one routing information is stored on the second device.
  • the second device receives a second advertisement message, and the second advertisement message includes identification information of a link with the first device as an endpoint and a second cost of the link.
  • the second device may also obtain identification information of other links in the first AS domain and cost values of the other links.
  • a transmission path that can reach the destination device is calculated. If the transmission path passes through a link with the first device as the endpoint, the second device uses the routing information as the fourth routing information, and replaces the next-hop device indicated by the fourth routing information with the fourth device.
  • the fourth device is not The first device or the fourth device does not include routing information that can reach the first device, but the fourth device includes routing information that can reach the destination device. In this way, when the second device receives the second network traffic that needs to be sent to the destination device, it sends the second network traffic to the fourth device based on the fourth routing information. The fourth device receives the second network traffic and sends the second network traffic to the destination device.
  • the second notification message includes a second node status TLV
  • the second device identifies the second node status TLV in the second notification message, and obtains the identification information of the link included in the second node status TLV and the link's identification information.
  • the second cost value of the road includes the second link status TLV, the second device identifies the second link status TLV in the second advertisement message, and obtains the identification information of the link included in the second link status TLV and the second link status TLV. The second cost value of the link.
  • the second notification message includes a second energy saving factor TLV and a second node status TLV.
  • the second device identifies the second energy saving factor TLV and the second node status TLV in the second notification message, and obtains the second energy saving factor TLV and the second node status TLV from the second notification message. Select the second energy-saving factor TLV from the energy-saving factor TLV and the second node status TLV.
  • the second advertisement message includes the second energy saving factor TLV and the second link status TLV.
  • the second device identifies the second energy saving factor TLV and the second link status TLV in the second advertisement message, and obtains the second energy saving factor TLV and the second link status TLV from the second advertisement message.
  • network device 2 receives a second advertisement message sent by network device 5.
  • the second advertisement message includes identification information of link 1 with network device 5 as the endpoint and a second cost value of link 1. “1.5” as well as the identification information of link 2 ending with network device 5 and the second cost value of link 2 “1.5”.
  • network device 2 also obtains the cost value of link 3 as "2”, and assumes that network device 2 has routing information stored on it.
  • the destination device indicated by the routing information is destination device 2, but the next destination indicated by the routing information is The hop device is network device 5.
  • Network device 2 is based on the address and chain of destination device 2.
  • the second cost value "0.5" of link 2, the first cost value "0.5” of link 1 and the cost value "2" of link 3 are used to calculate the transmission path that can reach the destination device 2.
  • the transmission path passes through the network device 5 , network device 6 and network device 7. That is to say, the transmission path passes through link 2 and link 1 with network device 5 as the end.
  • Network device 2 uses this routing information as the fourth routing information, and the next hop device indicated by the fourth routing information is network device 5.
  • Replace network device 3. Referring to Figure 10, when network device 2 receives network traffic 2, the destination device of network traffic 2 is destination device 2.
  • Network device 2 sends network traffic 2 to network device 3 based on the fourth routing information, and network device 3 then sends the network traffic 2 to the destination device 2.
  • Device 2 sends network traffic 2.
  • the relationship between the first device and the second device is the above-mentioned second relationship or the third relationship.
  • the second device receives the second notification message based on the second notification message and the second network traffic.
  • the destination address establishes a transmission path for the second network traffic, and the transmission path for the second network traffic does not pass through the first device.
  • the relationship between the first device and the second device is the above-mentioned second relationship
  • the second device and the first device are devices in two different AS domains
  • the second device has a message forwarding function.
  • the second network traffic is network traffic currently being transmitted by the second device and whose transmission path passes through the first device.
  • the second network traffic is network traffic that requires the second device to establish a transmission path
  • the second device is the head node of the transmission path. After the second device establishes a transmission path for the second network traffic, when receiving the second network traffic, the second device uses the transmission path to forward the received second network traffic. or,
  • the second device is the controller
  • the second network traffic is network traffic that requires the controller to establish a transmission path
  • the second network traffic is Network traffic currently being transmitted in the communication network and whose transmission path passes through the first device.
  • the controller After the controller establishes the transmission path of the second network traffic, the controller delivers the transmission path.
  • the network device receives the second network traffic, it forwards the received second network traffic to the next hop device, and the next hop device is a node on the transmission path.
  • the second advertisement message indicates that the energy type of the energy supplied by the first device is the second energy type, or the second advertisement message indicates that the energy type corresponding to the first routing information stored on the first device is the second energy type.
  • the process of the second device establishing the transmission path of the second network traffic is.
  • the second device determines, based on the second notification message, that the energy type of the energy supplied by the first device is the second energy type. Select a network traffic whose transmission path passes through the first device as the second network traffic, or select the network traffic that needs to establish a transmission path as the second network traffic. Based on the destination address of the second network traffic, a transmission path of the second network traffic that does not pass through the first device is established, and the transmission path is used as the transmission path of the second network traffic.
  • the second device when the second device is a network device with a packet forwarding function, the second device selects one network traffic as the second network traffic from the network traffic that is being transmitted on the second device and whose transmission path passes through the first device. , and/or, select one network flow as the second network flow from the network flow that requires the second device to establish a transmission path.
  • the second device when the second device is a controller, the second device selects a network traffic as the second network traffic from the network traffic that is being transmitted in the communication network and whose transmission path passes through the first device, and/or, from the network traffic that requires the second The device selects one network flow among the network flows used to establish a transmission path as the second network flow.
  • the controller receives a second notification message sent by the network device 5, and the second notification message indicates that the second energy type of the network device 5 is coal power energy. Based on the second notification message, the controller determines that the energy type of the power supply energy of the network device 5 is coal power energy.
  • the destination address of the network traffic 2 is the address of the destination device 2, and the transmission path of the network traffic 2 passes through the network device 5.
  • Controller based on network traffic 2 The destination address establishes a transmission path between source device 2 and destination device 2.
  • the nodes on the transmission path include network device 1, network device 2, network device 3, network device 4 and network device 7. The transmission path does not pass through network devices. 5.
  • the first device may use the above method 1 to cause the second notification message to indicate that the energy type of the energy supplied by the first device is the second energy type.
  • the second advertisement message includes a second newly added router attribute field, and the second newly added router attribute field includes the first energy type.
  • the second device determines that the energy type of the power supply energy of the first device is the second energy type based on the second new router attribute field included in the second advertisement message.
  • the controller receives a second notification message sent by the network device 5.
  • the second notification message includes a second newly added router attribute field, and the second newly added router attribute field includes the second energy source of the network device 5.
  • the type is coal power energy.
  • the controller determines that the energy type of the power supply energy of the network device 5 is coal power energy.
  • the first device may use the above method 2 to cause the second notification message to indicate that the energy type of the energy supplied by the first device is the second energy type.
  • the second notification message includes a second color field, and the value of the second color field is the second value.
  • the second device parses the second value from the second color field included in the second notification message, and determines based on the second value that the energy type of the energy supplied by the first device is the second energy type.
  • the controller receives a second notification message sent by the network device 5.
  • the second notification message includes a second color field, and the value of the second color field is "4". Based on the value "4" of the second color field included in the second notification message, the controller determines that the energy type of the power supply energy of the network device 5 is coal power energy.
  • the first device may use the above method 3 to cause the second notification message to indicate that the energy type of the energy supplied by the first device is the second energy type.
  • the second notification message includes a second AS-Path field, and the second device determines the second energy type of the power supply energy of the first device based on the length of the AS number included in the second AS-Path field.
  • the second device identifies the second AS-Path field in the second advertisement message, and obtains the length of the second AS-Path field as the length of the AS number.
  • the controller receives a second notification message sent by network device 5.
  • the second notification message includes a second AS-Path field
  • the second AS-Path field includes 300, 300, 300, 300, 300
  • the length of the AP-Path field is equal to four times the specified length.
  • the controller identifies the second AS-Path field in the second advertisement message and obtains the length of the second AS-Path field as the length of the AS number.
  • the length of the AS number is four times the specified length. Based on the length of the AS number, it is determined that the second energy type of the power supply energy of the network device 5 is coal power energy.
  • the process of the second device establishing the transmission path of the second network traffic is:
  • the second device determines the routing information indicated by the second advertisement message based on the second advertisement message, and determines that the energy type corresponding to the routing information is the second energy type.
  • the routing information is the routing information saved on the first device.
  • the second device selects the network traffic transmitted using the routing information as the second network traffic, and the destination device of the second network traffic is the same as the destination device indicated by the routing information.
  • a transmission path of the second network traffic that does not pass through the first device is established based on the destination address of the second network traffic.
  • the second device selects, from the network traffic that requires the second device to establish a transmission path, the network traffic whose destination device is the same as the destination device indicated by the path information as the second network traffic, and based on the destination address of the second network traffic, establishes a different network traffic.
  • the transmission path of the second network traffic passing through the first device.
  • the second device when the second device is a network device with a packet forwarding function, the second device selects the network traffic transmitted using the routing information as the second network traffic from the network traffic being transmitted on the second device. Or, when the second device is the controller, the second device selects a network for transmission using the routing information from network traffic being transmitted in the communication network. traffic as secondary network traffic.
  • the first device may use the above method a to cause the second advertisement message to indicate that the energy type corresponding to the routing information stored on the first device is the second energy type.
  • the second advertisement message includes a second path attribute field
  • the second path attribute field includes second routing information
  • the second routing information includes the second energy type.
  • the second device reads the second routing information from the second advertisement message, and determines that the energy type corresponding to the second routing information is the second energy type based on the second energy type included in the second routing information.
  • the first device may use the above method b to cause the second advertisement message to indicate that the energy type corresponding to the routing information stored on the first device is the second energy type.
  • the community attribute of the second advertisement message indicates that the energy type corresponding to the first routing information is the second energy type.
  • the second device parses the second community attribute value and the first routing information from the second community attribute field of the second advertisement message.
  • the second community attribute value corresponds to the second energy type, and uses the energy type corresponding to the first routing information. Determine the second energy type corresponding to the second community attribute value.
  • the relationship between the first device and the second device is the above-mentioned first relationship, and the first device and the second device are devices in the same AS domain.
  • the second device is a network device with a message forwarding function in the communication network
  • the second device includes fourth routing information
  • the next hop device indicated by the fourth routing information is the first device or the next hop.
  • the device includes routing information that can reach the first device.
  • the destination device indicated by the fourth routing information is the same as the destination device of the second network traffic.
  • the second network traffic is network traffic to be forwarded by the second device.
  • step 406 when the second device detects that the duration of not receiving the first advertisement message reaches the specified duration threshold, it replaces the next hop device indicated by the fourth routing information with the fourth device.
  • the fourth device is not The first device or the fourth device does not include routing information that can reach the first device, so that the transmission path for transmitting the second network traffic does not pass through the first device.
  • network device 5 changes from hydropower energy to coal power energy
  • network device 5 stops sending the first notification to network device 2 message.
  • network device 2 stores routing information.
  • the destination device indicated by the routing information is destination device 2, but the next-hop device indicated by the routing information is network device 5.
  • the network device 2 uses the routing information as the fourth routing information, and uses the next hop device indicated by the fourth routing information by the network.
  • Device 5 replaces network device 3.
  • the network device 2 when the network device 2 receives the network traffic 2 sent by the source device 2 to the destination device 2, the network device 2 sends the network traffic 2 to the network device 3 based on the fourth routing information, and the network device 3 then sends the network traffic 2 to the destination device 2.
  • the relationship between the first device and the second device is the second relationship described above.
  • the second device and the first device are devices in two different AS domains, and the second device is a network device with a message forwarding function.
  • the second device detects that the duration of not receiving the first notification message reaches the specified duration threshold, the second device selects the network traffic currently being transmitted by the second device and whose transmission path passes through the first device as the second network traffic.
  • the second device selects the second network traffic from the network traffic that requires the second device to establish a transmission path. Establishing a transmission path of the second network flow based on the destination address of the second network flow. or,
  • the relationship between the first device and the second device is the case of the third relationship described above, and the second device is the controller.
  • the second device detects that the duration of not receiving the first notification message reaches the specified duration threshold, the second device selects the network traffic currently being transmitted in the communication network and whose transmission path passes through the first device as the second network traffic. Or, the second device The second network traffic is selected from network traffic requiring the second device to establish a transmission path. Establishing a transmission path of the second network flow based on the destination address of the second network flow.
  • the power supply energy of network device 5 changes from hydropower energy to coal power energy.
  • the network device 5 stops sending the first notification message to the controller.
  • the network traffic 2 is the traffic sent by the source device 2 to the destination device 2, and the transmission path of the network traffic 2 passes through the network device 5.
  • the controller when the controller does not receive the first notification message sent by the network device 5 and the duration reaches the specified duration threshold, the controller establishes a link between the source device 2 and the destination device 2 based on the destination address of the network flow 2. Transmission path, the nodes on this transmission path include network device 1, network device 2, network device 3, network device 4 and network device 7. This transmission path does not pass through network device 5.
  • the network traffic passing through the first device becomes less and less, and even no network traffic passes through the first device. equipment.
  • the first device shuts down or sleeps, thereby reducing energy consumption.
  • the time length of the first time period is a specified first time length.
  • the first device is turned on periodically.
  • the controller may control the first device to turn on when the first device needs to be turned on. For example, when a large amount of network traffic needs to be transmitted in the communication network, the controller controls the first device to turn on.
  • the network device and/or controller in the communication network can sense that the first device is powered on. Therefore, within a set period of time after the first device is powered on, a network device in the communication network may send network traffic to the first device, and the first device will receive the network traffic. Alternatively, within a set time period after the first device is powered on, the network device in the communication network may not send network traffic to the first device, and the first device may not receive network traffic within the set time period.
  • the starting time of the set time period is the power-on time of the first device, and the time length of the set time period is a specified second time length.
  • the first device if the first device receives network traffic within a set time period after being powered on, the first device remains powered on. In this way, the first device forwards the received network traffic to avoid affecting the transmission of the network traffic.
  • the first device if the first device does not receive network traffic within a set time period after being powered on, the first device shuts down or goes to sleep at the end of the set time period, thereby continuing to reduce energy consumption.
  • the first device periodically determines the energy type of the energy supplied by the first device, and sends a first notification message when the determined energy type is the first energy type.
  • the first notification message indicates the first energy type.
  • Type the first energy type is renewable energy.
  • the second device receives the first notification message and determines a transmission path of the first network traffic based on the first notification message. The transmission path of the first network traffic passes through the first device. In this way, the second device can aggregate as much network traffic in the communication network as possible to the first device.
  • the first device forwards as much network traffic in the communication network as possible, and because the power supply energy of the first device is renewable energy, This not only reduces the energy consumption of the communication network, but also increases the utilization rate of renewable energy, making the communication network more low-carbon and environmentally friendly.
  • the energy type determined by the first device changes from the first energy type to the second energy type, indicating that the renewable energy may be unstable or stop supplying renewable energy to the first device
  • the first device sends a second notification message, and the second The notification message indicates the second energy type, and the second energy type is non-renewable energy.
  • the second device receives the second advertisement message and determines the transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device, thereby restoring the original routing function.
  • an embodiment of the present application provides a communication device 1300.
  • the device 1300 is applied to a network system including the device 1300 and a second device.
  • the device 1300 and the second device in the network system are shown in Figure 1, Figure 2, Figure 3, Figure 7, Figure 8, Devices in the communication network 100 shown in Figure 10 or Figure 11.
  • the device 1300 is the first device in the method 400 shown in Figure 4, Figure 5 or Figure 6.
  • the device 1300 includes: a processor 1301, a memory 1302, an internal connection 1303 and a network interface 1304.
  • the processor 1301, the memory 1302 and the network interface 1304 are connected through an internal connection 1303.
  • the operating system and program code are stored in the memory 1302.
  • the at least one processor 1301 reads the operating system from the memory 1302 and runs the operating system.
  • the internal connection 1303 includes a bus.
  • the network interface 1304 can communicate with the second device 102 in the method 400 shown in FIG. 4, FIG. 5, or FIG. 6 or FIG. 7.
  • At least one processor 1301 reads program code from the memory 1302, and runs the program code in the operating system to determine the energy type of the energy supplied by the device 1300 and/or obtain a notification message indicating the energy type (Fig. 4. The first notification message and/or the second notification message in the method 400 shown in Figure 5 or Figure 6). And/or, at least one processor 1301 sends the notification message through the network interface 1304.
  • the above-mentioned processor 1301 may be a general central processing unit (CPU), a network processor (NP), a microprocessor, or an application-specific integrated circuit (ASIC). , or one or more integrated circuits used to control the execution of the program of this application.
  • CPU central processing unit
  • NP network processor
  • ASIC application-specific integrated circuit
  • the internal connection 1303 includes a path for transmitting information between the components.
  • the internal connection 1303 may be a single board or a bus, etc.
  • the above-mentioned memory 1302 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types that can store information and instructions.
  • type of dynamic storage device which may also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disc Storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store the desired program code in the form of instructions or data structures and can be used by Any other media accessible by a computer, but not limited to this.
  • the memory may exist independently and be connected to the processor through a bus. Memory may also be integrated with the processor.
  • the processor 1301 may include one or more CPUs, such as CPU0 and CPU1 in Figure 13 .
  • the detection device 1300 may include multiple processors, such as processor 1301 and processor 1307 in Figure 13 . Each of these processors may be a single-CPU processor or a multi-CPU processor.
  • a processor here may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • the process of determining the energy type and/or obtaining the notification message may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software When implemented using software, it can be implemented in whole or in part in the form of a computer program product.
  • the computer product is a software that implements a communication method and is used to be installed in Figures 1, 2, 3, 7, and 8 , on the device in the communication network 100 shown in Figure 10 or Figure 11, or installed on the first device in the method 400 shown in Figure 4, Figure 5 or Figure 6.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
  • the computer instructions may be transmitted either from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website, computer, server, or data center over wires (e.g., coaxial cables, fiber optics, Digital Subscriber Line (DSL) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website, computer, server or data center.
  • 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, data center, etc. that contains one or more available media integrated.
  • the available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk (SSD)), etc.
  • an embodiment of the present application provides a communication device 1400.
  • the device 1400 is applied to a network system including the first device and the device 1400.
  • the first device and the device 1400 in the network system are shown in Figure 1, Figure 2, Figure 3, Figure 7, Figure 8, Devices in the communication network 100 shown in Figure 10 or Figure 11.
  • the device 1400 is the second device in the method 400 shown in Figure 4, Figure 5 or Figure 6.
  • the device 1400 includes: a processor 1401, a memory 1402, an internal connection 1403, and a network interface 1404.
  • the processor 1401, the memory 1402 and the network interface 1404 are connected through an internal connection 1403.
  • the operating system and program code are stored in the memory 1402.
  • the at least one processor 1401 reads the operating system from the memory 1402 and runs the operating system.
  • the internal connection 1403 includes a bus.
  • the network interface 1404 can communicate with the first device 102 in the method 400 shown in FIG. 4, FIG. 5, or FIG. 6 or FIG. 7.
  • the network interface 1404 is used to receive a notification message (the first notification message and/or the second notification message in the method 400 shown in Figure 4, Figure 5 or Figure 6.
  • the first notification message indicates the power supply of the first device.
  • the first energy type, the second notification message indicates the second energy type of the power supply energy of the first device).
  • At least one processor 1401 reads the program code from the memory 1402, and determines the transmission path of the first network traffic based on the first notification message by running the program code in the operating system.
  • the transmission path of the first network traffic passes through the first The device, and/or, determines a transmission route of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device.
  • the processor 1401 may be a general central processing unit (CPU), a network processor (NP), a microprocessor, or an application-specific integrated circuit (ASIC). , or one or more integrated circuits used to control the execution of the program of this application.
  • CPU central processing unit
  • NP network processor
  • ASIC application-specific integrated circuit
  • the internal connection 1403 includes a path for transmitting information between the components.
  • the internal connection 1403 may be a single board or a bus, etc.
  • the above-mentioned memory 1402 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types of static storage devices that can store information and instructions.
  • type of dynamic storage device which may also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory, CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store instructions or data
  • EEPROM electrically erasable programmable read-only memory
  • CD-ROM compact disc read-only memory
  • optical disc storage including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.
  • magnetic disk storage media or other magnetic storage devices, or can be used to carry or store instructions or data
  • any other medium that may be in
  • the processor 1401 may include one or more CPUs, such as CPU0 and CPU1 in Figure 14.
  • the detection device 1400 may include multiple processors, such as processor 1401 and processor 1407 in Figure 14 .
  • processors may be a single-CPU processor or a multi-CPU processor.
  • a processor here may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • the process of determining the energy type and/or obtaining the notification message may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software When implemented using software, it can be implemented in whole or in part in the form of a computer program product.
  • the computer product is a software that implements a communication method and is used to be installed in Figures 1, 2, 3, 7, and 8 , on the device in the communication network 100 shown in Figure 10 or Figure 11, or installed on the second device in the method 400 shown in Figure 4, Figure 5 or Figure 6.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
  • the computer instructions may be transmitted either from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website, computer, server, or data center over wires (e.g., coaxial cables, fiber optics, Digital Subscriber Line (DSL) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website, computer, server or data center.
  • 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, data center, etc. that contains one or more available media integrated.
  • the available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk (SSD)), etc.
  • an embodiment of the present application provides a communication device 1500.
  • the device 1500 is applied to a network system including the device 1500 and a second device.
  • the device 1500 and the second device in the network system are Devices in the communication network 100 shown in Figure 1, Figure 2, Figure 3, Figure 7, Figure 8, Figure 10 or Figure 11 .
  • the device 1500 is deployed on the first device in the method 400 shown in Figure 4, Figure 5 or Figure 6.
  • the device 1500 includes a processing module 1501 and a communication module 1502.
  • the processing module 1501 is used to determine the first energy type of the energy supplied by the device 1500.
  • the device 1500 is a network device with a message forwarding function in the communication network, and the first energy type is renewable energy;
  • the communication module 1502 is configured to send a first notification message, where the first notification message indicates the first energy type.
  • the processing module 1501 determines the detailed implementation process of the first energy type. Please refer to the relevant content in step 401 of the method 400 shown in Figure 4, which will not be described in detail here.
  • the communication module 1502 is also used to:
  • a second notification message is sent.
  • the second energy type is non-renewable energy
  • the second notification message indicates the second energy type.
  • the first notification message includes identification information of a link with the device 1500 as an endpoint and a first cost value of the link, where the first cost value corresponds to the first energy type.
  • the first notification message is an Interior Gateway Protocol IGP message.
  • the first notification message includes a link status type length value TLV or a node status TLV.
  • the first cost value is carried in the link status TLV or the node status. in TLV.
  • the first notification message is an IGP message
  • the first notification message includes an energy saving factor TLV
  • the energy saving factor TLV is an extended TLV
  • the energy saving factor TLV includes the first cost value
  • the communication module 1502 is also configured to send a second notification message when the energy type of the power supply energy of the device 1500 changes from the first energy type to the second energy type.
  • the second energy type is non-renewable energy.
  • the second notification message The message indicates the second energy type.
  • the second advertisement message is an IGP message.
  • the second advertisement message includes identification information of the link and a second cost value.
  • the second cost value corresponds to the second energy type.
  • the device 1500 and the second device are devices in the same autonomous system AS domain.
  • the first advertisement message is a Border Gateway Protocol BGP message
  • the first advertisement message is used to carry device attributes
  • the first advertisement message includes a first newly added router attribute field
  • the first newly added router attribute field includes The first type of energy.
  • the communication module 1502 is also configured to send a second notification message when the energy type of the energy supplied by the device 1500 changes from the first energy type to the second energy type, and the second energy type is non-renewable energy.
  • the second advertisement message indicates the second energy type
  • the second advertisement message is a BGP message
  • the second advertisement message is used to carry the device attributes
  • the second advertisement message includes the second new router attribute field
  • the second New router attribute fields include the second energy type.
  • the first advertisement message is a Border Gateway Protocol BGP message, and the first advertisement message is used to carry the Segment Routing Interconnection Protocol version 6 policy SRv6 Policy.
  • the first advertisement message includes a first color field, and a first The color field includes the first energy type.
  • the communication module 1502 is also configured to send a second notification message when the energy type of the energy supplied by the device 1500 changes from the first energy type to the second energy type, and the second energy type is non-renewable energy.
  • the second advertisement message indicates the second energy type
  • the second advertisement message is a BGP message
  • the second advertisement message is used to carry SRv6 Policy
  • the second advertisement message includes a second color field
  • the second color field includes the Two energy types.
  • the first advertisement message is a BGP message
  • the first advertisement message includes a first path attribute field
  • the first path attribute field includes first routing information
  • the first routing information includes a first energy type
  • the first route The information is routing information saved on the device 1500 .
  • the communication module 1502 is also configured to send a second notification message when the energy type of the energy supplied by the device 1500 changes from the first energy type to the second energy type, and the second energy type is non-renewable energy.
  • the second notification message refers to indicates the second energy type.
  • the second advertisement message is a BGP message.
  • the second advertisement message includes a second path attribute field.
  • the second path attribute field includes second routing information.
  • the second routing information includes the second energy type and the second routing information. Contents other than the first energy type in a routing information.
  • the first advertisement message is a BGP message
  • the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the first energy type
  • the first routing information is stored on the device 1500 routing information.
  • the communication module 1502 is also configured to send a second notification message when the energy type of the energy supplied by the device 1500 changes from the first energy type to the second energy type, and the second energy type is non-renewable energy.
  • the second advertisement message indicates the second energy type
  • the second advertisement message is a BGP message
  • the community attribute of the second advertisement message indicates that the energy type corresponding to the first routing information is the second energy type.
  • the first advertisement message is a BGP message.
  • the first advertisement message is used to advertise routes to neighbors.
  • the first autonomous system path AS-Path field of the first advertisement message includes m identical AS numbers, m is a multiple value corresponding to the first energy type, m is an integer greater than 0, and the AS number is used to identify the AS domain where the device is located.
  • the communication module 1502 is also configured to send a second notification message when the energy type of the energy supplied by the device 1500 changes from the first energy type to the second energy type, and the second energy type is non-renewable energy.
  • the second advertisement message indicates the second energy type
  • the second advertisement message is a BGP message
  • the second advertisement message is used to announce routes to neighbors
  • the second AS-Path field of the second advertisement message includes n
  • the AS number, n is a multiple value corresponding to the second energy type, n is an integer greater than 0, and m is not equal to n.
  • the apparatus 1500 and the second device are devices in two different AS domains.
  • the device 1500 embodiment described in Figure 15 is only illustrative.
  • the division of modules is only a logical function division. In actual implementation, there may be other division methods, for example, multiple modules may be combined or Integrated into another system, or some features can be ignored, or not implemented.
  • Each functional module in each embodiment of the present application can be integrated into one module, or each module can exist physically alone, or two or more modules can be integrated into one module.
  • Each of the above-mentioned modules in Figure 15 can be implemented in the form of hardware or in the form of software function modules.
  • the above-mentioned processing module 1501 and communication module 1502 can be implemented as software function modules generated by at least one processor 1301 in FIG. 13 after reading the program code stored in the memory 1302.
  • each of the above modules in Figure 15 can also be implemented by different hardware in the device 1300.
  • the processing module 1501 is implemented by a part of the processing resources of at least one processor 1301 in Figure 13 (for example, one core in a multi-core processor), and
  • the communication module 1502 uses the network interface 1304 of FIG. 13 and the remaining processing resources of at least one processor 1301 (such as other cores in a multi-core processor), or uses a field-programmable gate array (Field-Programmable Gate Array, FPGA) , or coprocessor and other programmable devices to complete.
  • the above functional modules can also be implemented by a combination of software and hardware.
  • the communication module 1502 is implemented by a hardware programmable device, and the processing module 1501 is a software function module generated by the CPU after reading the program code stored in the memory 1302. .
  • the processing module determines the first energy type of the energy supplied by the device, the device is For network equipment with a message forwarding function in a communication network, the first energy type is renewable energy.
  • the communication module sends a first notification message, and the first notification message indicates the first energy type. Since the first notification message indicates the first energy type, for the second device that receives the first notification message, the second device can learn that the energy type of the energy supplied by the device is the first energy type based on the first notification message. The second device can use the device to forward more network traffic.
  • the first energy type is renewable energy. This not only reduces the energy consumption of the communication network, but also improves the utilization rate of renewable energy, making the communication network low-carbon and environmentally friendly. .
  • an embodiment of the present application provides a communication device 1600.
  • the device 1600 is applied to a network system including a first device and the device 1600.
  • the first device and the device 1600 in the network system are Devices in the communication network 100 shown in Figure 1, Figure 2, Figure 3, Figure 7, Figure 8, Figure 10 or Figure 11 .
  • the device 1600 is deployed on the second device in the method 400 shown in Figure 4, Figure 5 or Figure 6.
  • the device 1600 includes a communication module 1601 and a processing module 1604.
  • the communication module 1601 is configured to receive a first notification message.
  • the first notification message indicates that the energy type of the power supply energy of the first device is the first energy type, the first energy type is renewable energy, and the first device is in the communication network.
  • Network equipment with message forwarding function ;
  • the processing module 1602 is configured to determine a transmission path of the first network traffic based on the first notification message, and the transmission path of the first network traffic passes through the first device.
  • the communication module 1601 is also configured to receive a second notification message, the second notification message indicates that the energy type of the power supply energy of the first device is the second energy type, and the second energy type is non-renewable energy;
  • the processing module 1602 is also configured to determine a transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device.
  • the processing module 1602 determines the detailed implementation process of the transmission path of the second network traffic. Please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
  • the first advertisement message includes identification information of a link with the first device as an endpoint and a first cost value of the link, where the first cost value corresponds to the first energy type.
  • the first notification message is an Interior Gateway Protocol IGP message.
  • the first notification message includes a link status type length value TLV or a node status TLV.
  • the first cost value is carried in the link status TLV or the node status. in TLV.
  • the first advertisement message is an Interior Gateway Protocol IGP message
  • the first advertisement message includes an energy saving factor TLV
  • the energy saving factor TLV is an extended TLV
  • the energy saving factor TLV includes the first cost value
  • the communication module 1601 is also configured to receive a second notification message.
  • the second notification message indicates that the energy type of the energy supplied by the first device is a second energy type, and the second energy type is non-renewable energy.
  • the advertisement message is an IGP message, and the second advertisement message includes identification information of the link and a second cost value, and the second cost value corresponds to the second energy type;
  • the processing module 1602 is also configured to determine a transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device.
  • the processing module 1602 determines the detailed implementation process of the transmission path of the second network traffic. Please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
  • the first device and the device 1600 are devices in the same autonomous system AS domain.
  • the first advertisement message is a Border Gateway Protocol BGP message
  • the first advertisement message is used to carry device attributes
  • the first advertisement message includes a first newly added router attribute field
  • the first newly added router attribute field includes The first type of energy.
  • the communication module 1601 is also configured to receive a second notification message.
  • the second notification message indicates that the energy type of the energy supplied by the first device is a second energy type, and the second energy type is non-renewable energy.
  • the advertisement message is a BGP message, and the second advertisement message is used to carry attributes of the device.
  • the second advertisement message includes a second new router attribute field, and the second new router attribute field includes a second energy type;
  • the processing module 1602 is also configured to determine a transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device.
  • the processing module 1602 determines the detailed implementation process of the transmission path of the second network traffic. Please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
  • the first advertisement message is a Border Gateway Protocol BGP message, and the first advertisement message is used to carry the Segment Routing Interconnection Protocol version 6 policy SRv6 Policy.
  • the first advertisement message includes a first color field, and a first The color field includes the first energy type.
  • the communication module 1601 is also configured to receive a second notification message.
  • the second notification message indicates that the energy type of the energy supplied by the first device is a second energy type, and the second energy type is non-renewable energy.
  • the notification message is a BGP message, and the second notification message is used to carry the SRv6 Policy.
  • the second notification message includes a second color field, and the second color field includes the second energy type;
  • the processing module 1602 is also configured to determine a transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device.
  • the processing module 1602 determines the detailed implementation process of the transmission path of the second network traffic. Please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
  • the first advertisement message is a BGP message
  • the first advertisement message includes a first path attribute field
  • the first path attribute field includes first routing information
  • the first routing information includes a first energy type
  • the first route The information is routing information saved on the first device.
  • the communication module 1601 is also configured to receive a second notification message.
  • the second notification message indicates that the energy type of the energy supplied by the first device is a second energy type, and the second energy type is non-renewable energy.
  • the advertisement message is a BGP message.
  • the second advertisement message includes a second path attribute field.
  • the second path attribute field includes second routing information.
  • the second routing information includes a second energy type and the first energy source in the first routing information. Content outside the genre;
  • the processing module 1602 is also configured to determine a transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device.
  • the processing module 1602 determines the detailed implementation process of the transmission path of the second network traffic. Please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
  • the first advertisement message is a BGP message
  • the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the first energy type
  • the first routing information is a route saved on the first device. information.
  • the communication module 1601 is also configured to receive a second notification message.
  • the second notification message indicates that the energy type of the energy supplied by the first device is a second energy type, and the second energy type is non-renewable energy.
  • the advertisement message is a BGP message, and the community attribute of the second advertisement message indicates that the energy type corresponding to the first routing information is the second energy type;
  • the processing module 1602 is also configured to determine a transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device.
  • the processing module 1602 determines the detailed implementation process of the transmission path of the second network traffic. Please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
  • the first advertisement message is a BGP message.
  • the first advertisement message is used to advertise routes to neighbors.
  • the first autonomous system path AS-Path field of the first advertisement message includes m identical autonomous system AS numbers. , m is a multiple value corresponding to the first energy type, m is an integer greater than 0, and the AS number is used to identify the AS domain where the first device is located.
  • the communication module 1601 is also configured to receive a second notification message.
  • the second notification message indicates that the energy type of the energy supplied by the first device is a second energy type, and the second energy type is non-renewable energy.
  • the advertisement message is a BGP message.
  • the second advertisement message is used to announce routes to neighbors.
  • the second AS-Path field of the second advertisement message includes n AS numbers, and n is the multiple corresponding to the second energy type. Numeric value, n is an integer greater than 0, m is not equal to n;
  • the processing module 1602 is also configured to determine a transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device.
  • step 405 of the method 400 shown in Figure 4 please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
  • the first device and the apparatus 1600 are devices in two different AS domains.
  • the device 1600 is a network device with a message forwarding function in a communication network.
  • the device 1600 includes third routing information, and the next hop device indicated by the third routing information is not the first device or the next hop.
  • the device does not include routing information that can reach the first device, and the destination device indicated by the third routing information is the same as the destination device of the first network traffic.
  • the processing module 1602 is configured to replace the next hop device indicated by the third routing information with a third device based on the first advertisement message.
  • the third device is the first device or the third device includes a route that can reach the first device. information.
  • the processing module 1602 replaces the next hop device indicated by the third routing information with the third device.
  • the processing module 1602 replaces the next hop device indicated by the third routing information with the third device.
  • the device 1600 is a network device with a message forwarding function in a communication network.
  • the device 1600 includes fourth routing information, and the next-hop device indicated by the fourth routing information is the first device or the next-hop device.
  • the hop device includes routing information that can reach the first device, and the destination device indicated by the fourth routing information is the same as the destination device of the second network traffic.
  • Processing module 1602 configured to replace the next hop device indicated by the fourth routing information with a fourth device based on the second advertisement message.
  • the fourth device is not the first device or the fourth device does not include routing information that can reach the first device. .
  • the processing module 1602 replaces the next hop device indicated by the fourth routing information with the fourth device.
  • the processing module 1602 replaces the next hop device indicated by the fourth routing information with the fourth device.
  • the processing module 1602 is configured to establish a transmission path of the first network traffic based on the first advertisement message and the destination address of the first network traffic.
  • the processing module 1602 is configured to establish a transmission path of the second network traffic based on the second advertisement message and the destination address of the second network traffic.
  • step 405 or step 406 of the method 400 shown in Figure 4 please refer to the relevant content in step 405 or step 406 of the method 400 shown in Figure 4, which will not be described in detail here.
  • the device 1600 is a controller or the device is a head node of a transmission path of the first network traffic.
  • the device 1600 embodiment described in Figure 16 is only illustrative.
  • the division of modules is only a logical function division. In actual implementation, there may be other division methods, for example, multiple modules may be combined or Integrated into another system, or some features can be ignored, or not implemented.
  • Each functional module in each embodiment of the present application can be integrated into one module, or each module can exist physically alone, or two or more modules can be integrated into one module.
  • Each of the above-mentioned modules in Figure 16 can be implemented in the form of hardware or in the form of software function modules.
  • the communication module 1601 and the processing unit 1602 may be implemented as software function modules generated by at least one processor 1401 in FIG. 14 after reading the program code stored in the memory 1402.
  • each of the above-mentioned modules in Figure 16 can also be implemented by different hardware in the device 1400.
  • the processing module 1602 is implemented by a part of the processing resources in at least one processor 1401 in Figure 14 (for example, one core in a multi-core processor), and The communication module 1601 uses the network interface 1404 of Figure 14 and the remaining processing resources of at least one processor 1401 (such as other cores in a multi-core processor), or uses a field-programmable gate array (Field-Programmable Gate Array, FPGA) , or coprocessor and other programmable devices to complete.
  • the above functional modules can also be implemented by a combination of software and hardware.
  • the communication module 1601 is implemented by a hardware programmable device
  • the processing module 1602 is a software function module generated by the CPU after reading the program code stored in the memory 1402. .
  • the communication module receives the first notification message, and the first notification message indicates that the energy type of the energy supplied by the first device is the first energy type, and the first energy type is renewable energy.
  • the processing module determines a transmission path of the first network traffic based on the first notification message, and the transmission path of the first network traffic passes through the first device. Since the first notification message indicates the first energy type of the power supply energy of the first device, the transmission path of the first network traffic determined by the processing module based on the first notification message passes through the first device. In this way, the device can use the first device to forward more network traffic.
  • the first energy type is renewable energy, which not only reduces the energy consumption of the communication network, but also improves the utilization rate of renewable energy, making the communication network low-carbon and environmentally friendly. .
  • an embodiment of the present application provides a communication system 1700.
  • the system 1700 includes a device 1300 as shown in Figure 13 and a device 1400 as shown in Figure 14.
  • the system 1700 includes a device as shown in Figure 15.
  • the device 1300 shown in Figure 13 or the device 1500 shown in Figure 15 is the first device 1701.
  • the device 1400 shown in Figure 14 or the device 1600 shown in Figure 16 is the second device 1702.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present application relates to the technical field of communications, and provides a communication method, apparatus and system, and a storage medium. The method comprises: a first device determines a first energy type of power supply energy for the first device, wherein the first device is a network device having a packet forwarding function in a communication network, and the first energy type is renewable energy; and the first device sends a first notification packet, wherein the first notification packet indicates the first energy type. According to the present application, the utilization rate of renewable energy can be improved.

Description

通信方法、装置、系统及存储介质Communication method, device, system and storage medium
本申请要求于2022年3月18日提交的申请号为202210273382.X、发明名称为“通信方法、装置、系统及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application with application number 202210273382. middle.
技术领域Technical field
本申请涉及通信领域,特别涉及一种通信方法、装置、系统及存储介质。The present application relates to the field of communication, and in particular to a communication method, device, system and storage medium.
背景技术Background technique
通信网络中的设备的供电能源分为可再生能源和非可再生能源。目前可再生的电力能源包括风电能源、水电能源和太阳能电力能源。可再生电力能源不需要人力参与,在自然界中可以循环再生。非可再生的电力能源包括煤电能源等,非可再生能源来自于煤炭或石油等化石燃料。The power supply energy for equipment in communication networks is divided into renewable energy and non-renewable energy. Current renewable electricity energy includes wind power energy, hydropower energy and solar power energy. Renewable electric energy does not require human participation and can be recycled in nature. Non-renewable electricity energy includes coal power energy, etc. Non-renewable energy comes from fossil fuels such as coal or petroleum.
通信网络包括大量的设备,其中一部分设备的供电能源是可再生能源,另一部分设备的供电能源是非可再生能源。如果通信网络中的可再生能源利用率高,则会使通信网络变的更低碳环保。因此如何提高可再生能源的利用率,是目前急需要解决的问题。Communication networks include a large number of devices, some of which are powered by renewable energy and some of which are powered by non-renewable energy. If the utilization rate of renewable energy in the communication network is high, the communication network will become lower carbon and environmentally friendly. Therefore, how to improve the utilization rate of renewable energy is an urgent problem that needs to be solved.
发明内容Contents of the invention
本申请提供了一种通信方法、装置、系统及存储介质,以提高可再生能源的利用率。This application provides a communication method, device, system and storage medium to improve the utilization rate of renewable energy.
第一方面,本申请提供了一种通信方法,所述方法应用于包括第一设备和第二设备的网络系统,在所述方法中,第一设备确定第一设备供电能源的第一能源类型,第一设备是通信网络中的具有报文转发功能的网络设备,第一能源类型为可再生能源。第一设备发送第一通告报文,第一通告报文指示第一能源类型。In a first aspect, the present application provides a communication method, which method is applied to a network system including a first device and a second device. In the method, the first device determines a first energy type of the energy supplied by the first device. , the first device is a network device with a message forwarding function in the communication network, and the first energy type is renewable energy. The first device sends a first notification message, and the first notification message indicates the first energy type.
由于第一通告报文指示第一设备供电能源的第一能源类型,其中第一能源类型为可再生能源。这样对于接收到第一通告报文的第二设备,能够基于第一通告报文获知第一设备供电能源的能源类型为第一能源类型,据此来更新第二设备上的路由信息中的下一跳路由,从而使用可再生能源供电的第一设备来转发更多的网络流量,如此不仅降低通信网络的能源消耗,还提高可再生能源的利用率,使得通信网络变的低碳环保。The first notification message indicates the first energy type of the power supply energy of the first device, where the first energy type is renewable energy. In this way, the second device that receives the first notification message can learn that the energy type of the power supply energy of the first device is the first energy type based on the first notification message, and update the routing information on the second device accordingly. One-hop routing uses the first device powered by renewable energy to forward more network traffic. This not only reduces the energy consumption of the communication network, but also improves the utilization of renewable energy, making the communication network low-carbon and environmentally friendly.
在一种可能的实现方式中,在第一设备供电能源的能源类型由第一能源类型变为第二能源类型时,第一设备发送第二通告报文,第二能源类型为非可再生能源,第二通告报文指示第二能源类型。由于第二通告报文指示第一设备供电能源的第二能源类型,这样对于接收第二通告报文的第二设备,能够基于第二通告报文获知第一设备供电能源的能源类型变为非可再生能源,从而基于第二通告报文进行路由恢复。In a possible implementation, when the energy type of the power supply energy of the first device changes from the first energy type to the second energy type, the first device sends a second notification message, and the second energy type is non-renewable energy. , the second notification message indicates the second energy type. Since the second notification message indicates the second energy type of the power supply energy of the first device, the second device that receives the second notification message can learn based on the second notification message that the energy type of the power supply energy of the first device has changed to non- renewable energy, thereby performing route recovery based on the second advertisement message.
在另一种可能的实现方式中,第一通告报文包括以第一设备为端点的链路的标识信息和该链路的第一开销cost值,第一cost值与第一能源类型相对应。这样使第一通告报文指示第 一能源类型。由于第一cost值与第一能源类型相对应,第二设备基于第一cost值,能够将通信网络的网络流量尽可能多的汇聚到第一设备,以提高可再生能源的利用率,使得通信网络变的低碳环保。In another possible implementation, the first advertisement message includes identification information of a link with the first device as an endpoint and a first cost value of the link, where the first cost value corresponds to the first energy type. . This causes the first notification message to indicate the One type of energy. Since the first cost value corresponds to the first energy type, the second device can aggregate as much network traffic of the communication network as possible to the first device based on the first cost value, so as to improve the utilization rate of renewable energy and enable communication. The Internet has become low-carbon and environmentally friendly.
在另一种可能的实现方式中,第一通告报文为内部网关协议IGP报文,第一通告报文包括链路状态类型长度值TLV或节点状态TLV,第一cost值携带在该链路状态TLV或该节点状态TLV中。这样使第一通告报文包括第一cost值,由于第一通告报文为IGP报文,使得第一设备能够向第一设备所在AS域内的其他设备通告第一能源类型。In another possible implementation, the first advertisement message is an interior gateway protocol IGP message, the first advertisement message includes a link status type length value TLV or a node status TLV, and the first cost value is carried on the link Status TLV or the node status TLV. In this way, the first advertisement message includes the first cost value, and since the first advertisement message is an IGP message, the first device can advertise the first energy type to other devices in the AS domain where the first device is located.
在另一种可能的实现方式中,第一通告报文为IGP报文,第一通告报文包括节能因子TLV,该节能因子TLV为扩展的TLV,该节能因子TLV包括第一cost值。这样使第一通告报文包括第一cost值,由于第一通告报文为IGP报文,使得第一设备能够向第一设备所在AS域内的其他设备通告第一能源类型。In another possible implementation manner, the first notification message is an IGP message, the first notification message includes an energy saving factor TLV, the energy saving factor TLV is an extended TLV, and the energy saving factor TLV includes the first cost value. In this way, the first advertisement message includes the first cost value, and since the first advertisement message is an IGP message, the first device can advertise the first energy type to other devices in the AS domain where the first device is located.
在另一种可能的实现方式中,在第一通告报文是IGP报文的情况下,在第一设备供电能源的能源类型由第一能源类型变为第二能源类型时,第一设备发送第二通告报文,第二能源类型为非可再生能源,第二通告报文指示第二能源类型,第二通告报文为IGP报文,第二通告报文包括链路的标识信息和第二cost值,第二cost值与第二能源类型相对应。这样使第二通告报文指示第二能源类型。由于第二cost值与第二能源类型相对应,第二设备基于第二cost值能够进行路由恢复。In another possible implementation, when the first notification message is an IGP message, when the energy type of the power supply energy of the first device changes from the first energy type to the second energy type, the first device sends The second notification message, the second energy type is non-renewable energy, the second notification message indicates the second energy type, the second notification message is an IGP message, the second notification message includes the identification information of the link and the second notification message. Two cost values, the second cost value corresponds to the second energy type. This causes the second advertisement message to indicate the second energy type. Since the second cost value corresponds to the second energy type, the second device can perform route recovery based on the second cost value.
可选地,在上述提及的通过IGP报文通告第一设备供电能源的能源类型的实现方式(例如,上述通过IGP报文中的cost值通告第一设备供电能源的能源类型)中,第一设备和第二设备是同一个自治系统AS域内的设备。Optionally, in the above-mentioned implementation of notifying the energy type of the power supply energy of the first device through the IGP message (for example, the above-mentioned notification of the energy type of the power supply energy of the first device through the cost value in the IGP message), the first The first device and the second device are devices in the same autonomous system AS domain.
在另一种可能的实现方式中,第一通告报文为边界网关协议BGP报文,第一通告报文用于携带设备属性,第一通告报文包括第一新增路由器属性字段,第一新增路由器属性字段包括第一能源类型。这样使第一通告报文指示第一能源类型,第二设备基于第一新增路由器属性字段包括的第一能源类型,能够将通信网络的网络流量尽可能多的汇聚到第一设备,以提高可再生能源的利用率,使得通信网络变的低碳环保。In another possible implementation, the first advertisement message is a Border Gateway Protocol BGP message, the first advertisement message is used to carry device attributes, the first advertisement message includes a first new router attribute field, and the first The new router attribute field includes the first energy type. In this way, the first advertisement message indicates the first energy type, and the second device can aggregate as much network traffic of the communication network as possible to the first device based on the first energy type included in the first newly added router attribute field to improve the efficiency of the communication network. The utilization of renewable energy makes communication networks low-carbon and environmentally friendly.
在另一种可能的实现方式中,在第一设备供电能源的能源类型由第一能源类型变为第二能源类型时,第一设备发送第二通告报文,第二能源类型为非可再生能源,第二通告报文指示第二能源类型,第二通告报文为BGP报文,第二通告报文用于携带该设备属性,第二通告报文包括第二新增路由器属性字段,第二新增路由器属性字段包括第二能源类型。这样使第二通告报文指示第二能源类型。第二设备基于第二新增路由器属性字段包括的第二能源类型能够进行路由恢复。In another possible implementation, when the energy type of the energy supplied by the first device changes from the first energy type to the second energy type, the first device sends a second notification message, and the second energy type is non-renewable. Energy, the second advertisement message indicates the second energy type, the second advertisement message is a BGP message, the second advertisement message is used to carry the attributes of the device, the second advertisement message includes a second new router attribute field, and Two new router attribute fields include the second energy type. This causes the second advertisement message to indicate the second energy type. The second device can perform route recovery based on the second energy type included in the second newly added router attribute field.
在另一种可能的实现方式中,第一通告报文为边界网关协议BGP报文,第一通告报文用 于携带分段路由互联协议第六版策略SRv6 Policy,第一通告报文包括第一颜色字段,第一颜色字段包括第一能源类型。这样使第一通告报文指示第一能源类型,第二设备基于第一颜色字段包括的第一能源类型,能够将通信网络的网络流量尽可能多的汇聚到第一设备,以提高可再生能源的利用率,使得通信网络变的低碳环保。In another possible implementation, the first advertisement message is a Border Gateway Protocol BGP message, and the first advertisement message is For carrying the Segment Routing Interconnection Protocol version 6 policy SRv6 Policy, the first advertisement message includes a first color field, and the first color field includes a first energy type. In this way, the first notification message indicates the first energy type, and the second device can aggregate as much network traffic of the communication network as possible to the first device based on the first energy type included in the first color field to increase renewable energy. The utilization rate makes the communication network low-carbon and environmentally friendly.
在另一种可能的实现方式中,第一新增路由器属性字段和第一颜色字段通过类型Type、类型码Typecode、地址族标志AFI或子地址族标志SAFI进行区分。其中,第一新增路由器属性字段包括的Type和第一颜色字段包括的Type不同,第一新增路由器属性字段包括的Typecode和第一颜色字段包括的Typecode不同,第一新增路由器属性字段包括的AFI和第一颜色字段包括的AFI不同。和/或,第一新增路由器属性字段包括的SAFI和第一颜色字段包括的SAFI不同,这样便于第二设备能够识别第一通告报文中的第一新增路由器属性字段和第一颜色字段。In another possible implementation, the first newly added router attribute field and the first color field are distinguished by type Type, type code Typecode, address family flag AFI or sub-address family flag SAFI. Among them, the Type included in the first newly added router attribute field is different from the Type included in the first color field, the Typecode included in the first newly added router attribute field is different from the Typecode included in the first color field, and the first newly added router attribute field includes The AFI and the AFI included in the first color field are different. And/or, the SAFI included in the first newly added router attribute field and the SAFI included in the first color field are different, so that the second device can identify the first newly added router attribute field and the first color field in the first advertisement message. .
在另一种可能的实现方式中,在第一设备供电能源的能源类型由第一能源类型变为第二能源类型时,第一设备发送第二通告报文,第二能源类型为非可再生能源,第二通告报文指示第二能源类型,第二通告报文为BGP报文,第二通告报文用于携带SRv6 Policy,第二通告报文包括第二颜色字段,第二颜色字段包括第二能源类型。这样使第二通告报文指示第二能源类型,第二设备基于第二颜色字段包括的第二能源类型进行路由恢复。In another possible implementation, when the energy type of the energy supplied by the first device changes from the first energy type to the second energy type, the first device sends a second notification message, and the second energy type is non-renewable. Energy, the second advertisement message indicates the second energy type, the second advertisement message is a BGP message, the second advertisement message is used to carry SRv6 Policy, the second advertisement message includes a second color field, and the second color field includes Second energy type. In this way, the second advertisement message indicates the second energy type, and the second device performs route recovery based on the second energy type included in the second color field.
在另一种可能的实现方式中,第一颜色字段的取值为第一取值,第一取值指示第一能源类型,第二颜色字段的取值为第二取值,第二取值指示第二能源类型。从而使颜色字段指示第一设备供电能源的能源类型。In another possible implementation, the value of the first color field is a first value, the first value indicates the first energy type, the value of the second color field is a second value, and the second value Indicates the secondary energy type. The color field thereby indicates the type of energy source powering the first device.
在另一种可能的实现方式中,第一颜色字段的取值为风电颜色取值,该风电颜色取值指示第一能源类型为风电能源。或者,第一颜色字段的取值为水电颜色取值,该水电颜色取值指示第一能源类型为水电能源。或者,第一颜色字段的取值为太阳能颜色取值,该太阳能颜色取值指示第一能源类型为太阳能电力能源。这样通过第一颜色字段能够指示不同的可再生能源。In another possible implementation, the value of the first color field is a wind power color value, and the wind power color value indicates that the first energy type is wind power energy. Alternatively, the value of the first color field is a hydropower color value, and the hydropower color value indicates that the first energy type is hydropower energy. Alternatively, the value of the first color field is a solar color value, and the solar color value indicates that the first energy type is solar electric energy. This allows different renewable energy sources to be indicated via the first color field.
在另一种可能的实现方式中,第一通告报文为BGP报文,第一通告报文包括第一路径属性字段,第一路径属性字段包括第一路由信息,第一路由信息包括第一能源类型,第一路由信息是第一设备上保存的路由信息。这样使第一通告报文指示第一能源类型,第二设备基于第一路径属性字段包括的第一路由信息,能够将通信网络的网络流量尽可能多的汇聚到第一设备,以提高可再生能源的利用率,使得通信网络变的低碳环保。In another possible implementation, the first advertisement message is a BGP message, the first advertisement message includes a first path attribute field, the first path attribute field includes first routing information, and the first routing information includes first The energy type, the first routing information is the routing information saved on the first device. In this way, the first advertisement message indicates the first energy type, and the second device can aggregate as much network traffic of the communication network as possible to the first device based on the first routing information included in the first path attribute field to improve regeneration. Energy utilization makes communication networks low-carbon and environmentally friendly.
在另一种可能的实现方式中,在第一设备供电能源的能源类型由第一能源类型变为第二能源类型时,第一设备发送第二通告报文,第二能源类型为非可再生能源,第二通告报文指示第二能源类型,第二通告报文为BGP报文,第二通告报文包括第二路径属性字段,第二路径属性字段包括第二路由信息,第二路由信息包括第二能源类型和所述第一路由信息中除所 述第一能源类型之外的内容。这样使第二通告报文指示第二能源类型,第二设备基于第二路径属性字段包括的第二路由信息进行路由恢复。In another possible implementation, when the energy type of the energy supplied by the first device changes from the first energy type to the second energy type, the first device sends a second notification message, and the second energy type is non-renewable. Energy, the second advertisement message indicates the second energy type, the second advertisement message is a BGP message, the second advertisement message includes a second path attribute field, the second path attribute field includes second routing information, and the second routing information including the second energy type and the first routing information except content beyond the first energy type. In this way, the second advertisement message indicates the second energy type, and the second device performs route recovery based on the second routing information included in the second path attribute field.
在另一种可能的实现方式中,第一通告报文为BGP报文,第一通告报文的团体community属性指示第一路由信息对应的能源类型为第一能源类型,第一路由信息为第一设备上保存的路由信息。这样使第一通告报文指示第一能源类型,基于community属性值能够统一管理同一种第一能源类型对应的路由信息的路径优先级,从而提高运维效率。In another possible implementation, the first advertisement message is a BGP message, the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the first energy type, and the first routing information is the first energy type. Routing information saved on a device. In this way, the first advertisement message indicates the first energy type, and the path priority of routing information corresponding to the same first energy type can be uniformly managed based on the community attribute value, thereby improving operation and maintenance efficiency.
在另一种可能的实现方式中,在第一设备供电能源的能源类型由第一能源类型变为第二能源类型时,第一设备发送第二通告报文,第二能源类型为非可再生能源,第二通告报文指示第二能源类型,第二通告报文为BGP报文,第二通告报文的community属性指示第一路由信息对应的能源类型为第二能源类型。这样使第二通告报文指示第二能源类型,基于community属性能够统一管理同第二能源类型对应的路由信息的路径优先级,从而提高运维效率。In another possible implementation, when the energy type of the energy supplied by the first device changes from the first energy type to the second energy type, the first device sends a second notification message, and the second energy type is non-renewable. Energy, the second advertisement message indicates the second energy type, the second advertisement message is a BGP message, and the community attribute of the second advertisement message indicates that the energy type corresponding to the first routing information is the second energy type. In this way, the second advertisement message indicates the second energy type, and the path priority of routing information corresponding to the second energy type can be uniformly managed based on the community attribute, thereby improving operation and maintenance efficiency.
在另一种可能的实现方式中,第一通告报文为BGP报文,第一通告报文用于向邻居宣告路由,第一通告报文的第一自治系统路径AS-Path字段包括m个相同的AS号,m是与第一能源类型相对应的倍数值,m为大于0的整数,该AS号用于标识第一设备所在的AS域。这这样通过AS号的长度来指示第一能源类型,丰富指示第一能源类型的方式。In another possible implementation, the first advertisement message is a BGP message, the first advertisement message is used to announce routes to neighbors, and the first autonomous system path AS-Path field of the first advertisement message includes m For the same AS number, m is a multiple value corresponding to the first energy type, m is an integer greater than 0, and the AS number is used to identify the AS domain where the first device is located. In this way, the first energy type is indicated by the length of the AS number, enriching the way of indicating the first energy type.
在另一种可能的实现方式中,在第一设备供电能源的能源类型由第一能源类型变为第二能源类型时,第一设备发送第二通告报文,第二能源类型为非可再生能源,第二通告报文指示第二能源类型,第二通告报文为BGP报文,第二通告报文用于向邻居宣告路由,第二通告报文的第二AS-Path字段包括n个所述AS号,n是与第二能源类型相对应的倍数值,n为大于0的整数,m不等于n。这样通过AS号的长度来指示第二能源类型,丰富指示第二能源类型的方式。In another possible implementation, when the energy type of the energy supplied by the first device changes from the first energy type to the second energy type, the first device sends a second notification message, and the second energy type is non-renewable. Energy. The second advertisement message indicates the second energy type. The second advertisement message is a BGP message. The second advertisement message is used to announce routes to neighbors. The second AS-Path field of the second advertisement message includes n In the AS number, n is a multiple value corresponding to the second energy type, n is an integer greater than 0, and m is not equal to n. In this way, the length of the AS number is used to indicate the second energy type, enriching the way of indicating the second energy type.
可选地,在上述提及的通过BGP报文通告第一设备供电能源的能源类型的各种实现方式中,第一设备和第二设备是两个不同AS域内的设备。Optionally, in the above-mentioned various implementations of notifying the energy type of the power supply energy of the first device through BGP messages, the first device and the second device are devices in two different AS domains.
在另一种可能的实现方式中,第一设备接收第二设备的能力信息,该能力信息用于指示第二设备具有处理第一通告报文的能力。第一设备在基于该能力信息确定第二设备具有该能力时,发送第一通告报文。这样避免在第二设备不具有该能力时,还向第二设备发送第一通告报文,从而避免浪费网络带宽资源。In another possible implementation, the first device receives capability information of the second device, where the capability information is used to indicate that the second device has the capability to process the first notification message. When the first device determines that the second device has the capability based on the capability information, the first device sends a first notification message. This avoids sending the first notification message to the second device when the second device does not have the capability, thereby avoiding wasting network bandwidth resources.
在另一种可能的实现方式中,第一设备在连续多个周期内确定的第一设备供电能源的能源类型均是第一能源类型时,发送第一通告报文。其中在连续多个周期确定出第一设备供电能源的能源类型均为第一能源类型时,表明当前可再生能源较稳定,能够向第一设备提供稳定的供电能源。此时第一设备才发送用于指示第一能源类型的第一通告报文,这样不仅能够 减小发送通告报文的次数,还能够避免频繁调整通信网络中的网络流量的传输路径。In another possible implementation, the first device sends the first notification message when the energy types of the energy supplied by the first device determined in multiple consecutive cycles are all the first energy type. When it is determined that the energy type of the power supply energy of the first device is the first energy type for multiple consecutive cycles, it indicates that the current renewable energy is relatively stable and can provide stable power supply energy to the first device. At this time, the first device sends the first notification message indicating the first energy type, so that not only can Reducing the number of sending notification messages can also avoid frequent adjustments to the transmission path of network traffic in the communication network.
在另一种可能的实现方式中,在第一时间段中第一设备上未接收到待转发的网络流量时,第一设备关机或休眠。第一设备关机或休眠后,对能源的消耗最低,这样能够节省能源。In another possible implementation, when the first device does not receive network traffic to be forwarded in the first time period, the first device shuts down or sleeps. After the first device is shut down or hibernated, it consumes the least energy, which can save energy.
在另一种可能的实现方式中,第一设备在设定时刻开机,如果第一设备在开机后的设定时间段内接收到网络流量,保持上电工作状态。这样第一设备能够转发接收的网络流量,从而避免对该网络流量的传输产生影响In another possible implementation, the first device is powered on at a set time. If the first device receives network traffic within a set time period after being powered on, the first device remains powered on and working. In this way, the first device can forward the received network traffic to avoid affecting the transmission of the network traffic.
第二方面,本申请提供了一种通信方法,所述方法应用于包括第一设备和第二设备的网络系统,在所述方法中,第二设备接收第一通告报文,第一通告报文指示第一设备供电能源的能源类型为第一能源类型,第一能源类型为可再生能源,第一设备是通信网络中具有报文转发功能的网络设备。第二设备基于第一通告报文确定第一网络流量的传输路径,第一网络流量的传输路径经过第一设备。In a second aspect, this application provides a communication method, which method is applied to a network system including a first device and a second device. In the method, the second device receives a first notification message, and the first notification message The article indicates that the energy type of the power supply energy of the first device is the first energy type, the first energy type is renewable energy, and the first device is a network device with a message forwarding function in the communication network. The second device determines a transmission path of the first network traffic based on the first advertisement message, and the transmission path of the first network traffic passes through the first device.
由于第一通告报文指示第一设备供电能源的第一能源类型,第二设备基于第一通告报文确定第一网络流量的传输路径,第一网络流量的传输路径经过第一设备。如此第二设备能够使用可再生能源供电的第一设备转发更多的网络流量,不仅降低通信网络的能源消耗,还提高可再生能源的利用率,使得通信网络变的低碳环保。Since the first notification message indicates the first energy type of the energy supplied by the first device, the second device determines the transmission path of the first network traffic based on the first notification message, and the transmission path of the first network traffic passes through the first device. In this way, the second device can use the first device powered by renewable energy to forward more network traffic, which not only reduces the energy consumption of the communication network, but also improves the utilization rate of renewable energy, making the communication network low-carbon and environmentally friendly.
在一种可能的实现方式中,第二设备接收第二通告报文,第二通告报文指示第一设备供电能源的能源类型为第二能源类型,第二能源类型为非可再生能源。第二设备基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。由于第二通告报文指示第一设备供电能源为非可再生能源,第二设备基于第二通告报文确定第二网络流量的传输路径,使得第二网络流量的传输路径不经过第一设备,从而实现路由恢复。In a possible implementation, the second device receives a second notification message, and the second notification message indicates that the energy type of the energy supplied by the first device is the second energy type, and the second energy type is non-renewable energy. The second device determines the transmission path of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device. Since the second notification message indicates that the power supply energy of the first device is non-renewable energy, the second device determines the transmission path of the second network traffic based on the second notification message, so that the transmission path of the second network traffic does not pass through the first device, This enables route recovery.
在另一种可能的实现方式中,第一通告报文包括以第一设备为端点的链路的标识信息和该链路的第一开销cost值,第一cost值与第一能源类型相对应。这样使第一通告报文指示第一能源类型。由于第一cost值与第一能源类型相对应,第二设备基于第一cost值,能够将通信网络的网络流量尽可能多的汇聚到第一设备,以提高可再生能源的利用率,使得通信网络变的低碳环保。In another possible implementation, the first advertisement message includes identification information of a link with the first device as an endpoint and a first cost value of the link, where the first cost value corresponds to the first energy type. . This causes the first advertisement message to indicate the first energy type. Since the first cost value corresponds to the first energy type, the second device can aggregate as much network traffic of the communication network as possible to the first device based on the first cost value, so as to improve the utilization rate of renewable energy and enable communication. The Internet has become low-carbon and environmentally friendly.
在另一种可能的实现方式中,第一通告报文为内部网关协议IGP报文,第一通告报文包括链路状态类型长度值TLV或节点状态TLV,第一cost值携带在该链路状态TLV或该节点状态TLV中。这样使第一通告报文包括第一cost值,丰富了携带第一cost值的方式。In another possible implementation, the first advertisement message is an interior gateway protocol IGP message, the first advertisement message includes a link status type length value TLV or a node status TLV, and the first cost value is carried on the link Status TLV or the node status TLV. In this way, the first notification message includes the first cost value, which enriches the way of carrying the first cost value.
在另一种可能的实现方式中,第一通告报文为内部网关协议IGP报文,第一通告报文包括节能因子TLV,该节能因子TLV为扩展的TLV,该节能因子TLV包括第一cost值。这样使第一通告报文包括第一cost值,丰富了携带第一cost值的方式。 In another possible implementation, the first advertisement message is an interior gateway protocol IGP message, and the first advertisement message includes an energy saving factor TLV. The energy saving factor TLV is an extended TLV. The energy saving factor TLV includes a first cost. value. In this way, the first notification message includes the first cost value, which enriches the way of carrying the first cost value.
在另一种可能的实现方式中,第二设备接收第二通告报文,第二通告报文指示第一设备供电能源的能源类型为第二能源类型,第二能源类型为非可再生能源,第二通告报文为IGP报文,第二通告报文包括该链路的标识信息和第二cost值,第二cost值与第二能源类型相对应。第二设备基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。这样使第二通告报文指示第二能源类型。由于第二cost值与第二能源类型相对应,第二设备基于第二cost值进行路由恢复。In another possible implementation, the second device receives a second notification message, and the second notification message indicates that the energy type of the energy supplied by the first device is the second energy type, and the second energy type is non-renewable energy, The second advertisement message is an IGP message, and the second advertisement message includes identification information of the link and a second cost value, and the second cost value corresponds to the second energy type. The second device determines the transmission path of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device. This causes the second advertisement message to indicate the second energy type. Since the second cost value corresponds to the second energy type, the second device performs route recovery based on the second cost value.
可选地,在上述提及的通过IGP报文通告第一设备供电能源的能源类型的实现方式(例如,上述通过IGP报文中的cost值通告第一设备供电能源的能源类型),第一设备和第二设备是同一个自治系统AS域内的设备。Optionally, in the above-mentioned implementation of notifying the energy type of the power supply energy of the first device through the IGP message (for example, the above-mentioned notification of the energy type of the power supply energy of the first device through the cost value in the IGP message), the first The device and the second device are devices in the same autonomous system AS domain.
在另一种可能的实现方式中,第一通告报文为边界网关协议BGP报文,第一通告报文用于携带设备属性,第一通告报文包括第一新增路由器属性字段,第一新增路由器属性字段包括第一能源类型。这样使第一通告报文指示第一能源类型,第二设备基于第一新增路由器属性字段包括的第一能源类型,能够将通信网络的网络流量尽可能多的汇聚到第一设备,以提高可再生能源的利用率,使得通信网络变的低碳环保。In another possible implementation, the first advertisement message is a Border Gateway Protocol BGP message, the first advertisement message is used to carry device attributes, the first advertisement message includes a first new router attribute field, and the first The new router attribute field includes the first energy type. In this way, the first advertisement message indicates the first energy type, and the second device can aggregate as much network traffic of the communication network as possible to the first device based on the first energy type included in the first newly added router attribute field to improve the efficiency of the communication network. The utilization of renewable energy makes communication networks low-carbon and environmentally friendly.
在另一种可能的实现方式中,第二设备接收第二通告报文,第二通告报文指示第一设备供电能源的能源类型为第二能源类型,第二能源类型为非可再生能源,第二通告报文为BGP报文,第二通告报文用于携带该设备属性,第二通告报文包括第二新增路由器属性字段,第二新增路由器属性字段包括第二能源类型。第二设备基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。这样使第二通告报文指示第二能源类型。第二设备基于第二新增路由器属性字段包括的第二能源类型进行路由恢复。In another possible implementation, the second device receives a second notification message, and the second notification message indicates that the energy type of the energy supplied by the first device is the second energy type, and the second energy type is non-renewable energy, The second advertisement message is a BGP message, and the second advertisement message is used to carry attributes of the device. The second advertisement message includes a second new router attribute field, and the second new router attribute field includes a second energy type. The second device determines the transmission path of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device. This causes the second advertisement message to indicate the second energy type. The second device performs route recovery based on the second energy type included in the second newly added router attribute field.
在另一种可能的实现方式中,第一通告报文为边界网关协议BGP报文,第一通告报文用于携带分段路由互联协议第六版策略SRv6 Policy,第一通告报文包括第一颜色字段,第一颜色字段包括第一能源类型。这样使第一通告报文指示第一能源类型,第二设备基于第一颜色字段包括的第一能源类型,能够将通信网络的网络流量尽可能多的汇聚到第一设备,以提高可再生能源的利用率,使得通信网络变的低碳环保。In another possible implementation, the first advertisement message is a Border Gateway Protocol BGP message, and the first advertisement message is used to carry the Segment Routing Interconnection Protocol version 6 policy SRv6 Policy, and the first advertisement message includes and a color field, the first color field including the first energy type. In this way, the first notification message indicates the first energy type, and the second device can aggregate as much network traffic of the communication network as possible to the first device based on the first energy type included in the first color field to increase renewable energy. The utilization rate makes the communication network low-carbon and environmentally friendly.
在另一种可能的实现方式中,第一新增路由器属性字段和第一颜色字段通过类型、类型码Typecode、地址族标志AFI或子地址族标志SAFI进行区分。其中,第一新增路由器属性字段包括的Type和第一颜色字段包括的Type不同,第一新增路由器属性字段包括的Typecode和第一颜色字段包括的Typecode不同,第一新增路由器属性字段包括的AFI和第一颜色字段包括的AFI不同。和/或,第一新增路由器属性字段包括的SAFI和第一颜色字段包括的SAFI不同,这样便于第二设备能够识别第一通告报文中的第一新增路由器属性字段和第一颜色字段。In another possible implementation, the first newly added router attribute field and the first color field are distinguished by type, type code, address family flag AFI or sub-address family flag SAFI. Among them, the Type included in the first newly added router attribute field is different from the Type included in the first color field, the Typecode included in the first newly added router attribute field is different from the Typecode included in the first color field, and the first newly added router attribute field includes The AFI and the AFI included in the first color field are different. And/or, the SAFI included in the first newly added router attribute field and the SAFI included in the first color field are different, so that the second device can identify the first newly added router attribute field and the first color field in the first advertisement message. .
在另一种可能的实现方式中,第二设备接收第二通告报文,第二通告报文指示第一设备 供电能源的能源类型为第二能源类型,第二能源类型为非可再生能源,第二通告报文为BGP报文,第二通告报文用于携带SRv6 Policy,第二通告报文包括第二颜色字段,第二颜色字段包括第二能源类型。第二设备基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。这样使第二通告报文指示第二能源类型,第二设备基于第二颜色字段包括的第二能源类型进行路由恢复。In another possible implementation, the second device receives a second notification message, and the second notification message indicates that the first device The energy type of the power supply energy is the second energy type, and the second energy type is non-renewable energy. The second notification message is a BGP message. The second notification message is used to carry the SRv6 Policy. The second notification message includes the second A color field, a second color field including a second energy type. The second device determines the transmission path of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device. In this way, the second advertisement message indicates the second energy type, and the second device performs route recovery based on the second energy type included in the second color field.
在另一种可能的实现方式中,第一颜色字段的取值为第一取值,第一取值指示第一能源类型,第二颜色字段的取值为第二取值,第二取值指示第二能源类型。从而使颜色字段指示第一设备供电能源的能源类型。In another possible implementation, the value of the first color field is a first value, the first value indicates the first energy type, the value of the second color field is a second value, and the second value Indicates the secondary energy type. The color field thereby indicates the type of energy source powering the first device.
在另一种可能的实现方式中,第一颜色字段的取值为风电颜色取值,该风电颜色取值指示第一能源类型为风电能源。或者,第一颜色字段的取值为水电颜色取值,该水电颜色取值指示第一能源类型为水电能源。或者,第一颜色字段的取值为太阳能颜色取值,该太阳能颜色取值指示第一能源类型为太阳能电力能源。这样通过第一颜色字段能够指示不同的可再生能源。In another possible implementation, the value of the first color field is a wind power color value, and the wind power color value indicates that the first energy type is wind power energy. Alternatively, the value of the first color field is a hydropower color value, and the hydropower color value indicates that the first energy type is hydropower energy. Alternatively, the value of the first color field is a solar color value, and the solar color value indicates that the first energy type is solar electric energy. This allows different renewable energy sources to be indicated via the first color field.
在另一种可能的实现方式中,第一通告报文为BGP报文,第一通告报文包括第一路径属性字段,第一路径属性字段包括第一路由信息,第一路由信息包括第一能源类型,第一路由信息是第一设备上保存的路由信息。这样使第一通告报文指示第一能源类型,第二设备基于第一路径属性字段包括的第一路由信息,能够将通信网络的网络流量尽可能多的汇聚到第一设备,以提高可再生能源的利用率,使得通信网络变的低碳环保。In another possible implementation, the first advertisement message is a BGP message, the first advertisement message includes a first path attribute field, the first path attribute field includes first routing information, and the first routing information includes first The energy type, the first routing information is the routing information saved on the first device. In this way, the first advertisement message indicates the first energy type, and the second device can aggregate as much network traffic of the communication network as possible to the first device based on the first routing information included in the first path attribute field to improve regeneration. Energy utilization makes communication networks low-carbon and environmentally friendly.
在另一种可能的实现方式中,第二设备接收第二通告报文,第二通告报文指示第一设备供电能源的能源类型为第二能源类型,第二能源类型为非可再生能源,第二通告报文为BGP报文,第二通告报文包括第二路径属性字段,第二路径属性字段包括第二路由信息,第二路由信息包括第二能源类型和第一路由信息中除第一能源类型之外的内容。第二设备基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。这样使第二通告报文指示第二能源类型,第二设备基于第二路径属性字段包括的第二路由信息进行路由恢复。In another possible implementation, the second device receives a second notification message, and the second notification message indicates that the energy type of the energy supplied by the first device is the second energy type, and the second energy type is non-renewable energy, The second advertisement message is a BGP message. The second advertisement message includes a second path attribute field. The second path attribute field includes second routing information. The second routing information includes the second energy type and the first routing information. Content other than an energy type. The second device determines the transmission path of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device. In this way, the second advertisement message indicates the second energy type, and the second device performs route recovery based on the second routing information included in the second path attribute field.
在另一种可能的实现方式中,第一通告报文为BGP报文,第一通告报文的团体community属性指示第一路由信息对应的能源类型为第一能源类型,第一路由信息为第一设备上保存的路由信息。这样使第一通告报文指示第一能源类型,基于community属性值能够统一管理同一种第一能源类型对应的路由信息的路径优先级,从而提高运维效率。In another possible implementation, the first advertisement message is a BGP message, the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the first energy type, and the first routing information is the first energy type. Routing information saved on a device. In this way, the first advertisement message indicates the first energy type, and the path priority of routing information corresponding to the same first energy type can be uniformly managed based on the community attribute value, thereby improving operation and maintenance efficiency.
在另一种可能的实现方式中,第一通告报文的community属性指示第一路由信息对应的第一能源类型为可再生能源的子类型,该子类型包括风电能源、水电能源、太阳能能源中的至少一个。 In another possible implementation, the community attribute of the first advertisement message indicates that the first energy type corresponding to the first routing information is a subtype of renewable energy, and the subtype includes wind power energy, hydropower energy, and solar energy. at least one of.
在另一种可能的实现方式中,第二设备接收第二通告报文,第二通告报文指示第一设备供电能源的能源类型为第二能源类型,第二能源类型为非可再生能源,第二通告报文为BGP报文,第二通告报文的community属性指示第一路由信息对应的能源类型为第二能源类型。第二设备基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。这样使第二通告报文指示第二能源类型,基于community属性能够统一管理同第二能源类型对应的路由信息的路径优先级,从而提高运维效率。In another possible implementation, the second device receives a second notification message, and the second notification message indicates that the energy type of the energy supplied by the first device is the second energy type, and the second energy type is non-renewable energy, The second advertisement message is a BGP message, and the community attribute of the second advertisement message indicates that the energy type corresponding to the first routing information is the second energy type. The second device determines the transmission path of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device. In this way, the second advertisement message indicates the second energy type, and the path priority of routing information corresponding to the second energy type can be uniformly managed based on the community attribute, thereby improving operation and maintenance efficiency.
在另一种可能的实现方式中,第一通告报文为BGP报文,第一通告报文用于向邻居宣告路由,第一通告报文的第一自治系统路径AS-Path字段包括m个相同的自治系统AS号,m是与第一能源类型相对应的倍数值,m为大于0的整数,AS号用于标识第一设备所在的AS域。这这样通过AS号的长度来指示第一能源类型,丰富指示第一能源类型的方式。In another possible implementation, the first advertisement message is a BGP message, the first advertisement message is used to announce routes to neighbors, and the first autonomous system path AS-Path field of the first advertisement message includes m For the same autonomous system AS number, m is a multiple value corresponding to the first energy type, m is an integer greater than 0, and the AS number is used to identify the AS domain where the first device is located. In this way, the first energy type is indicated by the length of the AS number, enriching the way of indicating the first energy type.
在另一种可能的实现方式中,第二设备接收第二通告报文,第二通告报文指示第一设备供电能源的能源类型为第二能源类型,第二能源类型为非可再生能源,第二通告报文为BGP报文,第二通告报文用于向邻居宣告路由,第二通告报文的第二AS-Path字段包括n个AS号,n是与第二能源类型相对应的倍数值,n为大于0的整数,m不等于n。第二设备基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。这样通过AS号的长度来指示第二能源类型,丰富指示第二能源类型的方式。In another possible implementation, the second device receives a second notification message, and the second notification message indicates that the energy type of the energy supplied by the first device is the second energy type, and the second energy type is non-renewable energy, The second advertisement message is a BGP message. The second advertisement message is used to announce routes to neighbors. The second AS-Path field of the second advertisement message includes n AS numbers, where n corresponds to the second energy type. Multiple value, n is an integer greater than 0, m is not equal to n. The second device determines the transmission path of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device. In this way, the length of the AS number is used to indicate the second energy type, enriching the way of indicating the second energy type.
可选地,在上述提及的通过BGP报文通告第一设备供电能源的能源类型的各种实现方式中,第一设备和第二设备是两个不同AS域内的设备。Optionally, in the above-mentioned various implementations of notifying the energy type of the power supply energy of the first device through BGP messages, the first device and the second device are devices in two different AS domains.
在另一种可能的实现方式中,第二设备向所述第一设备发送第二设备的能力信息,该能力信息用于指示第二设备具有处理第一通告报文的能力。这样避免在第二设备不具有该能力时,第一设备还向第二设备发送第一通告报文,从而避免网络资源的浪费。In another possible implementation manner, the second device sends capability information of the second device to the first device, where the capability information is used to indicate that the second device has the capability to process the first notification packet. This prevents the first device from sending the first notification message to the second device when the second device does not have the capability, thereby avoiding waste of network resources.
在另一种可能的实现方式中,第二设备是通信网络中的具有报文转发功能的网络设备,第二设备包括第三路由信息,第三路由信息指示的下一跳设备不是第一设备或下一跳设备不包括能够到达第一设备的路由信息,第三路由信息指示的目的设备和第一网络流量的目的设备相同。第二设备基于第一通告报文将第三路由信息指示的下一跳设备替换为第三设备,第三设备为第一设备或者第三设备包括能够到达第一设备的路由信息。这样通过修改第二设备保存上的路由信息,能够使第二设备使用第一设备转发更多的网络流量。In another possible implementation, the second device is a network device with a packet forwarding function in the communication network, the second device includes third routing information, and the next hop device indicated by the third routing information is not the first device. Or the next hop device does not include routing information that can reach the first device, and the destination device indicated by the third routing information is the same as the destination device of the first network traffic. The second device replaces the next hop device indicated by the third routing information with a third device based on the first advertisement message, and the third device is the first device or the third device includes routing information that can reach the first device. In this way, by modifying the routing information saved on the second device, the second device can use the first device to forward more network traffic.
在另一种可能的实现方式中,第二设备是通信网络中的具有报文转发功能的网络设备,第二设备包括第四路由信息,第四路由信息指示的下一跳设备是第一设备或该下一跳设备包括能够到达第一设备的路由信息,第四路由信息指示的目的设备和第二网络流量的目的设备相同。第二设备基于第二通告报文将第四路由信息指示的下一跳设备替换为第四设备,第四设备不是第一设备或者第四设备不包括能够到达第一设备的路由信息,从而实现路由恢复。 In another possible implementation, the second device is a network device with a packet forwarding function in the communication network, the second device includes fourth routing information, and the next hop device indicated by the fourth routing information is the first device. Or the next hop device includes routing information that can reach the first device, and the destination device indicated by the fourth routing information is the same as the destination device of the second network traffic. The second device replaces the next hop device indicated by the fourth routing information with the fourth device based on the second advertisement message. The fourth device is not the first device or the fourth device does not include routing information that can reach the first device, thereby achieving Routing restored.
在另一种可能的实现方式中,第二设备基于第一通告报文和第一网络流量的目的地址建立第一网络流量的传输路径。由于第一网络流量的路径经过第一设备,使第一设备转发更多的网络流量。In another possible implementation, the second device establishes a transmission path of the first network traffic based on the first advertisement message and the destination address of the first network traffic. Since the path of the first network traffic passes through the first device, the first device forwards more network traffic.
在另一种可能的实现方式中,第二设备基于第二通告报文和第二网络流量的目的地址建立第二网络流量的传输路径。由于第二网络流量的传输路径不经过第一设备,从而实现路由恢复。In another possible implementation, the second device establishes a transmission path of the second network traffic based on the second advertisement message and the destination address of the second network traffic. Since the transmission path of the second network traffic does not pass through the first device, route recovery is achieved.
在另一种可能的实现方式中,第二设备是控制器或第二设备是第一网络流量的传输路径的头节点。In another possible implementation, the second device is a controller or the second device is a head node of a transmission path of the first network traffic.
第三方面,本申请提供了一种通信装置,用于执行第一方面或第一方面的任意一种可能的实现方式中的方法。具体地,所述装置包括用于执行第一方面或第一方面的任意一种可能的实现方式中的方法的模块。In a third aspect, this application provides a communication device for performing the method in the first aspect or any possible implementation of the first aspect. Specifically, the apparatus includes a module for performing the method in the first aspect or any possible implementation of the first aspect.
第四方面,本申请提供了一种通信装置,用于执行第二方面或第二方面的任意一种可能的实现方式中的方法。具体地,所述装置包括用于执行第二方面或第二方面的任意一种可能的实现方式中的方法的模块。In a fourth aspect, this application provides a communication device for performing the method in the second aspect or any possible implementation of the second aspect. Specifically, the apparatus includes a module for performing the method in the second aspect or any possible implementation of the second aspect.
第五方面,本申请提供了一种通信设备,所述设备包括处理器和存储器。其中,所述处理器以及所述存储器之间可以通过内部连接相连。所述存储器用于存储程序,所述处理器用于执行所述存储器中的程序,使得所述设备完成第一方面或第一方面的任意可能的实现方式中的方法。In a fifth aspect, the present application provides a communication device, which includes a processor and a memory. The processor and the memory may be connected through internal connections. The memory is used to store programs, and the processor is used to execute the programs in the memory, so that the device completes the method in the first aspect or any possible implementation of the first aspect.
第六方面,本申请提供了一种通信设备,所述设备包括处理器和存储器。其中,所述处理器以及所述存储器之间可以通过内部连接相连。所述存储器用于存储程序,所述处理器用于执行所述存储器中的程序,使得所述设备完成第二方面或第二方面的任意可能的实现方式中的方法。In a sixth aspect, the present application provides a communication device, which includes a processor and a memory. The processor and the memory may be connected through internal connections. The memory is used to store programs, and the processor is used to execute the programs in the memory, so that the device completes the method in the second aspect or any possible implementation of the second aspect.
第七方面,本申请提供了一种计算机程序产品,所述计算机程序产品包括在计算机可读存储介质中存储的计算机程序,并且所述计算程序通过处理器进行加载来实现上述第一方面、第二方面、第一方面任意可能的实现方式或第二方面任意可能的实现方式的方法。In a seventh aspect, the present application provides a computer program product. The computer program product includes a computer program stored in a computer-readable storage medium, and the computing program is loaded by a processor to implement the first aspect and the third aspect. Two aspects, any possible implementation method of the first aspect or any possible implementation method of the second aspect.
第八方面,本申请提供了一种计算机可读存储介质,用于存储计算机程序,所述计算机程序通过处理器进行加载来执行第一方面、第二方面、第一方面任意可能的实现方式或第二方面任意可能的实现方式的方法。In an eighth aspect, the present application provides a computer-readable storage medium for storing a computer program, which is loaded by a processor to execute the first aspect, the second aspect, any possible implementation of the first aspect, or The second aspect is any possible implementation method.
第九方面,本申请实施例提供了一种芯片,包括存储器和处理器,存储器用于存储计算机指令,处理器用于从存储器中调用并运行该计算机指令,以执行上述第一方面、第二方面、 第一方面任意可能的实现方式或第二方面任意可能的实现方式的方法。In a ninth aspect, embodiments of the present application provide a chip, including a memory and a processor. The memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the above first and second aspects. , Any possible implementation of the first aspect or any possible implementation of the second aspect.
第十方面,本申请提供了一种通信系统,所述系统包括第三方面所述的装置和第四方面所述的装置,或者,所述系统包括第五方面所述的设备和第六方面所述的设备。In a tenth aspect, the present application provides a communication system. The system includes the device described in the third aspect and the device described in the fourth aspect, or the system includes the device described in the fifth aspect and the sixth aspect. the equipment described.
附图说明Description of the drawings
图1是本申请实施例提供的一种通信网络的结构示意图;Figure 1 is a schematic structural diagram of a communication network provided by an embodiment of the present application;
图2是本申请实施例提供的一种通信网络中的网络流量示意图;Figure 2 is a schematic diagram of network traffic in a communication network provided by an embodiment of the present application;
图3是本申请实施例提供的另一种通信网络的结构示意图;Figure 3 is a schematic structural diagram of another communication network provided by an embodiment of the present application;
图4是本申请实施例提供的一种通信方法流程图;Figure 4 is a flow chart of a communication method provided by an embodiment of the present application;
图5是本申请实施例提供的另一种通信方法流程图;Figure 5 is a flow chart of another communication method provided by an embodiment of the present application;
图6是本申请实施例提供的另一种通信方法流程图;Figure 6 is a flow chart of another communication method provided by an embodiment of the present application;
图7是本申请实施例提供的另一种通信网络的结构示意图;Figure 7 is a schematic structural diagram of another communication network provided by an embodiment of the present application;
图8是本申请实施例提供的另一种通信网络的结构示意图;Figure 8 is a schematic structural diagram of another communication network provided by an embodiment of the present application;
图9是本申请实施例提供的一种节能因子TLV的示意图;Figure 9 is a schematic diagram of an energy saving factor TLV provided by an embodiment of the present application;
图10是本申请实施例提供的另一种通信网络的结构示意图;Figure 10 is a schematic structural diagram of another communication network provided by an embodiment of the present application;
图11是本申请实施例提供的另一种通信网络的结构示意图;Figure 11 is a schematic structural diagram of another communication network provided by an embodiment of the present application;
图12是本申请实施例提供的一种颜色字段的示意图;Figure 12 is a schematic diagram of a color field provided by an embodiment of the present application;
图13是本申请实施例提供的一种通信设备结构示意图;Figure 13 is a schematic structural diagram of a communication device provided by an embodiment of the present application;
图14是本申请实施例提供的另一种通信设备结构示意图;Figure 14 is a schematic structural diagram of another communication device provided by an embodiment of the present application;
图15是本申请实施例提供的一种通信装置结构示意图;Figure 15 is a schematic structural diagram of a communication device provided by an embodiment of the present application;
图16是本申请实施例提供的另一种通信装置结构示意图;Figure 16 is a schematic structural diagram of another communication device provided by an embodiment of the present application;
图17是本申请实施例提供的一种通信系统结构示意图。Figure 17 is a schematic structural diagram of a communication system provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图对本申请实施方式作进一步地详细描述。The embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
通信网络包括多个自治系统(autonomous system,AS)域,AS域内的网络设备采用(内部网关协议,interior gateway protocol)IGP交换路由信息,属于不同AS域的网络设备采用边界网关协议(border gateway protocol,BGP)交换路由信息。The communication network includes multiple autonomous system (AS) domains. Network devices within the AS domain use (interior gateway protocol, interior gateway protocol) IGP to exchange routing information. Network devices belonging to different AS domains use border gateway protocol (border gateway protocol). , BGP) to exchange routing information.
IGP是在一个AS域内的网络设备间交换路由信息的协议,运行于小型或中等网络中。IGP包括开放最短路径优先(open shortest path first,OSPF)、路由信息协议(routing information protocol,RIP)、中间系统到中间系统(intermediate system-to-intermediate system,IS-IS)、内部网关路由协议(interior gateway routing protocol,IGRP)和/或增强内部网关路由协议(enhanced interior gateway routing protocol,EIGRP)等协议。接下来以OSPF为例,对OSPF进行如下介绍。IGP is a protocol for exchanging routing information between network devices within an AS domain and runs in small or medium-sized networks. IGP includes open shortest path first (OSPF), routing information protocol (routing information protocol, RIP), intermediate system-to-intermediate system (IS-IS), interior gateway routing protocol ( protocols such as interior gateway routing protocol (IGRP) and/or enhanced interior gateway routing protocol (enhanced interior gateway routing protocol (EIGRP)). Next, taking OSPF as an example, we will introduce OSPF as follows.
OSPF是一种常用的基于链路状态的IGP路由协议,具有扩展能力。OSPF具有链路状态通告功能,能够在全网中通告链路的状态。OSPF使用LSA来保存通信网络中的链路的状态,LSA是保存链路的状态的一种数据结构,链路的状态包括链路的权值和/或优先级等参数。LSA保 存在网络设备的数据库中,该数据库又称之为链路状态数据库。网络设备根据链路状态数据库中的信息,采用最短路径优先(shortest path first,SPF)算法计算出到达其他网络设备的路由。OSPF is a commonly used link state-based IGP routing protocol with scalability. OSPF has a link status notification function that can advertise link status throughout the entire network. OSPF uses LSA to save the status of links in the communication network. LSA is a data structure that saves the status of the link. The status of the link includes parameters such as the link's weight and/or priority. LSA guarantee It exists in the database of the network device, which is also called the link state database. The network device uses the shortest path first (SPF) algorithm to calculate routes to other network devices based on the information in the link state database.
以该网络设备为路由器为例,路由器使用OSPF计算路由的过程包括如下流程。Taking the network device as a router as an example, the process of the router using OSPF to calculate routes includes the following processes.
Step1,路由器初始化路由器自身数据结构,等待低层次协议(数据链路层)提示接口是否处于工作状态,该接口是该路由器上的接口。Step 1. The router initializes the router's own data structure and waits for the low-level protocol (data link layer) to prompt whether the interface is in working state. The interface is an interface on the router.
Step2,路由器在低层次协议提示该接口处于工作状态时,确认该接口工作正常,然后通过与其他路由器交换问候(HELLO)报文建立邻居关系。Step 2: When the low-level protocol prompts that the interface is in working status, the router confirms that the interface is working properly, and then establishes neighbor relationships by exchanging hello (HELLO) messages with other routers.
Step3,路由器采用OSPF通过对LSA的收发,达到与该其他路由器交换链路信息的目的。Step 3: The router uses OSPF to exchange link information with other routers by sending and receiving LSAs.
Step4,路由器基于节点链接关系以及链路的cost值,计算自身与其他路由器之间的最短路径作为路由。Step 4: Based on the node link relationship and the cost value of the link, the router calculates the shortest path between itself and other routers as a route.
BGP是运行于传输控制协议(transmission control protocol,TCP)上的一种自治系统的路由协议。BGP是用来处理像因特网大小的网络协议,同时,也是能够妥善处理好不相关路由域间的多路连接的协议。BGP is an autonomous system routing protocol that runs on the Transmission Control Protocol (TCP). BGP is a protocol designed to handle networks the size of the Internet. It is also a protocol that can properly handle multiple connections between unrelated routing domains.
BGP具有路径属性的概念,用来描述BGP的路由,从而作为路由决策的主要参数。路径属性分为四种,公认必遵、公认自决、可选传递和可选非传递。其中公认必遵属性包括AS_Path,可选传递属性包括团体(Community)属性,下面对这两个属性分别介绍。BGP has the concept of path attributes, which are used to describe BGP routes and serve as the main parameters for routing decisions. There are four types of path attributes, recognized mandatory, recognized self-determination, optional transitive and optional non-transitive. Among them, the recognized mandatory attributes include AS_Path, and the optional transfer attributes include the Community attribute. These two attributes are introduced below.
BGP的自治系统路径(AS-Path)用一串AS号来描述去往的指定目的地AS域的路径或路由。当BGP发言者(BGP speaker)发起一条路由,则在AS_Path中增加自己的AS号。该路由每经过一个AS区域,就会在AS_Path加上一个AS号,用来表示路径的优先级。AS号叠加得越多,说明经过的AS越多,那么这个路由的优先级也越低。BGP's Autonomous System Path (AS-Path) uses a string of AS numbers to describe the path or route to the specified destination AS domain. When the BGP speaker initiates a route, it adds its own AS number to AS_Path. Each time the route passes through an AS area, an AS number will be added to the AS_Path to indicate the priority of the path. The more AS numbers are superimposed, the more ASs passed through, and the lower the priority of this route.
BGP的团体(community)属性属于可选可传递属性,不支持该属性的路由器会原封不动的将community属性值传递给下游BGP邻居(前提是配置了传递community属性)。BGP的community属性能够简化网络中路由器对相同路由条目的匹配工作。例如在一个大型网络中所有路由器上都需要匹配相同的路由条目,如果用访问控制列表(access control lists,ACL)或者前缀列表进行匹配,则工作量比较大,所以在一台路由器上为相应的路由条目打上community属性值,在其他路由器上通过匹配community属性值的方式间接地来匹配路由条目,从而简化了路由条目的匹配工作。The BGP community attribute is an optional transitive attribute. Routers that do not support this attribute will pass the community attribute value intact to downstream BGP neighbors (provided that the community attribute is configured to be passed). The community attribute of BGP can simplify the matching of identical route entries by routers in the network. For example, all routers in a large network need to match the same routing entries. If access control lists (ACLs, ACL) or prefix lists are used for matching, the workload will be relatively large, so on one router, the corresponding The routing entries are marked with the community attribute value, and the routing entries are indirectly matched on other routers by matching the community attribute value, thereby simplifying the matching work of the routing entries.
对于通信网络中的任一个网络设备,在该网络设备传输的网络流量越少,该网络设备的功耗越低。为了降低通信网络的能源消耗,对于在通信网络中传输的网络流量,通过对网络流量的传输路径进行调整,使通信网络中的网络流量汇聚到通信网络中的少部分网络设备上。对于通信网络中的其他网络设备,该其他网络设备上传输的网络流量会减少,在该其他网络设备上没有网络流量传输时该其他网络设备关机或休眠,如此使通信网络的能源消耗降低。For any network device in the communication network, the less network traffic transmitted by the network device, the lower the power consumption of the network device. In order to reduce the energy consumption of the communication network, for the network traffic transmitted in the communication network, the transmission path of the network traffic is adjusted so that the network traffic in the communication network is aggregated to a small number of network devices in the communication network. For other network devices in the communication network, the network traffic transmitted on the other network devices will be reduced. When there is no network traffic transmitted on the other network devices, the other network devices shut down or go into sleep, thus reducing the energy consumption of the communication network.
可选地,采用如下方法能够将通信网络中的网络流量汇聚到通信网络中的少部分网络设备上,使通信网络的能源消耗降低。Optionally, the following method can be used to aggregate network traffic in the communication network to a small number of network devices in the communication network, thereby reducing energy consumption of the communication network.
方法1,基于流量变化会影响功耗的逻辑基础,对设备的能耗进行计算。利用OSPF协议中扩展出链路能量消耗的类型长度值(type length value,TLV),将计算结果携带在该TLV中。针对入口节点到出口节点的多条路径,基于该TLV计算每条路径的功耗消耗,然后选择功耗消耗最低的路径,入口节点和出口节点之间使用选择路径来传输数据,使通信网络的能 源消耗降低。Method 1: Calculate the energy consumption of the device based on the logical basis that traffic changes will affect power consumption. The OSPF protocol is used to extend the type length value (TLV) of link energy consumption, and the calculation result is carried in the TLV. For multiple paths from the entry node to the exit node, calculate the power consumption of each path based on the TLV, and then select the path with the lowest power consumption. The selected path is used to transmit data between the entry node and the exit node, making the communication network able Source consumption reduced.
方法2,通过控制器流量工程,设计基于流量需求情况和网络各链路及trunk的剩余带宽情况,对流量的路径进行重新调整。最终使网络中的流量汇聚到较少的链路,使通信网络中的部分链路的流量为0,将与该部分链路相连的路由器的关机/休眠,以实现节能效果。其中,trunk是一种由多个链路绑定在一起的逻辑接口。Method 2: Through controller traffic engineering, the design re-adjusts the traffic path based on the traffic demand and the remaining bandwidth of each network link and trunk. Eventually, the traffic in the network is aggregated to fewer links, so that the traffic of some links in the communication network is 0, and the routers connected to this part of the link are shut down/sleep to achieve energy saving effects. Among them, trunk is a logical interface bound together by multiple links.
方法3,以全网功耗最低为目标,对全网的功耗进行计算,最终选择功耗最低的路由。优先使用选择的路由来传输数据,使通信网络的能源消耗降低。Method 3: With the lowest power consumption in the entire network as the goal, calculate the power consumption of the entire network, and finally select the route with the lowest power consumption. Prioritize the use of selected routes to transmit data, reducing the energy consumption of the communication network.
对于通信网络中的每个网络设备,向该网络设备供电的供电能源可能是可再生能源,也可能是非可再生能源。在调整通信网络中的网络流量的传输路径时,如果优先将网络流量汇聚到通信网络中的供电能源是可再生能源的网络设备上,这样不仅使通信网络的能源消耗降低,还提高通信网络中的可再生能源的利用率,使通信网络变的低碳环保。For each network device in the communication network, the power supply energy supplying the network device may be renewable energy or non-renewable energy. When adjusting the transmission path of network traffic in the communication network, if the network traffic is prioritized to be converged on network devices whose power supply energy is renewable energy, this will not only reduce the energy consumption of the communication network, but also improve the efficiency of the communication network. The utilization rate of renewable energy makes the communication network low-carbon and environmentally friendly.
可选地,可再生能源包括水电能源、风电能源或太阳能电力能源等中的一个或多个。非可再生能源来自于煤炭或石油等化石燃料,例如非可再生能源包括煤电能源等。相比非可再生能源,可再生能源受天气等客观因素的影响,存在一定的不稳定性。比如风电能源受天气变化而不稳定,太阳能电力能源在夜晚不可用。通信网络的网络设备使用智能电网接口技术,能够动态选择供电能源。例如,在可再生能源稳定时,网络设备选择可再生能源作为自身的供电能源;在可再生能源不稳定时,网络设备选择非可再生能源作为自身的供电能源。Optionally, the renewable energy includes one or more of hydropower energy, wind power energy, solar power energy, etc. Non-renewable energy comes from fossil fuels such as coal or petroleum. For example, non-renewable energy includes coal power energy. Compared with non-renewable energy, renewable energy is affected by objective factors such as weather and has certain instability. For example, wind power energy is unstable due to weather changes, and solar power energy is unavailable at night. The network equipment of the communication network uses smart grid interface technology to dynamically select power supply energy. For example, when renewable energy is stable, network equipment chooses renewable energy as its own power supply energy; when renewable energy is unstable, network equipment chooses non-renewable energy as its own power supply energy.
参见图1,本申请实施例提供了一种通信网络100,该通信网络100包括多个网络设备,位置相邻的两个网络设备之间可能通过链路相连。Referring to Figure 1, an embodiment of the present application provides a communication network 100. The communication network 100 includes multiple network devices, and two adjacent network devices may be connected through a link.
例如,参见图1所示的通信网络100,通信网络100包括网络设备1、网络设备2、网络设备3、网络设备3、网络设备4、网络设备5、网络设备6和网络设备7。其中,以网络设备2为例,与网络设备2位置相邻的网络设备包括网络设备1、网络设备3和网络设备5,网络设备2分别与网络设备1、网络设备3和网络设备5之间使用链路相连。For example, referring to the communication network 100 shown in FIG. 1 , the communication network 100 includes network device 1 , network device 2 , network device 3 , network device 3 , network device 4 , network device 5 , network device 6 and network device 7 . Taking network device 2 as an example, network devices adjacent to network device 2 include network device 1, network device 3, and network device 5. Network device 2 is connected to network device 1, network device 3, and network device 5 respectively. Use links to connect.
可选地,通信网络100包括多个AS域,每个AS域包括多个网络设备。例如,参见图1,通信网络100包括AS域1和AS域2,AS域1包括网络设备1、网络设备2、网络设备3和网络设备5,AS域2包括网络设备4、网络设备6和网络设备7。Optionally, the communication network 100 includes multiple AS domains, each AS domain including multiple network devices. For example, referring to Figure 1, the communication network 100 includes AS domain 1 and AS domain 2. AS domain 1 includes network device 1, network device 2, network device 3 and network device 5. AS domain 2 includes network device 4, network device 6 and Network equipment7.
通信网络100中的网络设备具有报文转发功能,可选地,通信网络100中的网络设备包括路由器和/或交换机等。The network devices in the communication network 100 have a message forwarding function. Optionally, the network devices in the communication network 100 include routers and/or switches.
例如,参见图2,网络设备1接收到网络流量1,网络流量1的源设备1接入到网络设备1,网络流量1的目的设备1接入到网络设备7。假设网络设备1、网络设备2、网络设备3、网络设备4和网络设备7均是网络流量1的传输路径上的节点。这样网络设备1向网络设备2转发来自源设备1的网络流量1,网络设备2接收网络流量1并向网络设备3转发网络流量1,网络设备3接收网络流量1并向网络设备4转发网络流量1,网络设备4接收网络流量1并向网络设备7转发网络流量1,网络设备7接收网络流量1并向目的设备1转发网络流量1。For example, referring to Figure 2, network device 1 receives network traffic 1, source device 1 of network traffic 1 is connected to network device 1, and destination device 1 of network traffic 1 is connected to network device 7. Assume that network device 1, network device 2, network device 3, network device 4 and network device 7 are all nodes on the transmission path of network traffic 1. In this way, network device 1 forwards network traffic 1 from source device 1 to network device 2, network device 2 receives network traffic 1 and forwards network traffic 1 to network device 3, and network device 3 receives network traffic 1 and forwards network traffic to network device 4. 1. Network device 4 receives network traffic 1 and forwards network traffic 1 to network device 7. Network device 7 receives network traffic 1 and forwards network traffic 1 to destination device 1.
参见图3,通信网络100还包括控制器8,控制器8与通信网络100中的一个或多个网络设备通信。控制器8用于对通信网络100中的网络设备进行控制和/或管理等操作,例如,控制器8在通信网络100中确定用于传输网络流量的传输路径,并向传输路径经过的通信网络100中的一个或多个网络设备下发传输路径相关的路由信息,如此使该一个或多个网络设备转发该网 络流量。Referring to FIG. 3 , communication network 100 also includes a controller 8 that communicates with one or more network devices in communication network 100 . The controller 8 is used to control and/or manage network devices in the communication network 100. For example, the controller 8 determines a transmission path for transmitting network traffic in the communication network 100, and sends a message to the communication network through which the transmission path passes. One or more network devices in 100 issue routing information related to the transmission path, so that the one or more network devices forward the network network traffic.
接下来,仍以上述网络流量1为例,参见图3,控制器8接收源设备1发送的路径建立请求,该路径建立请求包括网络流量1的目的地址(为目的设备1的地址),基于该目的地址计算源设备1与目的设备1之间的传输路径,该传输路径经过网络设备1、网络设备2、网络设备3、网络设备4和网络设备7。控制器8向网络设备1、网络设备2、网络设备3、网络设备4和网络设备7下发该传输路径相关的路由信息。这样网络设备1接收到源设备1发送的网络流量1后,使用该传输路径向目的设备1发送网络流量1。Next, still taking the above-mentioned network traffic 1 as an example, see Figure 3, the controller 8 receives a path establishment request sent by the source device 1. The path establishment request includes the destination address of the network traffic 1 (which is the address of the destination device 1). Based on The destination address calculates a transmission path between source device 1 and destination device 1, which passes through network device 1, network device 2, network device 3, network device 4 and network device 7. The controller 8 delivers the routing information related to the transmission path to the network device 1, the network device 2, the network device 3, the network device 4 and the network device 7. In this way, after receiving the network traffic 1 sent by the source device 1, the network device 1 uses the transmission path to send the network traffic 1 to the destination device 1.
对于通信网络100中的每个网络设备,该网络设备包括电源接口,通过该电源接口向该网络设备供电。可选地,该网络设备供电能源的能源类型可能是可再生能源,也可能是非可再生能源。For each network device in the communication network 100, the network device includes a power interface through which power is supplied to the network device. Optionally, the energy type of the power supply for the network device may be renewable energy or non-renewable energy.
按供电能源的能源类型能够将通信网络100中的网络设备分为两部分,为了便于说明,将该两部分网络设备分别称为第一部分网络设备和第二部分网络设备。第一部分网络设备供电能源的能源类型为可再生能源,第二部分网络设备供电能源的能源类型为非可再生能源。The network equipment in the communication network 100 can be divided into two parts according to the energy type of the power supply energy. For convenience of explanation, the two parts of network equipment are called the first part of network equipment and the second part of network equipment respectively. The energy type of the first part of the network equipment power supply energy is renewable energy, and the energy type of the second part of the network equipment power supply energy is non-renewable energy.
可再生能源包括风电能源、水电能源、太阳能电力能源、潮汐能电力能源和/或地热能电力能源等,所以对于第一部分网络设备中的任一个网络设备,该网络设备供电能源的能源类型可能是风电能源,可能是水电能源,可能是太阳能电力能源,可能是潮汐能电力能源,或者,可能是地热能电力能源等。Renewable energy includes wind power energy, hydropower energy, solar power energy, tidal power power energy and/or geothermal power power energy, etc., so for any network device in the first part of the network device, the energy type of the network device power supply energy may be Wind power energy may be hydropower energy, solar power energy, tidal power power, or geothermal power energy, etc.
可再生能源的稳定性较差,例如,对于太阳能电力能源,在晴朗的白天由于阳光充足,才能为网络设备提供稳定的太阳能电力能源,而在其他时间(如夜晚、阴天或雨天等)无法为网络设备提供稳定的太阳能电力能源。再例如,对于水电能源,在雨水充沛的季节往往有充足的水电能源,这时通信网络100可能有较多的网络设备供电能源的能源类型为水电能源,而在其他时间(如旱季等)内可能没有充足的水电能源,通信网络100可能有少部分网络设备供电能源的能源类型为水电能源。还例如,对于风电能源,在有风的时间段内才能为网络设备提供稳定的风电能源,而在无风的时间段内无法为网络设备提供稳定的风电能源。The stability of renewable energy is poor. For example, for solar power energy, only stable solar power energy can be provided for network equipment on a clear day due to sufficient sunlight, but it cannot be provided at other times (such as night, cloudy or rainy days, etc.) Provide stable solar power energy for network equipment. For another example, for hydropower energy, there is often sufficient hydropower energy in seasons with abundant rain. At this time, the communication network 100 may have more network equipment. The energy type of power supply energy is hydropower energy. At other times (such as dry seasons, etc.) There may not be sufficient hydropower energy, and the communication network 100 may have a small number of network devices that are powered by hydropower energy. For example, for wind power energy, stable wind power energy can be provided for network equipment only during windy periods, but stable wind power energy cannot be provided for network equipment during non-windy periods.
由于可再生能源的稳定性较差,对于通信网络100中的任一个网络设备,在一段时间内该网络设备供电能源的能源类型可能为可再生能源,在另一段时间该网络设备供电能源的能源类型可能由可再生能源变为非可再生能源。例如,对于太阳能电力能源,在晴朗的白天网络设备的供电能源的能源类型为太阳能电力能源,在夜晚网络设备供电能源的能源类型变为煤电能源。Due to the poor stability of renewable energy, for any network device in the communication network 100, the energy type of the energy supplied by the network device may be renewable energy during a period of time, and the energy type of the energy supplied by the network device during another period of time. The type may change from renewable to non-renewable energy. For example, for solar power energy, the energy type of the power supply energy for the network equipment during the clear day is solar power energy, and at night the energy type of the power supply energy for the network equipment changes to coal power energy.
由于通信网络100中的网络设备供电能源的能源类型可能在不断地变化,所以在本申请实施例中,确定通信网络100中的网络设备供电能源的能源类型。基于该能源类型调整在通信网络100中传输的网络流量的传输路径,使通信网络100中的网络流量能够汇聚到可再生能源供电的网络设备上。如此,提高通信网络100的可再生能源利用率,使通信网络100变的更加低碳环保,详细实现过程参见如下介绍的任一实施例。Since the energy type of the energy supplied by the network equipment in the communication network 100 may be constantly changing, in this embodiment of the present application, the energy type of the energy supplied by the network equipment in the communication network 100 is determined. The transmission path of the network traffic transmitted in the communication network 100 is adjusted based on the energy type, so that the network traffic in the communication network 100 can be converged on network equipment powered by renewable energy. In this way, the renewable energy utilization rate of the communication network 100 is improved, making the communication network 100 more low-carbon and environmentally friendly. For the detailed implementation process, please refer to any of the embodiments introduced below.
参见图4,本申请实施例提供了一种通信方法400,所述方法400应用于图1、图2或图3所示的通信网络100中,包括如下流程。Referring to Figure 4, an embodiment of the present application provides a communication method 400. The method 400 is applied to the communication network 100 shown in Figure 1, Figure 2 or Figure 3, and includes the following process.
步骤401:第一设备确定第一设备供电能源的第一能源类型,第一设备是通信网络中的具有报文转发功能的网络设备,第一能源类型为可再生能源。 Step 401: The first device determines the first energy type of the power supply energy of the first device. The first device is a network device with a message forwarding function in the communication network, and the first energy type is renewable energy.
可选地,第一设备周期性地确定第一设备供电能源的能源类型。Optionally, the first device periodically determines the energy type of the energy supplied by the first device.
步骤402:第一设备发送第一通告报文,第一通告报文指示第一能源类型。Step 402: The first device sends a first notification message, and the first notification message indicates the first energy type.
步骤403:第二设备接收第一通告报文,基于第一通告报文确定第一网络流量的传输路径,第一网络流量的传输路径经过第一设备。Step 403: The second device receives the first notification message, and determines the transmission path of the first network traffic based on the first notification message. The transmission path of the first network traffic passes through the first device.
可选地,第一设备在确定的能源类型为第一能源类型时,表明第一设备的供电能源为可再生能源。但是随着时间推移,可再生能源变的不稳定,第一设备可能将第一设备的供电能源由可再生能源切换为非可再生能源。也就是说,在步骤401之后,第一设备确定第一设备供电能源的能源类型可能变为第二能源类型,第二能源类型为非可再生能源。Optionally, when the determined energy type is the first energy type, the first device indicates that the power supply energy of the first device is renewable energy. However, as time goes by, the renewable energy becomes unstable, and the first device may switch the power supply energy of the first device from renewable energy to non-renewable energy. That is to say, after step 401, the first device determines that the energy type of the energy supplied by the first device may change to the second energy type, and the second energy type is non-renewable energy.
可选地,第一设备在确定的能源类型为第二能源类型时发送第二通告报文,第二通告报文指示第二能源类型,第二能源类型为非可再生能源。参见图5,在步骤403之后,该通信方法400还可能包括如下步骤404-405。Optionally, the first device sends a second notification message when the determined energy type is the second energy type, the second notification message indicates the second energy type, and the second energy type is non-renewable energy. Referring to Figure 5, after step 403, the communication method 400 may also include the following steps 404-405.
步骤404:第一设备在确定的能源类型由第一能源类型变为第二能源类型时,发送第二通告报文,第二通告报文指示第二能源类型。Step 404: When the determined energy type changes from the first energy type to the second energy type, the first device sends a second notification message, and the second notification message indicates the second energy type.
步骤405:第二设备接收第二通告报文,基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。Step 405: The second device receives the second notification message and determines the transmission path of the second network traffic based on the second notification message. The transmission path of the second network traffic does not pass through the first device.
可选地,第一设备在确定的能源类型为第一能源类型时发送第一通告报文,在确定的能源类型由第一能源类型变为第二能源类型时停止发送第一通告报文,同时也不会发送第二通告报文。参见图6,在步骤403之后,该通信方法400还可能包括如下步骤406。Optionally, the first device sends the first notification message when the determined energy type is the first energy type, and stops sending the first notification message when the determined energy type changes from the first energy type to the second energy type, At the same time, the second notification message will not be sent. Referring to Figure 6, after step 403, the communication method 400 may also include the following step 406.
步骤406:第二设备在未接收到第一通告报文的持续时间长度达到指定时长阈值时,确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。Step 406: When the duration of not receiving the first notification message reaches the specified duration threshold, the second device determines the transmission path of the second network traffic. The transmission path of the second network traffic does not pass through the first device.
在本申请实施例中,由于第一设备能够确定第一设备供电能源的能源类型,在确定的能源类型为第一能源类型时发送第一通告报文,第一通告报文指示第一能源类型为可再生能源。第二设备接收第一通告报文,基于第一通告报文确定第一网络流量的传输路径,第一网络流量的传输路径经过第一设备,这样第一设备能够接收到第一网络流量并转发第一网络流量。由于第一设备的供电能源的第一能源类型为可再生能源,从而基于第一设备供电能源的能源类型能够将尽可能多的网络流量调整到可再生能源供电的第一设备上,以让第一设备转发更多的网络流量,提高了可再生能源的利用率,使得通信网络变的更加低碳环保。In this embodiment of the present application, since the first device can determine the energy type of the energy supplied by the first device, when the determined energy type is the first energy type, it sends the first notification message, and the first notification message indicates the first energy type. for renewable energy. The second device receives the first notification message and determines the transmission path of the first network traffic based on the first notification message. The transmission path of the first network traffic passes through the first device, so that the first device can receive and forward the first network traffic. First network traffic. Since the first energy type of the power supply energy of the first device is renewable energy, as much network traffic as possible can be adjusted to the first device powered by renewable energy based on the energy type of the power supply energy of the first device, so as to allow the third One device forwards more network traffic, improves the utilization of renewable energy, and makes the communication network more low-carbon and environmentally friendly.
对于上述图4、图5或图6所示的方法400,接下来本申请实施例结合图1、图2或图3所示的通信网络100,对所述方法400中的各步骤进行说明。Regarding the method 400 shown in FIG. 4, FIG. 5 or FIG. 6, the following embodiments of the present application will describe each step in the method 400 in conjunction with the communication network 100 shown in FIG. 1, FIG. 2 or FIG. 3.
对于上述步骤401,第一设备基于第一周期长度,周期性地确定第一设备供电能源的能源类型。For the above step 401, the first device periodically determines the energy type of the energy supplied by the first device based on the first period length.
可选地,第一周期长度为指定的时间长度。或者,第一周期长度为按实际需求配置的时间长度,例如控制器可能基于实际需求在第一设备上配置第一周期长度。Optionally, the first period length is a specified time length. Alternatively, the first period length is a time length configured according to actual needs. For example, the controller may configure the first period length on the first device based on actual needs.
在上述步骤401中,第一设备包括电源接口,该电源接口与不同能源类型的电源相连,第一设备检测当前向第一设备的电源接口供电的电力能源,得到第一设备供电能源的能源类型。In the above step 401, the first device includes a power interface, which is connected to power sources of different energy types. The first device detects the power energy currently supplying power to the power interface of the first device, and obtains the energy type of the power supply energy of the first device. .
在步骤401中,第一设备确定第一设备供电能源的能源类型为第一能源类型。第一能源类型是可再生能源,可再生能源包括多种能源,分别为风电能源、水电能源和太阳能电力能 源等。第一能源类型有多种类型,该多种第一能源类型分别为风电能源、水电能源和太阳能电力能源等。In step 401, the first device determines that the energy type of the energy supplied by the first device is the first energy type. The first type of energy is renewable energy. Renewable energy includes a variety of energy sources, including wind power energy, hydropower energy and solar power energy. Source et al. There are multiple types of first energy types, and the multiple first energy types are wind power energy, hydropower energy, solar power energy, etc.
例如,参见图2或图3,假设第一设备为通信网络100中的网络设备5,网络设备5供电能源为煤电能源。参见图7或图8,假设网络设备5的供电能源由煤电能源变为水电能源时,网络设备5确定网络设备5供电能源的第一能源类型为水电能源。For example, referring to Figure 2 or Figure 3, assume that the first device is the network device 5 in the communication network 100, and the power supply energy of the network device 5 is coal and electricity energy. Referring to Figure 7 or Figure 8, assuming that the power supply energy of the network device 5 changes from coal power energy to hydropower energy, the network device 5 determines that the first energy type of the power supply energy of the network device 5 is hydropower energy.
对于上述步骤402,第一设备向第二设备发送用于指示第一能源类型的第一通告报文,第一通告报文用于向第二设备通告第一设备供电能源的能源类型为第一能源类型。对于上述步骤404,在第一设备供电能源的能源类型由第一能源类型变为第二能源类型时,第一设备向第二设备发送用于指示第二能源类型的第二通告报文,第二通告报文与第一通告报文相对应。For the above step 402, the first device sends a first notification message indicating the first energy type to the second device, and the first notification message is used to notify the second device that the energy type of the power supply energy of the first device is the first Energy type. For the above step 404, when the energy type of the energy supplied by the first device changes from the first energy type to the second energy type, the first device sends a second notification message indicating the second energy type to the second device. The second notification message corresponds to the first notification message.
可选地,第一设备在确定出第一设备供电能源的能源类型时发送通告报文。或者,第一设备在连续多个周期内确定出第一设备供电能源的能源类型均相同时发送通告报文,该通告报文指示确定的能源类型。Optionally, the first device sends a notification message when determining the energy type of the energy supplied by the first device. Alternatively, the first device determines that the energy types of the energy supplied by the first device are the same in multiple consecutive cycles and sends a notification message indicating the determined energy type.
也就是说:在步骤402中,第一设备采用如下两种方式发送第一通告报文,该两种方式分别为。That is to say: in step 402, the first device sends the first notification message in the following two ways. The two ways are respectively.
第一方式,在第一设备确定出第一设备供电能源的能源类型为第一能源类型时,第一设备发送用于指示第一能源类型的第一通告报文。In a first manner, when the first device determines that the energy type of the energy supplied by the first device is the first energy type, the first device sends a first notification message indicating the first energy type.
可选地,在第一方式中,在第一设备确定第一设备供电能源的能源类型为第一能源类型时,第一设备发送第一通告报文。在第一设备确定第一设备供电能源的能源类型由第一能源类型变为第二能源类型时,第一设备停止发送第一通告报文,第二能源类型为非可再生能源。其中,第一设备可能不发送用于指示第二能源类型的第二通告报文,这样在第二设备持续多个周期内未接收到第一通告报文时,第二设备确定第一设备供电能源的能源类型由第一能源类型变为第二能源类型。或者,在步骤404中,第二设备在确定第一设备供电能源的第二能源类型时,第一设备发送用于指示第二能源类型的第二通告报文。Optionally, in the first manner, when the first device determines that the energy type of the energy supplied by the first device is the first energy type, the first device sends the first notification message. When the first device determines that the energy type of the energy supplied by the first device changes from the first energy type to the second energy type, the first device stops sending the first notification message, and the second energy type is non-renewable energy. Wherein, the first device may not send a second notification message indicating the second energy type, so that when the second device does not receive the first notification message for multiple cycles, the second device determines that the first device is powered by The energy type of the energy source changes from the first energy type to the second energy type. Alternatively, in step 404, when the second device determines the second energy type of the energy supplied by the first device, the first device sends a second notification message indicating the second energy type.
第二方式,在第一设备连续多个周期确定出第一设备供电能源的能源类型均为第一能源类型时,第一设备发送用于指示第一能源类型的第一通告报文。In a second manner, when the first device determines that the energy type of the energy supplied by the first device is the first energy type for multiple consecutive cycles, the first device sends a first notification message indicating the first energy type.
同样,在步骤404中,在第一设备确定的能源类型由第一能源类型变为第二能源类型后且在连续多个周期内确定的能源类型均为第二能源类型时,第一设备发送用于指示第二能源类型的第二通告报文。Similarly, in step 404, after the energy type determined by the first device changes from the first energy type to the second energy type and the energy types determined in multiple consecutive periods are all the second energy type, the first device sends A second notification message used to indicate the second energy type.
可选地,在第一设备连续多个周期确定的第一能源类型均相同时,第一设备发送用于指示第一能源类型的第一通告报文。第一设备连续多个周期确定的第一能源类型均相同,表示第一设备连续多个周期确定的第一能源类型均为同一种可再生能源,以及表示在当前该种可再能源较稳定,能够为第一设备持续供电。Optionally, when the first energy type determined by the first device in multiple consecutive cycles is the same, the first device sends a first notification message indicating the first energy type. The first energy type determined by the first device in multiple consecutive cycles is the same, which means that the first energy type determined by the first device in multiple consecutive cycles is the same renewable energy source, and it means that this renewable energy source is relatively stable at present, Able to continuously power the first device.
例如,在第一设备连续X个周期确定的第一能源类型均为水电能源时,第一设备发送第一通告报文,第一通告报文用于指示第一能源类型为水电能源,X为大于1的整数,表示当前水电能源较稳定,能够持续向第一设备提供水电能源。在第一设备连续X个周期确定的第一能源类型均为风电能源时,第一设备发送第一通告报文,第一通告报文用于指示第一能源类型为风电能源,表示当前风电能源较稳定,能够持续向第一设备提供风电能源。或者,在 第一设备连续X个周期确定的第一能源类型均为太阳能电力能源,第一设备发送第一通告报文,第一通告报文用于指示第一能源类型为太阳能电力能源,表示当前太阳能电力能源较稳定,能够持续向第一设备提供太阳能电力能源。For example, when the first energy type determined by the first device for X consecutive periods is hydroelectric energy, the first device sends a first notification message, and the first notification message is used to indicate that the first energy type is hydropower energy, and X is An integer greater than 1 indicates that the current hydropower energy is relatively stable and can continue to provide hydropower energy to the first device. When the first energy type determined by the first device for X consecutive periods is wind power energy, the first device sends a first notification message. The first notification message is used to indicate that the first energy type is wind power energy, indicating the current wind power energy. It is relatively stable and can continue to provide wind power energy to the first equipment. Or, in The first energy type determined by the first device for X consecutive periods is solar power energy. The first device sends a first notification message. The first notification message is used to indicate that the first energy type is solar power energy, indicating the current solar power. The energy is relatively stable and can continuously provide solar power energy to the first equipment.
可选地,X为指定整数值,或者,X为按实际需求配置的整数值,例如控制器按实际需求在第一设备上配置X的取值。Optionally, X is a specified integer value, or X is an integer value configured according to actual requirements. For example, the controller configures the value of X on the first device according to actual requirements.
其中,在第一设备连续多个周期确定出第一设备供电能源的能源类型均为第一能源类型时,表明当前可再生能源较稳定,能够向第一设备提供稳定的供电能源。此时第一设备才发送用于指示第一能源类型的第一通告报文,这样不仅能够减小发送通告报文的次数,还能够避免频繁调整通信网络中的网络流量的传输路径。Among them, when the first device determines that the energy type of the power supply energy of the first device is the first energy type for multiple consecutive cycles, it indicates that the current renewable energy is relatively stable and can provide stable power supply energy to the first device. At this time, the first device sends the first notification message indicating the first energy type, which not only reduces the number of sending notification messages, but also avoids frequent adjustment of the transmission path of network traffic in the communication network.
可选地,在上述第一方式或第二方式中,在第一设备供电能源发生变化时,第一设备发送第一通告报文或第二通告报文,以通告第一设备的供电能源。在实现时:Optionally, in the above first manner or the second manner, when the power supply energy of the first device changes, the first device sends a first notification message or a second notification message to notify the power supply energy of the first device. When implemented:
在执行步骤401之前,第一设备记录在当前之前第一设备供电能源的能源类型。对于上述第一方式,在步骤402中,在第一设备确定第一设备供电能源的能源类型为第一能源类型,如果第一设备记录的能源类型和第一能源类型不同,第一设备发送第一通告报文,并将记录的能源类型更新为第一能源类型。如果第一设备记录的能源类型和第一能源类型相同,则停止发送第一通告报文。同样在执行步骤404中,在第一设备确定第一设备供电能源的能源类型为第二能源类型时,如果第一设备记录的能源类型和第二能源类型不同,第一设备发送第二通告报文,并将记录的能源类型更新为第二能源类型。如果第一设备记录的能源类型和第二能源类型相同,则停止发送第二通告报文。Before performing step 401, the first device records the energy type of the energy supplied by the first device before the current one. For the above first method, in step 402, the first device determines that the energy type of the energy supplied by the first device is the first energy type. If the energy type recorded by the first device is different from the first energy type, the first device sends the first energy type. A notification message is sent, and the recorded energy type is updated to the first energy type. If the energy type recorded by the first device is the same as the first energy type, stop sending the first notification message. Also in step 404, when the first device determines that the energy type of the energy supplied by the first device is the second energy type, if the energy type recorded by the first device is different from the second energy type, the first device sends a second notification report document and update the recorded energy type to the second energy type. If the energy type recorded by the first device is the same as the second energy type, then stop sending the second notification message.
对于上述第二方式,在步骤402中,在第一设备连续多个周期内确定第一设备供电能源的能源类型均为第一能源类型后,如果第一设备记录的能源类型和第一能源类型不同,第一设备发送第一通告报文,并将记录的能源类型更新为第一能源类型。如果第一设备记录的能源类型和第一能源类型相同,则停止发送第一通告报文。同样在执行步骤404中,在第一设备连续多个周期内确定出第一设备供电能源的能源类型均为第二能源类型后,如果第一设备记录的能源类型和第二能源类型不同,表示在第一设备确定的能源类型由第一能源类型变为第二能源类型后且在连续多个周期内确定的能源类型均为第二能源类型,第一设备发送第二通告报文,并将记录的能源类型更新为第二能源类型。如果第一设备记录的能源类型和第二能源类型相同,则停止发送第二通告报文。For the above second method, in step 402, after the first device determines that the energy type of the energy supplied by the first device is the first energy type in multiple consecutive cycles, if the energy type recorded by the first device and the first energy type Differently, the first device sends a first notification message and updates the recorded energy type to the first energy type. If the energy type recorded by the first device is the same as the first energy type, stop sending the first notification message. Also in step 404, after the first device determines that the energy type of the energy supplied by the first device is the second energy type in multiple consecutive cycles, if the energy type recorded by the first device is different from the second energy type, it means After the energy type determined by the first device changes from the first energy type to the second energy type and the energy types determined in multiple consecutive cycles are all the second energy type, the first device sends a second notification message and The recorded energy type is updated to the second energy type. If the energy type recorded by the first device is the same as the second energy type, then stop sending the second notification message.
在步骤402中,第一设备和第二设备之间可能有如下三种关系,第一种关系为第一设备和第二设备是同一AS域内的设备,为了便于说明,将第一设备所在的AS域称为第一AS域,即第一设备和第二设备均位于第一AS域内。第二种关系为第一设备和第二设备为两个不同AS域内的设备,为了便于说明,将第一设备所在的AS域称为第一AS域,将第二设备所在的AS域称为第二AS域,第一AS域和第二AS域不同。第三种关系为第一设备为第一AS域内的设备,第二设备为控制器。In step 402, there may be the following three relationships between the first device and the second device. The first relationship is that the first device and the second device are devices in the same AS domain. For convenience of explanation, the location where the first device is located is The AS domain is called the first AS domain, that is, the first device and the second device are both located in the first AS domain. The second relationship is that the first device and the second device are devices in two different AS domains. For convenience of explanation, the AS domain where the first device is located is called the first AS domain, and the AS domain where the second device is located is called the first AS domain. The second AS domain, the first AS domain and the second AS domain are different. The third relationship is that the first device is a device in the first AS domain, and the second device is a controller.
接下来详细介绍在该三种关系下的第一通告报文和第二通告报文的结构。Next, the structures of the first notification message and the second notification message under these three relationships will be introduced in detail.
针对上述第一种关系,第一设备和第二设备均为第一AS域内的设备,第二设备包括第一AS域除第一设备之外的其他设备。也就是说:第一设备向第一AS域内的设备发送第一通告报文。Regarding the above first relationship, the first device and the second device are both devices in the first AS domain, and the second device includes other devices in the first AS domain except the first device. That is to say: the first device sends the first notification message to the device in the first AS domain.
针对第一种关系,第一通告报文为IGP报文,第一设备采用广播方式向第一AS域内的 设备广播第一通告报文,第一通告报文包括以第一设备为端点的链路的标识信息和该链路的第一开销(cost)值,第一cost值与第一能源类型相对应。For the first relationship, the first advertisement message is an IGP message, and the first device broadcasts it to The device broadcasts a first advertisement message. The first advertisement message includes identification information of a link with the first device as an endpoint and a first cost (cost) value of the link. The first cost value corresponds to the first energy type. .
可选地,IGP报文为OSPF报文和/或IS-IS报文等。Optionally, the IGP message is an OSPF message and/or an IS-IS message.
可选地,链路包括两个端点,其中一个端点为第一设备,另一个端点为第一设备的邻居设备,该链路的标识信息包括第一设备的设备标识和该邻居设备的设备标识等。第一设备的设备标识包括第一设备的地址和/或序列号等,该邻居设备的设备标识包括该邻居设备的地址和/或序列号等。Optionally, the link includes two endpoints, one of which is the first device and the other endpoint is a neighbor device of the first device, and the identification information of the link includes the device identifier of the first device and the device identifier of the neighbor device. wait. The device identification of the first device includes the address and/or serial number of the first device, and the device identification of the neighbor device includes the address and/or serial number of the neighbor device.
可选地,第一通告报文包括第一TLV,第一TLV包括该链路的标识信息和/或该链路的第一cost值。Optionally, the first advertisement message includes a first TLV, and the first TLV includes identification information of the link and/or a first cost value of the link.
可选地,第一TLV为第一链路状态TLV或第一节点状态TLV。即第一通告报文包括第一链路状态TLV,第一链路状态TLV包括该链路的标识信息和/或该链路的第一cost值。或者,第一通告报文包括第一节点状态TLV,第一节点状态TLV包括该链路的标识信息和/或该链路的第一cost值。Optionally, the first TLV is a first link status TLV or a first node status TLV. That is, the first advertisement message includes the first link status TLV, and the first link status TLV includes the identification information of the link and/or the first cost value of the link. Alternatively, the first notification message includes a first node status TLV, and the first node status TLV includes identification information of the link and/or a first cost value of the link.
其中,在第一设备确定出第一设备供电能源的能源类型为第一能源类型后,第一设备生成第一通告报文,此时第一通告报文中的第一链路状态TLV包括该链路的第三cost值,第三cost值是事先为该链路配置的cost值。第一设备在发送第一通告报文之前,减小第三cost值得到第一cost值,使得第一通告报文中的第一链路状态TLV包括该链路的第一cost值。或者,Wherein, after the first device determines that the energy type of the energy supplied by the first device is the first energy type, the first device generates the first notification message. At this time, the first link status TLV in the first notification message includes the The third cost value of the link. The third cost value is the cost value configured in advance for the link. Before sending the first advertisement message, the first device reduces the third cost value to obtain the first cost value, so that the first link status TLV in the first advertisement message includes the first cost value of the link. or,
在第一设备确定出第一设备供电能源的能源类型为第一能源类型后,第一设备生成第一通告报文,此时第一通告报文的第一节点状态TLV包括该链路的第三cost值。第一设备在发送第一通告报文之前,减小第三cost值得到第一cost值,使得第一通告报文中的第一节点状态TLV包括该链路的第一cost值。After the first device determines that the energy type of the energy supplied by the first device is the first energy type, the first device generates a first notification message. At this time, the first node status TLV of the first notification message includes the first node status TLV of the link. Three cost values. Before sending the first advertisement message, the first device reduces the third cost value to obtain the first cost value, so that the first node status TLV in the first advertisement message includes the first cost value of the link.
可选地,第一设备可能采用如下方式一至方式三中的任一种方式,减小第三cost值得到第一cost值,该方式一至方式三分别为。Optionally, the first device may adopt any one of the following methods 1 to 3 to reduce the third cost value to obtain the first cost value, where the methods 1 to 3 are respectively.
方式一,第一设备包括第一能源类型(可再生能源)对应的节能因子,第一能源类型对应的节能因子是大于0且小于1的小数,将第一通告报文中的该链路的第三cost值与第一能源类型对应的节能因子相乘得到第一cost值。Method 1: The first device includes an energy saving factor corresponding to the first energy type (renewable energy). The energy saving factor corresponding to the first energy type is a decimal greater than 0 and less than 1, and the link in the first notification message is The third cost value is multiplied by the energy saving factor corresponding to the first energy type to obtain the first cost value.
第一能源类型有多种,每种第一能源类型对应的节能因子相同,或者,每种第一能源类型对应的节能因子不同。例如,该多种第一能源类型包括水电能源、风电能源和太阳能电力能源等。水电能源对应的节能因子为“0.5”,风电能源对应的节能因子为“0.5”,太阳能电力能源对应的节能因子为“0.5”等,每种第一能源类型对应的节能因子均为“0.5”。或者,水电能源对应的节能因子为“0.7”,风电能源对应的节能因子为0.6,太阳能电力能源对应的节能因子为“0.5”等,每种第一能源类型对应的节能因子不同。There are multiple first energy types, and the energy saving factors corresponding to each first energy type are the same, or the energy saving factors corresponding to each first energy type are different. For example, the plurality of first energy types include hydropower energy, wind power energy, solar power energy, and the like. The energy saving factor corresponding to hydropower energy is "0.5", the energy saving factor corresponding to wind power energy is "0.5", the energy saving factor corresponding to solar power energy is "0.5", etc., the energy saving factor corresponding to each first energy type is "0.5" . Or, the energy-saving factor corresponding to hydropower energy is "0.7", the energy-saving factor corresponding to wind power energy is 0.6, the energy-saving factor corresponding to solar power energy is "0.5", etc. The energy-saving factor corresponding to each first energy type is different.
例如,参见图7,以网络设备5为端点的链路包括链路1和链路2,事先为链路1配置的第三cost值为1,为链路2配置的第三cost值为1。网络设备5确定网络设备5供电能源的能源类型为水电能源,生成第一通告报文,第一通告报文的第一节点状态TLV包括链路1的标识信息和第三cost值“1”,以及链路2的标识信息和第三cost值“1”。第一设备将第一通告报文中的链路1的第三cost值“1”与水电能源对应的节能因子“0.5”相乘得到链路1的第一cost值“0.5”,以及将第一通告报文中的链路2的第三cost值“1”与水电能源对应的节能因子“0.5”相乘得到链路2的第一cost值“0.5”。网络设备5向AS域1内的网络设备广播第一通告报文。 For example, see Figure 7. The link with network device 5 as the endpoint includes link 1 and link 2. The third cost value configured in advance for link 1 is 1, and the third cost value configured for link 2 is 1. . The network device 5 determines that the energy type of the power supply energy of the network device 5 is hydroelectric energy, and generates a first notification message. The first node status TLV of the first notification message includes the identification information of link 1 and the third cost value "1", and the identification information of link 2 and the third cost value "1". The first device multiplies the third cost value "1" of link 1 in the first advertisement message by the energy saving factor "0.5" corresponding to the hydropower energy to obtain the first cost value "0.5" of link 1, and adds the first cost value "0.5" to link 1. The third cost value "1" of link 2 in a notification message is multiplied by the energy saving factor "0.5" corresponding to hydropower energy to obtain the first cost value "0.5" of link 2. Network device 5 broadcasts the first notification message to the network devices in AS domain 1.
方式二,对于第一通告报文包括的第三cost值,第一设备将第三cost值的最高Y位比特的值设置为0,得到第一cost值,Y为大于0的整数,且Y小于第三cost值包括的比特个数。Method 2: For the third cost value included in the first advertisement message, the first device sets the value of the highest Y bit of the third cost value to 0 to obtain the first cost value, Y is an integer greater than 0, and Y is less than the number of bits included in the third cost value.
方式三,第一设备包括第一能源类型(可再生能源)对应的偏移值,对于第一通告报文包括的第三cost值,第一设备将第三cost值减小第一能源类型对应偏移值得到第一cost值。Method 3: The first device includes an offset value corresponding to the first energy type (renewable energy). For the third cost value included in the first notification message, the first device reduces the third cost value corresponding to the first energy type. The offset value gets the first cost value.
第一能源类型有多种,每种第一能源类型对应的偏移值相同,或者,每种第一能源类型对应的偏移值不同。例如,水电能源对应的偏移值为“0.5”,风电能源对应的偏移值为“0.5”,太阳能电力能源对应的偏移值为“0.5”等,即每种第一能源类型对应的偏移值相同。或者,水电能源对应的偏移值为“0.7”,风电能源对应的偏移值为“0.6”,太阳能电力能源对应的偏移值为“0.5”等,即每种第一能源类型对应的偏移值不同。There are multiple first energy types, and the offset values corresponding to each first energy type are the same, or the offset values corresponding to each first energy type are different. For example, the offset value corresponding to hydropower energy is "0.5", the offset value corresponding to wind power energy is "0.5", the offset value corresponding to solar power energy is "0.5", etc., that is, the offset value corresponding to each first energy type The shift values are the same. Or, the offset value corresponding to hydropower energy is "0.7", the offset value corresponding to wind power energy is "0.6", the offset value corresponding to solar power energy is "0.5", etc., that is, the offset value corresponding to each first energy type The shift values are different.
可选地,第一TLV为第一节能因子TLV,第一节能因子TLV是在第一通告报文中扩展的TLV。即第一通告报文中的第一节能因子TLV包括该链路的标识信息和/或该链路的第一cost值。Optionally, the first TLV is a first energy-saving factor TLV, and the first energy-saving factor TLV is a TLV extended in the first advertisement message. That is, the first energy saving factor TLV in the first advertisement message includes the identification information of the link and/or the first cost value of the link.
第一能源类型有多种,每种第一能源类型对应一个第一节能因子TLV,对于任一种第一能源类型对应的第一节能因子TLV,第一节能因子TLV包括该链路的标识信息和/或该第一能源类型对应的第一cost值。There are multiple first energy types. Each first energy type corresponds to a first energy saving factor TLV. For the first energy saving factor TLV corresponding to any first energy type, the first energy saving factor TLV includes the identification information of the link. and/or the first cost value corresponding to the first energy type.
例如参见图9(a),在第一能源类型为风电能源时,第一通告报文包括风电能源对应的第一节能因子TLV,第一节能因子TLV包括类型(Type)、长度(Length)和值(Value)三个子字段,第一节能因子TLV的Value子字段包括风电能源对应的第一cost值。For example, see Figure 9(a). When the first energy type is wind power energy, the first notification message includes the first energy saving factor TLV corresponding to the wind power energy. The first energy saving factor TLV includes type (Type), length (Length) and There are three subfields of value (Value). The Value subfield of the first energy saving factor TLV includes the first cost value corresponding to the wind power energy.
参见图9(b),在第一能源类型为水电能源时,第一通告报文包括水电能源对应的第一节能因子TLV,第一节能因子TLV包括Type、Length和Value三个子字段,第一节能因子TLV的Value子字段包括水电能源对应的第一cost值。Referring to Figure 9(b), when the first energy type is hydropower energy, the first notification message includes the first energy saving factor TLV corresponding to the hydropower energy. The first energy saving factor TLV includes three subfields: Type, Length and Value. The first The Value subfield of the energy saving factor TLV includes the first cost value corresponding to hydropower energy.
参见图9(c),在第一能源类型为太阳能电力能源时,第一通告报文包括太阳能电力能源对应的第一节能因子TLV,第一节能因子TLV包括Type、Length和Value三个子字段,第一节能因子TLV的Value子字段包括太阳能电力能源对应的第一cost值。Referring to Figure 9(c), when the first energy type is solar electric energy, the first notification message includes the first energy saving factor TLV corresponding to the solar electric energy. The first energy saving factor TLV includes three subfields: Type, Length and Value. The Value subfield of the first energy saving factor TLV includes the first cost value corresponding to the solar power energy.
可选地,在第一TLV为第一节能因子TLV的情况,第一通告报文还可能包括第一节点状态TLV,第一节点状态TLV包括该链路的标识信息和/或第三cost值;和/或,第一通告报文还可能包括第一链路状态TLV,第一链路状态TLV包括该链路的标识信息和/或第三cost值。也就是说,第一通告报文同时包括第一节点状态TLV和第一节能因子TLV,或者,第一通告报文同时包括第一链路状态TLV和第一节能因子TLV。在第一通告报文中第一cost值小于第三cost值。Optionally, when the first TLV is the first energy-saving factor TLV, the first notification message may also include a first node status TLV, and the first node status TLV includes identification information of the link and/or a third cost value. ; and/or, the first advertisement message may also include a first link status TLV, and the first link status TLV includes identification information of the link and/or a third cost value. That is to say, the first advertisement message includes both the first node status TLV and the first energy saving factor TLV, or the first advertisement message includes both the first link status TLV and the first energy saving factor TLV. The first cost value in the first notification message is smaller than the third cost value.
可选地,对于第一链路状态TLV和第一节能因子TLV这两个字段,通过字段的类型(Type)区分该两个字段,第一链路状态TLV包括第一链路状态TLV的类型,第一节能因子TLV包括第一节能因子TLV的类型,该两个字段包括的类型不同。Optionally, for the two fields of the first link status TLV and the first energy saving factor TLV, the two fields are distinguished by the type of the field (Type), and the first link status TLV includes the type of the first link status TLV. , the first energy saving factor TLV includes the type of the first energy saving factor TLV, and the two fields include different types.
可选地,对于第一节点状态TLV和第一节能因子TLV这两个字段,通过字段的类型区分该两个字段,第一节点状态TLV包括第一节点状态TLV的类型,第一节能因子TLV包括第一节能因子TLV的类型,该两个字段包括的类型不同。Optionally, for the two fields of the first node status TLV and the first energy saving factor TLV, the two fields are distinguished by the type of the field. The first node status TLV includes the type of the first node status TLV, and the first energy saving factor TLV Including the type of the first energy-saving factor TLV, the two fields include different types.
可选地,对于上述第一节点状态TLV,第一链路状态TLV或第一节能因子TLV等中的任一个第一TLV,第一TLV包括第一子TLV和第二子TLV,第一子TLV包括该链路的标识信息,第二子TLV包括第一cost值。 Optionally, for any first TLV among the above-mentioned first node status TLV, first link status TLV or first energy saving factor TLV, the first TLV includes a first sub-TLV and a second sub-TLV, and the first sub-TLV The TLV includes identification information of the link, and the second sub-TLV includes the first cost value.
针对上述第一种关系,第二通告报文同第一通告报文一样,也为IGP报文,第一设备向第一AS域内的设备发送第二通告报文。Regarding the first relationship mentioned above, the second advertisement message is the same as the first advertisement message and is also an IGP message. The first device sends the second advertisement message to the device in the first AS domain.
可选地,第一设备采用广播方式向第一AS域内的设备广播第二通告报文,第二通告报文包括以第一设备为端点的链路的标识信息和该链路的第二cost值,第二cost值与第二能源类型相对应。Optionally, the first device broadcasts a second notification message to the devices in the first AS domain in a broadcast manner. The second notification message includes identification information of a link with the first device as an endpoint and a second cost of the link. value, and the second cost value corresponds to the second energy type.
可选地,第二通告报文包括第二TLV,第二TLV包括该链路的标识信息和/或该链路的第二cost值。Optionally, the second advertisement message includes a second TLV, and the second TLV includes identification information of the link and/or a second cost value of the link.
可选地,第二TLV为第二链路状态TLV或第二节点状态TLV。在第一通告报文包括第一链路状态TLV的情况,第二通告报文包括第二链路状态TLV,第二链路状态TLV包括该链路的标识信息和/或该链路的第二cost值。或者,在第一通告报文包括第一节点状态TLV的情况,第二通告报文包括第二节点状态TLV,第二节点状态TLV包括该链路的标识信息和/或该链路的第二cost值。Optionally, the second TLV is a second link status TLV or a second node status TLV. In the case where the first advertisement message includes the first link status TLV, the second advertisement message includes the second link status TLV, and the second link status TLV includes the identification information of the link and/or the third link status of the link. 2 cost value. Or, in the case where the first notification message includes the first node status TLV, the second notification message includes the second node status TLV, and the second node status TLV includes the identification information of the link and/or the second node status TLV of the link. cost value.
其中,在第一设备确定出第一设备供电能源的能源类型为第二能源类型后,第一设备生成第二通告报文,此时第二通告报文的第二链路状态TLV包括该链路的第三cost值。第一设备在发送第二通告报文之前,增加第三cost值得到第二cost值,使得第二通告报文中的第二链路状态TLV包括该链路的第二cost值。或者,After the first device determines that the energy type of the energy supplied by the first device is the second energy type, the first device generates a second notification message. At this time, the second link status TLV of the second notification message includes the link status TLV. The third cost value of the road. Before sending the second advertisement message, the first device adds the third cost value to obtain the second cost value, so that the second link status TLV in the second advertisement message includes the second cost value of the link. or,
在第一设备确定出第一设备供电能源的能源类型为第二能源类型后,第一设备生成第二通告报文,此时第二通告报文中的第二节点状态TLV包括该链路的第三cost值。第一设备在发送第二通告报文之前,增加第三cost值得到第二cost值,使得第二通告报文中的第二节点状态TLV包括该链路的第二cost值。After the first device determines that the energy type of the energy supplied by the first device is the second energy type, the first device generates a second notification message. At this time, the second node status TLV in the second notification message includes the link's The third cost value. Before sending the second advertisement message, the first device adds the third cost value to obtain the second cost value, so that the second node status TLV in the second advertisement message includes the second cost value of the link.
可选地,第一设备可能采用如下方式A至方式C中的任一种方式,增加第三cost值得到第二cost值,该方式A至方式C分别为。Optionally, the first device may adopt any one of the following methods A to C to add the third cost value to obtain the second cost value. The methods A to C are respectively.
方式A,第一设备包括第二能源类型(非可再生能源)对应的节能因子,第二能源类型对应的节能因子是大于1的数值,将第二通告报文中的该链路的第三cost值与第二能源类型对应的节能因子相乘得到第二cost值。Method A, the first device includes an energy saving factor corresponding to the second energy type (non-renewable energy), the energy saving factor corresponding to the second energy type is a value greater than 1, and the third element of the link in the second notification message is The cost value is multiplied by the energy saving factor corresponding to the second energy type to obtain the second cost value.
例如,参见图10,以网络设备5为端点的链路包括链路1和链路2,事先为链路1配置的第三cost值为1,为链路2配置的第三cost值为1。网络设备5确定网络设备5供电能源的能源类型为煤电能源,生成第二通告报文,第二通告报文中的第一节点状态TLV包括链路1的标识信息和第三cost值“1”,以及链路2的标识信息和第三cost值“1”。假设煤电能源对应的节能因子为“1.5”,第一设备将第二通告报文中的链路1的第三cost值“1”与煤电能源对应的节能因子“1.5”相乘得到链路1的第二cost值“1.5”,以及将第二通告报文中的链路2的第三cost值“1”与煤电能源对应的节能因子“1.5”相乘得到链路2的第二cost值“1.5”。网络设备5向AS域1内的网络设备广播第二通告报文。For example, see Figure 10. The link with network device 5 as the endpoint includes link 1 and link 2. The third cost value configured in advance for link 1 is 1, and the third cost value configured for link 2 is 1. . Network device 5 determines that the energy type of the power supply energy of network device 5 is coal and electricity energy, and generates a second notification message. The first node status TLV in the second notification message includes the identification information of link 1 and the third cost value "1 ”, as well as the identification information of link 2 and the third cost value “1”. Assume that the energy saving factor corresponding to coal power energy is "1.5". The first device multiplies the third cost value "1" of link 1 in the second notification message by the energy saving factor "1.5" corresponding to coal power energy to obtain the link The second cost value "1.5" of link 1, and the third cost value "1" of link 2 in the second notification message are multiplied by the energy saving factor "1.5" corresponding to the coal power energy to obtain the third cost value of link 2. The second cost value is "1.5". Network device 5 broadcasts the second notification message to the network devices in AS domain 1.
方式B,对于第二通告报文包括的第三cost值,第一设备将第三cost值的最高Z位比特的值设置为1,得到第二cost值,Z为大于0的整数,且Z小于第三cost值包括的比特个数。Method B, for the third cost value included in the second advertisement message, the first device sets the value of the highest Z bit of the third cost value to 1 to obtain the second cost value, Z is an integer greater than 0, and Z is less than the number of bits included in the third cost value.
方式C,第一设备包括第二能源类型(非可再生能源)对应的偏移值,对于第二通告报文包括的第三cost值,第一设备将第三cost值增加第二能源类型对应偏移值得到第二cost值。Method C, the first device includes an offset value corresponding to the second energy type (non-renewable energy). For the third cost value included in the second notification message, the first device increases the third cost value corresponding to the second energy type. The offset value gets the second cost value.
可选地,第二TLV为第二节能因子TLV,第二节能因子TLV是在第二通告报文中扩展的TLV。即第二通告报文中的第二节能因子TLV包括该链路的标识信息和/或该链路的第二 cost值。Optionally, the second TLV is a second energy-saving factor TLV, and the second energy-saving factor TLV is a TLV extended in the second advertisement message. That is, the second energy-saving factor TLV in the second advertisement message includes the identification information of the link and/or the second cost value.
可选地,在第二TLV为第二节能因子TLV的情况,第二通告报文还可能包括第二节点状态TLV,第二节点状态TLV包括该链路的标识信息和/或该链路的第三cost值;和/或,第二通告报文还可能包括第二链路状态TLV,第二链路状态TLV包括该链路的标识信息和/或该链路的第三cost值。也就是说,第二通告报文同时包括第二节点状态TLV和第二节能因子TLV,或者,第二通告报文同时包括第二链路状态TLV和第二节能因子TLV。在第二通告报文中第二cost值大于第三cost值。Optionally, when the second TLV is the second energy-saving factor TLV, the second notification message may also include a second node status TLV, and the second node status TLV includes the identification information of the link and/or the link's The third cost value; and/or the second advertisement message may also include a second link status TLV, and the second link status TLV includes identification information of the link and/or a third cost value of the link. That is to say, the second advertisement message includes the second node status TLV and the second energy saving factor TLV at the same time, or the second advertisement message includes the second link status TLV and the second energy saving factor TLV at the same time. The second cost value in the second notification message is greater than the third cost value.
可选地,对于第二链路状态TLV和第二节能因子TLV这两个字段,通过字段的类型(Type)区分该两个字段,第二链路状态TLV包括第二链路状态TLV的类型,第二节能因子TLV包括第二节能因子TLV的类型,该两个字段包括的类型不同。Optionally, for the two fields of the second link state TLV and the second energy saving factor TLV, the two fields are distinguished by the type of the field (Type), and the second link state TLV includes the type of the second link state TLV. , the second energy-saving factor TLV includes the type of the second energy-saving factor TLV, and the two fields include different types.
可选地,对于第二节点状态TLV和第二节能因子TLV这两个字段,通过字段的类型区分该两个字段,第二节点状态TLV包括第二节点状态TLV的类型,第二节能因子TLV包括第二节能因子TLV的类型,该两个字段包括的类型不同。Optionally, for the two fields of the second node status TLV and the second energy saving factor TLV, the two fields are distinguished by the type of the field. The second node status TLV includes the type of the second node status TLV, and the second energy saving factor TLV Including the type of the second energy-saving factor TLV, the two fields include different types.
可选地,对于上述第二节点状态TLV,第二链路状态TLV或第二节能因子TLV中的任一个第二TLV,第二TLV包括第三子TLV和第四子TLV,第三子TLV包括该链路的标识信息,第四子TLV包括第二cost值。Optionally, for any one of the above-mentioned second node status TLV, second link status TLV or second energy saving factor TLV, the second TLV includes a third sub-TLV and a fourth sub-TLV, and the third sub-TLV Includes identification information of the link, and the fourth sub-TLV includes the second cost value.
可选地,第一通告报文中的第一TLV和第二通告报文中的第二TLV是同类型的TLV。即在第一TLV为第一节点状态TLV时,第二TLV为第二节点状态TLV;在第一TLV为第一链路状态TLV时,第二TLV为第二链路状态TLV;在第一TLV为第一节能因子TLV时,第二TLV为第二节能因子TLV。Optionally, the first TLV in the first advertisement message and the second TLV in the second advertisement message are TLVs of the same type. That is, when the first TLV is the first node status TLV, the second TLV is the second node status TLV; when the first TLV is the first link status TLV, the second TLV is the second link status TLV; when the first TLV is the first link status TLV, When the TLV is the first energy-saving factor TLV, the second TLV is the second energy-saving factor TLV.
针对上述第二种关系,第一设备是第一AS域内的设备,第二设备是第二AS域内的设备,也就是说,第一设备向第二AS域内的设备发送第一通告报文。Regarding the above second relationship, the first device is a device in the first AS domain, and the second device is a device in the second AS domain. That is to say, the first device sends the first notification message to the device in the second AS domain.
在第一设备发送第一通告报文之前,第二设备向第一设备发送第二设备的能力信息,该能力信息用于指示第二设备具有处理第一通告报文的能力。第一设备接收该能力信息,基于该能力信息确定第二设备具有处理第一通告报文的能力时,向第二设备发送第一通告报文。Before the first device sends the first notification message, the second device sends capability information of the second device to the first device, where the capability information is used to indicate that the second device has the capability to process the first notification message. When the first device receives the capability information and determines based on the capability information that the second device has the ability to process the first notification message, it sends the first notification message to the second device.
在第二种关系下,第一通告报文为BGP报文,第二通告报文同第一通告报文一样,也为BGP报文。其中,在步骤404中,第一设备向第二AS域内的设备发送第二通告报文。In the second relationship, the first advertisement message is a BGP message, and the second advertisement message, like the first advertisement message, is also a BGP message. In step 404, the first device sends a second notification message to the device in the second AS domain.
针对上述第三种关系,第一设备是第一AS域内的设备,第二设备是控制器,也就是说,第一设备向控制器发送第一通告报文。Regarding the above third relationship, the first device is a device in the first AS domain, and the second device is the controller. That is to say, the first device sends the first notification message to the controller.
在第一设备发送第一通告报文之前,控制器向第一设备发送控制器的能力信息,该能力信息用于指示控制器具有处理第一通告报文的能力。第一设备接收该能力信息,基于该能力信息确定控制器具有处理第一通告报文的能力时,向控制器发送第一通告报文。Before the first device sends the first notification message, the controller sends the controller's capability information to the first device, and the capability information is used to indicate that the controller has the ability to process the first notification message. When the first device receives the capability information and determines that the controller has the capability to process the first notification message based on the capability information, it sends the first notification message to the controller.
在第三种关系下,第一通告报文为BGP报文,第二通告报文同第一通告报文一样,也为BGP报文。其中,在步骤404中,第一设备向控制器发送第二通告报文。In the third relationship, the first advertisement message is a BGP message, and the second advertisement message, like the first advertisement message, is also a BGP message. In step 404, the first device sends a second notification message to the controller.
针对第二种关系或第三种关系,第一通告报文用于指示第一设备供电能源的能源类型为第一能源类型,以及,第二通告报文用于指示第一设备供电能源的能源类型为第二能源类型。或者,第一通告报文用于指示第一设备保存的路由信息对应的能源类型为第一能源类型,以及在步骤404中,第二通告报文用于指示第一设备保存的路由信息对应的能源类型为第二能源类型。 For the second relationship or the third relationship, the first notification message is used to indicate that the energy type of the power supply energy of the first device is the first energy type, and the second notification message is used to indicate the energy type of the power supply energy of the first device. The type is the second energy type. Alternatively, the first advertisement message is used to indicate that the energy type corresponding to the routing information saved by the first device is the first energy type, and in step 404, the second advertisement message is used to indicate that the energy type corresponding to the routing information saved by the first device is the first energy type. The energy type is a second energy type.
可选地,采用如下方式1至方式3中的任一种方式使第一通告报文指示第一能源类型,以及使第二通告报文指示第二能源类型。Optionally, any one of the following methods 1 to 3 is used to make the first notification message indicate the first energy type, and to make the second notification message indicate the second energy type.
方式1,第一通告报文用于携带设备属性,第一通告报文包括第一新增路由器属性字段,第一新增路由器属性字段包括第一能源类型。In Method 1, the first advertisement message is used to carry device attributes. The first advertisement message includes a first newly added router attribute field, and the first newly added router attribute field includes a first energy type.
在方式1中,新增一种设备属性,该设备属性为第一设备供电能源的能源类型,第一新增路由器属性字段是在第一通告报文中扩展的一个设备属性字段,第一新增路由器属性字段包括第一设备供电能源的能源类型(第一能源类型)。In method 1, a new device attribute is added. The device attribute is the energy type of the power supply energy of the first device. The first new router attribute field is a device attribute field expanded in the first advertisement message. The first new router attribute field is a device attribute field expanded in the first advertisement message. The router attribute field includes an energy type (first energy type) of power supply energy for the first device.
例如,参见图8,假设第二设备为控制器,网络设备5确定网络设备5供电能源的能源类型为水电能源,生成第一通告报文,第一通告报文包括第一新增路由器属性字段,第一新增路由器属性字段包括的第一能源类型为水电能源。网络设备5向控制器发送第一通告报文。For example, referring to Figure 8, assuming that the second device is a controller, the network device 5 determines that the energy type of the power supply of the network device 5 is hydropower energy, and generates a first notification message. The first notification message includes the first newly added router attribute field. , the first energy type included in the first newly added router attribute field is hydroelectric energy. The network device 5 sends the first notification message to the controller.
对于在步骤404中第一设备发送的第二通告报文,第二通告报文也用于携带该设备属性,第二通告报文包括第二新增路由器属性字段,第二新增路由器属性字段包括第二能源类型。For the second advertisement message sent by the first device in step 404, the second advertisement message is also used to carry attributes of the device. The second advertisement message includes a second new router attribute field, and a second new router attribute field. Includes secondary energy type.
第二新增路由器属性字段是在第二通告报文中扩展的一个设备属性字段。例如,参见图11,假设网络设备5确定网络设备5供电能源的能源类型由水电能源变为煤电能源,生成第二通告报文,第二通告报文包括第二新增路由器属性字段,第二新增路由器属性字段包括的第二能源类型为煤电能源。网络设备5向控制器发送第二通告报文。The second newly added router attribute field is a device attribute field extended in the second advertisement message. For example, referring to Figure 11, assume that the network device 5 determines that the energy type of the power supply energy of the network device 5 has changed from hydropower energy to coal power energy, and generates a second notification message. The second notification message includes a second newly added router attribute field. 2. The second energy type included in the newly added router attribute field is coal and electricity energy. The network device 5 sends a second notification message to the controller.
方式2,第一通告报文用于携带分段路由互联协议第六版策略(segment routing internet protocol version 6,SRv6 Policy),第一通告报文包括第一颜色字段,第一颜色字段包括第一能源类型。Method 2, the first advertisement message is used to carry the segment routing internet protocol version 6, SRv6 Policy. The first advertisement message includes the first color field, and the first color field includes the first Energy type.
可选地,第一颜色字段的取值为第一取值,第一取值用于指示第一能源类型。Optionally, the value of the first color field is a first value, and the first value is used to indicate the first energy type.
可选地,第一颜色字段为TLV字段。第一能源类型有多种,每种第一能源类型对应不同的第一颜色字段。第一能源类型可分为水电能源、风电能源或太阳电力能源等类型。参见图12(a),第一颜色字段为风电能源对应的TLV字段,或者,参见图12(b),第一颜色字段为水电能源对应的TLV字段,或者,参见图12(c),第一颜色字段为太阳能电力能源对应的TLV字段。Optionally, the first color field is a TLV field. There are multiple first energy types, and each first energy type corresponds to a different first color field. The first energy type can be divided into types such as hydropower energy, wind power energy or solar power energy. Referring to Figure 12(a), the first color field is the TLV field corresponding to wind power energy, or, referring to Figure 12(b), the first color field is the TLV field corresponding to hydropower energy, or, referring to Figure 12(c), the One color field is the TLV field corresponding to the solar power energy.
可选地,第一颜色字段的取值不同,第一颜色字段指示的第一能源类型不同。例如,第一取值包括风电颜色取值、水电颜色取值或太阳能颜色取值等,风电颜色取值用于指示风电能源,水电颜色取值用于指示水电能源,太阳能颜色取值用于指示太阳能电力能源。Optionally, the values of the first color field are different, and the first energy types indicated by the first color field are different. For example, the first value includes the color value of wind power, the color value of hydropower, or the color value of solar energy, etc. The color value of wind power is used to indicate wind power energy, the color value of hydropower is used to indicate hydropower energy, and the color value of solar energy is used to indicate Solar electric energy.
例如,风电颜色取值为1,1指示风电能源,水电颜色取值为2,2表示水电能源,太阳能颜色取值为3,3表示太阳能电力能源。当然,风电颜色取值、水电颜色取值和太阳能颜色取值还可能是其他取值,在此不再一一列举说明。For example, the color value of wind power is 1, which indicates wind power energy, the color value of hydropower is 2, which indicates hydropower energy, and the color value of solar energy is 3, which indicates solar electric energy. Of course, the wind power color value, hydropower color value and solar power color value may also have other values, which will not be listed one by one here.
例如,参见图8,假设第二设备为控制器,网络设备5确定网络设备5供电能源的能源类型为水电能源,生成第一通告报文,第一通告报文包括第一颜色字段,第一颜色字段的取值为2,表示第一能源类型为水电能源。网络设备5向控制器发送第一通告报文。For example, referring to Figure 8, assuming that the second device is a controller, the network device 5 determines that the energy type of the energy supplied by the network device 5 is hydropower energy, and generates a first notification message. The first notification message includes a first color field, and the first notification message includes a first color field. The value of the color field is 2, indicating that the first energy type is hydropower energy. The network device 5 sends the first notification message to the controller.
对于在步骤404中第一设备发送的第二通告报文,第二通告报文也用于携带该SRv6Policy,第二通告报文包括第二颜色字段,第二颜色字段包括第二能源类型。For the second notification message sent by the first device in step 404, the second notification message is also used to carry the SRv6Policy. The second notification message includes a second color field, and the second color field includes the second energy type.
可选地,第二颜色字段的取值为第二取值,第二取值用于指示第二能源类型。Optionally, the value of the second color field is a second value, and the second value is used to indicate the second energy type.
例如,参见图11,假设网络设备5确定网络设备5供电能源的能源类型由水电能源变为煤电能源,生成第二通告报文,第二通告报文包括第二颜色字段,第二颜色字段的取值为4, 4表示第一能源类型为煤电能源。网络设备5向控制器发送第二通告报文。For example, referring to Figure 11, assume that the network device 5 determines that the energy type of the power supply energy of the network device 5 has changed from hydropower energy to coal power energy, and generates a second notification message. The second notification message includes a second color field, and the second color field The value of is 4, 4 indicates that the first energy type is coal power energy. The network device 5 sends a second notification message to the controller.
可选地,对于第一新增路由器属性字段和第一颜色字段这两个字段,通过类型、类型码(Typecode)、地址族标志(address family identifier,AFI)或子地址族标志(subaddress family identifier,SAFI)值来区分该两个字段。其中,第一新增路由器属性字段可能包括第一新增路由器属性字段的类型,第一颜色字段可能包括第一颜色字段的类型,但该两个字段包括的类型不同。和/或,第一新增路由器属性字段可能包括第一新增路由器属性字段的类型码,第一颜色字段可能包括第一颜色字段的类型码,但两个字段包括的类型码不同。和/或,第一新增路由器属性字段可能包括AFI,第一颜色字段可能包括AFI,但两个字段包括的AFI不同。和/或,第一新增路由器属性字段可能包括SAFI,第一颜色字段可能包括SAFI,但两个字段包括的SAFI不同。同理,对于第二新增路由器属性字段和第二颜色字段,也能通过类型、类型码、AFI或SAFI来区分第二新增路由器属性字段和第二颜色字段。Optionally, for the two fields of the first newly added router attribute field and the first color field, use the type, type code (Typecode), address family identifier (address family identifier, AFI) or subaddress family identifier (subaddress family identifier) , SAFI) value to distinguish the two fields. The first newly added router attribute field may include the type of the first newly added router attribute field, and the first color field may include the type of the first color field, but the two fields include different types. And/or, the first newly added router attribute field may include the type code of the first newly added router attribute field, and the first color field may include the type code of the first color field, but the two fields include different type codes. And/or, the first newly added router attribute field may include AFI, and the first color field may include AFI, but the AFIs included in the two fields are different. And/or, the first newly added router attribute field may include SAFI, and the first color field may include SAFI, but the SAFI included in the two fields are different. Similarly, for the second newly added router attribute field and the second color field, the second newly added router attribute field and the second color field can also be distinguished by type, type code, AFI or SAFI.
可选地,在方式2中,扩展BGP或路径计算单元通信协议(path computation element communication protocol,PCEP)的SR Policy中的颜色字段的含义,使该颜色字段的取值能够为上述第一取值或第二取值。如此,使该颜色字段用于携带第一设备供电能源的能源类型,该颜色字段为第一通告报文中的第一颜色字段或第二通告报文中的第二颜色字段。Optionally, in method 2, extend the meaning of the color field in the SR Policy of BGP or path computation element communication protocol (PCEP) so that the value of the color field can be the first value mentioned above or second value. In this way, the color field is used to carry the energy type of the power supply energy of the first device, and the color field is the first color field in the first notification message or the second color field in the second notification message.
可选地,该颜色字段为分段路由互联协议第六版策略网络层可达信息(SR Policy network layer reachability information,SR Policy NLRI)中的策略颜色(Policy Color)字段。Optionally, the color field is the policy color (Policy Color) field in the Segment Routing Internet Protocol version 6 policy network layer reachability information (SR Policy network layer reachability information, SR Policy NLRI).
可选地,SR Policy NLRI为BGP的多协议可达网络层可达信息(multi protocol_REACH_NLRI,MP_REACH_NLRI)或多协议不可达网络层可达信息(multi protocol_UNREACH_NLRI,MP_UNREACH_NLRI)。Optionally, SR Policy NLRI is BGP's multi-protocol reachable network layer reachability information (multi protocol_REACH_NLRI, MP_REACH_NLRI) or multi-protocol unreachable network layer reachability information (multi protocol_UNREACH_NLRI, MP_UNREACH_NLRI).
可选地,在方式2中,扩展BGP不透明扩展团体(BGP Opaque Extended Community)中的颜色扩展团体(Color Extended Community)中的颜色值(Color Value)的含义,使该Color Extended Community的取值为上述第一取值或第二取值。如此,使该Color Extended Community用于携带第一设备供电能源的能源类型,该Color Extended Community为第一通告报文中的第一颜色字段或第二通告报文中的第二颜色字段。Optionally, in method 2, extend the meaning of the color value (Color Value) in the color extended community (Color Extended Community) in the BGP Opaque Extended Community (BGP Opaque Extended Community), so that the value of the Color Extended Community is The above-mentioned first value or second value. In this way, the Color Extended Community is used to carry the energy type of the power supply energy of the first device, and the Color Extended Community is the first color field in the first notification message or the second color field in the second notification message.
方式3,第一通告报文用于向邻居宣告路由,第一通告报文的第一AS-Path字段包括m个相同的AS号,m是与第一能源类型相对应的倍数值,m为大于0的整数,该AS号用于标识第一设备所在的AS域,即该AS号是第一AS域的AS号。Method 3, the first advertisement message is used to announce routes to neighbors. The first AS-Path field of the first advertisement message includes m identical AS numbers, m is a multiple value corresponding to the first energy type, and m is An integer greater than 0, the AS number is used to identify the AS domain where the first device is located, that is, the AS number is the AS number of the first AS domain.
通信网络中的每个AS域的AS号的长度均是指定长度,即每个AS域的AS号的长度相等。第一通告报文包括第一AS-Path字段,第一AS-Path字段用于携带AS号。The length of the AS number of each AS domain in the communication network is the specified length, that is, the length of the AS number of each AS domain is equal. The first advertisement message includes a first AS-Path field, and the first AS-Path field is used to carry an AS number.
在方式3中,在第一AS-Path字段中包括m个相同的AS号,在第一AS-Path字段中将该m个相同的AS号作为一个整体,即将该m个相同的AS号作为一个AS号,该一个AS号的长度为指定长度的m倍。第一能源类型有多种,每种第一能源类型对应的m的取值不同,这样使第一AS-Path具有不同的AS号长度,每种第一能源类型与不同的AS号长度相同对应。In method 3, m identical AS numbers are included in the first AS-Path field, and the m identical AS numbers are treated as a whole in the first AS-Path field, that is, the m identical AS numbers are regarded as An AS number whose length is m times the specified length. There are multiple first energy types. The value of m corresponding to each first energy type is different, so that the first AS-Path has different AS number lengths. Each first energy type corresponds to the same AS number length. .
在方式3中,在第一设备确定第一设备供电能源的能源类型为第一能源类型时,第一设备生成第一通告报文,获取第一能源类型对应的m,在第一通告报文的第一AS-Path字段中添加m个第一AS域的AS号。此时第一AS-Path字段的长度等于该m个AS号的总长度,从而使第一AS-Path字段包括的AS号长度与第一能源类型相对应。或者,In method 3, when the first device determines that the energy type of the energy supplied by the first device is the first energy type, the first device generates a first notification message, obtains m corresponding to the first energy type, and in the first notification message Add m AS numbers of the first AS domain to the first AS-Path field. At this time, the length of the first AS-Path field is equal to the total length of the m AS numbers, so that the length of the AS number included in the first AS-Path field corresponds to the first energy type. or,
在方式3中,第一设备接收其他网络设备(如第一设备的上游网络设备)发送的第三通 告报文,第三通告报文包括第一AS-Path字段,第一AS-Path字段包括第一AS域的AS号。在第一设备确定第一设备供电能源的能源类型为第一能源类型时,第一设备获取第一能源类型对应的m,在第三通告报文的第一AS-Path字段中再添加m-1个第一AS域的AS号,得到第一通告报文。第一通告报文的第一AS-Path字段的长度等于该m个AS号的总长度,从而使第一AS-Path字段包括的AS号长度与第一能源类型相对应。第一设备向第一设备的下游网络设备发送的第一通告报文。该下游网络设备向第二设备转发第一通告报文。In mode 3, the first device receives the third communication message sent by other network devices (such as the upstream network device of the first device). The third notification message includes the first AS-Path field, and the first AS-Path field includes the AS number of the first AS domain. When the first device determines that the energy type of the energy supplied by the first device is the first energy type, the first device obtains m corresponding to the first energy type, and adds m- in the first AS-Path field of the third notification message. 1 AS number of the first AS domain to obtain the first notification message. The length of the first AS-Path field of the first advertisement message is equal to the total length of the m AS numbers, so that the length of the AS number included in the first AS-Path field corresponds to the first energy type. A first notification message sent by the first device to a downstream network device of the first device. The downstream network device forwards the first notification message to the second device.
例如,假设风电能源对应的m取值为1,水电能源对应的m取值为2,太阳能电力能源对应的m取值为3,当然,风电能源对应的m取值,水电能源对应的m取值和太阳能电力能源对应的m取值还可能是其他整数值,在此不再一一列举说明。For example, assume that the value of m corresponding to wind power energy is 1, the value of m corresponding to hydropower energy is 2, and the value of m corresponding to solar power energy is 3. Of course, the value of m corresponding to wind power energy and the value of m corresponding to hydropower energy are The value of m corresponding to the solar power energy may also be other integer values, which will not be listed one by one here.
假设第一AS域的AS号为300,如果第一设备确定的第一能源类型为风电能源,则第一设备在第一通告报文中的第一AS-Path字段中添加一个该AS号,即第一AS-Path字段包括300,第一AP-Path字段的长度等于指定长度。如果第一设备确定的第一能源类型为水电能源,则第一设备在第一通告报文中的第一AS-Path字段中添加两个该AS号,即第一AS-Path字段包括300,300,第一AP-Path字段的长度等于指定长度的两倍。如果第一设备确定的第一能源类型为太阳能电力能源,则第一设备在第一通告报文中的第一AS-Path字段中添加三个该AS号,即第一AS-Path字段包括300,300,300,第一AP-Path字段的长度等于指定长度的三倍。Assume that the AS number of the first AS domain is 300. If the first energy type determined by the first device is wind power energy, the first device adds the AS number in the first AS-Path field in the first notification message, That is, the first AS-Path field includes 300, and the length of the first AP-Path field is equal to the specified length. If the first energy type determined by the first device is hydroelectric energy, the first device adds two AS numbers in the first AS-Path field in the first notification message, that is, the first AS-Path field includes 300, 300, the length of the first AP-Path field is equal to twice the specified length. If the first energy type determined by the first device is solar power energy, the first device adds three AS numbers in the first AS-Path field in the first notification message, that is, the first AS-Path field includes 300 , 300, 300, The length of the first AP-Path field is equal to three times the specified length.
对于在步骤404中第一设备发送的第二通告报文,第二通告报文也用于向该邻居宣告路由,第二通告报文的第二AS-Path字段包括n个相同的该AS号,n是与第二能源类型相对应的倍数值,n为大于0的整数。For the second advertisement message sent by the first device in step 404, the second advertisement message is also used to announce the route to the neighbor. The second AS-Path field of the second advertisement message includes n identical AS numbers. , n is a multiple value corresponding to the second energy type, and n is an integer greater than 0.
在方式3中,在第一设备确定第一设备供电能源的能源类型为第二能源类型时,第一设备生成第二通告报文,第一设备获取第二能源类型对应的n,在第二通告报文的第二AS-Path字段中添加n个第一AS域的AS号。此时在第二AS-Path字段中将该n个AS号作为一个整体,即作为一个AS号,使得第二AS-Path字段包括的AS号长度等于该n个AS号的总长度,从而使第二AS-Path字段包括的AS号长度与第二能源类型相对应。In method 3, when the first device determines that the energy type of the energy supplied by the first device is the second energy type, the first device generates a second notification message, the first device obtains n corresponding to the second energy type, and in the second Add n AS numbers of the first AS domain to the second AS-Path field of the notification message. At this time, the n AS numbers are treated as a whole in the second AS-Path field, that is, as one AS number, so that the length of the AS number included in the second AS-Path field is equal to the total length of the n AS numbers, so that The AS number length included in the second AS-Path field corresponds to the second energy type.
例如,假设煤电能源对应的n取值为4,当然,煤电能源对应的n取值还可能是其他整数值,在此不再一一列举说明。For example, assume that the value of n corresponding to coal power energy is 4. Of course, the value of n corresponding to coal power energy may also be other integer values, which will not be listed one by one here.
仍假设第一AS域的AS号为300,如果第一设备确定第一设备供电能源的能源类型由风电能源变为煤电能源,则第一设备生成第二通告报文,在第二通告报文中的第二AS-Path字段中添加四个该AS号,即第二AS-Path字段包括300,300,300,300,第一AP-Path字段的长度等于指定长度的四倍。It is still assumed that the AS number of the first AS domain is 300. If the first device determines that the energy type of the power supply energy of the first device has changed from wind power energy to coal power energy, the first device generates a second notification message. In the second notification report Four AS numbers are added to the second AS-Path field in this article, that is, the second AS-Path field includes 300, 300, 300, 300, and the length of the first AP-Path field is equal to four times the specified length.
可选地,采用如下方式a至方式b中的任一种方式使第一通告报文指示第一设备保存的路由信息对应的能源类型为第一能源类型,以及使第二通告报文指示第一设备保存的路由信息对应的能源类型为第二能源类型。Optionally, any one of the following methods a to b is used to make the first advertisement message indicate that the energy type corresponding to the routing information saved by the first device is the first energy type, and to make the second advertisement message indicate that the energy type is the first energy type. The energy type corresponding to the routing information saved by a device is the second energy type.
方式a,第一通告报文包括第一路径属性字段,第一路径属性字段包括第一路由信息,第一路由信息包括第一能源类型,第一路由信息是第一设备上保存的路由信息。In manner a, the first advertisement message includes a first path attribute field, the first path attribute field includes first routing information, the first routing information includes a first energy type, and the first routing information is routing information saved on the first device.
在方式a中在第一设备上保存的每条路由信息中扩展一种路径属性(path attribute),该路径属性为第一设备供电能源的能源类型。In method a, a path attribute (path attribute) is extended in each routing information saved on the first device, and the path attribute is the energy type of the power supply energy of the first device.
在方式a中,针对第一设备上保存的任一条路由信息,为了便于说明,将该路由信息称 为第一路由信息。在确定出第一设备供电能源的第一能源类型时,第一设备将第一路由信息包括的第一设备供电能源的能源类型更新为第一能源类型。In method a, for any piece of routing information saved on the first device, for the convenience of explanation, the routing information is called is the first routing information. When determining the first energy type of the energy supplied by the first device, the first device updates the energy type of the energy supplied by the first device included in the first routing information to the first energy type.
对于在步骤404中第一设备发送的第二通告报文,第一设备在第一设备供电能源的能源类型由第一能源类型变为第二能源类型时,将第一路由信息包括的第一能源类型替换为第二能源类型,第二通告报文包括第二路径属性字段,第二路径属性字段包括第二路由信息。其中,第二路由信息包括第二能源类型和第一路由信息中除第一能源类型之外的内容。For the second advertisement message sent by the first device in step 404, when the energy type of the power supply energy of the first device changes from the first energy type to the second energy type, the first device changes the first energy type included in the first routing information. The energy type is replaced with a second energy type, the second advertisement message includes a second path attribute field, and the second path attribute field includes second routing information. The second routing information includes the second energy type and content in the first routing information other than the first energy type.
方式b,第一通告报文的团体(community)属性指示第一路由信息对应的能源类型为第一能源类型,第一路由信息为第一设备上保存的路由信息。In method b, the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the first energy type, and the first routing information is routing information stored on the first device.
在一些实施例中,第一通告报文包括第一community属性字段,第一community属性字段包括的第一community属性值与第一能源类型相对应。也就是说,第一community属性字段与第一能源类型相对应,第一community属性字段还包括第一设备上保存的路由信息(第一路由信息),如此实现通过第一通告报文的community属性指示第一路由信息对应的能源类型为第一能源类型。In some embodiments, the first notification message includes a first community attribute field, and the first community attribute value included in the first community attribute field corresponds to the first energy type. That is to say, the first community attribute field corresponds to the first energy type, and the first community attribute field also includes routing information (first routing information) saved on the first device. In this way, the community attribute of the first advertisement message is implemented. Indicates that the energy type corresponding to the first routing information is the first energy type.
可选地,第一能源类型有多种,每种第一能源类型对应的community属性值不同,例如,风电能源对应的community属性值为300,水电能源对应的community属性值为100,太阳能电力能源对应的community属性值为50,当然,风电能源对应的community属性值、水电能源对应的community属性值以及太阳能电力能源对应的community属性值还可能是其他取值,在此不再一一说明。Optionally, there are multiple first energy types, and the community attribute value corresponding to each first energy type is different. For example, the community attribute value corresponding to wind power energy is 300, the community attribute value corresponding to hydropower energy is 100, and the community attribute value corresponding to solar power energy is 100. The corresponding community attribute value is 50. Of course, the community attribute value corresponding to wind power energy, the community attribute value corresponding to hydropower energy, and the community attribute value corresponding to solar power energy may also have other values, which will not be explained one by one here.
在方式b中,在第一设备确定出一种第一能源类型时,如果第一设备需要通告该种第一能源类型,第一设备生成第一通告报文,在第一通告报文中第一community属性字段包括的第一community属性值等于该种第一能源类型对应的community属性值,且第一通告报文中的第一community属性字段还包括第一设备上保存的路由信息。In method b, when the first device determines a first energy type, if the first device needs to notify the first energy type, the first device generates a first notification message, and in the first notification message, the first energy type is The first community attribute value included in a community attribute field is equal to the community attribute value corresponding to the first energy type, and the first community attribute field in the first advertisement message also includes routing information saved on the first device.
在方式b中,由于每一种第一能源类型对应不同的community属性值,这样基于community属性值能够统一管理同一种能源类型对应的路由信息的路径优先级。其中,在不同时间段或不同地域内风电能源,水电能源和太阳能电力能源的稳定性不同或价格不同。例如,针对一个地域,在某个时间段内该地域内的风电能源较稳定,则控制器通过风电能源对应的community属性值,统一增加该地域内各网络设备上风电能源对应的路由信息的路径优先级,如在实现时控制器执行该community属性值对应的全部路由信息优先,从而提高运维效率。In method b, since each first energy type corresponds to a different community attribute value, the path priority of routing information corresponding to the same energy type can be managed uniformly based on the community attribute value. Among them, wind power energy, hydropower energy and solar power energy have different stability or different prices in different time periods or in different regions. For example, for a region, if the wind power energy in the region is relatively stable within a certain period of time, the controller uses the community attribute value corresponding to the wind power energy to uniformly increase the routing information path corresponding to the wind power energy on each network device in the region. Priority, for example, during implementation, the controller executes all routing information corresponding to the community attribute value first, thereby improving operation and maintenance efficiency.
对于在步骤404中第一设备发送的第二通告报文,第二通告报文的community属性指示第一路由信息对应的能源类型为第二能源类型。For the second advertisement message sent by the first device in step 404, the community attribute of the second advertisement message indicates that the energy type corresponding to the first routing information is the second energy type.
可选地,第二通告报文包括第二community属性字段,第二community属性字段包括的第二community属性值与第二能源类型相对应。也就是说,第二community属性字段与第二能源类型相对应,第二community属性字段还包括第一设备上保存的路由信息(第一路由信息),如此实现通过第二通告报文的community属性指示第一路由信息对应的能源类型为第二能源类型。Optionally, the second notification message includes a second community attribute field, and the second community attribute value included in the second community attribute field corresponds to the second energy type. That is to say, the second community attribute field corresponds to the second energy type, and the second community attribute field also includes the routing information (first routing information) saved on the first device. In this way, the community attribute of the second advertisement message is implemented. Indicates that the energy type corresponding to the first routing information is the second energy type.
在方式b中,在第一设备确定出第一设备供电能源的能源类型为第二能源类型时,如果第一设备需要通告第二能源类型,第一设备生成第二通告报文,第二通告报文中的第二community属性字段包括的第二community属性值等于第二能源类型对应的community属性 值,且第二通告报文中的第二community属性字段还包括第一设备上保存的路由信息。In method b, when the first device determines that the energy type of the energy supplied by the first device is the second energy type, if the first device needs to notify the second energy type, the first device generates a second notification message, and the second notification message The second community attribute value included in the second community attribute field in the message is equal to the community attribute corresponding to the second energy type. value, and the second community attribute field in the second advertisement message also includes routing information saved on the first device.
对于上述步骤403,在第一设备和第二设备之间的关系是上述第一种关系,第一设备和第二设备是同一AS域内的设备。在此情况下,第二设备是通信网络中的具有报文转发功能的网络设备,第二设备包括第三路由信息,第三路由信息指示的下一跳设备不是第一设备或该下一跳设备不包括能够到达第一设备的路由信息,第三路由信息指示的目的设备和第一网络流量的目的设备相同,第一网络流量是第二设备待转发的网络流量。For the above step 403, the relationship between the first device and the second device is the above-mentioned first relationship, and the first device and the second device are devices in the same AS domain. In this case, the second device is a network device with a message forwarding function in the communication network, the second device includes third routing information, and the next hop device indicated by the third routing information is not the first device or the next hop. The device does not include routing information that can reach the first device. The destination device indicated by the third routing information is the same as the destination device of the first network traffic. The first network traffic is network traffic to be forwarded by the second device.
在步骤403中,第二设备基于第一通告报文将第三路由信息指示的下一跳设备替换为第三设备,第三设备为第一设备或者第三设备包括能够到达第一设备的路由信息,如此使用于传输第一网络流量的传输路径经过第一设备。In step 403, the second device replaces the next hop device indicated by the third routing information with a third device based on the first advertisement message. The third device is the first device or the third device includes a route that can reach the first device. Information such that the transmission path for transmitting the first network traffic passes through the first device.
在实现时,第二设备上保存有至少一个路由信息。第二设备接收第一通告报文,第一通告报文包括以第一设备为端点的链路的标识信息和该链路的第一cost,第二设备还能够获取到第一AS域中的其他链路的标识信息和该其他链路的cost值。这样对于第二设备上保存的任一个路由信息,第二设备基于该路由信息指示的目的设备的地址和第一AS域中的链路的cost值,计算能够到达该目的设备的传输路径。如果该传输路径经过以第一设备为端点的链路,则确定该路由信息指示的下一跳设备是否为第三设备,第三设备为第一设备或者第三设备包括能够到达第一设备的路由信息。如果该路由信息指示的下一跳设备不是第三设备,将该路由信息作为第三路由信息,将第三路由信息指示的下一跳设备替换为第三设备。这样当第二设备接收到需要发送给该目的设备的第一网络流量时,第二设备基于第三路由信息向第一设备发送第一网络流量。第一设备接收第一网络流量,向该目的设备发送第一网络流量,如此增加在第一设备上转发网络流量的个数,不仅减小通信网络的能源消耗,还提高可再生能源的利用率。During implementation, at least one routing information is stored on the second device. The second device receives the first advertisement message. The first advertisement message includes the identification information of the link with the first device as the endpoint and the first cost of the link. The second device can also obtain the link in the first AS domain. The identification information of other links and the cost value of the other links. In this way, for any piece of routing information stored on the second device, the second device calculates a transmission path that can reach the destination device based on the address of the destination device indicated by the routing information and the cost value of the link in the first AS domain. If the transmission path passes through a link with the first device as the endpoint, it is determined whether the next hop device indicated by the routing information is the third device, the third device is the first device, or the third device includes a link that can reach the first device. routing information. If the next-hop device indicated by the routing information is not the third device, use the routing information as the third routing information, and replace the next-hop device indicated by the third routing information with the third device. In this way, when the second device receives the first network traffic that needs to be sent to the destination device, the second device sends the first network traffic to the first device based on the third routing information. The first device receives the first network traffic and sends the first network traffic to the destination device. This increases the number of network traffic forwarded on the first device, which not only reduces the energy consumption of the communication network, but also improves the utilization rate of renewable energy. .
例如,参见图7,假设网络设备2接收到网络设备5发送第一通告报文,第一通告报文包括以网络设备5为端点的链路1的标识信息和链路1的第一cost值“0.5”以及以网络设备5为端的链路2的标识信息和链路2的第一cost值“0.5”。假设,网络设备2还获取到链路3的cost值为“2”,以及假设网络设备2上保存有路由信息,该路由信息指示的目的设备为目的设备1,但该路由信息指示的下一跳设备为网络设备3。网络设备2基于目的设备1的地址、链路2的第一cost值“0.5”、链路1的第一cost值“0.5”以及链路3的cost值“2”,计算能够到达目的设备1的传输路径,该传输路径经过网络设备5、网络设备6和网络设备7。也就是说,该传输路径经过以网络设备5为端的链路2和链路1,网络设备2将该路由信息作为第三路由信息,将第三路由信息指示的下一跳设备由网络设备3替换网络设备5。参见图7,当网络设备2接收到网络流量1时,网络流量1的目的设备为目的设备1,网络设备2基于第三路由信息将网络流量1发送给网络设备5,网络设备5再向目的设备1发送网络流量1。For example, referring to Figure 7, assume that network device 2 receives a first notification message sent by network device 5. The first notification message includes identification information of link 1 with network device 5 as the endpoint and the first cost value of link 1. “0.5” as well as the identification information of link 2 ending with network device 5 and the first cost value of link 2 “0.5”. Assume that network device 2 also obtains the cost value of link 3 as "2", and assumes that network device 2 stores routing information. The destination device indicated by the routing information is destination device 1, but the next destination device indicated by the routing information is The hop device is network device 3. Network device 2 calculates that it can reach destination device 1 based on the address of destination device 1, the first cost value "0.5" of link 2, the first cost value "0.5" of link 1, and the cost value "2" of link 3. The transmission path passes through network device 5, network device 6 and network device 7. That is to say, the transmission path passes through link 2 and link 1 with network device 5 as the end. Network device 2 uses this routing information as the third routing information, and the next hop device indicated by the third routing information is network device 3. Replace network device 5. Referring to Figure 7, when network device 2 receives network traffic 1, the destination device of network traffic 1 is destination device 1. Network device 2 sends network traffic 1 to network device 5 based on the third routing information, and network device 5 then sends the network traffic 1 to the destination device. Device 1 sends network traffic 1.
可选地,第一通告报文包括第一节点状态TLV,第二设备在第一通告报文中识别出第一节点状态TLV,获取第一节点状态TLV包括的链路的标识信息和该链路的第一cost值。或者,第一通告报文包括第一链路状态TLV,第二设备在第一通告报文中识别出第一链路状态TLV,获取第一链路状态TLV包括的链路的标识信息和该链路的第一cost值。Optionally, the first notification message includes the first node status TLV, the second device identifies the first node status TLV in the first notification message, and obtains the identification information of the link included in the first node status TLV and the link The first cost value of the road. Alternatively, the first notification message includes the first link status TLV, the second device identifies the first link status TLV in the first notification packet, and obtains the identification information of the link included in the first link status TLV and the The first cost value of the link.
可选地,第一通告报文包括第一节能因子TLV和第一节点状态TLV,第一节能因子TLV包括的类型和第一节点状态TLV包括的类型不同,使得第二设备能够在第一通告报文中识别 出第一节能因子TLV和第一节点状态TLV,并从第一节能因子TLV和第一节点状态TLV中选择第一节能因子TLV。或者,Optionally, the first notification message includes a first energy saving factor TLV and a first node status TLV. The type included in the first energy saving factor TLV and the type included in the first node status TLV are different, so that the second device can perform the first notification in the first notification message. Identification in the message The first energy saving factor TLV and the first node status TLV are obtained, and the first energy saving factor TLV is selected from the first energy saving factor TLV and the first node status TLV. or,
可选地,第一通告报文包括第一节能因子TLV和第一链路状态TLV,第一节能因子TLV包括的类型和第一链路状态TLV包括的类型不同,使得第二设备在第一通告报文中识别出第一节能因子TLV和第一链路状态TLV,并从第一节能因子TLV和第一链路状态TLV中选择第一节能因子TLV。获取选择的第一节能因子TLV包括的链路的标识信息和该链路的第一cost值。Optionally, the first notification message includes a first energy saving factor TLV and a first link status TLV. The type included in the first energy saving factor TLV and the type included in the first link status TLV are different, so that the second device is in the first The first energy saving factor TLV and the first link status TLV are identified in the notification message, and the first energy saving factor TLV is selected from the first energy saving factor TLV and the first link status TLV. Obtain the identification information of the link included in the selected first energy-saving factor TLV and the first cost value of the link.
对于上述步骤403,在第一设备和第二设备之间的关系是上述第二种关系或第三种关系,第二设备接收第一通告报文,基于第一通告报文和第一网络流量的目的地址建立第一网络流量的传输路径,第一网络流量的传输路径经过第一设备。For the above step 403, the relationship between the first device and the second device is the above-mentioned second relationship or the third relationship. The second device receives the first notification message based on the first notification message and the first network traffic. The destination address establishes a transmission path of the first network traffic, and the transmission path of the first network traffic passes through the first device.
可选地,在第一设备和第二设备之间的关系是上述第二种关系的情况,第二设备和第一设备是两个不同AS域内的设备,第二设备是具有报文转发功能的网络设备。第一网络流量是第二设备当前正在传输的且传输路径不经过第一设备的网络流量。或者,第一网络流量是需要第二设备建立传输路径的网络流量,第二设备是该传输路径的头节点。在第二设备建立第一网络流量的传输路径后,第二设备在接收到第一网络流量时,使用该传输路径转发接收的第一网络流量。或者,Optionally, the relationship between the first device and the second device is the above-mentioned second relationship, the second device and the first device are devices in two different AS domains, and the second device has a message forwarding function. network equipment. The first network traffic is network traffic currently being transmitted by the second device and whose transmission path does not pass through the first device. Alternatively, the first network traffic is network traffic that requires the second device to establish a transmission path, and the second device is the head node of the transmission path. After the second device establishes a transmission path for the first network traffic, when receiving the first network traffic, the second device uses the transmission path to forward the received first network traffic. or,
可选地,在第一设备和第二设备之间的关系是上述第三种关系的情况,第二设备是控制器,第一网络流量是需要控制器建立传输路径的网络流量,或者,第一网络流量是通信网络中当前正在传输的且传输路径不经过第一设备的网络流量。在控制器建立第一网络流量的传输路径后,控制器下发该传输路径。对于该传输路径上的任一个网络设备,该网络设备接收到第一网络流量时,向下一跳设备转发接收的第一网络流量,该下一跳设备是该传输路径上的节点。Optionally, the relationship between the first device and the second device is the above-mentioned third relationship, the second device is a controller, and the first network traffic is network traffic that requires the controller to establish a transmission path, or, the third A network traffic is network traffic that is currently being transmitted in the communication network and whose transmission path does not pass through the first device. After the controller establishes the transmission path of the first network traffic, the controller issues the transmission path. For any network device on the transmission path, when the network device receives the first network traffic, it forwards the received first network traffic to the next hop device, and the next hop device is a node on the transmission path.
所谓当前正在传输的网络流量是指在当前已建立该网络流量的传输路径,在当前可能使用该传输路径传输该网络流量的数据,但在当前还没有传输完该网络流量的全部数据。The so-called network traffic currently being transmitted refers to that a transmission path for the network traffic has been established at present, and the data of the network traffic may be transmitted using the transmission path at present, but all the data of the network traffic has not been transmitted yet.
所谓需要第二设备(为上述具有报文转发功能的网络设备(如头节点)或控制器)建立传输路径的网络流量是指第二设备接收到该网络流量的源设备发送的路径建立请求,该路径建立请求用于请求第二设备为该网络流量建立传输路径,但在当前第二设备还没有为该网络流量建立传输路径;或者,该网络流量的传输路径出现异常,需要重新为该网络流量建立传输路径。The so-called network traffic that requires a second device (for the above-mentioned network device (such as a head node) or controller with a message forwarding function) to establish a transmission path means that the second device receives a path establishment request sent by the source device of the network traffic, This path establishment request is used to request the second device to establish a transmission path for the network traffic, but currently the second device has not established a transmission path for the network traffic; or, the transmission path of the network traffic is abnormal, and the network needs to be re-established. Traffic establishes a transmission path.
其中,在后文中出现类似描述,参考此处介绍的含义,就不再一一列举说明。Among them, similar descriptions appear in the following text. Please refer to the meanings introduced here and will not list them one by one.
对于当前正在传输的且传输路径不经过第一设备的第一网络流量,第二设备为第一网络流量建立的传输路径经过第一设备,这样将通信网络中正在传输的网络流量调整到第一设备并由第一设备转发,增加在第一设备上转发网络流量的个数,从而提高可再生能源的利用率。对于需要建立传输路径的第一网络流量,第二设备为第一网络流量建立的传输路径经过第一设备,这样也增加在第一设备上转发网络流量的个数,从而提高可再生能源的利用率。For the first network traffic that is currently being transmitted and whose transmission path does not pass through the first device, the transmission path established by the second device for the first network traffic passes through the first device, thus adjusting the network traffic being transmitted in the communication network to the first network traffic. The device is forwarded by the first device, thereby increasing the number of network traffic forwarded on the first device, thereby improving the utilization rate of renewable energy. For the first network traffic that needs to establish a transmission path, the transmission path established by the second device for the first network traffic passes through the first device, which also increases the number of network traffic forwarded on the first device, thereby improving the utilization of renewable energy. Rate.
其中,第一通告报文指示第一设备供电能源的能源类型为第一能源类型,或者,第一通告报文指示第一设备上保存的第一路由信息对应的能源类型为第一能源类型。The first advertisement message indicates that the energy type of the energy supplied by the first device is the first energy type, or the first advertisement message indicates that the energy type corresponding to the first routing information stored on the first device is the first energy type.
可选地,在第一通告报文指示第一设备供电能源的能源类型为第一能源类型的情况,第 二设备建立第一网络流量的传输路径的过程如下所示。Optionally, when the first notification message indicates that the energy type of the power supply energy of the first device is the first energy type, the first The process of the two devices establishing the transmission path of the first network traffic is as follows.
第二设备基于第一通告报文确定第一设备供电能源的能源类型为第一能源类型。选择一个网络流量,基于该网络流量的目的地址确定能否通过第一设备向该目的地址传输该网络流量。如果能够通过第一设备向该目的地址传输该网络流量,则将网络流量作为第一网络流量。基于第一网络流量的目的地址,建立经过第一设备的传输路径,将该传输路径作为第一网络流量的传输路径。The second device determines, based on the first notification message, that the energy type of the energy supplied by the first device is the first energy type. Select a network flow, and determine whether the network flow can be transmitted to the destination address through the first device based on the destination address of the network flow. If the network traffic can be transmitted to the destination address through the first device, the network traffic is regarded as the first network traffic. Based on the destination address of the first network traffic, a transmission path through the first device is established, and the transmission path is used as the transmission path of the first network traffic.
可选地,在第二设备是具有报文转发功能的网络设备时,第二设备从第二设备上正在传输的且传输路径不经过第一设备的网络流量中选择一个网络流量,和/或,从需要第二设备建立传输路径的网络流量中选择一个网络流量。或者,在第二设备是控制器时,第二设备从通信网络中正在传输的且传输路径不经过第一设备的网络流量中选择一个网络流量,和/或,从需要第二设备建立传输路径的网络流量中选择一个网络流量。Optionally, when the second device is a network device with a packet forwarding function, the second device selects a network traffic from the network traffic that is being transmitted on the second device and whose transmission path does not pass through the first device, and/or , select one network traffic from the network traffic that requires the second device to establish a transmission path. Or, when the second device is a controller, the second device selects a network traffic from the network traffic that is being transmitted in the communication network and whose transmission path does not pass through the first device, and/or, from a network traffic that requires the second device to establish a transmission path. Select a network flow among the network flows.
例如,参见图8,假设控制器接收到网络设备5发送第一通告报文,第一通告报文指示网络设备5的第一能源类型为水电能源。控制器基于第一通告报文,确定网络设备5供电能源的能源类型为水电能源。参见图3,通信网络当前正在传输网络流量1,网络流量1的传输路径不经过网络设备5,网络流量1的目的地址为目的设备1的地址。控制器基于网络流量1的目的地址确定能够通过网络设备5向该目的地址传输网络流量1,建立经过网络设备5的传输路径,将该传输路径作为网络流量1的传输路径。参见图8,该传输路径上的节点包括网络设备1、网络设备2、网络设备5、网络设备6和网络设备7。For example, referring to Figure 8, assume that the controller receives a first notification message sent by the network device 5, and the first notification message indicates that the first energy type of the network device 5 is hydroelectric energy. Based on the first notification message, the controller determines that the energy type of the power supply energy of the network device 5 is hydroelectric energy. Referring to Figure 3, the communication network is currently transmitting network traffic 1. The transmission path of network traffic 1 does not pass through network device 5. The destination address of network traffic 1 is the address of destination device 1. Based on the destination address of the network flow 1, the controller determines that the network flow 1 can be transmitted to the destination address through the network device 5, establishes a transmission path through the network device 5, and uses the transmission path as the transmission path of the network flow 1. Referring to Figure 8, the nodes on the transmission path include network device 1, network device 2, network device 5, network device 6 and network device 7.
可选地,在步骤402中,第一设备可能采用上述方式1使第一通告报文指示第一设备供电能源的能源类型为第一能源类型。在此情况下,第一通告报文包括第一新增路由器属性字段,第一新增路由器属性字段包括第一能源类型。第二设备基于第一通告报文包括的第一新增路由器属性字段,确定第一设备供电能源的能源类型为第一能源类型。Optionally, in step 402, the first device may use the above method 1 to cause the first notification message to indicate that the energy type of the energy supplied by the first device is the first energy type. In this case, the first advertisement message includes a first newly added router attribute field, and the first newly added router attribute field includes a first energy type. Based on the first new router attribute field included in the first advertisement message, the second device determines that the energy type of the energy supplied by the first device is the first energy type.
例如,参见图8,假设控制器接收到网络设备5发送第一通告报文,第一通告报文包括第一新增路由器属性字段,第一新增路由器属性字段包括网络设备5的第一能源类型为水电能源。控制器基于第一通告报文包括的第一新增路由器属性字段,确定网络设备5供电能源的能源类型为水电能源。For example, referring to Figure 8, assume that the controller receives a first notification message sent by the network device 5. The first notification message includes a first newly added router attribute field, and the first newly added router attribute field includes a first energy source of the network device 5. The type is hydroelectric energy. Based on the first newly added router attribute field included in the first notification message, the controller determines that the energy type of the power supply energy of the network device 5 is hydroelectric energy.
可选地,在步骤402中,第一设备可能采用上述方式2使第一通告报文指示第一设备供电能源的能源类型为第一能源类型。在此情况下,第一通告报文包括第一颜色字段,第一颜色字段的取值为第一取值。第二设备从第一通告报文包括的第一颜色字段中解析出第一取值,基于第一取值确定第一设备供电能源的能源类型为第一能源类型。Optionally, in step 402, the first device may use the above method 2 to cause the first notification message to indicate that the energy type of the energy supplied by the first device is the first energy type. In this case, the first notification message includes a first color field, and the value of the first color field is the first value. The second device parses the first value from the first color field included in the first notification message, and determines based on the first value that the energy type of the energy supplied by the first device is the first energy type.
例如,参见图8,假设控制器接收到网络设备5发送第一通告报文,第一通告报文包括第一颜色字段,第一颜色字段的取值为“2”。控制器基于第一通告报文包括的第一颜色字段的取值“2”,确定网络设备5供电能源的能源类型为水电能源。For example, referring to Figure 8, assume that the controller receives a first notification message sent by the network device 5. The first notification message includes a first color field, and the value of the first color field is "2". Based on the value "2" of the first color field included in the first notification message, the controller determines that the energy type of the power supply energy of the network device 5 is hydroelectric energy.
其中,第一颜色字段的取值不同,第二设备确定的能源类型不同。例如,第一颜色字段的取值为水电颜色取值,第二设备确定的能源类型为水电能源。再例如,第一颜色字段的取值为风电颜色取值,第二设备确定的能源类型为风电能源。还例如,第一颜色字段的取值为太阳能颜色取值,第二设备确定的能源类型为太阳能电力能源。The value of the first color field is different, and the energy type determined by the second device is different. For example, the value of the first color field is the hydroelectric color value, and the energy type determined by the second device is hydroelectric energy. For another example, the value of the first color field is the color value of wind power, and the energy type determined by the second device is wind power energy. For another example, the value of the first color field is a solar color value, and the energy type determined by the second device is solar power energy.
可选地,在第二设备为头节点时,对于需要第二设备转发的第一网络流量,第二设备可能建立有用于传输第一网络流量的至少一条SRv6路径。第二设备可能接收控制器发送的第 一需求信息,第一需求信息包括某种第一能源类型,第一需求信息用于指示第二设备优先使用供电能源的能源类型为该种第一能源类型的网络设备来转发网络流量。Optionally, when the second device is the head node, for the first network traffic that needs to be forwarded by the second device, the second device may establish at least one SRv6 path for transmitting the first network traffic. The second device may receive the first One demand information, the first demand information includes a certain first energy type, and the first demand information is used to instruct the second device to preferentially use network devices whose power supply energy type is the first energy type to forward network traffic.
可选地,第二设备建立第一网络流量的传输路径的操作为:在第二设备接收第一网络流量后,第二设备基于第一需求信息,从该至少一条SRv6路径中选择第一网络流量的传输路径,第一网络流量的传输路径上存在一个或多个网络设备的供电能源的能源类型为该种第一能源类型。Optionally, the operation of the second device to establish the transmission path of the first network traffic is: after the second device receives the first network traffic, the second device selects the first network from the at least one SRv6 path based on the first requirement information. The energy type of the power supply energy of one or more network devices on the transmission path of the first network traffic is the first energy type.
可选地,在步骤402中,第一设备可能采用上述方式3使第一通告报文指示第一设备供电能源的能源类型为第一能源类型。在此情况下,第一通告报文包括第一AS-Path字段,第二设备基于第一AS-Path字段包括的AS号长度确定第一设备供电能源的第一能源类型。Optionally, in step 402, the first device may use the above method 3 to cause the first notification message to indicate that the energy type of the energy supplied by the first device is the first energy type. In this case, the first notification message includes a first AS-Path field, and the second device determines the first energy type of the power supply energy of the first device based on the length of the AS number included in the first AS-Path field.
可选地,第二设备在第一通告报文中识别出第一AS-Path字段,获取第一AS-Path字段的长度作为该AS号长度。Optionally, the second device identifies the first AS-Path field in the first advertisement message and obtains the length of the first AS-Path field as the length of the AS number.
例如,参见图8,假设控制器接收到网络设备5发送第一通告报文,第一通告报文包括第一AS-Path字段,第一AS-Path字段包括300,300,第一AP-Path字段的长度等于指定长度的两倍。控制器在第一通告报文中识别出第一AS-Path字段,获取第一AS-Path字段的长度作为AS号长度,该AS号长度为指定长度的两倍。基于该AS号长度确定网络设备5供电能源的第一能源类型为水电能源。For example, referring to Figure 8, assume that the controller receives a first notification message sent by network device 5. The first notification message includes a first AS-Path field, and the first AS-Path field includes 300, 300, first AP-Path The length of the field is equal to twice the specified length. The controller identifies the first AS-Path field in the first advertisement message and obtains the length of the first AS-Path field as the length of the AS number. The length of the AS number is twice the specified length. Based on the length of the AS number, it is determined that the first energy type of the power supply energy for the network device 5 is hydropower energy.
可选地,在第一通告报文指示第一设备上保存的第一路由信息对应的能源类型为第一能源类型的情况,第二设备建立第一网络流量的传输路径的过程为:Optionally, when the first advertisement message indicates that the energy type corresponding to the first routing information saved on the first device is the first energy type, the process of the second device establishing the transmission path of the first network traffic is:
第二设备基于第一通告报文确定第一路由信息对应的能源类型为第一能源类型,第二设备选择一个网络流量作为第一网络流量,第一网络流量的目的设备与第一路由信息指示的目的设备相同,基于第一网络流量的目的地址建立经过第一设备的第一网络流量的传输路径。The second device determines that the energy type corresponding to the first routing information is the first energy type based on the first advertisement message. The second device selects a network flow as the first network flow. The destination device of the first network flow is consistent with the first routing information indication. The destination devices are the same, and a transmission path of the first network traffic passing through the first device is established based on the destination address of the first network traffic.
可选地,在第二设备是具有报文转发功能的网络设备时,第二设备从第二设备上正在传输的且传输路径不经过第一设备的网络流量中选择目的设备与第一路由信息指示的目的设备相同一个网络流量作为第一网络流量。和/或,第二设备从需要第二设备建立传输路径的网络流量中选择目的设备与第一路由信息指示的目的设备相同一个网络流量作为第一网络流量。第二设备基于第一网络流量的目的地址建立第一网络流量的传输路径,第一网络流量的传输路径包括第二设备到第一设备的路径和第一设备到该目的设备的路径。或者,Optionally, when the second device is a network device with a packet forwarding function, the second device selects the destination device and the first routing information from the network traffic that is being transmitted on the second device and whose transmission path does not pass through the first device. Indicates that the destination device is the same network traffic as the first network traffic. And/or, the second device selects, from the network traffic that requires the second device to establish a transmission path, a network traffic whose destination device is the same as the destination device indicated by the first routing information as the first network traffic. The second device establishes a transmission path of the first network flow based on the destination address of the first network flow. The transmission path of the first network flow includes a path from the second device to the first device and a path from the first device to the destination device. or,
可选地,在第二设备是控制器时,第二设备从通信网络中正在传输的且传输路径不经过第一设备的网络流量中选择目的设备与第一路由信息指示的目的设备相同一个网络流量作为第一网络流量。和/或,第二设备从需要第二设备建立传输路径的网络流量中选择目的设备与第一路由信息指示的目的设备的一个网络流量作为第一网络流量。第二设备基于第一网络流量的目的地址建立第一网络流量的传输路径,第一网络流量的传输路径包括第一网络流量的源设备到第一设备的路径和第一设备到该目的设备的路径。Optionally, when the second device is a controller, the second device selects a network where the destination device is the same as the destination device indicated by the first routing information from the network traffic that is being transmitted in the communication network and whose transmission path does not pass through the first device. traffic as first network traffic. And/or, the second device selects a network traffic between the destination device and the destination device indicated by the first routing information as the first network traffic from the network traffic requiring the second device to establish a transmission path. The second device establishes a transmission path of the first network traffic based on the destination address of the first network traffic. The transmission path of the first network traffic includes a path from the source device of the first network traffic to the first device and a path from the first device to the destination device. path.
可选地,在步骤402中,第一设备可能采用上述方式a使第一通告报文指示第一设备上保存的第一路由信息对应的能源类型为第一能源类型。在此情况下,第一通告报文包括第一路径属性字段,第一路径属性字段包括第一路由信息,第一路由信息包括第一能源类型。第二设备从第一通告报文中读取第一路由信息,基于第一路由信息包括的第一能源类型,确定第一路由信息对应的能源类型为第一能源类型。Optionally, in step 402, the first device may use the above method a to cause the first advertisement message to indicate that the energy type corresponding to the first routing information stored on the first device is the first energy type. In this case, the first advertisement message includes a first path attribute field, the first path attribute field includes first routing information, and the first routing information includes the first energy type. The second device reads the first routing information from the first advertisement message, and determines that the energy type corresponding to the first routing information is the first energy type based on the first energy type included in the first routing information.
可选地,在步骤402中,第一设备可能采用上述方式b使第一通告报文指示第一设备上 保存的第一路由信息对应的能源类型为第一能源类型。在此情况下,第一通告报文的community属性指示第一路由信息对应的能源类型为第一能源类型。第二设备从第一通告报文的第一community属性字段中解析出第一community属性值和第一路由信息,第一community属性值与第一能源类型对应,将第一路由信息对应的能源类型确定为第一community属性值对应的第一能源类型。Optionally, in step 402, the first device may use the above method b to cause the first notification message to indicate on the first device The energy type corresponding to the saved first routing information is the first energy type. In this case, the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the first energy type. The second device parses the first community attribute value and the first routing information from the first community attribute field of the first advertisement message. The first community attribute value corresponds to the first energy type, and adds the energy type corresponding to the first routing information. Determine the first energy type corresponding to the first community attribute value.
对于上述步骤405,在第一设备和第二设备之间的关系是上述第一种关系,第一设备和第二设备是同一AS域内的设备。在此情况下,第二设备是通信网络中的具有报文转发功能的网络设备,第二设备包括第四路由信息,第四路由信息指示的下一跳设备是第一设备或该下一跳设备包括能够到达第一设备的路由信息,第四路由信息指示的目的设备和第二网络流量的目的设备相同,第二网络流量是第二设备待转发的网络流量。For the above step 405, the relationship between the first device and the second device is the above-mentioned first relationship, and the first device and the second device are devices in the same AS domain. In this case, the second device is a network device with a message forwarding function in the communication network, the second device includes fourth routing information, and the next hop device indicated by the fourth routing information is the first device or the next hop. The device includes routing information that can reach the first device. The destination device indicated by the fourth routing information is the same as the destination device of the second network traffic. The second network traffic is network traffic to be forwarded by the second device.
在步骤405中,第二设备基于第二通告报文将第四路由信息指示的下一跳设备替换为第四设备,第四设备不是第一设备或者第四设备不包括能够到达第一设备的路由信息,如此使用于传输第二网络流量的传输路径不经过第一设备。In step 405, the second device replaces the next hop device indicated by the fourth routing information with a fourth device based on the second advertisement message. The fourth device is not the first device or the fourth device does not include a path that can reach the first device. Routing information such that the transmission path for transmitting the second network traffic does not pass through the first device.
在实现时,第二设备上保存有至少一个路由信息。第二设备接收第二通告报文,第二通告报文包括以第一设备为端点的链路的标识信息和该链路的第二cost。第二设备还可以获取第一AS域中的其他链路的标识信息和该其他链路的cost值。这样对于第二设备上保存的任一个路由信息,基于该路由信息指示的目的设备的地址和第一AS域中的链路的cost值,计算能够到达该目的设备的传输路径。如果该传输路径经过以第一设备为端点的链路,则第二设备将该路由信息作为第四路由信息,将第四路由信息指示的下一跳设备替换为第四设备,第四设备不是第一设备或者第四设备不包括能够到达第一设备的路由信息,但第四设备包括能够到达该目的设备的路由信息。这样当第二设备接收到需要发送给该目的设备的第二网络流量,基于第四路由信息向第四设备发送第二网络流量。第四设备接收第二网络流量,向该目的设备发送第二网络流量。During implementation, at least one routing information is stored on the second device. The second device receives a second advertisement message, and the second advertisement message includes identification information of a link with the first device as an endpoint and a second cost of the link. The second device may also obtain identification information of other links in the first AS domain and cost values of the other links. In this way, for any piece of routing information stored on the second device, based on the address of the destination device indicated by the routing information and the cost value of the link in the first AS domain, a transmission path that can reach the destination device is calculated. If the transmission path passes through a link with the first device as the endpoint, the second device uses the routing information as the fourth routing information, and replaces the next-hop device indicated by the fourth routing information with the fourth device. The fourth device is not The first device or the fourth device does not include routing information that can reach the first device, but the fourth device includes routing information that can reach the destination device. In this way, when the second device receives the second network traffic that needs to be sent to the destination device, it sends the second network traffic to the fourth device based on the fourth routing information. The fourth device receives the second network traffic and sends the second network traffic to the destination device.
可选地,第二通告报文包括第二节点状态TLV,第二设备在第二通告报文中识别出第二节点状态TLV,获取第二节点状态TLV包括的链路的标识信息和该链路的第二cost值。或者,第二通告报文包括第二链路状态TLV,第二设备在第二通告报文中识别出第二链路状态TLV,获取第二链路状态TLV包括的链路的标识信息和该链路的第二cost值。Optionally, the second notification message includes a second node status TLV, and the second device identifies the second node status TLV in the second notification message, and obtains the identification information of the link included in the second node status TLV and the link's identification information. The second cost value of the road. Alternatively, the second advertisement message includes the second link status TLV, the second device identifies the second link status TLV in the second advertisement message, and obtains the identification information of the link included in the second link status TLV and the second link status TLV. The second cost value of the link.
可选地,第二通告报文包括第二节能因子TLV和第二节点状态TLV,第二设备在第二通告报文中识别出第二节能因子TLV和第二节点状态TLV,并从第二节能因子TLV和第二节点状态TLV中选择第二节能因子TLV。或者,第二通告报文包括第二节能因子TLV和第二链路状态TLV,第二设备在第二通告报文中识别出第二节能因子TLV和第二链路状态TLV,并从第二节能因子TLV和第二链路状态TLV中选择第二节能因子TLV。获取选择的第二节能因子TLV包括的链路的标识信息和该链路的第二cost值。Optionally, the second notification message includes a second energy saving factor TLV and a second node status TLV. The second device identifies the second energy saving factor TLV and the second node status TLV in the second notification message, and obtains the second energy saving factor TLV and the second node status TLV from the second notification message. Select the second energy-saving factor TLV from the energy-saving factor TLV and the second node status TLV. Alternatively, the second advertisement message includes the second energy saving factor TLV and the second link status TLV. The second device identifies the second energy saving factor TLV and the second link status TLV in the second advertisement message, and obtains the second energy saving factor TLV and the second link status TLV from the second advertisement message. Select the second energy-saving factor TLV from the energy-saving factor TLV and the second link status TLV. Obtain the identification information of the link included in the selected second energy-saving factor TLV and the second cost value of the link.
例如,参见图10,假设网络设备2接收到网络设备5发送第二通告报文,第二通告报文包括以网络设备5为端点的链路1的标识信息和链路1的第二cost值“1.5”以及以网络设备5为端的链路2的标识信息和链路2的第二cost值“1.5”。假设,网络设备2还获取到链路3的cost值为“2”,以及假设网络设备2上保存有路由信息,该路由信息指示的目的设备为目的设备2,但该路由信息指示的下一跳设备为网络设备5。网络设备2基于目的设备2的地址、链 路2的第二cost值“0.5”、链路1的第一cost值“0.5”以及链路3的cost值“2”,计算能够到达目的设备2的传输路径,该传输路径经过网络设备5、网络设备6和网络设备7。也就是说,该传输路径经过以网络设备5为端的链路2和链路1,网络设备2将该路由信息作为第四路由信息,将第四路由信息指示的下一跳设备由网络设备5替换网络设备3。参见图10,当网络设备2接收到网络流量2时,网络流量2的目的设备为目的设备2,网络设备2基于第四路由信息将网络流量2发送给网络设备3,网络设备3再向目的设备2发送网络流量2。For example, referring to Figure 10, assume that network device 2 receives a second advertisement message sent by network device 5. The second advertisement message includes identification information of link 1 with network device 5 as the endpoint and a second cost value of link 1. “1.5” as well as the identification information of link 2 ending with network device 5 and the second cost value of link 2 “1.5”. Assume that network device 2 also obtains the cost value of link 3 as "2", and assumes that network device 2 has routing information stored on it. The destination device indicated by the routing information is destination device 2, but the next destination indicated by the routing information is The hop device is network device 5. Network device 2 is based on the address and chain of destination device 2. The second cost value "0.5" of link 2, the first cost value "0.5" of link 1 and the cost value "2" of link 3 are used to calculate the transmission path that can reach the destination device 2. The transmission path passes through the network device 5 , network device 6 and network device 7. That is to say, the transmission path passes through link 2 and link 1 with network device 5 as the end. Network device 2 uses this routing information as the fourth routing information, and the next hop device indicated by the fourth routing information is network device 5. Replace network device 3. Referring to Figure 10, when network device 2 receives network traffic 2, the destination device of network traffic 2 is destination device 2. Network device 2 sends network traffic 2 to network device 3 based on the fourth routing information, and network device 3 then sends the network traffic 2 to the destination device 2. Device 2 sends network traffic 2.
对于上述步骤405,在第一设备和第二设备之间的关系是上述第二种关系或第三种关系,第二设备接收第二通告报文,基于第二通告报文和第二网络流量的目的地址建立第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。For the above step 405, the relationship between the first device and the second device is the above-mentioned second relationship or the third relationship. The second device receives the second notification message based on the second notification message and the second network traffic. The destination address establishes a transmission path for the second network traffic, and the transmission path for the second network traffic does not pass through the first device.
可选地,在第一设备和第二设备之间的关系是上述第二种关系的情况,第二设备和第一设备是两个不同AS域内的设备,第二设备是具有报文转发功能的网络设备。第二网络流量是第二设备当前正在传输的且传输路径经过第一设备的网络流量。或者,第二网络流量是需要第二设备建立传输路径的网络流量,第二设备是该传输路径的头节点。在第二设备建立第二网络流量的传输路径后,第二设备在接收到第二网络流量时,使用该传输路径转发接收的第二网络流量。或者,Optionally, the relationship between the first device and the second device is the above-mentioned second relationship, the second device and the first device are devices in two different AS domains, and the second device has a message forwarding function. network equipment. The second network traffic is network traffic currently being transmitted by the second device and whose transmission path passes through the first device. Alternatively, the second network traffic is network traffic that requires the second device to establish a transmission path, and the second device is the head node of the transmission path. After the second device establishes a transmission path for the second network traffic, when receiving the second network traffic, the second device uses the transmission path to forward the received second network traffic. or,
在第一设备和第二设备之间的关系是上述第三种关系的情况,第二设备是控制器,第二网络流量是需要控制器建立传输路径的网络流量,或者,第二网络流量是通信网络中当前正在传输的且传输路径经过第一设备的网络流量。在控制器建立第二网络流量的传输路径后,控制器下发该传输路径。对于该传输路径上的任一个网络设备,该网络设备接收到第二网络流量时,向下一跳设备转发接收的第二网络流量,该下一跳设备是该传输路径上的节点。In the case where the relationship between the first device and the second device is the above-mentioned third relationship, the second device is the controller, and the second network traffic is network traffic that requires the controller to establish a transmission path, or the second network traffic is Network traffic currently being transmitted in the communication network and whose transmission path passes through the first device. After the controller establishes the transmission path of the second network traffic, the controller delivers the transmission path. For any network device on the transmission path, when the network device receives the second network traffic, it forwards the received second network traffic to the next hop device, and the next hop device is a node on the transmission path.
其中,第二通告报文指示第一设备供电能源的能源类型为第二能源类型,或者,第二通告报文指示第一设备上保存的第一路由信息对应的能源类型为第二能源类型。The second advertisement message indicates that the energy type of the energy supplied by the first device is the second energy type, or the second advertisement message indicates that the energy type corresponding to the first routing information stored on the first device is the second energy type.
可选地,在第二通告报文指示第一设备供电能源的能源类型为第二能源类型的情况,第二设备建立第二网络流量的传输路径的过程为。Optionally, when the second notification message indicates that the energy type of the power supply energy of the first device is the second energy type, the process of the second device establishing the transmission path of the second network traffic is.
第二设备基于第二通告报文确定第一设备供电能源的能源类型为第二能源类型。选择传输路径经过第一设备的一个网络流量作为第二网络流量,或者,选择需要建立传输路径的网络流量作为第二网络流量。基于第二网络流量的目的地址,建立不经过第一设备的第二网络流量的传输路径,将该传输路径作为第二网络流量的传输路径。The second device determines, based on the second notification message, that the energy type of the energy supplied by the first device is the second energy type. Select a network traffic whose transmission path passes through the first device as the second network traffic, or select the network traffic that needs to establish a transmission path as the second network traffic. Based on the destination address of the second network traffic, a transmission path of the second network traffic that does not pass through the first device is established, and the transmission path is used as the transmission path of the second network traffic.
可选地,在第二设备是具有报文转发功能的网络设备时,第二设备从第二设备上正在传输的且传输路径经过第一设备的网络流量中选择一个网络流量作为第二网络流量,和/或,从需要第二设备建立传输路径的网络流量中选择一个网络流量作为第二网络流量。或者,在第二设备是控制器时,第二设备从通信网络中正在传输的且传输路径经过第一设备的网络流量中选择一个网络流量作为第二网络流量,和/或,从需要第二设备建立传输路径的网络流量中选择一个网络流量作为第二网络流量。Optionally, when the second device is a network device with a packet forwarding function, the second device selects one network traffic as the second network traffic from the network traffic that is being transmitted on the second device and whose transmission path passes through the first device. , and/or, select one network flow as the second network flow from the network flow that requires the second device to establish a transmission path. Alternatively, when the second device is a controller, the second device selects a network traffic as the second network traffic from the network traffic that is being transmitted in the communication network and whose transmission path passes through the first device, and/or, from the network traffic that requires the second The device selects one network flow among the network flows used to establish a transmission path as the second network flow.
例如,参见图11,假设控制器接收到网络设备5发送第二通告报文,第二通告报文指示网络设备5的第二能源类型为煤电能源。控制器基于第二通告报文,确定网络设备5供电能源的能源类型为煤电能源。对于通信网络中正在传输的网络流量2,网络流量2的目的地址为目的设备2的地址,且网络流量2的传输路径经过网络设备5。控制器基于网络流量2的 目的地址建立源设备2与目的设备2之间的传输路径,该传输路径上的节点包括网络设备1、网络设备2、网络设备3、网络设备4和网络设备7,该传输路径不经过网络设备5。For example, referring to Fig. 11, assume that the controller receives a second notification message sent by the network device 5, and the second notification message indicates that the second energy type of the network device 5 is coal power energy. Based on the second notification message, the controller determines that the energy type of the power supply energy of the network device 5 is coal power energy. For the network traffic 2 being transmitted in the communication network, the destination address of the network traffic 2 is the address of the destination device 2, and the transmission path of the network traffic 2 passes through the network device 5. Controller based on network traffic 2 The destination address establishes a transmission path between source device 2 and destination device 2. The nodes on the transmission path include network device 1, network device 2, network device 3, network device 4 and network device 7. The transmission path does not pass through network devices. 5.
可选地,在步骤404中,第一设备可能采用上述方式1使第二通告报文指示第一设备供电能源的能源类型为第二能源类型。在此情况下,第二通告报文包括第二新增路由器属性字段,第二新增路由器属性字段包括第一能源类型。第二设备基于第二通告报文包括的第二新增路由器属性字段,确定第一设备供电能源的能源类型为第二能源类型。Optionally, in step 404, the first device may use the above method 1 to cause the second notification message to indicate that the energy type of the energy supplied by the first device is the second energy type. In this case, the second advertisement message includes a second newly added router attribute field, and the second newly added router attribute field includes the first energy type. The second device determines that the energy type of the power supply energy of the first device is the second energy type based on the second new router attribute field included in the second advertisement message.
例如,参见图11,假设控制器接收到网络设备5发送第二通告报文,第二通告报文包括第二新增路由器属性字段,第二新增路由器属性字段包括网络设备5的第二能源类型为煤电能源。控制器基于第二通告报文包括的第二新增路由器属性字段,确定网络设备5供电能源的能源类型为煤电能源。For example, referring to Figure 11, assume that the controller receives a second notification message sent by the network device 5. The second notification message includes a second newly added router attribute field, and the second newly added router attribute field includes the second energy source of the network device 5. The type is coal power energy. Based on the second newly added router attribute field included in the second advertisement message, the controller determines that the energy type of the power supply energy of the network device 5 is coal power energy.
可选地,在步骤404中,第一设备可能采用上述方式2使第二通告报文指示第一设备供电能源的能源类型为第二能源类型。在此情况下,第二通告报文包括第二颜色字段,第二颜色字段的取值为第二取值。第二设备从第二通告报文包括的第二颜色字段中解析出第二取值,基于第二取值确定第一设备供电能源的能源类型为第二能源类型。Optionally, in step 404, the first device may use the above method 2 to cause the second notification message to indicate that the energy type of the energy supplied by the first device is the second energy type. In this case, the second notification message includes a second color field, and the value of the second color field is the second value. The second device parses the second value from the second color field included in the second notification message, and determines based on the second value that the energy type of the energy supplied by the first device is the second energy type.
例如,参见图11,假设控制器接收到网络设备5发送第二通告报文,第二通告报文包括第二颜色字段,第二颜色字段的取值为“4”。控制器基于第二通告报文包括的第二颜色字段的取值“4”,确定网络设备5供电能源的能源类型为煤电能源。For example, referring to Figure 11, assume that the controller receives a second notification message sent by the network device 5. The second notification message includes a second color field, and the value of the second color field is "4". Based on the value "4" of the second color field included in the second notification message, the controller determines that the energy type of the power supply energy of the network device 5 is coal power energy.
可选地,在步骤404中,第一设备可能采用上述方式3使第二通告报文指示第一设备供电能源的能源类型为第二能源类型。在此情况下,第二通告报文包括第二AS-Path字段,第二设备基于第二AS-Path字段包括的AS号长度确定第一设备供电能源的第二能源类型。Optionally, in step 404, the first device may use the above method 3 to cause the second notification message to indicate that the energy type of the energy supplied by the first device is the second energy type. In this case, the second notification message includes a second AS-Path field, and the second device determines the second energy type of the power supply energy of the first device based on the length of the AS number included in the second AS-Path field.
可选地,第二设备在第二通告报文中识别出第二AS-Path字段,获取第二AS-Path字段的长度作为该AS号长度。Optionally, the second device identifies the second AS-Path field in the second advertisement message, and obtains the length of the second AS-Path field as the length of the AS number.
例如,参见图11,假设控制器接收到网络设备5发送第二通告报文,第二通告报文包括第二AS-Path字段,第二AS-Path字段包括300,300,300,300,第二AP-Path字段的长度等于指定长度的四倍。控制器在第二通告报文中识别出第二AS-Path字段,获取第二AS-Path字段的长度作为AS号长度,该AS号长度为指定长度的四倍。基于该AS号长度确定网络设备5供电能源的第二能源类型为煤电能源。For example, referring to Figure 11, assume that the controller receives a second notification message sent by network device 5. The second notification message includes a second AS-Path field, and the second AS-Path field includes 300, 300, 300, 300, and The length of the AP-Path field is equal to four times the specified length. The controller identifies the second AS-Path field in the second advertisement message and obtains the length of the second AS-Path field as the length of the AS number. The length of the AS number is four times the specified length. Based on the length of the AS number, it is determined that the second energy type of the power supply energy of the network device 5 is coal power energy.
可选地,在第二通告报文指示第一设备上保存的路由信息对应的能源类型为第二能源类型的情况,第二设备建立第二网络流量的传输路径的过程为:Optionally, when the second advertisement message indicates that the energy type corresponding to the routing information saved on the first device is the second energy type, the process of the second device establishing the transmission path of the second network traffic is:
第二设备基于第二通告报文确定第二通告报文指示的路由信息,以及确定该路由信息对应的能源类型为第二能源类型,该路由信息是第一设备上保存的路由信息。第二设备选择使用该路由信息传输的网络流量作为第二网络流量,第二网络流量的目的设备与该路由信息指示的目的设备相同。基于第二网络流量的目的地址建立不经过第一设备的第二网络流量的传输路径。或者,第二设备从需要第二设备建立传输路径的网络流量中,选择目的设备和该路径信息指示的目的设备相同的网络流量作为第二网络流量,基于第二网络流量的目的地址,建立不经过第一设备的第二网络流量的传输路径。The second device determines the routing information indicated by the second advertisement message based on the second advertisement message, and determines that the energy type corresponding to the routing information is the second energy type. The routing information is the routing information saved on the first device. The second device selects the network traffic transmitted using the routing information as the second network traffic, and the destination device of the second network traffic is the same as the destination device indicated by the routing information. A transmission path of the second network traffic that does not pass through the first device is established based on the destination address of the second network traffic. Alternatively, the second device selects, from the network traffic that requires the second device to establish a transmission path, the network traffic whose destination device is the same as the destination device indicated by the path information as the second network traffic, and based on the destination address of the second network traffic, establishes a different network traffic. The transmission path of the second network traffic passing through the first device.
可选地,在第二设备是具有报文转发功能的网络设备时,第二设备从第二设备上正在传输的网络流量中选择使用该路由信息传输的网络流量作为第二网络流量。或者,在第二设备是控制器时,第二设备从通信网络中正在传输的网络流量中选择使用该路由信息传输的网络 流量作为第二网络流量。Optionally, when the second device is a network device with a packet forwarding function, the second device selects the network traffic transmitted using the routing information as the second network traffic from the network traffic being transmitted on the second device. Or, when the second device is the controller, the second device selects a network for transmission using the routing information from network traffic being transmitted in the communication network. traffic as secondary network traffic.
可选地,在步骤404中,第一设备可能采用上述方式a使第二通告报文指示第一设备上保存的路由信息对应的能源类型为第二能源类型。在此情况下,第二通告报文包括第二路径属性字段,第二路径属性字段包括第二路由信息,第二路由信息包括第二能源类型。第二设备从第二通告报文中读取第二路由信息,基于第二路由信息包括的第二能源类型,确定第二路由信息对应的能源类型为第二能源类型。Optionally, in step 404, the first device may use the above method a to cause the second advertisement message to indicate that the energy type corresponding to the routing information stored on the first device is the second energy type. In this case, the second advertisement message includes a second path attribute field, the second path attribute field includes second routing information, and the second routing information includes the second energy type. The second device reads the second routing information from the second advertisement message, and determines that the energy type corresponding to the second routing information is the second energy type based on the second energy type included in the second routing information.
可选地,在步骤404中,第一设备可能采用上述方式b使第二通告报文指示第一设备上保存的路由信息对应的能源类型为第二能源类型。在此情况下,第二通告报文的community属性指示第一路由信息对应的能源类型为第二能源类型。第二设备从第二通告报文的第二community属性字段中解析出第二community属性值和第一路由信息,第二community属性值与第二能源类型对应,将第一路由信息对应的能源类型确定为第二community属性值对应的第二能源类型。Optionally, in step 404, the first device may use the above method b to cause the second advertisement message to indicate that the energy type corresponding to the routing information stored on the first device is the second energy type. In this case, the community attribute of the second advertisement message indicates that the energy type corresponding to the first routing information is the second energy type. The second device parses the second community attribute value and the first routing information from the second community attribute field of the second advertisement message. The second community attribute value corresponds to the second energy type, and uses the energy type corresponding to the first routing information. Determine the second energy type corresponding to the second community attribute value.
对于上述步骤406,在第一设备和第二设备之间的关系是上述第一种关系,第一设备和第二设备是同一AS域内的设备。在此情况下,第二设备是通信网络中的具有报文转发功能的网络设备,第二设备包括第四路由信息,第四路由信息指示的下一跳设备是第一设备或该下一跳设备包括能够到达第一设备的路由信息,第四路由信息指示的目的设备和第二网络流量的目的设备相同,第二网络流量是第二设备待转发的网络流量。For the above step 406, the relationship between the first device and the second device is the above-mentioned first relationship, and the first device and the second device are devices in the same AS domain. In this case, the second device is a network device with a message forwarding function in the communication network, the second device includes fourth routing information, and the next hop device indicated by the fourth routing information is the first device or the next hop. The device includes routing information that can reach the first device. The destination device indicated by the fourth routing information is the same as the destination device of the second network traffic. The second network traffic is network traffic to be forwarded by the second device.
在步骤406中,第二设备在检测出未接收到第一通告报文的持续时间长度达到指定时长阈值时,将第四路由信息指示的下一跳设备替换为第四设备,第四设备不是第一设备或者第四设备不包括能够到达第一设备的路由信息,如此使用于传输第二网络流量的传输路径不经过第一设备。In step 406, when the second device detects that the duration of not receiving the first advertisement message reaches the specified duration threshold, it replaces the next hop device indicated by the fourth routing information with the fourth device. The fourth device is not The first device or the fourth device does not include routing information that can reach the first device, so that the transmission path for transmitting the second network traffic does not pass through the first device.
例如,参见图10,假设网络设备5供电能源由水电能源变为煤电能源,且在网络设备5供电能源由水电能源变为煤电能源时,网络设备5停止向网络设备2发送第一通告报文。假设网络设备2上保存有路由信息,该路由信息指示的目的设备为目的设备2,但该路由信息指示的下一跳设备为网络设备5。网络设备2在未接收到网络设备5发送的第一通告报文的持续时间长度达到指定时长阈值时,将该路由信息作为第四路由信息,将第四路由信息指示的下一跳设备由网络设备5替换网络设备3。参见图10,当网络设备2接收到源设备2发送给目的设备2的网络流量2时,网络设备2基于第四路由信息将网络流量2发送给网络设备3,网络设备3再向目的设备2发送网络流量2。For example, referring to Figure 10, assume that the power supply energy of network device 5 changes from hydropower energy to coal power energy, and when the power supply energy of network device 5 changes from hydropower energy to coal power energy, network device 5 stops sending the first notification to network device 2 message. Assume that network device 2 stores routing information. The destination device indicated by the routing information is destination device 2, but the next-hop device indicated by the routing information is network device 5. When the duration of the first advertisement message sent by the network device 5 is not received by the network device 5 and reaches the specified duration threshold, the network device 2 uses the routing information as the fourth routing information, and uses the next hop device indicated by the fourth routing information by the network. Device 5 replaces network device 3. Referring to Figure 10, when the network device 2 receives the network traffic 2 sent by the source device 2 to the destination device 2, the network device 2 sends the network traffic 2 to the network device 3 based on the fourth routing information, and the network device 3 then sends the network traffic 2 to the destination device 2. Send network traffic 2.
在第一设备和第二设备之间的关系是上述第二种关系的情况,第二设备和第一设备是两个不同AS域内的设备,第二设备是具有报文转发功能的网络设备。第二设备在检测出未接收到第一通告报文的持续时间长度达到指定时长阈值时,选择第二设备当前正在传输的且传输路径经过第一设备的网络流量作为第二网络流量。或者,第二设备从需要第二设备建立传输路径的网络流量选择第二网络流量。基于第二网络流量的目的地址建立第二网络流量的传输路径。或者,The relationship between the first device and the second device is the second relationship described above. The second device and the first device are devices in two different AS domains, and the second device is a network device with a message forwarding function. When the second device detects that the duration of not receiving the first notification message reaches the specified duration threshold, the second device selects the network traffic currently being transmitted by the second device and whose transmission path passes through the first device as the second network traffic. Alternatively, the second device selects the second network traffic from the network traffic that requires the second device to establish a transmission path. Establishing a transmission path of the second network flow based on the destination address of the second network flow. or,
在第一设备和第二设备之间的关系是上述第三种关系的情况,第二设备是控制器。第二设备在检测出未接收到第一通告报文的持续时间长度达到指定时长阈值时,选择在通信网络中当前正在传输的且传输路径经过第一设备的网络流量作为第二网络流量。或者,第二设备 从需要第二设备建立传输路径的网络流量选择第二网络流量。基于第二网络流量的目的地址建立第二网络流量的传输路径。The relationship between the first device and the second device is the case of the third relationship described above, and the second device is the controller. When the second device detects that the duration of not receiving the first notification message reaches the specified duration threshold, the second device selects the network traffic currently being transmitted in the communication network and whose transmission path passes through the first device as the second network traffic. Or, the second device The second network traffic is selected from network traffic requiring the second device to establish a transmission path. Establishing a transmission path of the second network flow based on the destination address of the second network flow.
例如,参见图11,假设网络设备5供电能源由水电能源变为煤电能源。在网络设备5供电能源由水电能源变为煤电能源时,网络设备5停止向控制器发送第一通告报文。对于通信网络中正在传输的网络流量2,网络流量2是源设备2发给目的设备2的流量,且网络流量2的传输路径经过网络设备5。参见图11,在控制器未接收到网络设备5发送的第一通告报文的持续时间长度达到指定时长阈值时,控制器基于网络流量2的目的地址建立源设备2与目的设备2之间的传输路径,该传输路径上的节点包括网络设备1、网络设备2、网络设备3、网络设备4和网络设备7,该传输路径不经过网络设备5。For example, referring to Figure 11, assume that the power supply energy of network device 5 changes from hydropower energy to coal power energy. When the power supply energy of the network device 5 changes from hydropower energy to coal power energy, the network device 5 stops sending the first notification message to the controller. Regarding the network traffic 2 being transmitted in the communication network, the network traffic 2 is the traffic sent by the source device 2 to the destination device 2, and the transmission path of the network traffic 2 passes through the network device 5. Referring to Figure 11, when the controller does not receive the first notification message sent by the network device 5 and the duration reaches the specified duration threshold, the controller establishes a link between the source device 2 and the destination device 2 based on the destination address of the network flow 2. Transmission path, the nodes on this transmission path include network device 1, network device 2, network device 3, network device 4 and network device 7. This transmission path does not pass through network device 5.
其中,在上述步骤405或406中,由于第二设备确定的第二网络流量的传输路径不经过第一设备,这样使得经过第一设备的网络流量越来越少,甚至没有网络流量经过第一设备。在第一时间段中第一设备上未接收到待转发的网络流量时,第一设备关机或休眠,从而降低对能源的消耗。Among them, in the above step 405 or 406, since the transmission path of the second network traffic determined by the second device does not pass through the first device, the network traffic passing through the first device becomes less and less, and even no network traffic passes through the first device. equipment. When the first device does not receive network traffic to be forwarded in the first time period, the first device shuts down or sleeps, thereby reducing energy consumption.
可选地,第一时间段的时间长度为指定的第一时间长度。Optionally, the time length of the first time period is a specified first time length.
可选地,在第一设备关机或体眠后,第一设备周期性地开机。或者,控制器可能需要第一设备开机时,控制第一设备开机,例如,在通信网络中需要传输的网络流量较多时,控制器控制第一设备开机。Optionally, after the first device is turned off or put to sleep, the first device is turned on periodically. Alternatively, the controller may control the first device to turn on when the first device needs to be turned on. For example, when a large amount of network traffic needs to be transmitted in the communication network, the controller controls the first device to turn on.
在第一设备开机后,通信网络中的网络设备和/或控制器能够感知到第一设备开机。所以在第一设备开机后的设定时间段内,通信网络中的网络设备可能向第一设备发送网络流量,第一设备会接收到该网络流量。或者,在第一设备开机后的设定时间段内,通信网络中的网络设备可能不向第一设备发送网络流量,在设定时间段内第一设备不会接收到网络流量。After the first device is powered on, the network device and/or controller in the communication network can sense that the first device is powered on. Therefore, within a set period of time after the first device is powered on, a network device in the communication network may send network traffic to the first device, and the first device will receive the network traffic. Alternatively, within a set time period after the first device is powered on, the network device in the communication network may not send network traffic to the first device, and the first device may not receive network traffic within the set time period.
可选地,设定时间段的起始时刻为第一设备的开机时刻,设定时间段的时间长度为指定的第二时间长度。Optionally, the starting time of the set time period is the power-on time of the first device, and the time length of the set time period is a specified second time length.
可选地,如果第一设备在开机后的设定时间段内接收到网络流量,第一设备保持上电工作状态。这样第一设备转发接收的网络流量,从而避免对该网络流量的传输产生影响。Optionally, if the first device receives network traffic within a set time period after being powered on, the first device remains powered on. In this way, the first device forwards the received network traffic to avoid affecting the transmission of the network traffic.
可选地,如果第一设备在开机后的设定时间段内没有接收到网络流量,第一设备在设定的时间段的结束时刻关机或体眠,从而继续减小消耗能源。Optionally, if the first device does not receive network traffic within a set time period after being powered on, the first device shuts down or goes to sleep at the end of the set time period, thereby continuing to reduce energy consumption.
在本申请实施例中,第一设备周期性地确定第一设备供电能源的能源类型,在确定的能源类型为第一能源类型时发送第一通告报文,第一通告报文指示第一能源类型,第一能源类型为可再生能源。第二设备接收第一通告报文,基于第一通告报文确定第一网络流量的传输路径,第一网络流量的传输路径经过第一设备。这样第二设备能够尽可能多地将通信网络中的网络流量汇聚到第一设备,由于第一设备尽可能多地转发通信网络中的网络流量,又由于第一设备供电能源为可再生能源,从而不仅减小通信网络的能源消耗,还提高了可再生能源的利用率,使得通信网络变的更加低碳环保。在第一设备确定的能源类型由第一能源类型变为第二能源类型时,表示可能再生能源不稳定或停止向第一设备供电可再生能源,第一设备发送第二通告报文,第二通告报文指示第二能源类型,第二能源类型为非可再生能源。第二设备接收第二通告报文,基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备,从而恢复原路由功能。 In this embodiment of the present application, the first device periodically determines the energy type of the energy supplied by the first device, and sends a first notification message when the determined energy type is the first energy type. The first notification message indicates the first energy type. Type, the first energy type is renewable energy. The second device receives the first notification message and determines a transmission path of the first network traffic based on the first notification message. The transmission path of the first network traffic passes through the first device. In this way, the second device can aggregate as much network traffic in the communication network as possible to the first device. Since the first device forwards as much network traffic in the communication network as possible, and because the power supply energy of the first device is renewable energy, This not only reduces the energy consumption of the communication network, but also increases the utilization rate of renewable energy, making the communication network more low-carbon and environmentally friendly. When the energy type determined by the first device changes from the first energy type to the second energy type, indicating that the renewable energy may be unstable or stop supplying renewable energy to the first device, the first device sends a second notification message, and the second The notification message indicates the second energy type, and the second energy type is non-renewable energy. The second device receives the second advertisement message and determines the transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device, thereby restoring the original routing function.
参见图13,本申请实施例提供了一种通信设备1300。可选地,该设备1300应用于包括该设备1300和第二设备的网络系统,例如该网络系统中的该设备1300和第二设备为图1、图2、图3、图7、图8、图10或图11所示的通信网络100中的设备。该设备1300为图4、图5或图6所示方法400中的第一设备。该设备1300包括:处理器1301、存储器1302、内部连接1303和网络接口1304。Referring to Figure 13, an embodiment of the present application provides a communication device 1300. Optionally, the device 1300 is applied to a network system including the device 1300 and a second device. For example, the device 1300 and the second device in the network system are shown in Figure 1, Figure 2, Figure 3, Figure 7, Figure 8, Devices in the communication network 100 shown in Figure 10 or Figure 11. The device 1300 is the first device in the method 400 shown in Figure 4, Figure 5 or Figure 6. The device 1300 includes: a processor 1301, a memory 1302, an internal connection 1303 and a network interface 1304.
处理器1301、存储器1302和网络接口1304通过内部连接1303连接,存储器1302中存储有操作系统和程序代码,该至少一个处理器1301从存储器1302中读取操作系统并运行该操作系统。可选地,内部连接1303包括总线。可选的,网络接口1304能够与图4、图5或图6或图7所示方法400中的第二设备102通信。The processor 1301, the memory 1302 and the network interface 1304 are connected through an internal connection 1303. The operating system and program code are stored in the memory 1302. The at least one processor 1301 reads the operating system from the memory 1302 and runs the operating system. Optionally, the internal connection 1303 includes a bus. Optionally, the network interface 1304 can communicate with the second device 102 in the method 400 shown in FIG. 4, FIG. 5, or FIG. 6 or FIG. 7.
至少一个处理器1301从该存储器1302中读取程序代码,在该操作系统中通过运行程序代码来确定该设备1300供电能源的能源类型和/或获取用于指示该能源类型的通告报文(图4、图5或图6所示方法400中的第一通告报文和/或第二通告报文)。和/或,至少一个处理器1301通过网络接口1304发送该通告报文。At least one processor 1301 reads program code from the memory 1302, and runs the program code in the operating system to determine the energy type of the energy supplied by the device 1300 and/or obtain a notification message indicating the energy type (Fig. 4. The first notification message and/or the second notification message in the method 400 shown in Figure 5 or Figure 6). And/or, at least one processor 1301 sends the notification message through the network interface 1304.
可选的,处理器1301确定能源类型和/或获取通告报文的详细实现过程,可以参见图4、图5或图6所示的实施例中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the processor 1301 determining the energy type and/or obtaining the notification message, please refer to the relevant content in the embodiment shown in Figure 4, Figure 5 or Figure 6, which will not be described in detail here.
可选的,上述处理器1301可能是一个通用中央处理器(central processing unit,CPU),网络处理器(network processor,NP),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。Optionally, the above-mentioned processor 1301 may be a general central processing unit (CPU), a network processor (NP), a microprocessor, or an application-specific integrated circuit (ASIC). , or one or more integrated circuits used to control the execution of the program of this application.
上述内部连接1303包括一通路,在上述组件之间传送信息。可选的,内部连接1303可能是单板或总线等。The internal connection 1303 includes a path for transmitting information between the components. Optionally, the internal connection 1303 may be a single board or a bus, etc.
上述存储器1302可能是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可能是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可能是独立存在,通过总线与处理器相连接。存储器也可能和处理器集成在一起。The above-mentioned memory 1302 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types that can store information and instructions. type of dynamic storage device, which may also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disc Storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store the desired program code in the form of instructions or data structures and can be used by Any other media accessible by a computer, but not limited to this. The memory may exist independently and be connected to the processor through a bus. Memory may also be integrated with the processor.
在具体实现中,作为一种实施例,处理器1301可能包括一个或多个CPU,例如图13中的CPU0和CPU1。In specific implementation, as an embodiment, the processor 1301 may include one or more CPUs, such as CPU0 and CPU1 in Figure 13 .
在具体实现中,作为一种实施例,该检测设备1300可能包括多个处理器,例如图13中的处理器1301和处理器1307。这些处理器中的每一个可能是一个单核(single-CPU)处理器,也可能是一个多核(multi-CPU)处理器。这里的处理器可能指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In specific implementation, as an embodiment, the detection device 1300 may include multiple processors, such as processor 1301 and processor 1307 in Figure 13 . Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor here may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
在上述实施例中,确定能源类型和/或获取通告报文的流程可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现,例如该计算机产品是一种实现通信方法的软件,用以安装于图1、图2、图3、图7、图8、图10或图11所示的通信网络100中的设备上,或者,安装于图4、图5或图6所示方法400中的第一设备上。 In the above embodiments, the process of determining the energy type and/or obtaining the notification message may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. For example, the computer product is a software that implements a communication method and is used to be installed in Figures 1, 2, 3, 7, and 8 , on the device in the communication network 100 shown in Figure 10 or Figure 11, or installed on the first device in the method 400 shown in Figure 4, Figure 5 or Figure 6.
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生在本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程设备。所述计算机指令可以存储在计算机可读存储介质中,上述提到的存储介质可能是只读存储器,磁盘或光盘等。所述计算机指令可以或者从一个计算机可读存储介质向另一个计算机可读存储介质传输例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(Digital Subscriber Line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc. The computer instructions may be transmitted either 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 over wires (e.g., coaxial cables, fiber optics, Digital Subscriber Line (DSL) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website, computer, server or data center. 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, data center, etc. that contains one or more available media integrated. The available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk (SSD)), etc.
参见图14,本申请实施例提供了一种通信设备1400。可选地,该设备1400应用于包括第一设备和该设备1400的网络系统,例如该网络系统中的第一设备和该设备1400为图1、图2、图3、图7、图8、图10或图11所示的通信网络100中的设备。该设备1400为图4、图5或图6所示方法400中的第二设备。该设备1400包括:处理器1401、存储器1402、内部连接1403和网络接口1404。Referring to Figure 14, an embodiment of the present application provides a communication device 1400. Optionally, the device 1400 is applied to a network system including the first device and the device 1400. For example, the first device and the device 1400 in the network system are shown in Figure 1, Figure 2, Figure 3, Figure 7, Figure 8, Devices in the communication network 100 shown in Figure 10 or Figure 11. The device 1400 is the second device in the method 400 shown in Figure 4, Figure 5 or Figure 6. The device 1400 includes: a processor 1401, a memory 1402, an internal connection 1403, and a network interface 1404.
处理器1401、存储器1402和网络接口1404通过内部连接1403连接,存储器1402中存储有操作系统和程序代码,该至少一个处理器1401从存储器1402中读取操作系统并运行该操作系统。可选地,内部连接1403包括总线。可选的,网络接口1404能够与图4、图5或图6或图7所示方法400中的第一设备102通信。The processor 1401, the memory 1402 and the network interface 1404 are connected through an internal connection 1403. The operating system and program code are stored in the memory 1402. The at least one processor 1401 reads the operating system from the memory 1402 and runs the operating system. Optionally, the internal connection 1403 includes a bus. Optionally, the network interface 1404 can communicate with the first device 102 in the method 400 shown in FIG. 4, FIG. 5, or FIG. 6 or FIG. 7.
网络接口1404用于接收通告报文(图4、图5或图6所示方法400中的第一通告报文和/或第二通告报文,第一通告报文指示第一设备供电能源的第一能源类型,第二通告报文指示第一设备供电能源的第二能源类型)。至少一个处理器1401从该存储器1402中读取程序代码,在该操作系统中通过运行程序代码来基于第一通告报文确定第一网络流量的传输路径,第一网络流量的传输路径经过第一设备,和/或,基于第二通告报文确定第二网络流量的传输路由,第二网络流量的传输路径不经过第一设备。The network interface 1404 is used to receive a notification message (the first notification message and/or the second notification message in the method 400 shown in Figure 4, Figure 5 or Figure 6. The first notification message indicates the power supply of the first device. The first energy type, the second notification message indicates the second energy type of the power supply energy of the first device). At least one processor 1401 reads the program code from the memory 1402, and determines the transmission path of the first network traffic based on the first notification message by running the program code in the operating system. The transmission path of the first network traffic passes through the first The device, and/or, determines a transmission route of the second network traffic based on the second advertisement message, and the transmission path of the second network traffic does not pass through the first device.
可选的,处理器1401确定第一网络流量的传输路径和/或确定第二网络流量的传输路径的详细实现过程,可以参见图4、图5或图6所示的实施例中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the processor 1401 determining the transmission path of the first network traffic and/or determining the transmission path of the second network traffic, please refer to the relevant content in the embodiment shown in Figure 4, Figure 5 or Figure 6 , will not be explained in detail here.
可选的,上述处理器1401可能是一个通用中央处理器(central processing unit,CPU),网络处理器(network processor,NP),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。Optionally, the processor 1401 may be a general central processing unit (CPU), a network processor (NP), a microprocessor, or an application-specific integrated circuit (ASIC). , or one or more integrated circuits used to control the execution of the program of this application.
上述内部连接1403包括一通路,在上述组件之间传送信息。可选的,内部连接1403可能是单板或总线等。The internal connection 1403 includes a path for transmitting information between the components. Optionally, the internal connection 1403 may be a single board or a bus, etc.
上述存储器1402可能是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可能是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory, CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可能是独立存在,通过总线与处理器相连接。存储器也可能和处理器集成在一起。The above-mentioned memory 1402 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types of static storage devices that can store information and instructions. type of dynamic storage device, which may also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory, CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store instructions or data Without limitation, any other medium that may be in the form of the desired program code and capable of being accessed by a computer. The memory may exist independently and be connected to the processor through a bus. Memory may also be integrated with the processor.
在具体实现中,作为一种实施例,处理器1401可能包括一个或多个CPU,例如图14中的CPU0和CPU1。In specific implementation, as an embodiment, the processor 1401 may include one or more CPUs, such as CPU0 and CPU1 in Figure 14.
在具体实现中,作为一种实施例,该检测设备1400可能包括多个处理器,例如图14中的处理器1401和处理器1407。这些处理器中的每一个可能是一个单核(single-CPU)处理器,也可能是一个多核(multi-CPU)处理器。这里的处理器可能指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In specific implementation, as an embodiment, the detection device 1400 may include multiple processors, such as processor 1401 and processor 1407 in Figure 14 . Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor here may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
在上述实施例中,确定能源类型和/或获取通告报文的流程可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现,例如该计算机产品是一种实现通信方法的软件,用以安装于图1、图2、图3、图7、图8、图10或图11所示的通信网络100中的设备上,或者,安装于图4、图5或图6所示方法400中的第二设备上。In the above embodiments, the process of determining the energy type and/or obtaining the notification message may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. For example, the computer product is a software that implements a communication method and is used to be installed in Figures 1, 2, 3, 7, and 8 , on the device in the communication network 100 shown in Figure 10 or Figure 11, or installed on the second device in the method 400 shown in Figure 4, Figure 5 or Figure 6.
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生在本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程设备。所述计算机指令可以存储在计算机可读存储介质中,上述提到的存储介质可能是只读存储器,磁盘或光盘等。所述计算机指令可以或者从一个计算机可读存储介质向另一个计算机可读存储介质传输例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(Digital Subscriber Line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc. The computer instructions may be transmitted either 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 over wires (e.g., coaxial cables, fiber optics, Digital Subscriber Line (DSL) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website, computer, server or data center. 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, data center, etc. that contains one or more available media integrated. The available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk (SSD)), etc.
参见图15,本申请实施例提供了一种通信装置1500,所述装置1500应用于包括所述装置1500和第二设备的网络系统,例如该网络系统中的所述装置1500和第二设备为图1、图2、图3、图7、图8、图10或图11所示的通信网络100中的设备。所述装置1500部署在图4、图5或图6所示方法400中的第一设备。所述装置1500包括处理模块1501和通信模块1502。Referring to Figure 15, an embodiment of the present application provides a communication device 1500. The device 1500 is applied to a network system including the device 1500 and a second device. For example, the device 1500 and the second device in the network system are Devices in the communication network 100 shown in Figure 1, Figure 2, Figure 3, Figure 7, Figure 8, Figure 10 or Figure 11 . The device 1500 is deployed on the first device in the method 400 shown in Figure 4, Figure 5 or Figure 6. The device 1500 includes a processing module 1501 and a communication module 1502.
处理模块1501,用于确定所述装置1500供电能源的第一能源类型,所述装置1500是通信网络中的具有报文转发功能的网络设备,第一能源类型为可再生能源;The processing module 1501 is used to determine the first energy type of the energy supplied by the device 1500. The device 1500 is a network device with a message forwarding function in the communication network, and the first energy type is renewable energy;
通信模块1502,用于发送第一通告报文,第一通告报文指示第一能源类型。The communication module 1502 is configured to send a first notification message, where the first notification message indicates the first energy type.
可选地,处理模块1501确定第一能源类型的详细实现过程,参见图4所示方法400的步骤401中的相关内容,在此不再详细说明。Optionally, the processing module 1501 determines the detailed implementation process of the first energy type. Please refer to the relevant content in step 401 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,通信模块1502发送第一通告报文的详细实现过程,参见图4所示方法400的步骤402中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1502 sending the first notification message, please refer to the relevant content in step 402 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,通信模块1502,还用于: Optionally, the communication module 1502 is also used to:
在所述装置1500供电能源的能源类型由第一能源类型变为第二能源类型时,发送第二通告报文,第二能源类型为非可再生能源,第二通告报文指示第二能源类型。When the energy type of the power supply energy of the device 1500 changes from the first energy type to the second energy type, a second notification message is sent. The second energy type is non-renewable energy, and the second notification message indicates the second energy type. .
可选地,通信模块1502发送第二通告报文的详细实现过程,参见图4所示方法400的步骤404中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1502 sending the second notification message, please refer to the relevant content in step 404 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,第一通告报文包括以所述装置1500为端点的链路的标识信息和该链路的第一开销cost值,第一cost值与第一能源类型相对应。Optionally, the first notification message includes identification information of a link with the device 1500 as an endpoint and a first cost value of the link, where the first cost value corresponds to the first energy type.
可选地,第一通告报文为内部网关协议IGP报文,第一通告报文包括链路状态类型长度值TLV或节点状态TLV,第一cost值携带在该链路状态TLV或该节点状态TLV中。Optionally, the first notification message is an Interior Gateway Protocol IGP message. The first notification message includes a link status type length value TLV or a node status TLV. The first cost value is carried in the link status TLV or the node status. in TLV.
可选地,第一通告报文为IGP报文,第一通告报文包括节能因子TLV,该节能因子TLV为扩展的TLV,该节能因子TLV包括第一cost值。Optionally, the first notification message is an IGP message, and the first notification message includes an energy saving factor TLV, the energy saving factor TLV is an extended TLV, and the energy saving factor TLV includes the first cost value.
通信模块1502,还用于在所述装置1500供电能源的能源类型由第一能源类型变为第二能源类型时,发送第二通告报文,第二能源类型为非可再生能源,第二通告报文指示第二能源类型,第二通告报文为IGP报文,第二通告报文包括该链路的标识信息和第二cost值,第二cost值与第二能源类型相对应。The communication module 1502 is also configured to send a second notification message when the energy type of the power supply energy of the device 1500 changes from the first energy type to the second energy type. The second energy type is non-renewable energy. The second notification message The message indicates the second energy type. The second advertisement message is an IGP message. The second advertisement message includes identification information of the link and a second cost value. The second cost value corresponds to the second energy type.
可选地,通信模块1502发送第二通告报文的详细实现过程,参见图4所示方法400的步骤404中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1502 sending the second notification message, please refer to the relevant content in step 404 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,所述装置1500和第二设备是同一个自治系统AS域内的设备。Optionally, the device 1500 and the second device are devices in the same autonomous system AS domain.
可选地,第一通告报文为边界网关协议BGP报文,第一通告报文用于携带设备属性,第一通告报文包括第一新增路由器属性字段,第一新增路由器属性字段包括第一能源类型。Optionally, the first advertisement message is a Border Gateway Protocol BGP message, the first advertisement message is used to carry device attributes, the first advertisement message includes a first newly added router attribute field, and the first newly added router attribute field includes The first type of energy.
可选地,通信模块1502,还用于在所述装置1500供电能源的能源类型由第一能源类型变为第二能源类型时,发送第二通告报文,第二能源类型为非可再生能源,第二通告报文指示第二能源类型,第二通告报文为BGP报文,第二通告报文用于携带该设备属性,第二通告报文包括第二新增路由器属性字段,第二新增路由器属性字段包括第二能源类型。Optionally, the communication module 1502 is also configured to send a second notification message when the energy type of the energy supplied by the device 1500 changes from the first energy type to the second energy type, and the second energy type is non-renewable energy. , the second advertisement message indicates the second energy type, the second advertisement message is a BGP message, the second advertisement message is used to carry the device attributes, the second advertisement message includes the second new router attribute field, the second New router attribute fields include the second energy type.
可选地,通信模块1502发送第二通告报文的详细实现过程,参见图4所示方法400的步骤404中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1502 sending the second notification message, please refer to the relevant content in step 404 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,第一通告报文为边界网关协议BGP报文,第一通告报文用于携带分段路由互联协议第六版策略SRv6 Policy,第一通告报文包括第一颜色字段,第一颜色字段包括第一能源类型。Optionally, the first advertisement message is a Border Gateway Protocol BGP message, and the first advertisement message is used to carry the Segment Routing Interconnection Protocol version 6 policy SRv6 Policy. The first advertisement message includes a first color field, and a first The color field includes the first energy type.
可选地,通信模块1502,还用于在所述装置1500供电能源的能源类型由第一能源类型变为第二能源类型时,发送第二通告报文,第二能源类型为非可再生能源,第二通告报文指示第二能源类型,第二通告报文为BGP报文,第二通告报文用于携带SRv6 Policy,第二通告报文包括第二颜色字段,第二颜色字段包括第二能源类型。Optionally, the communication module 1502 is also configured to send a second notification message when the energy type of the energy supplied by the device 1500 changes from the first energy type to the second energy type, and the second energy type is non-renewable energy. , the second advertisement message indicates the second energy type, the second advertisement message is a BGP message, the second advertisement message is used to carry SRv6 Policy, the second advertisement message includes a second color field, and the second color field includes the Two energy types.
可选地,通信模块1502发送第二通告报文的详细实现过程,参见图4所示方法400的步骤404中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1502 sending the second notification message, please refer to the relevant content in step 404 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,第一通告报文为BGP报文,第一通告报文包括第一路径属性字段,第一路径属性字段包括第一路由信息,第一路由信息包括第一能源类型,第一路由信息是所述装置1500上保存的路由信息。Optionally, the first advertisement message is a BGP message, the first advertisement message includes a first path attribute field, the first path attribute field includes first routing information, the first routing information includes a first energy type, and the first route The information is routing information saved on the device 1500 .
可选地,通信模块1502,还用于在所述装置1500供电能源的能源类型由第一能源类型变为第二能源类型时,发送第二通告报文,第二能源类型为非可再生能源,第二通告报文指 示第二能源类型,第二通告报文为BGP报文,第二通告报文包括第二路径属性字段,第二路径属性字段包括第二路由信息,第二路由信息包括第二能源类型和第一路由信息中除第一能源类型之外的内容。Optionally, the communication module 1502 is also configured to send a second notification message when the energy type of the energy supplied by the device 1500 changes from the first energy type to the second energy type, and the second energy type is non-renewable energy. , the second notification message refers to indicates the second energy type. The second advertisement message is a BGP message. The second advertisement message includes a second path attribute field. The second path attribute field includes second routing information. The second routing information includes the second energy type and the second routing information. Contents other than the first energy type in a routing information.
可选地,通信模块1502发送第二通告报文的详细实现过程,参见图4所示方法400的步骤404中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1502 sending the second notification message, please refer to the relevant content in step 404 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,第一通告报文为BGP报文,第一通告报文的团体community属性指示第一路由信息对应的能源类型为第一能源类型,第一路由信息为所述装置1500上保存的路由信息。Optionally, the first advertisement message is a BGP message, the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the first energy type, and the first routing information is stored on the device 1500 routing information.
可选地,通信模块1502,还用于在所述装置1500供电能源的能源类型由第一能源类型变为第二能源类型时,发送第二通告报文,第二能源类型为非可再生能源,第二通告报文指示第二能源类型,第二通告报文为BGP报文,第二通告报文的community属性指示第一路由信息对应的能源类型为第二能源类型。Optionally, the communication module 1502 is also configured to send a second notification message when the energy type of the energy supplied by the device 1500 changes from the first energy type to the second energy type, and the second energy type is non-renewable energy. , the second advertisement message indicates the second energy type, the second advertisement message is a BGP message, and the community attribute of the second advertisement message indicates that the energy type corresponding to the first routing information is the second energy type.
可选地,通信模块1502发送第二通告报文的详细实现过程,参见图4所示方法400的步骤404中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1502 sending the second notification message, please refer to the relevant content in step 404 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,第一通告报文为BGP报文,第一通告报文用于向邻居宣告路由,第一通告报文的第一自治系统路径AS-Path字段包括m个相同的AS号,m是与第一能源类型相对应的倍数值,m为大于0的整数,AS号用于标识所述装置所在的AS域。Optionally, the first advertisement message is a BGP message. The first advertisement message is used to advertise routes to neighbors. The first autonomous system path AS-Path field of the first advertisement message includes m identical AS numbers, m is a multiple value corresponding to the first energy type, m is an integer greater than 0, and the AS number is used to identify the AS domain where the device is located.
可选地,通信模块1502,还用于在所述装置1500供电能源的能源类型由第一能源类型变为第二能源类型时,发送第二通告报文,第二能源类型为非可再生能源,第二通告报文指示所述第二能源类型,第二通告报文为BGP报文,第二通告报文用于向邻居宣告路由,第二通告报文的第二AS-Path字段包括n个所述AS号,n是与第二能源类型相对应的倍数值,n为大于0的整数,m不等于n。Optionally, the communication module 1502 is also configured to send a second notification message when the energy type of the energy supplied by the device 1500 changes from the first energy type to the second energy type, and the second energy type is non-renewable energy. , the second advertisement message indicates the second energy type, the second advertisement message is a BGP message, the second advertisement message is used to announce routes to neighbors, and the second AS-Path field of the second advertisement message includes n The AS number, n is a multiple value corresponding to the second energy type, n is an integer greater than 0, and m is not equal to n.
可选地,通信模块1502发送第二通告报文的详细实现过程,参见图4所示方法400的步骤404中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1502 sending the second notification message, please refer to the relevant content in step 404 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,所述装置1500和第二设备是两个不同AS域内的设备。Optionally, the apparatus 1500 and the second device are devices in two different AS domains.
附图15所描述的装置1500实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。在本申请各个实施例中的各功能模块可以集成在一个模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。附图15中上述各个模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。例如,采用软件实现时,上述处理模块1501和通信模块1502可以是由附图13中的至少一个处理器1301读取存储器1302中存储的程序代码后,生成的软件功能模块来实现。图15中上述各个模块也可以由设备1300中的不同硬件分别实现,例如处理模块1501由附图13中至少一个处理器1301中的一部分处理资源(例如多核处理器中的一个核)实现,而通信模块1502由附图13的网络接口1304和至少一个处理器1301中的其余部分处理资源(例如多核处理器中的其他核),或者采用现场可编程门阵列(Field-Programmable Gate Array,FPGA)、或协处理器等可编程器件来完成。显然上述功能模块也可以采用软件硬件相结合的方式来实现,例如通信模块1502由硬件可编程器件实现,而处理模块1501是由CPU读取存储器1302中存储的程序代码后,生成的软件功能模块。The device 1500 embodiment described in Figure 15 is only illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods, for example, multiple modules may be combined or Integrated into another system, or some features can be ignored, or not implemented. Each functional module in each embodiment of the present application can be integrated into one module, or each module can exist physically alone, or two or more modules can be integrated into one module. Each of the above-mentioned modules in Figure 15 can be implemented in the form of hardware or in the form of software function modules. For example, when implemented in software, the above-mentioned processing module 1501 and communication module 1502 can be implemented as software function modules generated by at least one processor 1301 in FIG. 13 after reading the program code stored in the memory 1302. Each of the above modules in Figure 15 can also be implemented by different hardware in the device 1300. For example, the processing module 1501 is implemented by a part of the processing resources of at least one processor 1301 in Figure 13 (for example, one core in a multi-core processor), and The communication module 1502 uses the network interface 1304 of FIG. 13 and the remaining processing resources of at least one processor 1301 (such as other cores in a multi-core processor), or uses a field-programmable gate array (Field-Programmable Gate Array, FPGA) , or coprocessor and other programmable devices to complete. Obviously, the above functional modules can also be implemented by a combination of software and hardware. For example, the communication module 1502 is implemented by a hardware programmable device, and the processing module 1501 is a software function module generated by the CPU after reading the program code stored in the memory 1302. .
在本申请实施例中,由于处理模块确定所述装置供电能源的第一能源类型,所述装置是 通信网络中的具有报文转发功能的网络设备,第一能源类型为可再生能源。通信模块发送第一通告报文,第一通告报文指示第一能源类型。由于第一通告报文指示第一能源类型,这样对于接收第一通告报文的第二设备,第二设备基于第一通告报文能够获知所述装置供电能源的能源类型为第一能源类型。第二设备能够使用所述装置转发更多的网络流量,第一能源类型为可再生能源,如此不仅降低通信网络的能源消耗,还提高可再生能源的利用率,使得通信网络变的低碳环保。In this embodiment of the present application, since the processing module determines the first energy type of the energy supplied by the device, the device is For network equipment with a message forwarding function in a communication network, the first energy type is renewable energy. The communication module sends a first notification message, and the first notification message indicates the first energy type. Since the first notification message indicates the first energy type, for the second device that receives the first notification message, the second device can learn that the energy type of the energy supplied by the device is the first energy type based on the first notification message. The second device can use the device to forward more network traffic. The first energy type is renewable energy. This not only reduces the energy consumption of the communication network, but also improves the utilization rate of renewable energy, making the communication network low-carbon and environmentally friendly. .
参见图16,本申请实施例提供了一种通信装置1600,所述装置1600应用于包括第一设备和所述装置1600的网络系统,例如该网络系统中的第一设备和所述装置1600为图1、图2、图3、图7、图8、图10或图11所示的通信网络100中的设备。所述装置1600部署在图4、图5或图6所示方法400中的第二设备。所述装置1600包括通信模块1601和处理模块1604。Referring to Figure 16, an embodiment of the present application provides a communication device 1600. The device 1600 is applied to a network system including a first device and the device 1600. For example, the first device and the device 1600 in the network system are Devices in the communication network 100 shown in Figure 1, Figure 2, Figure 3, Figure 7, Figure 8, Figure 10 or Figure 11 . The device 1600 is deployed on the second device in the method 400 shown in Figure 4, Figure 5 or Figure 6. The device 1600 includes a communication module 1601 and a processing module 1604.
通信模块1601,用于接收第一通告报文,第一通告报文指示第一设备供电能源的能源类型为第一能源类型,第一能源类型为可再生能源,第一设备是通信网络中具有报文转发功能的网络设备;The communication module 1601 is configured to receive a first notification message. The first notification message indicates that the energy type of the power supply energy of the first device is the first energy type, the first energy type is renewable energy, and the first device is in the communication network. Network equipment with message forwarding function;
处理模块1602,用于基于第一通告报文确定第一网络流量的传输路径,第一网络流量的传输路径经过第一设备。The processing module 1602 is configured to determine a transmission path of the first network traffic based on the first notification message, and the transmission path of the first network traffic passes through the first device.
可选地,通信模块1601接收第一通告报文的详细实现过程,参见图4所示方法400的步骤403中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1601 receiving the first notification message, please refer to the relevant content in step 403 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,处理模块1602确定第一网络流量的传输路径的详细实现过程,参见图4所示方法400的步骤403中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the processing module 1602 determining the transmission path of the first network traffic, please refer to the relevant content in step 403 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,通信模块1601,还用于接收第二通告报文,第二通告报文指示第一设备供电能源的能源类型为第二能源类型,第二能源类型为非可再生能源;Optionally, the communication module 1601 is also configured to receive a second notification message, the second notification message indicates that the energy type of the power supply energy of the first device is the second energy type, and the second energy type is non-renewable energy;
处理模块1602,还用于基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。The processing module 1602 is also configured to determine a transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device.
可选地,通信模块1601接收第二通告报文的详细实现过程,参见图4所示方法400的步骤405中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1601 receiving the second notification message, please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,处理模块1602确定第二网络流量的传输路径的详细实现过程,参见图4所示方法400的步骤405中的相关内容,在此不再详细说明。Optionally, the processing module 1602 determines the detailed implementation process of the transmission path of the second network traffic. Please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,第一通告报文包括以第一设备为端点的链路的标识信息和该链路的第一开销cost值,第一cost值与第一能源类型相对应。Optionally, the first advertisement message includes identification information of a link with the first device as an endpoint and a first cost value of the link, where the first cost value corresponds to the first energy type.
可选地,第一通告报文为内部网关协议IGP报文,第一通告报文包括链路状态类型长度值TLV或节点状态TLV,第一cost值携带在该链路状态TLV或该节点状态TLV中。Optionally, the first notification message is an Interior Gateway Protocol IGP message. The first notification message includes a link status type length value TLV or a node status TLV. The first cost value is carried in the link status TLV or the node status. in TLV.
可选地,第一通告报文为内部网关协议IGP报文,第一通告报文包括节能因子TLV,该节能因子TLV为扩展的TLV,该节能因子TLV包括第一cost值。Optionally, the first advertisement message is an Interior Gateway Protocol IGP message, the first advertisement message includes an energy saving factor TLV, the energy saving factor TLV is an extended TLV, and the energy saving factor TLV includes the first cost value.
可选地,通信模块1601,还用于接收第二通告报文,第二通告报文指示第一设备供电能源的能源类型为第二能源类型,第二能源类型为非可再生能源,第二通告报文为IGP报文,第二通告报文包括该链路的标识信息和第二cost值,第二cost值与第二能源类型相对应;Optionally, the communication module 1601 is also configured to receive a second notification message. The second notification message indicates that the energy type of the energy supplied by the first device is a second energy type, and the second energy type is non-renewable energy. The advertisement message is an IGP message, and the second advertisement message includes identification information of the link and a second cost value, and the second cost value corresponds to the second energy type;
处理模块1602,还用于基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。 The processing module 1602 is also configured to determine a transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device.
可选地,通信模块1601接收第二通告报文的详细实现过程,参见图4所示方法400的步骤405中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1601 receiving the second notification message, please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,处理模块1602确定第二网络流量的传输路径的详细实现过程,参见图4所示方法400的步骤405中的相关内容,在此不再详细说明。Optionally, the processing module 1602 determines the detailed implementation process of the transmission path of the second network traffic. Please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,第一设备和所述装置1600是同一个自治系统AS域内的设备。Optionally, the first device and the device 1600 are devices in the same autonomous system AS domain.
可选地,第一通告报文为边界网关协议BGP报文,第一通告报文用于携带设备属性,第一通告报文包括第一新增路由器属性字段,第一新增路由器属性字段包括第一能源类型。Optionally, the first advertisement message is a Border Gateway Protocol BGP message, the first advertisement message is used to carry device attributes, the first advertisement message includes a first newly added router attribute field, and the first newly added router attribute field includes The first type of energy.
可选地,通信模块1601,还用于接收第二通告报文,第二通告报文指示第一设备供电能源的能源类型为第二能源类型,第二能源类型为非可再生能源,第二通告报文为BGP报文,第二通告报文用于携带该设备属性,第二通告报文包括第二新增路由器属性字段,第二新增路由器属性字段包括第二能源类型;Optionally, the communication module 1601 is also configured to receive a second notification message. The second notification message indicates that the energy type of the energy supplied by the first device is a second energy type, and the second energy type is non-renewable energy. The advertisement message is a BGP message, and the second advertisement message is used to carry attributes of the device. The second advertisement message includes a second new router attribute field, and the second new router attribute field includes a second energy type;
处理模块1602,还用于基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。The processing module 1602 is also configured to determine a transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device.
可选地,通信模块1601接收第二通告报文的详细实现过程,参见图4所示方法400的步骤405中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1601 receiving the second notification message, please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,处理模块1602确定第二网络流量的传输路径的详细实现过程,参见图4所示方法400的步骤405中的相关内容,在此不再详细说明。Optionally, the processing module 1602 determines the detailed implementation process of the transmission path of the second network traffic. Please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,第一通告报文为边界网关协议BGP报文,第一通告报文用于携带分段路由互联协议第六版策略SRv6 Policy,第一通告报文包括第一颜色字段,第一颜色字段包括第一能源类型。Optionally, the first advertisement message is a Border Gateway Protocol BGP message, and the first advertisement message is used to carry the Segment Routing Interconnection Protocol version 6 policy SRv6 Policy. The first advertisement message includes a first color field, and a first The color field includes the first energy type.
可选地,通信模块1601,还用于接收第二通告报文,第二通告报文指示第一设备供电能源的能源类型为第二能源类型,第二能源类型为非可再生能源,第二通告报文为BGP报文,第二通告报文用于携带SRv6 Policy,第二通告报文包括第二颜色字段,第二颜色字段包括第二能源类型;Optionally, the communication module 1601 is also configured to receive a second notification message. The second notification message indicates that the energy type of the energy supplied by the first device is a second energy type, and the second energy type is non-renewable energy. The notification message is a BGP message, and the second notification message is used to carry the SRv6 Policy. The second notification message includes a second color field, and the second color field includes the second energy type;
处理模块1602,还用于基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。The processing module 1602 is also configured to determine a transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device.
可选地,通信模块1601接收第二通告报文的详细实现过程,参见图4所示方法400的步骤405中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1601 receiving the second notification message, please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,处理模块1602确定第二网络流量的传输路径的详细实现过程,参见图4所示方法400的步骤405中的相关内容,在此不再详细说明。Optionally, the processing module 1602 determines the detailed implementation process of the transmission path of the second network traffic. Please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,第一通告报文为BGP报文,第一通告报文包括第一路径属性字段,第一路径属性字段包括第一路由信息,第一路由信息包括第一能源类型,第一路由信息是第一设备上保存的路由信息。Optionally, the first advertisement message is a BGP message, the first advertisement message includes a first path attribute field, the first path attribute field includes first routing information, the first routing information includes a first energy type, and the first route The information is routing information saved on the first device.
可选地,通信模块1601,还用于接收第二通告报文,第二通告报文指示第一设备供电能源的能源类型为第二能源类型,第二能源类型为非可再生能源,第二通告报文为BGP报文,第二通告报文包括第二路径属性字段,第二路径属性字段包括第二路由信息,第二路由信息包括第二能源类型和第一路由信息中除第一能源类型之外的内容;Optionally, the communication module 1601 is also configured to receive a second notification message. The second notification message indicates that the energy type of the energy supplied by the first device is a second energy type, and the second energy type is non-renewable energy. The advertisement message is a BGP message. The second advertisement message includes a second path attribute field. The second path attribute field includes second routing information. The second routing information includes a second energy type and the first energy source in the first routing information. Content outside the genre;
处理模块1602,还用于基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。 The processing module 1602 is also configured to determine a transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device.
可选地,通信模块1601接收第二通告报文的详细实现过程,参见图4所示方法400的步骤405中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1601 receiving the second notification message, please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,处理模块1602确定第二网络流量的传输路径的详细实现过程,参见图4所示方法400的步骤405中的相关内容,在此不再详细说明。Optionally, the processing module 1602 determines the detailed implementation process of the transmission path of the second network traffic. Please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,第一通告报文为BGP报文,第一通告报文的团体community属性指示第一路由信息对应的能源类型为第一能源类型,第一路由信息为第一设备上保存的路由信息。Optionally, the first advertisement message is a BGP message, the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the first energy type, and the first routing information is a route saved on the first device. information.
可选地,通信模块1601,还用于接收第二通告报文,第二通告报文指示第一设备供电能源的能源类型为第二能源类型,第二能源类型为非可再生能源,第二通告报文为BGP报文,第二通告报文的community属性指示第一路由信息对应的能源类型为第二能源类型;Optionally, the communication module 1601 is also configured to receive a second notification message. The second notification message indicates that the energy type of the energy supplied by the first device is a second energy type, and the second energy type is non-renewable energy. The advertisement message is a BGP message, and the community attribute of the second advertisement message indicates that the energy type corresponding to the first routing information is the second energy type;
处理模块1602,还用于基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。The processing module 1602 is also configured to determine a transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device.
可选地,通信模块1601接收第二通告报文的详细实现过程,参见图4所示方法400的步骤405中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1601 receiving the second notification message, please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,处理模块1602确定第二网络流量的传输路径的详细实现过程,参见图4所示方法400的步骤405中的相关内容,在此不再详细说明。Optionally, the processing module 1602 determines the detailed implementation process of the transmission path of the second network traffic. Please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,第一通告报文为BGP报文,第一通告报文用于向邻居宣告路由,第一通告报文的第一自治系统路径AS-Path字段包括m个相同的自治系统AS号,m是与第一能源类型相对应的倍数值,m为大于0的整数,该AS号用于标识第一设备所在的AS域。Optionally, the first advertisement message is a BGP message. The first advertisement message is used to advertise routes to neighbors. The first autonomous system path AS-Path field of the first advertisement message includes m identical autonomous system AS numbers. , m is a multiple value corresponding to the first energy type, m is an integer greater than 0, and the AS number is used to identify the AS domain where the first device is located.
可选地,通信模块1601,还用于接收第二通告报文,第二通告报文指示第一设备供电能源的能源类型为第二能源类型,第二能源类型为非可再生能源,第二通告报文为BGP报文,第二通告报文用于向邻居宣告路由,第二通告报文的第二AS-Path字段包括n个该AS号,n是与第二能源类型相对应的倍数值,n为大于0的整数,m不等于n;Optionally, the communication module 1601 is also configured to receive a second notification message. The second notification message indicates that the energy type of the energy supplied by the first device is a second energy type, and the second energy type is non-renewable energy. The advertisement message is a BGP message. The second advertisement message is used to announce routes to neighbors. The second AS-Path field of the second advertisement message includes n AS numbers, and n is the multiple corresponding to the second energy type. Numeric value, n is an integer greater than 0, m is not equal to n;
处理模块1602,还用于基于第二通告报文确定第二网络流量的传输路径,第二网络流量的传输路径不经过第一设备。The processing module 1602 is also configured to determine a transmission path of the second network traffic based on the second advertisement message. The transmission path of the second network traffic does not pass through the first device.
可选地,通信模块1601接收第二通告报文的详细实现过程,参见图4所示方法400的步骤405中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the communication module 1601 receiving the second notification message, please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,处理模块1602确定第二网络流量的传输路径的详细实现过程,参见图4所示方法400的步骤405中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the processing module 1602 determining the transmission path of the second network traffic, please refer to the relevant content in step 405 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,第一设备和所述装置1600是两个不同AS域内的设备。Optionally, the first device and the apparatus 1600 are devices in two different AS domains.
可选地,所述装置1600是通信网络中的具有报文转发功能的网络设备,所述装置1600包括第三路由信息,第三路由信息指示的下一跳设备不是第一设备或下一跳设备不包括能够到达第一设备的路由信息,第三路由信息指示的目的设备和第一网络流量的目的设备相同。Optionally, the device 1600 is a network device with a message forwarding function in a communication network. The device 1600 includes third routing information, and the next hop device indicated by the third routing information is not the first device or the next hop. The device does not include routing information that can reach the first device, and the destination device indicated by the third routing information is the same as the destination device of the first network traffic.
处理模块1602,用于基于第一通告报文将第三路由信息指示的下一跳设备替换为第三设备,第三设备为第一设备或者第三设备包括能够到达所述第一设备的路由信息。The processing module 1602 is configured to replace the next hop device indicated by the third routing information with a third device based on the first advertisement message. The third device is the first device or the third device includes a route that can reach the first device. information.
可选地,处理模块1602将第三路由信息指示的下一跳设备替换为第三设备的详细实现过程,参见图4所示方法400的步骤403中的相关内容,在此不再详细说明。Optionally, the processing module 1602 replaces the next hop device indicated by the third routing information with the third device. For a detailed implementation process, please refer to the relevant content in step 403 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,所述装置1600是通信网络中的具有报文转发功能的网络设备,所述装置1600包括第四路由信息,第四路由信息指示的下一跳设备是第一设备或该下一跳设备包括能够到达第一设备的路由信息,第四路由信息指示的目的设备和第二网络流量的目的设备相同。 Optionally, the device 1600 is a network device with a message forwarding function in a communication network. The device 1600 includes fourth routing information, and the next-hop device indicated by the fourth routing information is the first device or the next-hop device. The hop device includes routing information that can reach the first device, and the destination device indicated by the fourth routing information is the same as the destination device of the second network traffic.
处理模块1602,用于基于第二通告报文将第四路由信息指示的下一跳设备替换为第四设备,第四设备不是第一设备或者第四设备不包括能够到达第一设备的路由信息。Processing module 1602, configured to replace the next hop device indicated by the fourth routing information with a fourth device based on the second advertisement message. The fourth device is not the first device or the fourth device does not include routing information that can reach the first device. .
可选地,处理模块1602将第四路由信息指示的下一跳设备替换为第四设备的详细实现过程,参见图4所示方法400的步骤405或步骤406中的相关内容,在此不再详细说明。Optionally, the processing module 1602 replaces the next hop device indicated by the fourth routing information with the fourth device. For a detailed implementation process, please refer to the relevant content in step 405 or step 406 of the method 400 shown in Figure 4, which will not be repeated here. Detailed description.
可选地,处理模块1602,用于基于第一通告报文和第一网络流量的目的地址建立第一网络流量的传输路径。Optionally, the processing module 1602 is configured to establish a transmission path of the first network traffic based on the first advertisement message and the destination address of the first network traffic.
可选地,处理模块1602建立第一网络流量的传输路径的详细实现过程,参见图4所示方法400的步骤403中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the processing module 1602 establishing the transmission path of the first network traffic, please refer to the relevant content in step 403 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,处理模块1602,用于基于第二通告报文和第二网络流量的目的地址建立第二网络流量的传输路径。Optionally, the processing module 1602 is configured to establish a transmission path of the second network traffic based on the second advertisement message and the destination address of the second network traffic.
可选地,处理模块1602建立第二网络流量的传输路径的详细实现过程,参见图4所示方法400的步骤405或步骤406中的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of the processing module 1602 establishing the transmission path of the second network traffic, please refer to the relevant content in step 405 or step 406 of the method 400 shown in Figure 4, which will not be described in detail here.
可选地,所述装置1600是控制器或所述装置是第一网络流量的传输路径的头节点。Optionally, the device 1600 is a controller or the device is a head node of a transmission path of the first network traffic.
附图16所描述的装置1600实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。在本申请各个实施例中的各功能模块可以集成在一个模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。附图16中上述各个模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。例如,采用软件实现时,上述通信模块1601和处理单元1602可以是由附图14中的至少一个处理器1401读取存储器1402中存储的程序代码后,生成的软件功能模块来实现。图16中上述各个模块也可以由设备1400中的不同硬件分别实现,例如处理模块1602由附图14中至少一个处理器1401中的一部分处理资源(例如多核处理器中的一个核)实现,而通信模块1601由附图14的网络接口1404和至少一个处理器1401中的其余部分处理资源(例如多核处理器中的其他核),或者采用现场可编程门阵列(Field-Programmable Gate Array,FPGA)、或协处理器等可编程器件来完成。显然上述功能模块也可以采用软件硬件相结合的方式来实现,例如通信模块1601由硬件可编程器件实现,而处理模块1602是由CPU读取存储器1402中存储的程序代码后,生成的软件功能模块。The device 1600 embodiment described in Figure 16 is only illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods, for example, multiple modules may be combined or Integrated into another system, or some features can be ignored, or not implemented. Each functional module in each embodiment of the present application can be integrated into one module, or each module can exist physically alone, or two or more modules can be integrated into one module. Each of the above-mentioned modules in Figure 16 can be implemented in the form of hardware or in the form of software function modules. For example, when implemented in software, the communication module 1601 and the processing unit 1602 may be implemented as software function modules generated by at least one processor 1401 in FIG. 14 after reading the program code stored in the memory 1402. Each of the above-mentioned modules in Figure 16 can also be implemented by different hardware in the device 1400. For example, the processing module 1602 is implemented by a part of the processing resources in at least one processor 1401 in Figure 14 (for example, one core in a multi-core processor), and The communication module 1601 uses the network interface 1404 of Figure 14 and the remaining processing resources of at least one processor 1401 (such as other cores in a multi-core processor), or uses a field-programmable gate array (Field-Programmable Gate Array, FPGA) , or coprocessor and other programmable devices to complete. Obviously, the above functional modules can also be implemented by a combination of software and hardware. For example, the communication module 1601 is implemented by a hardware programmable device, and the processing module 1602 is a software function module generated by the CPU after reading the program code stored in the memory 1402. .
在本申请实施例中,通信模块接收第一通告报文,第一通告报文指示第一设备供电能源的能源类型为第一能源类型,第一能源类型为可再生能源。处理模块基于第一通告报文确定第一网络流量的传输路径,第一网络流量的传输路径经过第一设备。由于第一通告报文指示第一设备供电能源的第一能源类型,所以处理模块基于第一通告报文确定的第一网络流量的传输路径经过第一设备。如此所述装置能够使用第一设备转发更多的网络流量,第一能源类型为可再生能源,不仅降低通信网络的能源消耗,还提高可再生能源的利用率,使得通信网络变的低碳环保。In this embodiment of the present application, the communication module receives the first notification message, and the first notification message indicates that the energy type of the energy supplied by the first device is the first energy type, and the first energy type is renewable energy. The processing module determines a transmission path of the first network traffic based on the first notification message, and the transmission path of the first network traffic passes through the first device. Since the first notification message indicates the first energy type of the power supply energy of the first device, the transmission path of the first network traffic determined by the processing module based on the first notification message passes through the first device. In this way, the device can use the first device to forward more network traffic. The first energy type is renewable energy, which not only reduces the energy consumption of the communication network, but also improves the utilization rate of renewable energy, making the communication network low-carbon and environmentally friendly. .
参见图17,本申请实施例提供了一种通信系统1700,该系统1700包括如图13所示的设备1300和如图14所示的设备1400,或者,该系统1700包括如图15所示的装置1500和如图16所示的装置1600。Referring to Figure 17, an embodiment of the present application provides a communication system 1700. The system 1700 includes a device 1300 as shown in Figure 13 and a device 1400 as shown in Figure 14. Alternatively, the system 1700 includes a device as shown in Figure 15. Device 1500 and device 1600 as shown in Figure 16.
参见图17,如图13所示的设备1300或如图15所示的装置1500为第一设备1701,如图 14所示的设备1400或如图16所示的装置1600为第二设备1702。Referring to Figure 17, the device 1300 shown in Figure 13 or the device 1500 shown in Figure 15 is the first device 1701. As shown in Figure The device 1400 shown in Figure 14 or the device 1600 shown in Figure 16 is the second device 1702.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned The storage media mentioned can be read-only memory, magnetic disks or optical disks, etc.
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。 The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the protection scope of the present application. Inside.

Claims (56)

  1. 一种通信方法,其特征在于,所述方法应用于包括第一设备和第二设备的网络系统,所述方法包括:A communication method, characterized in that the method is applied to a network system including a first device and a second device, and the method includes:
    所述第一设备确定所述第一设备供电能源的第一能源类型,所述第一设备是通信网络中的具有报文转发功能的网络设备,所述第一能源类型为可再生能源;The first device determines a first energy type of the energy supplied by the first device, the first device is a network device with a message forwarding function in a communication network, and the first energy type is renewable energy;
    所述第一设备发送第一通告报文,所述第一通告报文指示所述第一能源类型。The first device sends a first notification message, and the first notification message indicates the first energy type.
  2. 如权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, further comprising:
    在所述第一设备供电能源的能源类型由所述第一能源类型变为第二能源类型时,所述第一设备发送第二通告报文,所述第二能源类型为非可再生能源,所述第二通告报文指示所述第二能源类型。When the energy type of the energy supplied by the first device changes from the first energy type to a second energy type, the first device sends a second notification message, and the second energy type is non-renewable energy, The second notification message indicates the second energy type.
  3. 如权利要求1或2所述的方法,其特征在于,所述第一通告报文包括以所述第一设备为端点的链路的标识信息和所述链路的开销cost值,所述cost值与所述第一能源类型相对应。The method according to claim 1 or 2, characterized in that the first notification message includes identification information of a link with the first device as an endpoint and a cost value of the link, and the cost The value corresponds to the first energy type.
  4. 如权利要求3所述的方法,其特征在于,所述第一通告报文为内部网关协议IGP报文,所述第一通告报文包括链路状态类型长度值TLV或节点状态TLV,所述cost值携带在所述链路状态TLV或所述节点状态TLV中。The method of claim 3, wherein the first notification message is an interior gateway protocol IGP message, and the first notification message includes a link status type length value TLV or a node status TLV, and the The cost value is carried in the link status TLV or the node status TLV.
  5. 如权利要求3所述的方法,其特征在于,所述第一通告报文为IGP报文,所述第一通告报文包括节能因子TLV,所述节能因子TLV为扩展的TLV,所述节能因子TLV包括所述cost值。The method of claim 3, wherein the first notification message is an IGP message, the first notification message includes an energy saving factor TLV, and the energy saving factor TLV is an extended TLV. The factor TLV includes the cost value.
  6. 如权利要求1-5任一项所述的方法,其特征在于,所述第一设备和所述第二设备是同一个自治系统AS域内的设备。The method according to any one of claims 1 to 5, characterized in that the first device and the second device are devices in the same autonomous system (AS) domain.
  7. 如权利要求1或2所述的方法,其特征在于,所述第一通告报文为边界网关协议BGP报文,所述第一通告报文用于携带设备属性,所述第一通告报文包括新增路由器属性字段,所述新增路由器属性字段包括所述第一能源类型。The method according to claim 1 or 2, characterized in that the first notification message is a Border Gateway Protocol BGP message, the first notification message is used to carry device attributes, and the first notification message A new router attribute field is included, and the new router attribute field includes the first energy type.
  8. 如权利要求1或2所述的方法,其特征在于,所述第一通告报文为边界网关协议BGP报文,所述第一通告报文用于携带分段路由互联协议第六版策略SRv6 Policy,所述第一通告报文包括颜色字段,所述颜色字段包括所述第一能源类型。The method according to claim 1 or 2, characterized in that the first advertisement message is a Border Gateway Protocol BGP message, and the first advertisement message is used to carry the Segment Routing Interconnection Protocol version 6 policy SRv6 Policy, the first notification message includes a color field, and the color field includes the first energy type.
  9. 如权利要求1或2所述的方法,其特征在于,所述第一通告报文为BGP报文,所述第一通告报文包括路径属性字段,所述路径属性字段包括第一路由信息,所述第一路由信息包括所述第一能源类型,所述第一路由信息是所述第一设备上保存的路由信息。 The method according to claim 1 or 2, characterized in that the first advertisement message is a BGP message, the first advertisement message includes a path attribute field, and the path attribute field includes first routing information, The first routing information includes the first energy type, and the first routing information is routing information saved on the first device.
  10. 如权利要求1或2所述的方法,其特征在于,所述第一通告报文为BGP报文,所述第一通告报文的团体community属性指示第一路由信息对应的能源类型为所述第一能源类型,所述第一路由信息为所述第一设备上保存的路由信息。The method according to claim 1 or 2, characterized in that the first advertisement message is a BGP message, and the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the The first energy type, the first routing information is routing information saved on the first device.
  11. 如权利要求1或2所述的方法,其特征在于,所述第一通告报文为BGP报文,所述第一通告报文用于向邻居宣告路由,所述第一通告报文的自治系统路径AS-Path字段包括m个相同的AS号,m是与所述第一能源类型相对应的倍数值,m为大于0的整数,所述AS号用于标识所述第一设备所在的AS域。The method according to claim 1 or 2, characterized in that the first advertisement message is a BGP message, the first advertisement message is used to announce routes to neighbors, and the autonomy of the first advertisement message The system path AS-Path field includes m identical AS numbers, m is a multiple value corresponding to the first energy type, m is an integer greater than 0, and the AS number is used to identify the location where the first device is located. AS domain.
  12. 如权利要求1、2、7、8、9、10或11所述的方法,其特征在于,所述第一设备和所述第二设备是两个不同AS域内的设备。The method of claim 1, 2, 7, 8, 9, 10 or 11, wherein the first device and the second device are devices in two different AS domains.
  13. 一种通信方法,其特征在于,所述方法应用于包括第一设备和第二设备的网络系统,所述方法包括:A communication method, characterized in that the method is applied to a network system including a first device and a second device, and the method includes:
    所述第二设备接收第一通告报文,所述第一通告报文指示所述第一设备供电能源的能源类型为第一能源类型,所述第一能源类型为可再生能源,所述第一设备是通信网络中具有报文转发功能的网络设备;The second device receives a first notification message, the first notification message indicates that the energy type of the energy supplied by the first device is a first energy type, the first energy type is renewable energy, and the third One device is a network device with a message forwarding function in the communication network;
    所述第二设备基于所述第一通告报文确定第一网络流量的传输路径,所述第一网络流量的传输路径经过所述第一设备。The second device determines a transmission path of the first network traffic based on the first notification message, and the transmission path of the first network traffic passes through the first device.
  14. 如权利要求13所述的方法,其特征在于,所述方法还包括:The method of claim 13, further comprising:
    所述第二设备接收第二通告报文,所述第二通告报文指示所述第一设备供电能源的能源类型为第二能源类型,所述第二能源类型为非可再生能源;The second device receives a second notification message, and the second notification message indicates that the energy type of the energy supplied by the first device is a second energy type, and the second energy type is a non-renewable energy source;
    所述第二设备基于所述第二通告报文确定第二网络流量的传输路径,所述第二网络流量的传输路径不经过所述第一设备。The second device determines a transmission path of the second network traffic based on the second notification message, and the transmission path of the second network traffic does not pass through the first device.
  15. 如权利要求13或14所述的方法,其特征在于,所述第一通告报文包括以所述第一设备为端点的链路的标识信息和所述链路的开销cost值,所述cost值与所述第一能源类型相对应。The method of claim 13 or 14, wherein the first notification message includes identification information of a link with the first device as an endpoint and a cost value of the link, and the cost The value corresponds to the first energy type.
  16. 如权利要求15所述的方法,其特征在于,所述第一通告报文为内部网关协议IGP报文,所述第一通告报文包括链路状态类型长度值TLV或节点状态TLV,所述cost值携带在所述链路状态TLV或所述节点状态TLV中。The method of claim 15, wherein the first notification message is an interior gateway protocol IGP message, and the first notification message includes a link status type length value TLV or a node status TLV, and the The cost value is carried in the link status TLV or the node status TLV.
  17. 如权利要求15所述的方法,其特征在于,所述第一通告报文为内部网关协议IGP报文,所述第一通告报文包括节能因子TLV,所述节能因子TLV为扩展的TLV,所述节能因子TLV包括所述cost值。The method of claim 15, wherein the first notification message is an interior gateway protocol IGP message, the first notification message includes an energy saving factor TLV, and the energy saving factor TLV is an extended TLV, The energy saving factor TLV includes the cost value.
  18. 如权利要求13-17任一项所述的方法,其特征在于,所述第一设备和所述第二设备是 同一个自治系统AS域内的设备。The method according to any one of claims 13-17, characterized in that the first device and the second device are Devices in the same autonomous system AS domain.
  19. 如权利要求13或14所述的方法,其特征在于,所述第一通告报文为边界网关协议BGP报文,所述第一通告报文用于携带设备属性,所述第一通告报文包括新增路由器属性字段,所述新增路由器属性字段包括所述第一能源类型。The method according to claim 13 or 14, characterized in that the first notification message is a Border Gateway Protocol BGP message, the first notification message is used to carry device attributes, and the first notification message A new router attribute field is included, and the new router attribute field includes the first energy type.
  20. 如权利要求13或14所述的方法,其特征在于,所述第一通告报文为边界网关协议BGP报文,所述第一通告报文用于携带分段路由互联协议第六版策略SRv6 Policy,所述第一通告报文包括颜色字段,所述颜色字段包括所述第一能源类型。The method according to claim 13 or 14, characterized in that the first advertisement message is a Border Gateway Protocol BGP message, and the first advertisement message is used to carry the Segment Routing Interconnection Protocol version 6 policy SRv6 Policy, the first notification message includes a color field, and the color field includes the first energy type.
  21. 如权利要求13或14所述的方法,其特征在于,所述第一通告报文为BGP报文,所述第一通告报文包括路径属性字段,所述路径属性字段包括第一路由信息,所述第一路由信息包括所述第一能源类型,所述第一路由信息是所述第一设备上保存的路由信息。The method of claim 13 or 14, wherein the first advertisement message is a BGP message, the first advertisement message includes a path attribute field, and the path attribute field includes first routing information, The first routing information includes the first energy type, and the first routing information is routing information saved on the first device.
  22. 如权利要求13或14所述的方法,其特征在于,所述第一通告报文为BGP报文,所述第一通告报文的团体community属性指示第一路由信息对应的能源类型为所述第一能源类型,所述第一路由信息为所述第一设备上保存的路由信息。The method of claim 13 or 14, wherein the first advertisement message is a BGP message, and the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the The first energy type, the first routing information is routing information saved on the first device.
  23. 如权利要求13或14所述的方法,其特征在于,所述第一通告报文为BGP报文,所述第一通告报文用于向邻居宣告路由,所述第一通告报文的自治系统路径AS-Path字段包括m个相同的自治系统AS号,m是与所述第一能源类型相对应的倍数值,m为大于0的整数,所述AS号用于标识所述第一设备所在的AS域。The method according to claim 13 or 14, characterized in that the first advertisement message is a BGP message, the first advertisement message is used to announce routes to neighbors, and the autonomy of the first advertisement message The system path AS-Path field includes m identical autonomous system AS numbers, m is a multiple value corresponding to the first energy type, m is an integer greater than 0, and the AS number is used to identify the first device The AS domain in which it is located.
  24. 如权利要求13、14、19、20、21、22或23所述的方法,其特征在于,所述第一设备和所述第二设备是两个不同AS域内的设备。The method of claim 13, 14, 19, 20, 21, 22 or 23, wherein the first device and the second device are devices in two different AS domains.
  25. 如权利要求13-18任一项所述的方法,其特征在于,所述第二设备是所述通信网络中的具有报文转发功能的网络设备,所述第二设备包括第三路由信息,所述第三路由信息指示的下一跳设备不是所述第一设备或所述下一跳设备不包括能够到达所述第一设备的路由信息,所述第三路由信息指示的目的设备和所述第一网络流量的目的设备相同;The method according to any one of claims 13 to 18, characterized in that the second device is a network device with a message forwarding function in the communication network, and the second device includes third routing information, The next-hop device indicated by the third routing information is not the first device or the next-hop device does not include routing information that can reach the first device. The destination device indicated by the third routing information is not the same as the first device. The destination device of the first network traffic is the same;
    所述第二设备基于所述第一通告报文确定第一网络流量的第一传输路径,包括:The second device determines the first transmission path of the first network traffic based on the first notification message, including:
    所述第二设备基于所述第一通告报文将所述第三路由信息指示的下一跳设备替换为第三设备,所述第三设备为所述第一设备或者所述第三设备包括能够到达所述第一设备的路由信息。The second device replaces the next hop device indicated by the third routing information with a third device based on the first advertisement message, and the third device is the first device or the third device includes Routing information capable of reaching the first device.
  26. 如权利要求14所述的方法,其特征在于,所述第二设备是所述通信网络中的具有报文转发功能的网络设备,所述第二设备包括第四路由信息,所述第四路由信息指示的下一跳设备是所述第一设备或所述下一跳设备包括能够到达所述第一设备的路由信息,所述第四路由信息指示的目的设备和所述第二网络流量的目的设备相同; The method of claim 14, wherein the second device is a network device with a message forwarding function in the communication network, the second device includes fourth routing information, and the fourth routing information The next hop device indicated by the information is the first device or the next hop device includes routing information that can reach the first device, the destination device indicated by the fourth routing information and the second network traffic. The destination device is the same;
    所述第二设备基于所述第二通告报文确定第二网络流量的传输路径,包括:The second device determines the transmission path of the second network traffic based on the second notification message, including:
    所述第二设备基于所述第二通告报文将所述第四路由信息指示的下一跳设备替换为第四设备,所述第四设备不是所述第一设备或者所述第四设备不包括能够到达所述第一设备的路由信息。The second device replaces the next hop device indicated by the fourth routing information with a fourth device based on the second advertisement message, and the fourth device is not the first device or the fourth device does not Includes routing information that can reach the first device.
  27. 如权利要求13、14、19、20、21、22、23或24所述的方法,其特征在于,所述第二设备是控制器或所述第二设备是所述第一网络流量的传输路径的头节点。The method of claim 13, 14, 19, 20, 21, 22, 23 or 24, wherein the second device is a controller or the second device is a transmitter of the first network traffic The head node of the path.
  28. 一种通信装置,其特征在于,所述装置应用于包括所述装置和第二设备的网络系统,所述装置包括:A communication device, characterized in that the device is applied to a network system including the device and a second device, and the device includes:
    处理模块,用于确定所述装置供电能源的第一能源类型,所述装置是通信网络中的具有报文转发功能的网络设备,所述第一能源类型为可再生能源;A processing module configured to determine a first energy type of the energy supplied by the device, the device being a network device with a message forwarding function in a communication network, and the first energy type being renewable energy;
    通信模块,用于发送第一通告报文,所述第一通告报文指示所述第一能源类型。A communication module, configured to send a first notification message, where the first notification message indicates the first energy type.
  29. 如权利要求28所述的装置,其特征在于,所述通信模块,还用于:The device according to claim 28, characterized in that the communication module is also used for:
    在所述装置供电能源的能源类型由所述第一能源类型变为第二能源类型时,发送第二通告报文,所述第二能源类型为非可再生能源,所述第二通告报文指示所述第二能源类型。When the energy type of the energy supplied by the device changes from the first energy type to a second energy type, a second notification message is sent, and the second energy type is a non-renewable energy source. The second notification message Indicates the second energy type.
  30. 如权利要求28或29所述的装置,其特征在于,所述第一通告报文包括以所述装置为端点的链路的标识信息和所述链路的开销cost值,所述cost值与所述第一能源类型相对应。The device according to claim 28 or 29, characterized in that the first notification message includes identification information of a link with the device as an endpoint and a cost value of the link, and the cost value is the same as the cost value of the link. Corresponds to the first energy type.
  31. 如权利要求30所述的装置,其特征在于,所述第一通告报文为内部网关协议IGP报文,所述第一通告报文包括链路状态类型长度值TLV或节点状态TLV,所述cost值携带在所述链路状态TLV或所述节点状态TLV中。The device of claim 30, wherein the first notification message is an interior gateway protocol IGP message, and the first notification message includes a link status type length value TLV or a node status TLV, and the The cost value is carried in the link status TLV or the node status TLV.
  32. 如权利要求30所述的装置,其特征在于,所述第一通告报文为IGP报文,所述第一通告报文包括节能因子TLV,所述节能因子TLV为扩展的TLV,所述节能因子TLV包括所述cost值。The device of claim 30, wherein the first notification message is an IGP message, the first notification message includes an energy saving factor TLV, and the energy saving factor TLV is an extended TLV. The factor TLV includes the cost value.
  33. 如权利要求28-32任一项所述的装置,其特征在于,所述装置和所述第二设备是同一个自治系统AS域内的设备。The device according to any one of claims 28 to 32, characterized in that the device and the second device are devices in the same autonomous system (AS) domain.
  34. 如权利要求28或29所述的装置,其特征在于,所述第一通告报文为边界网关协议BGP报文,所述第一通告报文用于携带设备属性,所述第一通告报文包括新增路由器属性字段,所述新增路由器属性字段包括所述第一能源类型。The device according to claim 28 or 29, characterized in that the first notification message is a Border Gateway Protocol BGP message, the first notification message is used to carry device attributes, and the first notification message A new router attribute field is included, and the new router attribute field includes the first energy type.
  35. 如权利要求28或29所述的装置,其特征在于,所述第一通告报文为边界网关协议BGP报文,所述第一通告报文用于携带分段路由互联协议第六版策略SRv6 Policy,所述第一通告报文包括颜色字段,所述颜色字段包括所述第一能源类型。 The device according to claim 28 or 29, characterized in that the first advertisement message is a Border Gateway Protocol BGP message, and the first advertisement message is used to carry the Segment Routing Interconnection Protocol version 6 policy SRv6 Policy, the first notification message includes a color field, and the color field includes the first energy type.
  36. 如权利要求28或29所述的装置,其特征在于,所述第一通告报文为BGP报文,所述第一通告报文包括路径属性字段,所述路径属性字段包括第一路由信息,所述第一路由信息包括所述第一能源类型,所述第一路由信息是所述装置上保存的路由信息。The device according to claim 28 or 29, wherein the first advertisement message is a BGP message, the first advertisement message includes a path attribute field, and the path attribute field includes first routing information, The first routing information includes the first energy type, and the first routing information is routing information saved on the device.
  37. 如权利要求28或29所述的装置,其特征在于,所述第一通告报文为BGP报文,所述第一通告报文的团体community属性指示第一路由信息对应的能源类型为所述第一能源类型,所述第一路由信息为所述装置上保存的路由信息。The device according to claim 28 or 29, wherein the first advertisement message is a BGP message, and the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the The first energy type, the first routing information is routing information saved on the device.
  38. 如权利要求28或29所述的装置,其特征在于,所述第一通告报文为BGP报文,所述第一通告报文用于向邻居宣告路由,所述第一通告报文的自治系统路径AS-Path字段包括m个相同的AS号,m是与所述第一能源类型相对应的倍数值,m为大于0的整数,所述AS号用于标识所述装置所在的AS域。The device according to claim 28 or 29, characterized in that the first advertisement message is a BGP message, the first advertisement message is used to announce routes to neighbors, and the autonomy of the first advertisement message The system path AS-Path field includes m identical AS numbers, m is a multiple value corresponding to the first energy type, m is an integer greater than 0, and the AS number is used to identify the AS domain where the device is located. .
  39. 如权利要求28、29、34、35、36、37或38所述的装置,其特征在于,所述装置和所述第二设备是两个不同AS域内的设备。The device according to claim 28, 29, 34, 35, 36, 37 or 38, characterized in that the device and the second device are devices in two different AS domains.
  40. 一种通信装置,其特征在于,所述装置应用于包括第一设备和所述装置的网络系统,所述装置包括:A communication device, characterized in that the device is applied to a network system including a first device and the device, and the device includes:
    通信模块,用于接收第一通告报文,所述第一通告报文指示所述第一设备供电能源的能源类型为第一能源类型,所述第一能源类型为可再生能源,所述第一设备是通信网络中具有报文转发功能的网络设备;A communication module configured to receive a first notification message, the first notification message indicating that the energy type of the power supply energy of the first device is a first energy type, the first energy type is renewable energy, and the third energy type is renewable energy. One device is a network device with a message forwarding function in the communication network;
    处理模块,用于基于所述第一通告报文确定第一网络流量的传输路径,所述第一网络流量的传输路径经过所述第一设备。A processing module configured to determine a transmission path of the first network traffic based on the first notification message, where the transmission path of the first network traffic passes through the first device.
  41. 如权利要求40所述的装置,其特征在于,所述通信模块,还用于接收第二通告报文,所述第二通告报文指示所述第一设备供电能源的能源类型为第二能源类型,所述第二能源类型为非可再生能源;The device of claim 40, wherein the communication module is further configured to receive a second notification message indicating that the energy type of the power supply energy of the first device is a second energy source. Type, the second energy type is non-renewable energy;
    所述处理模块,还用于基于所述第二通告报文确定第二网络流量的传输路径,所述第二网络流量的传输路径不经过所述第一设备。The processing module is further configured to determine a transmission path of the second network traffic based on the second notification message, and the transmission path of the second network traffic does not pass through the first device.
  42. 如权利要求40或41所述的装置,其特征在于,所述第一通告报文包括以所述第一设备为端点的链路的标识信息和所述链路的开销cost值,所述cost值与所述第一能源类型相对应。The apparatus according to claim 40 or 41, wherein the first notification message includes identification information of a link with the first device as an endpoint and a cost value of the link, and the cost The value corresponds to the first energy type.
  43. 如权利要求42所述的装置,其特征在于,所述第一通告报文为内部网关协议IGP报文,所述第一通告报文包括链路状态类型长度值TLV或节点状态TLV,所述cost值携带在所述链路状态TLV或所述节点状态TLV中。 The device of claim 42, wherein the first notification message is an interior gateway protocol IGP message, and the first notification message includes a link status type length value TLV or a node status TLV, and the The cost value is carried in the link status TLV or the node status TLV.
  44. 如权利要求42所述的装置,其特征在于,所述第一通告报文为内部网关协议IGP报文,所述第一通告报文包括节能因子TLV,所述节能因子TLV为扩展的TLV,所述节能因子TLV包括所述cost值。The device of claim 42, wherein the first notification message is an interior gateway protocol IGP message, the first notification message includes an energy saving factor TLV, and the energy saving factor TLV is an extended TLV, The energy saving factor TLV includes the cost value.
  45. 如权利要求40-44任一项所述的装置,其特征在于,所述第一设备和所述装置是同一个自治系统AS域内的设备。The device according to any one of claims 40 to 44, wherein the first device and the device are devices in the same autonomous system (AS) domain.
  46. 如权利要求40或41所述的装置,其特征在于,所述第一通告报文为边界网关协议BGP报文,所述第一通告报文用于携带设备属性,所述第一通告报文包括新增路由器属性字段,所述新增路由器属性字段包括所述第一能源类型。The device according to claim 40 or 41, characterized in that the first notification message is a Border Gateway Protocol BGP message, the first notification message is used to carry device attributes, and the first notification message A new router attribute field is included, and the new router attribute field includes the first energy type.
  47. 如权利要求40或41所述的装置,其特征在于,所述第一通告报文为边界网关协议BGP报文,所述第一通告报文用于携带分段路由互联协议第六版策略SRv6 Policy,所述第一通告报文包括颜色字段,所述颜色字段包括所述第一能源类型。The device according to claim 40 or 41, characterized in that the first advertisement message is a Border Gateway Protocol BGP message, and the first advertisement message is used to carry the Segment Routing Interconnection Protocol version 6 policy SRv6 Policy, the first notification message includes a color field, and the color field includes the first energy type.
  48. 如权利要求40或41所述的装置,其特征在于,所述第一通告报文为BGP报文,所述第一通告报文包括路径属性字段,所述路径属性字段包括第一路由信息,所述第一路由信息包括所述第一能源类型,所述第一路由信息是所述第一设备上保存的路由信息。The device of claim 40 or 41, wherein the first advertisement message is a BGP message, the first advertisement message includes a path attribute field, and the path attribute field includes first routing information, The first routing information includes the first energy type, and the first routing information is routing information saved on the first device.
  49. 如权利要求40或41所述的装置,其特征在于,所述第一通告报文为BGP报文,所述第一通告报文的团体community属性指示第一路由信息对应的能源类型为所述第一能源类型,所述第一路由信息为所述第一设备上保存的路由信息。The device according to claim 40 or 41, wherein the first advertisement message is a BGP message, and the community attribute of the first advertisement message indicates that the energy type corresponding to the first routing information is the The first energy type, the first routing information is routing information saved on the first device.
  50. 如权利要求40或41所述的装置,其特征在于,所述第一通告报文为BGP报文,所述第一通告报文用于向邻居宣告路由,所述第一通告报文的自治系统路径AS-Path字段包括m个相同的自治系统AS号,m是与所述第一能源类型相对应的倍数值,m为大于0的整数,所述AS号用于标识所述第一设备所在的AS域。The device according to claim 40 or 41, characterized in that the first advertisement message is a BGP message, the first advertisement message is used to announce routes to neighbors, and the autonomy of the first advertisement message The system path AS-Path field includes m identical autonomous system AS numbers, m is a multiple value corresponding to the first energy type, m is an integer greater than 0, and the AS number is used to identify the first device The AS domain in which it is located.
  51. 如权利要求40、41、46、47、48、49或50所述的装置,其特征在于,所述第一设备和所述装置是两个不同AS域内的设备。The device according to claim 40, 41, 46, 47, 48, 49 or 50, characterized in that the first device and the device are devices in two different AS domains.
  52. 如权利要求40-45任一项所述的装置,其特征在于,所述装置是所述通信网络中的具有报文转发功能的网络设备,所述装置包括第三路由信息,所述第三路由信息指示的下一跳设备不是所述第一设备或所述下一跳设备不包括能够到达所述第一设备的路由信息,所述第三路由信息指示的目的设备和所述第一网络流量的目的设备相同;The device according to any one of claims 40 to 45, characterized in that the device is a network device with a message forwarding function in the communication network, the device includes third routing information, and the third The next-hop device indicated by the routing information is not the first device or the next-hop device does not include routing information that can reach the first device. The destination device indicated by the third routing information and the first network The destination device of the traffic is the same;
    所述处理模块,用于基于所述第一通告报文将所述第三路由信息指示的下一跳设备替换为第三设备,所述第三设备为所述第一设备或者所述第三设备包括能够到达所述第一设备的路由信息。 The processing module is configured to replace the next hop device indicated by the third routing information with a third device based on the first advertisement message, and the third device is the first device or the third device. The device includes routing information capable of reaching the first device.
  53. 如权利要求41所述的装置,其特征在于,所述装置是所述通信网络中的具有报文转发功能的网络设备,所述装置包括第四路由信息,所述第四路由信息指示的下一跳设备是所述第一设备或所述下一跳设备包括能够到达所述第一设备的路由信息,所述第四路由信息指示的目的设备和所述第二网络流量的目的设备相同;The device of claim 41, wherein the device is a network device with a message forwarding function in the communication network, the device includes fourth routing information, and the fourth routing information indicates the next A one-hop device is the first device or the next-hop device includes routing information that can reach the first device, and the destination device indicated by the fourth routing information is the same as the destination device of the second network traffic;
    所述处理模块,用于基于所述第二通告报文将所述第四路由信息指示的下一跳设备替换为第四设备,所述第四设备不是所述第一设备或者所述第四设备不包括能够到达所述第一设备的路由信息。The processing module is configured to replace the next hop device indicated by the fourth routing information with a fourth device based on the second advertisement message. The fourth device is not the first device or the fourth device. The device does not include routing information that can reach the first device.
  54. 如权利要求40、46、47、48、49、50或51所述的装置,其特征在于,所述装置是控制器或所述装置是所述第一网络流量的传输路径的头节点。The device according to claim 40, 46, 47, 48, 49, 50 or 51, characterized in that the device is a controller or the device is a head node of the transmission path of the first network traffic.
  55. 一种通信系统,其特征在于,所述系统包括如权利要求28-39任一项所述的装置和如权利要求40-54任一项所述的装置。A communication system, characterized in that the system includes the device according to any one of claims 28-39 and the device according to any one of claims 40-54.
  56. 一种通信设备,其特征在于,包括存储器、处理器及存储在所述存储器上的计算机程序,所述处理器执行所述计算机程序时,使得所述装置实现如权利要求1-27任一项所述的方法。 A communication device, characterized in that it includes a memory, a processor and a computer program stored on the memory. When the processor executes the computer program, the device implements any one of claims 1-27 the method described.
PCT/CN2023/081386 2022-03-18 2023-03-14 Communication method, apparatus and system, and storage medium WO2023174288A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210273382.X 2022-03-18
CN202210273382.XA CN116801281A (en) 2022-03-18 2022-03-18 Communication method, device, system and storage medium

Publications (1)

Publication Number Publication Date
WO2023174288A1 true WO2023174288A1 (en) 2023-09-21

Family

ID=88022310

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/081386 WO2023174288A1 (en) 2022-03-18 2023-03-14 Communication method, apparatus and system, and storage medium

Country Status (2)

Country Link
CN (1) CN116801281A (en)
WO (1) WO2023174288A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110134929A1 (en) * 2009-12-07 2011-06-09 Verizon Patent And Licensing, Inc. Link path discovery
CN102263688A (en) * 2010-05-26 2011-11-30 华为技术有限公司 Method and network device for choosing LSP (label switching path)
CN103236941A (en) * 2013-04-03 2013-08-07 华为技术有限公司 Link discovery method and device
WO2021258823A1 (en) * 2020-06-24 2021-12-30 华为技术有限公司 Path creation method, apparatus and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110134929A1 (en) * 2009-12-07 2011-06-09 Verizon Patent And Licensing, Inc. Link path discovery
CN102263688A (en) * 2010-05-26 2011-11-30 华为技术有限公司 Method and network device for choosing LSP (label switching path)
CN103236941A (en) * 2013-04-03 2013-08-07 华为技术有限公司 Link discovery method and device
WO2021258823A1 (en) * 2020-06-24 2021-12-30 华为技术有限公司 Path creation method, apparatus and system

Also Published As

Publication number Publication date
CN116801281A (en) 2023-09-22

Similar Documents

Publication Publication Date Title
Wei et al. Energy-aware traffic engineering in hybrid SDN/IP backbone networks
CN101455030B (en) Dynamic shared risk node group (srng) membership discovery
US8774050B2 (en) Dynamic wake-up time adjustment based on designated paths through a computer network
US7940763B1 (en) Aggregated topological routing
Zhang et al. GreenTE: Power-aware traffic engineering
US9660897B1 (en) BGP link-state extensions for segment routing
Vetriselvan et al. Survey on the RIP, OSPF, EIGRP routing protocols
EP2870731B1 (en) Method and apparatus for limiting dissemination of topology and reachability information in an ospf area
US20140192677A1 (en) Network routing protocol power saving method for network elements
WO2008055429A1 (en) A method and border node for advertising border connection information of a system
Charalambides et al. Energy-aware adaptive network resource management
US7362752B1 (en) Aggregated topological routing
Guo et al. A new solution based on optimal link-state routing for named data MANET
Caria et al. Trading IP routing stability for energy efficiency: A case for traffic offloading with optical bypass
WO2023174288A1 (en) Communication method, apparatus and system, and storage medium
CN108075981B (en) Transmission method of link state data packet and routing node
Abdullah et al. Energy Efficient MANET Routing Protocol Based on Ant Colony Optimization.
CN110121185A (en) A kind of power distribution communication network route optimization method
Patil et al. Extended ECDSR protocol for energy efficient MANET
Acharya et al. Energy-aware virtual backbone tree for efficient routing in wireless sensor networks
Jo et al. Green routing using renewable energy for IP networks
Liu et al. An energy‐efficient localized topology control algorithm for wireless ad hoc and sensor networks
JP6113157B2 (en) How to switch off a router in a communication network and the router that implements this method
Anu et al. Optimization of OSPF LSA flooding process using clustering technique
Jo et al. Cost-Effective and Eco-Friendly Green Routing Using Renewable Energy

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: 23769790

Country of ref document: EP

Kind code of ref document: A1