WO2022033496A1 - 一种报文发送方法、报文处理方法及设备 - Google Patents

一种报文发送方法、报文处理方法及设备 Download PDF

Info

Publication number
WO2022033496A1
WO2022033496A1 PCT/CN2021/111937 CN2021111937W WO2022033496A1 WO 2022033496 A1 WO2022033496 A1 WO 2022033496A1 CN 2021111937 W CN2021111937 W CN 2021111937W WO 2022033496 A1 WO2022033496 A1 WO 2022033496A1
Authority
WO
WIPO (PCT)
Prior art keywords
location information
geographic location
packet
ipv6 packet
carried
Prior art date
Application number
PCT/CN2021/111937
Other languages
English (en)
French (fr)
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 华为技术有限公司
Priority to EP21855547.2A priority Critical patent/EP4113947A4/en
Publication of WO2022033496A1 publication Critical patent/WO2022033496A1/zh
Priority to US18/047,372 priority patent/US20230053788A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/741Routing in networks with a plurality of addressing schemes, e.g. with both IPv4 and IPv6
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/126Shortest path evaluation minimising geographical or physical path length
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/56Routing software
    • H04L45/566Routing instructions carried by the data packet, e.g. active networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • the present application relates to the field of communications, and in particular, to a method for sending a message, a method for processing a message, and a device.
  • a device can obtain its own geographic location information by locating the device through a Global Positioning System (Global Positioning System, GPS), and the geographic location information reflects the geographic location where the device is located.
  • GPS Global Positioning System
  • the geographic location information of the device is not only required by itself, but also by other devices. Therefore, how to transmit one's own geographic location information to other devices is a technical problem that needs to be solved at present.
  • the embodiments of the present application provide a method for sending a message, a method for processing a message, and a device, so as to achieve the purpose of transmitting the device's own geographic location information to other devices.
  • a method for sending a message is provided, and the method can be applied to a first device, where the first device can be a terminal device or a server or the like.
  • the method specifically includes the following steps: the first device obtains the geographic location information of the first device, and generates a first Internet Protocol version 6 (IPv6) message, where the first IPv6 message carries Geographic location information of the first device.
  • IPv6 message carries Geographic location information of the first device.
  • the address location information of the first device identifies the geographic location where the first device is located.
  • the geographic location information may be one or more of the latitude and longitude of the first device or an identifier of an area where the first device is located.
  • the area where the first device is located may be an administrative area where the first device is located, such as a country, province, city, district, county, township, village, etc., or a non-administrative area, such as a street, a community, and the like.
  • the first device After generating the first IPv6 packet, the first device sends the first IPv6 packet, so that other devices receive the first IPv6 packet and obtain the first device's information from the first IPv6 packet Geolocation information.
  • the geographic location information of the first device is carried in an extension header of the first IPv6 packet.
  • the extension header may include one of a hop-by-hop option header (HBH), a destination option header (DOH), and a segment routing header (SRH), etc. or more.
  • the geographic location information of the first device may be specifically carried in the HBH type of the first IPv6 packet Length value (type-length-value, TLV) or TLV of DOH.
  • the geographic location information of the first device may be specifically carried in the TLV, tag field or segment of the SRH identification (segment identification, SID).
  • the geographic location information of the first device may be specifically carried in the parameters field of the SID of the SRH.
  • a packet processing method is provided, and the method is applied to a second device, where the second device may be a terminal device, a server, or a network device.
  • the packet processing method includes the following steps: the second device obtains a first IPv6 packet or a Multi-Protocol Label Switching (Multi-Protocol Label Switching, MPLS) packet, the first IPv6 packet or the MPLS packet carrying the Geographic location information of the first device.
  • MPLS Multi-Protocol Label Switching
  • the second device processes the first IPv6 packet or the MPLS packet. That is, the second device can obtain the first IPv6 packet or the MPLS packet including the geographic location information of the first device, so as to achieve the purpose that the geographic location information of the first device can be obtained by other devices.
  • the obtaining, by the second device, the first IPv6 packet includes: the second device receiving, by the second device, a second IPv6 packet from the first device, where the second IPv6 packet includes the The IP address of the first device.
  • the second device obtains the geographic location information of the first device according to the IP address of the first device, and carries the geographic location information of the first device in the second IPv6 packet to obtain the first device.
  • An IPv6 packet After obtaining the first IPv6 packet, the second device may send the first IPv6 packet, so that other devices can obtain the first IPv6 packet, thereby obtaining the geographic location of the first device from the first IPv6 packet location information.
  • the obtaining, by the second device, the first MPLS packet includes: the second device receiving an Internet Protocol IP packet from the first device, where the IP packet includes the first MPLS packet.
  • the IP address of the device The second device obtains the geographic location information of the first device according to the IP address of the first device.
  • the second device encapsulates a label stack outside the IP packet to obtain the MPLS packet, where the label stack includes geographic location information of the first device.
  • the second device may send the MPLS packet, so that other devices can obtain the MPLS packet, thereby obtaining the geographic location information of the first device from the MPLS packet.
  • the geographic location information of the first device is located at the bottom of the label stack.
  • a specific implementation of the second device processing the first IPv6 packet or the MPLS packet may also include the following two types: the second device pushes corresponding preset information, such as advertisement, news, entertainment information, life information and other information to the first device according to the geographic location information of the first device. Or, the second device forwards the first IPv6 packet or The MPLS message is used to achieve the purpose of the first device accessing the DNS or CDN server.
  • the second device processes the first IPv6 packet or the MPLS packet do not constitute a limitation on the technical solutions of the present application, and those skilled in the art can design them according to actual conditions.
  • a first device in a third aspect, includes: a processing unit configured to acquire geographic location information of the first device and generate a first Internet Protocol version 6 IPv6 packet, the The first IPv6 message carries the geographic location information of the first device; the sending unit is configured to send the first IPv6 message.
  • a second device comprising: an obtaining unit configured to obtain a first Internet Protocol version 6 IPv6 packet or a multi-protocol label switching MPLS packet, the first IPv6 packet
  • the message or the MPLS message carries the geographic location information of the first device
  • the processing unit is configured to process the first IPv6 message or the MPLS message.
  • the obtaining unit is configured to receive a second IPv6 packet from the first device, where the second IPv6 packet includes the IP address of the first device; according to the first device The IP address of a device obtains the geographic location information of the first device; and the second IPv6 message carries the geographic location information of the first device to obtain the first IPv6 message.
  • the obtaining unit is configured to receive an Internet Protocol IP packet from the first device, where the IP packet includes the IP address of the first device; according to the first device obtain the geographic location information of the first device; encapsulate a label stack outside the IP packet to obtain the MPLS packet, and the label stack includes the geographic location information of the first device.
  • the geographic location information of the first device is located at the bottom of the label stack.
  • the processing unit is configured to push corresponding preset information to the first device according to the geographic location information of the first device; or, to the geographic location corresponding to the first device
  • the domain name system DNS or content distribution network CDN server corresponding to the information forwards the first IPv6 packet or the MPLS packet.
  • a fifth aspect provides a network system, where the network system includes the first device described in the third aspect and the second device described in the fourth aspect.
  • a computer-readable storage medium comprising instructions, programs or codes that, when executed on a computer, cause the computer to perform one of the possible designs of the first aspect or the second aspect provided method.
  • a seventh aspect provides a computer program product comprising computer instructions, which, when the computer program product runs on a network device, causes the network device to execute the method provided by any one of the possible designs of the first aspect or the second aspect .
  • a chip including a memory and a processor, the memory is used to store instructions or program codes, and the processor is used to call and run the instructions or program codes from the memory to execute the above-mentioned first aspect or the first aspect
  • the method in any one possible design of the second aspect; or, the processor executes the second aspect or the method in any one possible design of the second aspect.
  • the above-mentioned chip only includes a processor, and the processor is used to read and execute the instructions or program codes stored in the memory, and when the instructions or program codes are executed, the processor executes the first aspect or the first aspect The method in any one possible design of the second aspect; or, the processor executes the second aspect or the method in any one possible design of the second aspect.
  • FIG. 1 is a schematic structural diagram of a network architecture provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of a message sending and processing method provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of a format of an IPv6 message provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a format of an SRH provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of another message sending and processing method provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a first device 600 according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a second device 700 provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a network system 800 according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a device 900 provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a device 1000 according to an embodiment of the present application.
  • the embodiment of the present application provides a method for sending and processing a message, so as to realize the purpose of transmitting the geographic location information of a device in a network.
  • FIG. 1 this figure is a schematic structural diagram of a network architecture provided by an embodiment of the present application.
  • the network architecture includes one or more terminal devices 101 , and an access device 102 for connecting the one or more terminal devices 101 and an IP network, wherein the IP network includes a plurality of network devices 103 .
  • the network architecture also includes one or more servers 105, and an access device 104 connected between the one or more servers 105 and the IP network.
  • the terminal device 101 which may also be called user equipment (UE), mobile station (MS), mobile terminal (MT), terminal, etc.
  • UE user equipment
  • MS mobile station
  • MT mobile terminal
  • terminal devices are: mobile phone, desktop computer, tablet computer, notebook computer, PDA, mobile internet device (MID), wearable device, virtual reality (VR) device, augmented reality (augmented reality, AR) equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, and smart grids wireless terminals, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, and 5G-residential gateway devices that support 5G access , 5G-RG) and so on.
  • MID mobile internet device
  • VR virtual reality
  • AR augmented reality
  • wireless terminals in industrial control wireless terminals in self-driving
  • wireless terminals in remote medical surgery and smart grids wireless terminals
  • wireless terminals in transportation safety wireless terminals in smart cities, wireless terminals in smart homes, and 5G-residential gateway devices that support 5G access , 5G-RG) and so on.
  • the access device 102 , the network device 103 , and the access device 104 may be forwarding devices such as routers and switches, and are used to forward IPv6 packets between the terminal device 101 and the server 105 .
  • this figure is a flowchart of a method for sending and processing a message according to an embodiment of the present application.
  • the first device acquires geographic location information of the first device, and generates a first IPv6 packet, where the first IPv6 packet includes geographic location information of the first device.
  • the first device sends a first IPv6 packet to the second device.
  • the first device may be the terminal device 101 in the embodiment shown in FIG. 1 .
  • the first device may also be a server, etc., which is not specifically limited in this embodiment of the present application.
  • the second device may be the access device 102 , the network device 103 , the access device 104 or the server 105 in the embodiment shown in FIG. 1 .
  • the second device may also be a terminal device, etc., which is not specifically limited in this embodiment of the application .
  • the first device may acquire its own geographic location information, where the address location information identifies the geographic location where the first device is located.
  • the geographic location information may be one or more of the latitude and longitude of the first device or an identifier of an area where the first device is located.
  • the area where the first device is located may be an administrative area where the first device is located, such as a country, province, city, district, county, township, village, etc., or a non-administrative area, such as a street, a community, and the like.
  • the first device can obtain its own geographic location information. For example, if the Android system is loaded on the first device, the first device can obtain the latitude and longitude of the first device through the installed global positioning system (GPS) or network (NetWork) (a positioning software). . Alternatively, the first device may acquire geographic location information according to the IP address of the first device. Specifically, the first device can parse the IP address by itself to obtain geographic location information, or can send the IP address of the first device to other devices such as a server or a network device, so that other devices such as the server or network device can understand the first device's information. The IP address is parsed to obtain corresponding geographic location information, and the geographic location information is returned to the first device. For example, when the first device is the terminal device 101 in FIG. 1 , other devices that resolve the IP address of the first device may be the access device 102 , the network device 103 or the access device 104 .
  • GPS global positioning system
  • Network Network
  • the first device may acquire geographic location information according to the IP address of the
  • the first device may also acquire its own geographic location information in other ways, which is not specifically limited in this embodiment of the present application. Moreover, how to obtain the corresponding geographic location information by parsing the IP address is a mature technology, and details are not described here.
  • the first device may carry the geographic location information of the first device in the first IPv6 packet sent to the second device, so that the second device can process the first IPv6 packet.
  • the geographic location information of the first device may be carried in the extension header of the first IPv6 packet.
  • FIG. 3 the figure is a schematic diagram of the format of an IPv6 packet.
  • the IPv6 packet includes a basic header, an extension header (EH) and a payload (payload).
  • the basic header includes the version field, the traffic class field, the flow label field, the payload length field, the next header field (for example, the value is 43), Hop limit (hop limit) field, source address (source address) field and destination address (destination) field.
  • the extension header includes the hop-by-hop option header (HBH), the destination address option header (DOH), the routing header (routing header) (if it is the sixth edition segment routing (segment routing). version 6, SRv6) message, then it is a segment routing header (segment routing header, SRH)) and so on.
  • the geographic location information of the first device is carried in the HBH of the first IPv6 packet.
  • the geographic location information of the first device may be carried in a type-length-value (type-length-value, TLV) of the HBH.
  • TLV type-length-value
  • the TLV includes an option type (option type) field, an option data length (option data length) field and an option data (option data) field.
  • the value of the option type field is used to indicate that the type of the TLV is a TLV that carries the geographic location information of the first device
  • the value of the option data length field is the length of the TLV
  • the value of the option data field includes the geographic location of the first device. information.
  • the geographic location information of the first device is carried in the DOH of the first IPv6 packet.
  • the geographic location information of the first device may be carried in the TLV of the DOH, and the format of the TLV may refer to the format of the TLV of the HBH, which will not be repeated here.
  • the geographic location information of the first device is carried in the SRH of the SRv6 packet.
  • the figure is a schematic diagram of the format of the SRH.
  • the SRH includes the next header field, the length of the SRH (Hdr Ext Len) field, the routing type (routing type), the segment left field, the last index (last entry) field, Flags field, tag field, segment list (128-bit IPv6 address), and optional TLV object field.
  • the geographic location information of the first device may be carried in the optional TLV field in FIG. 4 .
  • the TLV includes a type field, a length field, and an optional-length data (variable-length data) field, where the value of the type field is used to indicate that the TLV carries the geographic location information of the first device.
  • TLV the value of the length field is the length of the TLV, and the variable-length data field is used to carry the geographic location information of the first device.
  • the geographic location information of the first device may also be carried in the tag field in FIG. 4 or the segment identification (segment identification, SID) field in the segment list.
  • SID segment identification
  • the SID field includes a location address (locator address) field, a function identifier (function identifier, function ID) field, and a parameter (arguments) field, where the parameter field may be used to carry geographic location information of the first device.
  • S103 The second device receives the first IPv6 packet and processes the first IPv6 packet.
  • the second device may forward the first IPv6 packet to the destination device, so that the destination device can receive the first IPv6 packet text, and obtain the geographic location information of the first device.
  • the terminal device 101 may send an IPv6 packet P1 to the access device 102 , the IPv6 packet P1 carries the geographic location information of the terminal device 101 , and the destination device of the IPv6 packet P1 is the server 105 .
  • the access device 102 After receiving the IPv6 packet P1 from the terminal device 101, the access device 102 sends the packet to the network device 103 according to the destination address of the IPv6 packet P1 (the IP address of the destination device).
  • the network device 103 After receiving the IPv6 packet P1 from the access device 102, the network device 103 sends the packet to the access device 104 according to the destination address of the IPv6 packet P1.
  • the access device 104 After receiving the IPv6 packet P1 from the network device 103, the access device 104 sends the IPv6 packet P1 to the server 105 according to the destination address of the IPv6 packet P1. Therefore, the server 105 can obtain the geographic location information of the terminal device 101 from the IPv6 packet P1.
  • the second device may obtain the geographic location information of the first device from the first IPv6 packet, and use the geographic location information of the first device Carry out corresponding processing.
  • the second device may or may not be the destination device of the first IPv6 packet.
  • the second device can advertise or push advertisements to the first device according to the geographic location information of the first device. News, entertainment information, life information and other information, so that the user of the first device can obtain corresponding services.
  • the second device may forward the first IPv6 packet to the destination device after performing corresponding processing according to the geographic location information of the first device.
  • the device on the forwarding path as the first IPv6 packet receives the first IPv6 packet.
  • the first IPv6 message is forwarded to the DNS or CDN device corresponding to the geographic location information according to the geographic location information of the first device, so as to achieve the purpose of saving network resources.
  • the meaning of "corresponding" may be, for example, being close or belonging to the same area.
  • FIG. 5 is a flowchart of another method for sending and processing packets provided by an embodiment of the present application.
  • the first device sends an IP packet to the second device, where the IP packet carries the IP address of the first device.
  • the IP packet sent by the first device may be an IPv6 packet, or may be an Internet Protocol version 4 (Internet Protocol version 4, IPv4) packet.
  • IPv6 packet or may be an Internet Protocol version 4 (Internet Protocol version 4, IPv4) packet.
  • IPv4 Internet Protocol version 4, IPv4
  • the IP packet carries the IP address of the first device, but does not carry the geographic location information of the first device.
  • the format of the IPv6 packet may refer to FIG. 3, and the IP address of the first device may be carried in the source address field of the IPv6 packet.
  • the first device may be, for example, the terminal device 101 in FIG. 1 .
  • the first device may also be a server, etc., which is not specifically limited in the embodiment of the present application.
  • the second device may be the access device 102, the network device 103, or the access device 104 in the embodiment shown in FIG. 1 .
  • the terminal device 101 may send an IP packet P2 to the access device 102, where the IP packet P2 carries the IP address of the terminal device 101.
  • the second device receives the IP packet from the first device, and obtains geographic location information of the first device according to the IP address of the first device.
  • the second device may obtain geographic location information of the first device according to the IP address of the first device in the IP packet.
  • the second device may parse the IP address of the first device to obtain geographic location information of the first device. For example, after receiving the IP packet P2 from the terminal device 101, the access device 102 obtains the IP address of the terminal device 101 from the IP packet P2, and then parses the IP address of the terminal device 101 to obtain the terminal device 101's geographic location information.
  • the second device may send the IP address of the first device to a server for address resolution, and the server parses the IP address of the first device, and returns the geographic location information of the first device obtained by the analysis to the network device .
  • the second device may pre-store the correspondence between the IP address of the first device and the geographic location information of the first device, and after obtaining the IP packet from the first device, The address and the corresponding relationship obtain geographic location information of the first device.
  • the second device carries the geographic location information of the first device in the IP packet, and obtains a first IPv6 packet or an MPLS packet.
  • the access device 102 if the IP packet P2 is an IPv6 packet, after obtaining the geographic location information of the terminal device 101, the access device 102 carries the geographic location information of the terminal device 101 in the IP packet P2, The IPv6 packet P3 is obtained, and then the IPv6 packet P3 is forwarded to the next-hop network device (ie, the network device 103 ) according to the destination address of the IPv6 packet P3, that is, the IP address of the server 105 .
  • the next-hop network device ie, the network device 103
  • the network device 103 After receiving the IPv6 packet P3, the network device 103 sends the IPv6 packet P3 to the access device 104 according to the destination address of the IPv6 packet P3, so that the access device 104 can forward the IPv6 packet P3 to the server 105, and The server 105 can obtain the geographic location information of the terminal device 101 from the IPv6 packet P3.
  • the IP packet P2 is an IPv6 packet
  • the specific location where the geographic location information of the first device is carried in the first IPv6 packet can be referred to above, and details are not repeated here.
  • the IP packet P2 is an IPv6 packet or an IPv4 packet
  • the second device belongs to a network device in the MPLS network
  • a label stack may be encapsulated outside the IP packet P2, where the label stack includes a label corresponding to a packet forwarding path of the IP packet P2 to obtain an MPLS packet.
  • the label stack of the MPLS packet may carry the geographic location information of the first device.
  • the geographic location information of the first device may be located at the bottom of the label stack, so that the last device on the packet forwarding path can obtain the geographic location information of the first device.
  • the geographic location information of the first device may also be located at other locations in the MPLS packet, which is not specifically limited in this embodiment of the present application.
  • the processing of the first IPv6 packet or the MPLS packet by the second device reference may be made to the relevant description of processing the first IPv6 packet in the embodiment shown in FIG. 2 , which is not repeated here.
  • S204 The second device processes the first IPv6 packet or MPLS packet.
  • the second device may forward the first IPv6 packet or MPLS packet, so that other devices can also obtain the geographic location information of the first device from the first IPv6 packet or MPLS packet , to realize the diffusion of the geographic location information of the first device in the network.
  • FIG. 6 shows a possible schematic structural diagram of the first device involved in the foregoing embodiment, and the first device 600 may implement the functions of the first device in the embodiment shown in FIG. 2 .
  • the first device 600 includes: a processing unit 601 and a sending unit 602 . These units may perform the corresponding functions of the first device in the embodiment shown in FIG. 2 .
  • the processing unit 601 is configured to acquire geographic location information of the first device, and generate a first Internet Protocol version 6 IPv6 packet, where the first IPv6 packet carries the geographic location information of the first device ; a sending unit 602, configured to send the first IPv6 packet.
  • a sending unit 602 configured to send the first IPv6 packet.
  • each functional unit in this embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the acquiring unit and the processing unit may be the same unit or different units.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • FIG. 7 shows a possible schematic structural diagram of the second device involved in the above embodiment, and the second device 700 may implement the functions of the second device in the embodiment shown in FIG. 2 .
  • the second device 700 includes: an obtaining unit 701 and a processing unit 702 . These units may perform corresponding functions of the second device in the embodiment shown in FIG. 2 or the second device in the embodiment shown in FIG. 5 .
  • the obtaining unit 701 is configured to obtain a first IPv6 packet or an MPLS packet, where the first IPv6 packet or the MPLS packet carries the geographic location information of the first device; the processing unit 702 is configured to obtain the geographic location information of the first device
  • the first IPv6 packet or the MPLS packet is processed.
  • the specific execution process please refer to the detailed description of the corresponding steps in the above-mentioned embodiment shown in FIG. 4 , which will not be repeated here.
  • each functional unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the acquiring unit and the processing unit may be the same unit or different units.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • an embodiment of the present invention provides a network system 800, where the system 800 is configured to implement the packet sending method and the packet processing method in the foregoing method embodiments.
  • the system 800 includes a first device 801 and a second device 802 .
  • the first device 801 can implement the functions of the first device in the embodiment shown in FIG. 2 or the first device 600 in FIG. 6
  • the second device 802 can implement the second device in the embodiment shown in FIG.
  • the functionality of the second device in the illustrated embodiment or the second device 700 in FIG. 7 For the specific execution process, please refer to the detailed description of the corresponding steps in the embodiment shown in FIG. 2 or FIG. 5 or FIG. 6 or FIG. 7 , which will not be repeated here.
  • FIG. 9 is a schematic structural diagram of a device 900 provided by an embodiment of the present application.
  • the first device 600 in FIG. 6 and the second device 700 in FIG. 7 may be implemented by the devices shown in FIG. 9 .
  • the device 900 includes at least one processor 901 , a communication bus 902 and at least one network interface 904 , and optionally, the device 900 may further include a memory 903 .
  • the processor 901 may be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits (integrated circuits) for controlling the execution of programs in the solution of the present application. , IC).
  • the processor may be configured to process the message, so as to implement the method for sending a message provided in the embodiments of the present application.
  • the processor may be configured to acquire geographic location information of the first device, and generate a first Internet Protocol version 6 IPv6 report In the text, the first IPv6 packet carries the geographic location information of the first device.
  • the processing part corresponding to the first device in the method embodiment shown in FIG. 2 the processor can be used to obtain the first IPv6 packet or MPLS packet, the first IPv6 packet or the MPLS packet The message carries the geographic location information of the first device, and the first IPv6 message or the MPLS message is processed.
  • Communication bus 902 is used to transfer information between processor 901 , network interface 904 and memory 903 .
  • the memory 903 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, and the memory 903 can also be a random access memory (RAM) or can store information and other types of dynamic storage devices for instructions, also can be compact disc read-only Memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray optical disks, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, without limitation.
  • the memory 903 may exist independently and is connected to the processor 901 through the communication bus 902 .
  • the memory 903 may also be integrated with the processor 901 .
  • the memory 903 is used for storing program codes or instructions for executing the solutions of the present application, and the execution is controlled by the processor 901 .
  • the processor 901 is used to execute program codes or instructions stored in the memory 903 .
  • One or more software modules may be included in the program code.
  • the processor 901 may also store program codes or instructions for executing the solutions of the present application. In this case, the processor 901 does not need to read the program codes or instructions from the memory 903 .
  • the network interface 904 may be a device such as a transceiver for communicating with other devices or a communication network, and the communication network may be an Ethernet, a radio access network (RAN), or a wireless local area network (WLAN), or the like. In this embodiment of the present application, the network interface 904 may be configured to receive packets sent by other nodes in the segment routing network, and may also send packets to other nodes in the segment routing network.
  • the network interface 904 may be an ethernet (ethernet) interface, a fast ethernet (FE) interface, or a gigabit ethernet (GE) interface, or the like.
  • the device 900 may include multiple processors, such as the processor 901 and the processor 405 shown in FIG. 9 .
  • processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • FIG. 10 is a schematic structural diagram of a device 1000 provided by an embodiment of the present application.
  • the second device in FIG. 2 or FIG. 5 may be implemented by the device shown in FIG. 10 .
  • the device 1000 includes a main control board and one or more interface boards.
  • the main control board communicates with the interface board.
  • the main control board is also called the main processing unit (MPU) or the route processor card (route processor card).
  • the main control board includes a CPU and memory.
  • the main control board is responsible for the control and management of various components in the device 1000, including Route calculation, device management and maintenance functions.
  • Interface boards also known as line processing units (LPUs) or line cards, are used to receive and send messages.
  • LPUs line processing units
  • the communication between the main control board and the interface board or between the interface board and the interface board is through a bus.
  • the interface boards communicate through a switch fabric board.
  • the device 1000 also includes a switch fabric board.
  • the switch fabric board is communicatively connected to the main control board and the interface board.
  • the switch fabric board is used for forwarding the interface board.
  • the data between them, the switch fabric board can also be called a switch fabric unit (SFU).
  • the interface board includes a CPU, a memory, a forwarding engine, and an interface card (IC), where the interface card may include one or more network interfaces.
  • the network interface can be an Ethernet interface, an FE interface, or a GE interface.
  • the CPU is communicatively connected to the memory, the forwarding engine and the interface card, respectively.
  • the memory is used to store the forwarding table.
  • the forwarding engine is used to forward the received packet based on the forwarding table stored in the memory. If the destination address of the received packet is the IP address of device 1000, the packet is sent to the CPU of the main control board or interface board for processing. Processing; if the destination address of the received packet is not the IP address of the device 1000, then look up the forwarding table according to the destination, if the next hop and outgoing interface corresponding to the destination address are found from the forwarding table, the packet Forwarding to the outbound interface corresponding to the destination address.
  • the forwarding engine may be a network processor (NP).
  • the interface card also known as the daughter card, can be installed on the interface board and is responsible for converting photoelectric signals into data frames, checking the validity of the data frames and forwarding them to the forwarding engine for processing or the interface board CPU.
  • the CPU can also perform the function of a forwarding engine, such as implementing soft forwarding based on a general-purpose CPU, so that a forwarding engine is not required in the interface board.
  • the forwarding engine may be implemented by an ASIC or a field programmable gate array (FPGA).
  • the memory that stores the forwarding table may also be integrated into the forwarding engine as part of the forwarding engine.
  • An embodiment of the present application further provides a chip system, including: a processor, where the processor is coupled with a memory, the memory is used to store a program or an instruction, and when the program or instruction is executed by the processor, the The chip system implements the method of the first device or the second device in the embodiment shown in FIG. 2 or FIG. 5 .
  • the number of processors in the chip system may be one or more.
  • the processor can be implemented by hardware or by software.
  • the processor may be a logic circuit, an integrated circuit, or the like.
  • the processor may be a general-purpose processor implemented by reading software codes stored in memory.
  • there may also be one or more memories in the chip system.
  • the memory may be integrated with the processor, or may be provided separately from the processor, which is not limited in this application.
  • the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be provided on different chips.
  • the setting method of the processor is not particularly limited.
  • the chip system may be an FPGA, an ASIC, a system on chip (system on chip, SoC), a CPU, an NP, or a digital signal processing circuit (digital signal processor, DSP), can also be a microcontroller (micro controller unit, MCU), can also be a programmable logic device (programmable logic device, PLD) or other integrated chips.
  • SoC system on chip
  • DSP digital signal processing circuit
  • MCU microcontroller
  • PLD programmable logic device
  • each step in the above method embodiments may be implemented by a hardware integrated logic circuit in a processor or an instruction in the form of software.
  • the method steps disclosed in conjunction with the embodiments of the present application may be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
  • Embodiments of the present application also provide a computer-readable storage medium, including instructions, which, when executed on a computer, cause the computer to execute the methods in the foregoing embodiments.
  • At least one item (piece) refers to one or more, and “multiple” refers to two or more.
  • At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
  • at least one item (a) of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple .
  • “A and/or B” is considered to include A alone, B alone, and A+B.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical module division.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be acquired according to actual needs to achieve the purpose of the solution in this embodiment.
  • each module unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of software module units.
  • the integrated unit if implemented in the form of a software module unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .
  • the functions described in the present invention may be implemented in hardware, software, firmware, or any combination thereof.
  • the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
  • Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.
  • a storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请实施例公开了一种报文发送方法、报文处理方法及设备,实现了设备将自己的地理位置信息传输给其他设备的目的。其中,所述报文发送方法包括: 第一设备获取所述第一设备的地理位置信息,并生成第一互联网协议第六版IPv6报文,所述第一IPv6报文中携带所述第一设备的地理位置信息; 所述第一设备发送所述第一IPv6报文。

Description

一种报文发送方法、报文处理方法及设备
本申请要求于2020年8月11日提交中国国家知识产权局、申请号为202010802694.6、发明名称为“一种报文发送方法、报文处理方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,尤其涉及一种报文发送方法、报文处理方法及设备。
背景技术
在目前的技术中,设备可以通过全球定位系统(Global Positioning System,GPS)对设备进行定位等方式获取自己的地理位置信息,该地理位置信息反映设备所处的地理位置。但随着通信业务或互联网业务的拓展,设备的地理位置信息不仅被自己需要,也被其他设备所需要。所以,如何将自己的地理位置信息传输给其他设备是目前需要解决的技术问题。
发明内容
本申请实施例提供了一种报文发送方法、报文处理方法及设备,实现了设备将自己的地理位置信息传输给其他设备的目的。
第一方面,提供了一种报文发送方法,该方法可以应用于第一设备,该第一设备可以是终端设备或服务器等。该方法具体包括如下步骤:第一设备获取所述第一设备的地理位置信息,并生成第一互联网协议第六版(Internet Protocol version 6,IPv6)报文,所述第一IPv6报文中携带所述第一设备的地理位置信息。第一设备的地址位置信息标识第一设备所处的地理位置。例如,该地理位置信息可以是第一设备的经纬度或第一设备所在区域的标识等其中的一种或多种。其中,第一设备所在区域可以是第一设备所在的行政区域,例如国家、省、市、区、县、乡、村等,也可以是非行政区域,例如街道、小区等。在生成第一IPv6报文之后,所述第一设备发送所述第一IPv6报文,以使其他设备接收该第一IPv6报文,并从该第一IPv6报文中获取到第一设备的地理位置信息。
在一种可能的设计中,所述第一设备的地理位置信息携带在所述第一IPv6报文的扩展头中。其中,该扩展头可以包括逐跳选项头(hop-by-hop option header,HBH)、目的地址选项头(destination option header,DOH)和段路由头(segment routing header,SRH)等其中的一种或多种。
当所述第一设备的地理位置信息携带在所述第一IPv6报文的HBH或DOH中时,所述第一设备的地理位置信息可以具体携带在所述第一IPv6报文的HBH的类型长度值(type-length-value,TLV)或DOH的TLV中。
当所述第一设备的地理位置信息携带在所述第一IPv6报文的SRH中时,所述第一设备的地理位置信息可以具体携带在所述SRH的TLV、标签(Tag)字段或段标识(segment identification,SID)中。
在一种可能的设计中,第一设备的地理位置信息可以具体携带在所述SRH的SID的参数(arguments)字段中。
第二方面,提供了一种报文处理方法,该方法应用于第二设备,第二设备可以是终端设备、服务器或网络设备。该报文处理方法包括如下步骤:第二设备获取第一IPv6报文或多协议标签交换(Multi-Protocol Label Switching,MPLS)报文,所述第一IPv6报文或所述MPLS报文中携带第一设备的地理位置信息。关于第一设备的地理位置信息的介绍请参见上文,此处不再赘述。然后,所述第二设备对所述第一IPv6报文或所述MPLS报文进行处理。也就是说,第二设备能够获取到包括第一设备的地理位置信息的第一IPv6报文或所述MPLS报文,实现第一设备的地理位置信息能够被其他设备获取到的目的。
第一设备的地理位置信息在第一IPv6报文中的具体位置可以参见第一方面的描述,此处不再赘述。
在一种可能的设计中,所述第二设备获取第一IPv6报文包括:所述第二设备接收来自所述第一设备的第二IPv6报文,所述第二IPv6报文包括所述第一设备的IP地址。所述第二设备根据所述第一设备的IP地址得到所述第一设备的地理位置信息,并在所述第二IPv6报文中携带所述第一设备的地理位置信息,得到所述第一IPv6报文。在得到第一IPv6报文之后,第二设备可以发送该第一IPv6报文,以使其他设备能够获取到第一IPv6报文,从而从该第一IPv6报文中获取到第一设备的地理位置信息。
在一种可能的设计中,所述第二设备获取第一MPLS报文包括:所述第二设备接收来自所述第一设备的互联网协议IP报文,所述IP报文包括所述第一设备的IP地址。所述第二设备根据所述第一设备的IP地址得到所述第一设备的地理位置信息。所述第二设备在所述IP报文外封装标签栈,得到所述MPLS报文,所述标签栈包括所述第一设备的地理位置信息。在得到MPLS报文之后,第二设备可以发送该MPLS报文,以使其他设备能够获取到MPLS报文,从而从该MPLS报文中获取到第一设备的地理位置信息。
在一种可能的设计中,所述第一设备的地理位置信息位于所述标签栈的栈底。
在一种可能的设计中,除了向其他设备发送第一IPv6报文或所述MPLS报文以外,所述第二设备对所述第一IPv6报文或所述MPLS报文进行处理的具体实现还可以包括如下两种:所述第二设备根据所述第一设备的地理位置信息向所述第一设备推送对应的预设信息,例如广告、新闻、娱乐信息、生活信息等资讯。或者,所述第二设备向与所述第一设备的地理位置信息对应的域名系统(domain name system,DNS)或内容分发网络(content delivery network,CDN)服务器转发所述第一IPv6报文或所述MPLS报文,以实现第一设备访问DNS或CDN服务器的目的。当然,上述第二设备对第一IPv6报文或所述MPLS报文进行处理的几种方式并不构成对本申请技术方案的限定,本领域技术人员可以根据实际情况自行设计。
第三方面,提供了一种第一设备,所述第一设备包括:处理单元,用于获取所述第一设备的地理位置信息,并生成第一互联网协议第六版IPv6报文,所述第一IPv6报文中携带所述第一设备的地理位置信息;发送单元,用于发送所述第一IPv6报文。
关于所述第一设备的地理位置信息的内容以及在第一IPv6报文的具体位置请参见第一 方面的描述,此处不再赘述。
第四方面,提供了一种第二设备,所述第二设备包括:获取单元,用于获取第一互联网协议第六版IPv6报文或多协议标签交换MPLS报文,所述第一IPv6报文或所述MPLS报文中携带第一设备的地理位置信息;处理单元,用于对所述第一IPv6报文或所述MPLS报文进行处理。
在一种可能的设计中,所述获取单元,用于接收来自所述第一设备的第二IPv6报文,所述第二IPv6报文包括所述第一设备的IP地址;根据所述第一设备的IP地址得到所述第一设备的地理位置信息;在所述第二IPv6报文中携带所述第一设备的地理位置信息,得到所述第一IPv6报文。
在一种可能的设计中,所述获取单元,用于接收来自所述第一设备的互联网协议IP报文,所述IP报文包括所述第一设备的IP地址;根据所述第一设备的IP地址得到所述第一设备的地理位置信息;在所述IP报文外封装标签栈,得到所述MPLS报文,所述标签栈包括所述第一设备的地理位置信息。
在一种可能的设计中,所述第一设备的地理位置信息位于所述标签栈的栈底。
在一种可能的设计中,所述处理单元,用于根据所述第一设备的地理位置信息向所述第一设备推送对应的预设信息;或,向与所述第一设备的地理位置信息对应的域名系统DNS或内容分发网络CDN服务器转发所述第一IPv6报文或所述MPLS报文。
第五方面,提供了一种网络系统,所述网络系统包括上述第三方面所述的第一设备和第四方面所述的第二设备。
第六方面,提供了一种计算机可读存储介质,包括指令、程序或代码,当其在计算机上执行时,使得所述计算机执行前述第一方面或第二方面任意一种可能的设计之一提供的方法。
第七方面,提供了一种包括计算机指令的计算机程序产品,当该计算机程序产品在网络设备上运行时,使得网络设备执行第一方面或第二方面任意一种可能的设计之一提供的方法。
第八方面,提供了一种芯片,包括存储器和处理器,存储器用于存储指令或程序代码,处理器用于从存储器中调用并运行该指令或程序代码,以执行上述第一方面或第一方面的任意一种可能的设计中的方法;或,处理器执行第二方面或第二方面任意一种可能的设计中的方法。
在一种可能的设计中,上述芯片仅包括处理器,处理器用于读取并执行存储器中存储的指令或程序代码,当指令或程序代码被执行时,处理器执行第一方面或第一方面的任意一种可能的设计中的方法;或,处理器执行第二方面或第二方面任意一种可能的设计中的方法。
附图说明
图1为本申请实施例提供的网络架构的结构示意图;
图2为本申请实施例提供的报文发送和处理方法的流程图;
图3为本申请实施例提供的IPv6报文的格式示意图;
图4为本申请实施例提供的SRH的格式示意图;
图5为本申请实施例提供的另一种报文发送和处理方法的流程图;
图6为本申请实施例提供的第一设备600的结构示意图;
图7为本申请实施例提供的第二设备700的结构示意图;
图8为本申请实施例提供的网络系统800的结构示意图;
图9为本申请实施例提供的设备900的结构示意图;
图10为本申请实施例提供的一种设备1000的结构示意图。
具体实施方式
本申请实施例提供了一种报文发送和处理方法,实现在网络中传输设备的地理位置信息的目的。
在介绍本申请实施例提供的报文发送和处理方法之前,首先介绍该方法可以适用的一个网络架构示例。
参见图1,该图为本申请实施例提供的网络架构的结构示意图。
在图1中,该网络架构包括一个或多个终端设备101,以及用于连接该一个或多个终端设备101和IP网络的接入设备102,其中IP网络包括多个网络设备103。该网络架构还包括一个或多个服务器105,以及连接在该一个或多个服务器105与该IP网络之间的接入设备104。
在本申请实施例中,终端设备101,又可以称为用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)、终端等,是一种向用户提供语音和/或数据连通性的设备,或,设置于该设备内的芯片,例如,具有无线连接功能的手持式设备、车载设备等。目前,一些终端设备的举例为:手机、台式电脑、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(mobile internet device,MID)、可穿戴设备,虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、支持5G接入的家庭网关设备(5G-residential gateway,5G-RG)等。
接入设备102、网络设备103、接入设备104可以是路由器(router)、交换机(switch)等转发设备,用于转发终端设备101与服务器105之间的IPv6报文。
参见图2,该图为本申请实施例提供的一种报文发送和处理方法的流程图。
下面结合图1和图2介绍本申请实施例提供的报文发送和处理方法,该方法包括如下步骤:
S101:第一设备获取第一设备的地理位置信息,并生成第一IPv6报文,该第一IPv6报文包括第一设备的地理位置信息。
S102:第一设备向第二设备发送第一IPv6报文。
在本申请实施例中,第一设备可以是图1所示实施例中的终端设备101,当然,第一设备还可以是服务器等,本申请实施例不做具体限定。第二设备可以是图1所示实施例中的接入设备102、网络设备103、接入设备104或服务器105,当然,第二设备还可以是终端设备等,本申请实施例不做具体限定。
在本申请实施例中,第一设备可以获取自己的地理位置信息,该地址位置信息标识第一设备所处的地理位置。例如,该地理位置信息可以是第一设备的经纬度或第一设备所在区域的标识等其中的一种或多种。其中,第一设备所在区域可以是第一设备所在的行政区域,例如国家、省、市、区、县、乡、村等,也可以是非行政区域,例如街道、小区等。
第一设备获取自己的地理位置信息的方式有多种。例如,如果第一设备上加载了安卓(Android)系统,那么第一设备可以通过安装的全球定位系统(global positioning system,GPS)或网络(NetWork)(一种定位软件)获取第一设备的经纬度。或者,第一设备可以根据第一设备的IP地址获取地理位置信息。具体的,第一设备可以自己对IP地址进行解析以获取地理位置信息,也可以向服务器或网络设备等其他设备发送第一设备的IP地址,以便服务器或网络设备等其他设备对第一设备的IP地址进行解析,得到对应的地理位置信息,并将该地理位置信息返回给第一设备。例如,当第一设备为图1的终端设备101时,对第一设备的IP地址进行解析的其他设备可以是接入设备102、网络设备103或接入设备104。
当然,第一设备还可以通过其他方式获取自己的地理位置信息,本申请实施例不做具体限定。并且,如何通过对IP地址进行解析以得到对应的地理位置信息的实现手段属于成熟技术,此处不再赘述。
在本申请实施例中,第一设备可以在发往第二设备的第一IPv6报文中携带第一设备的地理位置信息,以便第二设备对该第一IPv6报文进行处理。
在本申请实施例中,第一设备的地理位置信息可以携带在第一IPv6报文的扩展头中。参见图3,该图为IPv6报文的格式示意图。在图3中IPv6报文包括基本头、扩展头(extension header,EH)和负载(payload)。其中基本头包括版本(version)字段、通信分类(traffic class)字段、流标签(flow label)字段、负载长度(payload length)字段、下一个头部(next header)字段(例如值为43)、跳数限制(hop limit)字段、源地址(source address)字段和目的地址(destination)字段。扩展头包括逐跳选项择头(hop-by-hop option header,HBH)、目的地址选项择头(destination option header,DOH)、路由头(routing header)(如果是第六版段路由(segment routing version 6,SRv6)报文,那么为段路由头(segment routing header,SRH))等。
作为第一种可能的实现方式,第一设备的地理位置信息携带在第一IPv6报文的HBH中。具体的,第一设备的地理位置信息可以携带在HBH的类型长度值(type-length-value,TLV)中。按照RFC8200对HBH TLV的格式的定义,该TLV包括选项类型(option type)字段、选项数据长度(option data length)字段和选项数据(option data)字段。其中,option type字段的值用于指示该TLV的类型为携带第一设备的地理位置信息的TLV,option data  length字段的值为该TLV的长度,option data字段的值包括第一设备的地理位置信息。
作为第二种可能的实现方式,第一设备的地理位置信息携带在第一IPv6报文的DOH中。具体的,第一设备的地理位置信息可以携带在DOH的TLV中,该TLV的格式可以参见HBH的TLV的格式,此处不再赘述。
作为第三种可能的实现方式,当第一IPv6报文为SRv6报文时,第一设备的地理位置信息携带在该SRv6报文的SRH中。
参见图4,该图为SRH的格式示意图。在图4中,在该图中,SRH包括next header字段、SRH的长度(Hdr Ext Len)字段、路由类型(routing type)、段剩余(segment left)字段、最后一个索引(last entry)字段、标志(flags)字段、标签(tag)字段、段列表(segment list)(128位的IPv6地址)以及可选的TLV对象字段。
其中,第一设备的地理位置信息可以携带在图4中可选的TLV字段中。基于RFC8754对SRH TLV格式的定义,该TLV包括type字段、length字段和可选长度数据(variable-length data)字段,其中type字段的值用于指示该TLV为携带第一设备的地理位置信息的TLV,length字段的值为该TLV的长度,variable-length data字段用于携带第一设备的地理位置信息。
第一设备的地理位置信息还可以携带在图4的tag字段或者是segment list中的段标识(segment identification,SID)字段中。其中SID字段包括位置地址(locator address)字段、功能标识(function identifier,function ID)字段和参数(arguments)字段,其中参数字段可以用于携带第一设备的地理位置信息。
上述三种可能的实现方式并不构成对本申请技术方案的限定,本领域技术人员可以根据实际情况自行设计。
S103:第二设备接收第一IPv6报文并对第一IPv6报文进行处理。
在本申请实施例中,第二设备对第一IPv6报文进行处理可以有多种实现方式。
作为第一种可能的实现方式,若第二设备不为第一IPv6报文的目的设备时,第二设备可以向目的设备转发第一IPv6报文,以便目的设备能够接收到该第一IPv6报文,并获取到第一设备的地理位置信息。
以图1为例,终端设备101可以向接入设备102发送IPv6报文P1,该IPv6报文P1中携带终端设备101的地理位置信息,该IPv6报文P1的目的设备为服务器105。接入设备102在接收到来自终端设备101的IPv6报文P1之后,根据IPv6报文P1的目的地址(目的设备的IP地址)向网络设备103发送。网络设备103在接收到来自接入设备102的IPv6报文P1之后,根据IPv6报文P1的目的地址向接入设备104发送。接入设备104在接收到来自网络设备103的IPv6报文P1之后,根据IPv6报文P1的目的地址将IPv6报文P1发送给服务器105。因而,服务器105可以从IPv6报文P1获取到终端设备101的地理位置信息。
作为第二种可能的实现方式,第二设备在接收到第一IPv6报文之后,可以从第一IPv6报文中获取到第一设备的地理位置信息,并利用该第一设备的地理位置信息进行相应的处理。在这种实现方式中,第二设备可以是第一IPv6报文的目的设备,也可以不是。
例如,若第二设备为第一IPv6报文的目的设备,例如为图1所示实施例的服务器105,那么第二设备可以根据第一设备的地理位置信息向第一设备投放广告,或推送新闻、娱乐信息、生活信息等资讯,以使第一设备的用户能够获取到相应的服务。
若第二设备不为第一IPv6报文的目的设备,第二设备可以根据第一设备的地理位置信息进行相应处理之后,将该第一IPv6报文转发到目的设备。
例如若第一IPv6报文需要访问域名系统(domain name system,DNS)或内容分发网络(content delivery network,CDN)设备,那么作为第一IPv6报文的转发路径上的设备在接收到该第一IPv6报文之后,根据第一设备的地理位置信息将该第一IPv6报文转发给与该地理位置信息对应的DNS或CDN设备,以实现节约网络资源的目的。“对应”的含义可以例如为相近或属于相同区域等。
参见图5,该图为本申请实施例提供的另一种报文发送和处理方法的流程图。
下面结合图1和图5介绍本申请实施例提供的报文发送和处理方法,该方法包括如下步骤:
S201:第一设备向第二设备发送IP报文,IP报文中携带第一设备的IP地址。
在本申请实施例中,第一设备发送的IP报文可以是IPv6报文,也可以是互联网协议第四版(Internet Protocol version 4,IPv4)报文。IP报文中携带第一设备的IP地址,但不携带第一设备的地理位置信息。
以IP报文为IPv6报文为例,IPv6报文的格式可以参见图3,第一设备的IP地址可以携带在该IPv6报文的source address字段中。
在本申请实施例中,第一设备可以例如为图1中的终端设备101,当然,第一设备也可以是服务器等,本申请实施例不做具体限定。第二设备可以是图1所示实施例中的接入设备102、网络设备103或接入设备104。终端设备101可以向接入设备102发送IP报文P2,该IP报文P2中携带终端设备101的IP地址。
S202:第二设备接收来自第一设备的IP报文,根据第一设备的IP地址获取第一设备的地理位置信息。
在本申请实施例中,第二设备可以根据IP报文中第一设备的IP地址获取第一设备的地理位置信息。
具体的,第二设备可以对第一设备的IP地址进行解析,以得到第一设备的地理位置信息。例如,接入设备102在接收到来自终端设备101的IP报文P2之后,从IP报文P2中获取终端设备101的IP地址,然后对该终端设备101的IP地址进行解析,以获得终端设备101的地理位置信息。
或者,第二设备可以将第一设备的IP地址发送给用于地址解析的服务器,由该服务器对第一设备的IP地址进行解析,并将解析得到的第一设备的地理位置信息返回网络设备。再或者,第二设备可以预先存储第一设备的IP地址与第一设备的地理位置信息之间的对应关系,当得到来自第一设备的IP报文之后,可以根据该IP报文中的IP地址和该对应关系得到第一设备的地理位置信息。当然,上述三种可能的实现方式并不构成对本申请技术方 案的限定,本领域技术人员还可以根据实际情况自行设计。
S203:第二设备在IP报文中携带第一设备的地理位置信息,得到第一IPv6报文或MPLS报文。
在本申请实施例中,若IP报文P2为IPv6报文,那么接入设备102获取到终端设备101的地理位置信息之后,将该终端设备101的地理位置信息携带在IP报文P2中,得到IPv6报文P3,然后根据IPv6报文P3的目的地址,即服务器105的IP地址,向下一跳网络设备(即网络设备103)转发该IPv6报文P3。网络设备103在接收到该IPv6报文P3之后,根据IPv6报文P3的目的地址向接入设备104发送IPv6报文P3,以便接入设备104能够将该IPv6报文P3转发给服务器105,并且服务器105能够从该IPv6报文P3中得到终端设备101的地理位置信息。
在本申请实施例中,若IP报文P2为IPv6报文,那么第一设备的地理位置信息携带在第一IPv6报文的具体位置请参见上文,此处不再赘述。
在本申请实施例中,IP报文P2为IPv6报文或IPv4报文,且第二设备属于MPLS网络中的网络设备,那么第二设备在接收到来自第一设备的IP报文P2之后,可以在该IP报文P2外部封装标签栈,该标签栈包括IP报文P2的报文转发路径对应的标签,得到MPLS报文。在该场景中,该MPLS报文的标签栈中可以携带第一设备的地理位置信息。可选的,第一设备的地理位置信息可以位于标签栈的栈底,以使报文转发路径上的最后一个设备能够获取到该第一设备的地理位置信息。当然,第一设备的地理位置信息也可以位于MPLS报文的其他位置,本申请实施例不做具体限定。此外,第二设备对第一IPv6报文或MPLS报文进行处理的具体实现可以参见图2所示实施例中对第一IPv6报文进行处理的相关描述,此处不再赘述。
S204:第二设备对该第一IPv6报文或MPLS报文进行处理。
在本申请实施例中,第二设备可以对第一IPv6报文或MPLS报文进行转发,以使其他设备也能够从第一IPv6报文或MPLS报文中获取到第一设备的地理位置信息,实现第一设备的地理位置信息在网络中的扩散。
图6示出了上述实施例中所涉及的第一设备的一种可能的结构示意图,该第一设备600可以实现图2所示实施例中第一设备的功能。参阅图6,该第一设备600包括:处理单元601和发送单元602。这些单元可以执行图2所示实施例中第一设备的相应功能。处理单元601,用于支持第一设备600执行图2中S101;发送单元602,用于支持第一设备600执行图2中的S102;和/或本文所描述的技术中第一设备执行的其它过程。例如,处理单元601,用于获取所述第一设备的地理位置信息,并生成第一互联网协议第六版IPv6报文,所述第一IPv6报文中携带所述第一设备的地理位置信息;发送单元602,用于发送所述第一IPv6报文。具体执行过程请参考上述图2所示实施例中相应步骤的详细描述,这里不再一一赘述。
需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。本申请实施例中的各功能单元可以集成在一个处理单 元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。例如,上述实施例中,获取单元和处理单元可以是同一个单元,也不同的单元。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
图7示出了上述实施例中所涉及的第二设备的一种可能的结构示意图,该第二设备700可以实现图2所示实施例中第二设备的功能。参阅图7,该第二设备700包括:获取单元701和处理单元702。这些单元可以执行图2所示实施例中第二设备或图5所示实施例中第二设备的相应功能。获取单元701,用于支持第二设备700执行图2中S103或图5中的S202及S203;处理单元702,用于支持第二设备700执行图2中的S103或图5中的S204;和/或本文所描述的技术中第二设备执行的其它过程。例如,获取单元701,用于获取第一IPv6报文或MPLS报文,所述第一IPv6报文或所述MPLS报文中携带第一设备的地理位置信息;处理单元702,用于对所述第一IPv6报文或所述MPLS报文进行处理。具体执行过程请参考上述图4所示实施例中相应步骤的详细描述,这里不再一一赘述。
需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。本申请实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。例如,上述实施例中,获取单元和处理单元可以是同一个单元,也不同的单元。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
参阅图8所示,发明实施例提供了一种网络系统800,该系统800用于实现前述方法实施例中的报文发送方法和报文处理方法。该系统800包括第一设备801和第二设备802。第一设备801可以实现图2所示的实施例中的第一设备或图6中的第一设备600的功能,第二设备802可以实现图2所示的实施例中第二设备、图5所示实施例中第二设备或图7中的第二设备700的功能。具体执行过程请参考上述图2或图5或图6或图7所示实施例中相应步骤的详细描述,这里不再一一赘述。
图9是本申请实施例提供的一种设备900的结构示意图。图6中的第一设备600和图7中的第二设备700可以通过图9所示的设备来实现。参见图9,该设备900包括至少一个处理器901,通信总线902以及至少一个网络接口904,可选地,该设备900还可以包括存储器903。
处理器901可以是一个通用中央处理器(central processing unit,CPU)、特定应用集成电路(application-specific integrated circuit,ASIC)或一个或多个用于控制本申请方案程序执行的集成电路(integrated circuit,IC)。处理器可以用于对报文进行处理,以实现本申请实施例中提供的发送报文的方法。
比如,当图6中的第一设备600通过图9所示的设备来实现时,该处理器可以用于获取所述第一设备的地理位置信息,并生成第一互联网协议第六版IPv6报文,所述第一IPv6报文中携带所述第一设备的地理位置信息,具体功能实现可参考图2所示方法实施例中对 应第一设备的处理部分。又比如,当图7中的第二设备通过图9所示的设备来实现时,该处理器可以用于获取第一IPv6报文或MPLS报文,所述第一IPv6报文或所述MPLS报文中携带第一设备的地理位置信息,以及对所述第一IPv6报文或所述MPLS报文进行处理,具体功能实现可参考图5所示方法实施例中第二设备的处理部分。
通信总线902用于在处理器901、网络接口904和存储器903之间传送信息。
存储器903可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,存储器903还可以是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,也可以是只读光盘(compact disc read-only Memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器903可以是独立存在,通过通信总线902与处理器901相连接。存储器903也可以和处理器901集成在一起。
可选地,存储器903用于存储执行本申请方案的程序代码或指令,并由处理器901来控制执行。处理器901用于执行存储器903中存储的程序代码或指令。程序代码中可以包括一个或多个软件模块。可选地,处理器901也可以存储执行本申请方案的程序代码或指令,在这种情况下处理器901不需要到存储器903中读取程序代码或指令。
网络接口904可以为收发器一类的装置,用于与其它设备或通信网络通信,通信网络可以为以太网、无线接入网(RAN)或无线局域网(wireless local area networks,WLAN)等。在本申请实施例中,网络接口904可以用于接收分段路由网络中的其他节点发送的报文,也可以向分段路由网络中的其他节点发送报文。网络接口904可以为以太接口(ethernet)接口、快速以太(fast ethernet,FE)接口或千兆以太(gigabit ethernet,GE)接口等。
在具体实现中,作为一种实施例,设备900可以包括多个处理器,例如图9中所示的处理器901和处理器405。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
图10是本申请实施例提供的一种设备1000的结构示意图。图2或图5中的第二设备可以通过图10所示的设备来实现。参见图10所示的设备结构示意图,设备1000包括主控板和一个或多个接口板。主控板与接口板通信连接。主控板也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板包括CPU和存储器,主控板负责对设备1000中各个组件的控制和管理,包括路由计算、设备管理和维护功能。接口板也称为线处理单元(line processing unit,LPU)或线卡(line card),用于接收和发送报文。在一些实施例中,主控板与接口板之间或接口板与接口板之间通过总线通信。在一些实施例中,接口板之间通过交换网板通信,在这种情况下设备1000也包括交换网板,交换网板与主控板、接口板通信连接,交换网板用于转发接口板之间的数据,交换网板也可以称为交换网板单元(switch fabric unit,SFU)。接口板包括CPU、存储器、转发引擎和接 口卡(interface card,IC),其中接口卡可以包括一个或多个网络接口。网络接口可以为Ethernet接口、FE接口或GE接口等。CPU与存储器、转发引擎和接口卡分别通信连接。存储器用于存储转发表。转发引擎用于基于存储器中保存的转发表转发接收到的报文,如果接收到的报文的目的地址为设备1000的IP地址,则将该报文发送给主控板或接口板的CPU进行处理;如果接收到的报文的目的地址不是设备1000的IP地址,则根据该目的地查转发表,如果从转发表中查找到该目的地址对应的下一跳和出接口,将该报文转发到该目的地址对应的出接口。转发引擎可以是网络处理器(network processor,NP)。接口卡也称为子卡,可安装在接口板上,负责将光电信号转换为数据帧,并对数据帧进行合法性检查后转发给转发引擎处理或接口板CPU。在一些实施例中,CPU也可执行转发引擎的功能,比如基于通用CPU实现软转发,从而接口板中不需要转发引擎。在一些实施例中,转发引擎可以通过ASIC或现场可编程门阵列(field programmable gate array,FPGA)实现。在一些实施例中,存储转发表的存储器也可以集成到转发引擎中,作为转发引擎的一部分。
本申请实施例还提供一种芯片系统,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述图2或图5所示实施例中第一设备或第二设备的方法。
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
示例性的,该芯片系统可以是FPGA,可以是ASIC,还可以是系统芯片(system on chip,SoC),还可以是CPU,还可以是NP,还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
本申请实施例还提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行前述实施例中的方法。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包括,例如,包括了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚 地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
本申请中“至少一项(个)”是指一个或者多个,“多个”是指两个或两个以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。本申请中认为“A和/或B”包括单独A,单独B,和A+B。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑模块划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要获取其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各模块单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件模块单元的形式实现。
所述集成的单元如果以软件模块单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (39)

  1. 一种报文发送方法,其特征在于,所述方法包括:
    第一设备获取所述第一设备的地理位置信息,并生成第一互联网协议第六版IPv6报文,所述第一IPv6报文中携带所述第一设备的地理位置信息;
    所述第一设备发送所述第一IPv6报文。
  2. 根据权利要求1所述的方法,其特征在于,所述第一设备的地理位置信息携带在所述第一IPv6报文的扩展头中。
  3. 根据权利要求2所述的方法,其特征在于,所述扩展头包括以下其中一种或多种:
    逐跳选项头HBH、目的地址选项头DOH和段路由头SRH。
  4. 根据权利要求3所述的方法,其特征在于,所述第一设备的地理位置信息携带在所述第一IPv6报文的HBH或DOH中包括:
    所述第一设备的地理位置信息携带在所述第一IPv6报文的HBH的类型长度值TLV或DOH的TLV中。
  5. 根据权利要求3所述的方法,其特征在于,所述第一设备的地理位置信息携带在所述第一IPv6报文的SRH中包括:
    所述第一设备的地理位置信息携带在所述SRH的TLV、标签Tag字段或段标识SID中。
  6. 根据权利要求5所述的方法,其特征在于,所述第一设备的地理位置信息携带在所述SRH的SID中包括:
    第一设备的地理位置信息携带在所述SRH的SID的参数arguments字段中。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述第一设备的地理位置信息包括以下其中一种或多种:
    所述第一设备的经度、所述第一设备的纬度和所述第一设备所在的区域的标识。
  8. 一种报文处理方法,其特征在于,所述方法包括:
    第二设备获取第一互联网协议第六版IPv6报文或多协议标签交换MPLS报文,所述第一IPv6报文或所述MPLS报文中携带第一设备的地理位置信息;
    所述第二设备对所述第一IPv6报文或所述MPLS报文进行处理。
  9. 根据权利要求8所述的方法,其特征在于,所述第一设备的地理位置信息携带在所述第一IPv6报文的扩展头中。
  10. 根据权利要求9所述的方法,其特征在于,所述扩展头包括以下其中一种或多种:
    逐跳选项头HBH、目的地址选项头DOH和段路由头SRH。
  11. 根据权利要求10所述的方法,其特征在于,所述第一设备的地理位置信息携带在所述第一IPv6报文的HBH或DOH中包括:
    所述第一设备的地理位置信息携带在所述第一IPv6报文的HBH的类型长度值TLV或DOH的TLV中。
  12. 根据权利要求10所述的方法,其特征在于,所述第一设备的地理位置信息携带在所述第一IPv6报文的SRH中包括:
    所述第一设备的地理位置信息携带在所述SRH的TLV、标签Tag字段或段标识SID中。
  13. 根据权利要求12所述的方法,其特征在于,所述第一设备的地理位置信息携带在所述SRH的SID中包括:
    第一设备的地理位置信息携带在所述SRH的SID的参数arguments字段中。
  14. 根据权利要求8-13任一项所述的方法,其特征在于,所述第二设备获取第一IPv6报文包括:
    所述第二设备接收来自所述第一设备的第二IPv6报文,所述第二IPv6报文包括所述第一设备的IP地址;
    所述第二设备根据所述第一设备的IP地址得到所述第一设备的地理位置信息;
    所述第二设备在所述第二IPv6报文中携带所述第一设备的地理位置信息,得到所述第一IPv6报文。
  15. 根据权利要求8-13任一项所述的方法,其特征在于,所述第二设备获取第一MPLS报文包括:
    所述第二设备接收来自所述第一设备的互联网协议IP报文,所述IP报文包括所述第一设备的IP地址;
    所述第二设备根据所述第一设备的IP地址得到所述第一设备的地理位置信息;
    所述第二设备在所述IP报文外封装标签栈,得到所述MPLS报文,所述标签栈包括所述第一设备的地理位置信息。
  16. 根据权利要求15所述的方法,其特征在于,所述第一设备的地理位置信息位于所述标签栈的栈底。
  17. 根据权利要求8-16任一项所述的方法,其特征在于,所述第二设备对所述第一IPv6报文或所述MPLS报文进行处理包括:
    所述第二设备根据所述第一设备的地理位置信息向所述第一设备推送对应的预设信息;或,
    所述第二设备向与所述第一设备的地理位置信息对应的域名系统DNS或内容分发网络CDN服务器转发所述第一IPv6报文或所述MPLS报文。
  18. 根据权利要求8-17任一项所述的方法,其特征在于,所述第一设备的地理位置信息包括以下其中一种或多种:
    所述第一设备的经度、所述第一设备的纬度和所述第一设备所在的区域的标识。
  19. 根据权利要求8-18任一项所述的方法,其特征在于,所述第二设备包括网络设备、终端设备或服务器。
  20. 一种第一设备,其特征在于,所述第一设备包括:
    处理单元,用于获取所述第一设备的地理位置信息,并生成第一互联网协议第六版IPv6报文,所述第一IPv6报文中携带所述第一设备的地理位置信息;
    发送单元,用于发送所述第一IPv6报文。
  21. 根据权利要求20所述的第一设备,其特征在于,所述第一设备的地理位置信息携带在所述第一IPv6报文的扩展头中。
  22. 根据权利要求21所述的第一设备,其特征在于,所述扩展头包括以下其中一种或 多种:
    逐跳选项头HBH、目的地址选项头DOH和段路由头SRH。
  23. 根据权利要求22所述的第一设备,其特征在于,所述第一设备的地理位置信息携带在所述第一IPv6报文的HBH或DOH中包括:
    所述第一设备的地理位置信息携带在所述第一IPv6报文的HBH的类型长度值TLV或DOH的TLV中。
  24. 根据权利要求22所述的第一设备,其特征在于,所述第一设备的地理位置信息携带在所述第一IPv6报文的SRH中包括:
    所述第一设备的地理位置信息携带在所述SRH的TLV、标签Tag字段或段标识SID中。
  25. 根据权利要求24所述的第一设备,其特征在于,所述第一设备的地理位置信息携带在所述SRH的SID中包括:
    第一设备的地理位置信息携带在所述SRH的SID的参数arguments字段中。
  26. 根据权利要求20-25任一项所述的第一设备,其特征在于,所述第一设备的地理位置信息包括以下其中一种或多种:
    所述第一设备的经度、所述第一设备的纬度和所述第一设备所在的区域的标识。
  27. 一种第二设备,其特征在于,所述第二设备包括:
    获取单元,用于获取第一互联网协议第六版IPv6报文或多协议标签交换MPLS报文,所述第一IPv6报文或所述MPLS报文中携带第一设备的地理位置信息;
    处理单元,用于对所述第一IPv6报文或所述MPLS报文进行处理。
  28. 根据权利要求27所述的第二设备,其特征在于,所述第一设备的地理位置信息携带在所述第一IPv6报文的扩展头中。
  29. 根据权利要求28所述的第二设备,其特征在于,所述扩展头包括以下其中一种或多种:
    逐跳选项头HBH、目的地址选项头DOH和段路由头SRH。
  30. 根据权利要求29所述的第二设备,其特征在于,所述第一设备的地理位置信息携带在所述第一IPv6报文的HBH或DOH中包括:
    所述第一设备的地理位置信息携带在所述第一IPv6报文的HBH的类型长度值TLV或DOH的TLV中。
  31. 根据权利要求29所述的第二设备,其特征在于,所述第一设备的地理位置信息携带在所述第一IPv6报文的SRH中包括:
    所述第一设备的地理位置信息携带在所述SRH的TLV、标签Tag字段或段标识SID中。
  32. 根据权利要求31所述的第二设备,其特征在于,所述第一设备的地理位置信息携带在所述SRH的SID中包括:
    第一设备的地理位置信息携带在所述SRH的SID的参数arguments字段中。
  33. 根据权利要求27-32任一项所述的第二设备,其特征在于,
    所述获取单元,用于接收来自所述第一设备的第二IPv6报文,所述第二IPv6报文包括所述第一设备的IP地址;根据所述第一设备的IP地址得到所述第一设备的地理位置信 息;在所述第二IPv6报文中携带所述第一设备的地理位置信息,得到所述第一IPv6报文。
  34. 根据权利要求27-32任一项所述的第二设备,其特征在于,
    所述获取单元,用于接收来自所述第一设备的互联网协议IP报文,所述IP报文包括所述第一设备的IP地址;根据所述第一设备的IP地址得到所述第一设备的地理位置信息;在所述IP报文外封装标签栈,得到所述MPLS报文,所述标签栈包括所述第一设备的地理位置信息。
  35. 根据权利要求34所述的第二设备,其特征在于,所述第一设备的地理位置信息位于所述标签栈的栈底。
  36. 根据权利要求27-35任一项所述的第二设备,其特征在于,
    所述处理单元,用于根据所述第一设备的地理位置信息向所述第一设备推送对应的预设信息;或,向与所述第一设备的地理位置信息对应的域名系统DNS或内容分发网络CDN服务器转发所述第一IPv6报文或所述MPLS报文。
  37. 一种网络系统,其特征在于,所述网络系统包括如权利要求20-26任一项所述的第一设备和如权利要求27-36任一项所述的第二设备。
  38. 一种计算机可读存储介质,其特征在于,包括指令、程序或代码,当其在计算机上执行时,使得所述计算机执行如权利要求1至19任一权利要求所述的方法。
  39. 一种芯片,其特征在于,包括存储器和处理器,存储器用于存储指令或程序代码,处理器用于从存储器中调用并运行该指令或程序代码,以执行如权利要求1至19任一权利要求所述的方法。
PCT/CN2021/111937 2020-08-11 2021-08-11 一种报文发送方法、报文处理方法及设备 WO2022033496A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21855547.2A EP4113947A4 (en) 2020-08-11 2021-08-11 METHOD FOR SENDING MESSAGES, METHOD FOR PROCESSING MESSAGES AND DEVICE
US18/047,372 US20230053788A1 (en) 2020-08-11 2022-10-18 Packet Sending Method, Packet Processing Method, and Device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010802694.6 2020-08-11
CN202010802694.6A CN114079633A (zh) 2020-08-11 2020-08-11 一种报文发送方法、报文处理方法及设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/047,372 Continuation US20230053788A1 (en) 2020-08-11 2022-10-18 Packet Sending Method, Packet Processing Method, and Device

Publications (1)

Publication Number Publication Date
WO2022033496A1 true WO2022033496A1 (zh) 2022-02-17

Family

ID=80246982

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/111937 WO2022033496A1 (zh) 2020-08-11 2021-08-11 一种报文发送方法、报文处理方法及设备

Country Status (4)

Country Link
US (1) US20230053788A1 (zh)
EP (1) EP4113947A4 (zh)
CN (1) CN114079633A (zh)
WO (1) WO2022033496A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050059409A1 (en) * 2003-09-08 2005-03-17 Nokia Corporation Geographical position extension in messaging for a terminal node
US20120047572A1 (en) * 2010-08-17 2012-02-23 Richard Jeremy Duncan Decapsulation of data packet tunnels to process encapsulated ipv4 or ipv6 packets
CN102546248A (zh) * 2011-12-30 2012-07-04 华为技术有限公司 多协议标签交换环境下精确定位故障位置的方法、装置及系统
CN107276902A (zh) * 2017-06-12 2017-10-20 北京邮电大学 地理位置与ip地址结合的车联网路由寻址方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020048493A1 (en) * 2018-09-05 2020-03-12 Huawei Technologies Co., Ltd. Segment routing in mpls network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050059409A1 (en) * 2003-09-08 2005-03-17 Nokia Corporation Geographical position extension in messaging for a terminal node
US20120047572A1 (en) * 2010-08-17 2012-02-23 Richard Jeremy Duncan Decapsulation of data packet tunnels to process encapsulated ipv4 or ipv6 packets
CN102546248A (zh) * 2011-12-30 2012-07-04 华为技术有限公司 多协议标签交换环境下精确定位故障位置的方法、装置及系统
CN107276902A (zh) * 2017-06-12 2017-10-20 北京邮电大学 地理位置与ip地址结合的车联网路由寻址方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4113947A4

Also Published As

Publication number Publication date
EP4113947A1 (en) 2023-01-04
EP4113947A4 (en) 2023-06-14
CN114079633A (zh) 2022-02-22
US20230053788A1 (en) 2023-02-23

Similar Documents

Publication Publication Date Title
US8743879B2 (en) Label switched routing to connect low power network domains
US9313125B2 (en) Method and apparatus for disabling transmission of a packet with aggregated data from multiple packets having an address for a group of network devices
ES2638612T3 (es) Procedimiento y dispositivo para almacenar y enviar entradas de direcciones MAC y sistema
EP2680507B1 (en) Packet forwarding method and system, and relay agent device
US9641433B2 (en) Method, routing bridge, and system for sending packet
WO2019223795A1 (zh) 报文传输方法、通信装置和系统
US20230370899A1 (en) Packet forwarding method, packet processing method, and device
CN110855568A (zh) 报文转发方法及系统
US11757775B2 (en) Message generation method and apparatus, and message processing method and apparatus
WO2017041534A1 (zh) 一种电力线网络通信的方法及装置、计算机存储介质
WO2022028216A1 (zh) 网络层可达信息传输方法、系统、装置以及网络设备
WO2022033496A1 (zh) 一种报文发送方法、报文处理方法及设备
CN111277580A (zh) 节点数据发送方法、接收方法以及传输方法
CN101986647A (zh) Vrrp的兼容方法及装置
CN111404816B (zh) 一种跨网络发送组播报文的方法、装置、系统及存储介质
WO2022228293A1 (zh) 一种发送报文的方法、处理报文的方法及设备
WO2023078144A1 (zh) 报文处理方法、装置及系统
CN104717313B (zh) mDNS网关地址配置方法与装置
WO2023019874A1 (zh) 分布式业务转发方法、装置、系统、存储介质及电子设备
US20230269174A1 (en) Route Advertisement Method, Route Loop Check Method, and Device
CN116418628A (zh) 一种vxlan报文传输方法、网络设备及系统
CN117714554A (zh) 一种设备互联方法、相关设备及系统
CN118075196A (zh) 一种报文传输方法、装置及设备
CN115914066A (zh) 一种路由发送方法及设备
JP2006174329A (ja) 地理情報を含むアドレスに基づくパケット転送装置、システム及びプログラム

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 21855547.2

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2021855547

Country of ref document: EP

Effective date: 20220927

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21855547

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE