CN114157601A - Message transmission method, device and storage medium - Google Patents

Message transmission method, device and storage medium Download PDF

Info

Publication number
CN114157601A
CN114157601A CN202111439001.2A CN202111439001A CN114157601A CN 114157601 A CN114157601 A CN 114157601A CN 202111439001 A CN202111439001 A CN 202111439001A CN 114157601 A CN114157601 A CN 114157601A
Authority
CN
China
Prior art keywords
message
node device
simplified
node
initial
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202111439001.2A
Other languages
Chinese (zh)
Other versions
CN114157601B (en
Inventor
何涛
张帅
曹畅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202111439001.2A priority Critical patent/CN114157601B/en
Publication of CN114157601A publication Critical patent/CN114157601A/en
Application granted granted Critical
Publication of CN114157601B publication Critical patent/CN114157601B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The invention provides a message transmission method, a message transmission device and a storage medium, relates to the technical field of communication, and aims to solve the problem of low message transmission efficiency in the prior art. The method comprises the following steps: the method comprises the steps of obtaining a simplified identification of second node equipment for transmitting an initial message, wherein the byte length of the simplified identification is smaller than that of the initial identification of the second node equipment, then obtaining a destination address corresponding to the simplified identification of the second node equipment, generating a target message, and then sending the target message to the second node equipment according to the destination address. Therefore, the byte length of the message header of the initial message can be effectively shortened, and the message transmission efficiency is improved.

Description

Message transmission method, device and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for transmitting a packet, and a storage medium.
Background
In a segment routing Protocol version 6, SRv6 network based on the sixth version of Internet Protocol, a message header of a transmitted SRv6 message needs to carry a Segment Routing Header (SRH), and a Segment List (SL) included in the SRH is a path sequence composed of Segment Identifiers (SID) of each node on a message forwarding path. Where each SID has a standard byte length of 128 bits (bits).
However, as each SID is added to the SL, the length of the SRH will be increased by 128 bits, and the length of the packet will also be increased by 128 bits. When the forwarding path is too long, the length of the header byte of the SRv6 message is too long, thereby reducing the transmission efficiency of the message information. When the message length exceeds the Maximum Transmission Unit (MTU) of the network, the message transmission cannot be performed.
Disclosure of Invention
The application provides a message transmission method, a message transmission device and a storage medium, which are used for improving the message transmission efficiency.
In order to achieve the purpose, the technical scheme is as follows:
in a first aspect, a method for packet transmission is provided, including: the method comprises the steps of obtaining a simplified identification of second node equipment for transmitting an initial message, wherein the byte length of the simplified identification is smaller than that of the initial identification of the second node equipment, then obtaining a destination address corresponding to the simplified identification of the second node equipment, generating a target message, and then sending the target message to the second node equipment according to the destination address.
Optionally, the method for obtaining the simplified identifier of the second node device for transmitting the initial packet specifically includes: sending a first request message to a server; the first request message is used for requesting to acquire an index relation between the node equipment and the simplified identifier which is pre-established by the server; receiving an index relation sent by a server; and reading the index relation, and determining the simplified identification corresponding to the second node equipment.
Optionally, the method for obtaining the simplified identifier of the second node device for transmitting the initial packet specifically includes: sending a second request message to the server; the second request message is used for requesting to acquire the simplified identifier of the second node equipment; receiving a simplified identifier of the second node equipment sent by the server; the simplified identifier of the second node device is determined by the server reading the pre-established index relationship between the node device and the simplified identifier.
Optionally, the method for obtaining the simplified identifier of the second node device for transmitting the initial packet specifically includes: when the first node equipment is source node equipment for transmitting data to be transmitted, acquiring simplified identifications of all node equipment for transmitting the data to be transmitted; when the first node device is an intermediate node device for transmitting data to be transmitted, simplified identifiers of next hop node devices adjacent to the first node device in all the node devices for transmitting the data to be transmitted are obtained.
Optionally, when the first node device is a source node device, the method for generating the target packet according to the destination address and the initial packet specifically includes: and adding the destination address into the initial message to obtain a target message.
Optionally, when the first node device is an intermediate node device, the method for generating the target packet according to the destination address and the initial packet specifically includes: and updating the initial address in the initial message into the destination address to obtain the target message.
In a second aspect, a message transmission apparatus is provided, which includes: an acquisition unit, a generation unit and a transmission unit; an obtaining unit, configured to obtain a simplified identifier of a second node device used for transmitting an initial packet; the byte length of the simplified identifier is less than the byte length of the initial identifier of the second node device; the obtaining unit is further configured to obtain a destination address corresponding to the simplified identifier of the second node device; the generating unit is used for generating a target message according to the destination address and the initial message acquired by the acquiring unit; and the sending unit is used for sending the target message generated by the generating unit to the second node equipment according to the destination address acquired by the acquiring unit.
Optionally, the obtaining unit is specifically configured to: sending a first request message to a server; the first request message is used for requesting to acquire an index relation between the node equipment and the simplified identifier which is pre-established by the server; receiving an index relation sent by a server; and reading the index relation, and determining the simplified identification corresponding to the second node equipment.
Optionally, the obtaining unit is specifically configured to: sending a second request message to the server; the second request message is used for requesting to acquire the simplified identifier of the second node equipment; receiving a simplified identifier of the second node equipment sent by the server; the simplified identifier of the second node device is determined by the server reading the pre-established index relationship between the node device and the simplified identifier.
Optionally, the obtaining unit is specifically configured to: when the first node equipment is source node equipment for transmitting data to be transmitted, acquiring simplified identifications of all node equipment for transmitting the data to be transmitted; when the first node device is an intermediate node device for transmitting data to be transmitted, simplified identifiers of next hop node devices adjacent to the first node device in all the node devices for transmitting the data to be transmitted are obtained.
Optionally, when the first node device is a source node device, the generating unit is specifically configured to: and adding the destination address acquired by the acquisition unit into the initial message to obtain a target message.
Optionally, when the first node device is an intermediate node device, the generating unit is specifically configured to: and updating the initial address in the initial message to the destination address acquired by the acquisition unit to obtain the target message.
In a third aspect, a message transmission apparatus is provided, which includes a memory and a processor; the memory is used for storing computer execution instructions, and the processor is connected with the memory through a bus; when the message transmission device is operated, the processor executes the computer execution instructions stored in the memory, so that the message transmission device executes the message transmission method of the first aspect.
The message transmission device may be a network device, or may be a part of a device in the network device, for example, a system on chip in the network device. The chip system is configured to support the network device to implement the functions related to the first aspect and any one of the possible implementations thereof, for example, to acquire, generate, and send data and/or information related to the message transmission method. The chip system includes a chip and may also include other discrete devices or circuit structures.
In a fourth aspect, a computer-readable storage medium is provided, which includes computer-executable instructions, which, when executed on a computer, cause the computer to perform the message transmission method according to the first aspect.
In a fifth aspect, there is also provided a computer program product comprising computer instructions which, when run on a message transmitting apparatus, cause the message transmitting apparatus to perform the message transmission method according to the first aspect.
It should be noted that all or part of the above computer instructions may be stored on the first computer readable storage medium. The first computer-readable storage medium may be packaged together with the processor of the message transmission apparatus, or may be packaged separately from the processor of the message transmission apparatus, which is not limited in this embodiment of the present application.
For the descriptions of the second, third, fourth and fifth aspects in this application, reference may be made to the detailed description of the first aspect; in addition, for the beneficial effects of the second aspect, the third aspect, the fourth aspect and the fifth aspect, reference may be made to the beneficial effect analysis of the first aspect, and details are not repeated here.
In the embodiment of the present application, the names of the above message transmission apparatuses do not limit the devices or the functional modules themselves, and in an actual implementation, the devices or the functional modules may appear by other names. Insofar as the functions of the respective devices or functional modules are similar to those of the present application, they fall within the scope of the claims of the present application and their equivalents.
These and other aspects of the present application will be more readily apparent from the following description.
The technical scheme provided by the application at least brings the following beneficial effects:
based on any one of the above aspects, the present application provides a message transmission method, where a simplified identifier of a second node device for transmitting an initial message is obtained, where a byte length of the simplified identifier is smaller than a byte length of the initial identifier of the second node device, a destination address corresponding to the simplified identifier of the second node device is obtained, a destination message is generated, and then the destination message is sent to the second node device according to the destination address. Therefore, the initial identifier in the path sequence carried by the message header can be replaced by the simplified identifier with shorter byte length, the byte length of the message header of the initial message is effectively shortened, and the message transmission efficiency is improved.
Drawings
Fig. 1 is a schematic structural diagram of a message transmission system according to an embodiment of the present application;
fig. 2 is a schematic hardware structure diagram of a communication device according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of another hardware structure of a communication device according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a message transmission method according to an embodiment of the present application;
fig. 5 is a schematic flowchart of another message transmission method according to an embodiment of the present application;
fig. 6 is a schematic flowchart of another message transmission method according to an embodiment of the present application;
fig. 7 is a schematic flowchart of another message transmission method according to an embodiment of the present application;
fig. 8 is a schematic flowchart of another message transmission method according to an embodiment of the present application;
fig. 9 is a schematic flowchart of another message transmission method according to an embodiment of the present application;
fig. 10 is a schematic flowchart of another message transmission method according to an embodiment of the present application;
fig. 11 is a schematic flowchart of another message transmission method according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a message transmission apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
For the convenience of clearly describing the technical solutions of the embodiments of the present application, in the embodiments of the present application, the terms "first" and "second" are used to distinguish the same items or similar items with basically the same functions and actions, and those skilled in the art can understand that the terms "first" and "second" are not used to limit the quantity and execution order.
As described in the background art, the existing message transmission method has a long message header byte length, which affects the message transmission efficiency.
In view of the foregoing problems, an embodiment of the present application provides a message transmission method, which obtains a simplified identifier of a second node device for transmitting an initial message, where a byte length of the simplified identifier is smaller than a byte length of the initial identifier of the second node device, then obtains a destination address corresponding to the simplified identifier of the second node device, generates a target message, and then sends the target message to the second node device according to the destination address. Therefore, the initial identifier in the path sequence carried by the message header can be replaced by the simplified identifier with shorter byte length, the byte length of the message header of the initial message is effectively shortened, and the message transmission efficiency is improved.
The message transmission method is suitable for a message transmission system. Fig. 1 shows a structure of the message transmission system. As shown in fig. 1, the message transmission system includes: a first node device 101, a second node device 102 and a server 103.
The first node apparatus 101 and the second node apparatus 102 are node apparatuses in the routing network, and the second node apparatus 102 is a next hop node of the first node apparatus 101. The server 103 is in communication connection with the first node apparatus 101 and the second node apparatus 102, respectively.
In practical applications, the server 103 may connect a plurality of node devices. The node devices include a first node device 101 and a second node device 102.
Alternatively, the routing network may be an SRv6 network.
Alternatively, the first node apparatus 101 and the second node apparatus 102 in fig. 1 may be network apparatuses such as routers and switches.
The server 103 in fig. 1 may be one server in a server cluster (composed of a plurality of servers), a chip in the server, a system on chip in the server, or a Virtual Machine (VM) deployed on a physical machine, which is not limited in this embodiment of the present invention.
The basic hardware structure of the first node apparatus 101, the second node apparatus 102 and the server 103 in the communication system is similar, and all include the elements included in the communication device shown in fig. 2 or fig. 3. The hardware configurations of the first node apparatus 101, the second node apparatus 102, and the server 103 will be described below by taking the communication device shown in fig. 2 and 3 as an example.
Fig. 2 is a schematic diagram of a hardware structure of a communication device according to an embodiment of the present disclosure. The communication device comprises a processor 21, a memory 22, a communication interface 23, a bus 24. The processor 21, the memory 22 and the communication interface 23 may be connected by a bus 24.
The processor 21 is a control center of the communication apparatus, and may be a single processor or a collective term for a plurality of processing elements. For example, the processor 21 may be a Central Processing Unit (CPU), other general-purpose processors, or the like. Wherein a general purpose processor may be a microprocessor or any conventional processor or the like.
For one embodiment, processor 21 may include one or more CPUs, such as CPU 0 and CPU 1 shown in FIG. 2.
The memory 22 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that may store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that may store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium or other magnetic storage device, 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.
In a possible implementation, the memory 22 may exist separately from the processor 21, and the memory 22 may be connected to the processor 21 via a bus 24 for storing instructions or program codes. The message transmission method provided by the following embodiments of the present invention can be implemented when the processor 21 calls and executes instructions or program codes stored in the memory 22.
In the embodiment of the present application, the software programs stored in the memory 22 are different for the first node apparatus 101, the second node apparatus 102, and the server 103, so that the functions implemented by the first node apparatus 101, the second node apparatus 102, and the server 103 are different. The functions performed by the devices will be described in connection with the following flow charts.
In another possible implementation, the memory 22 may also be integrated with the processor 21.
The communication interface 23 is used for connecting the communication device with other devices through a communication network, which may be an ethernet, a radio access network, a Wireless Local Area Network (WLAN), or the like. The communication interface 23 may include a receiving unit for receiving data, and a transmitting unit for transmitting data.
The bus 24 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an extended ISA (enhanced industry standard architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 2, but it is not intended that there be only one bus or one type of bus.
Fig. 3 shows another hardware configuration of the communication apparatus in the embodiment of the present invention. As shown in fig. 3, the communication device may include a processor 31 and a communication interface 32. The processor 31 is coupled to a communication interface 32.
The function of the processor 31 may refer to the description of the processor 21 above. The processor 31 also has a memory function and can function as the memory 22.
The communication interface 32 is used to provide data to the processor 31. The communication interface 32 may be an internal interface of the communication device, or may be an external interface (corresponding to the communication interface 23) of the communication device.
It is noted that the configuration shown in fig. 2 (or fig. 3) does not constitute a limitation of the communication apparatus, which may include more or less components than those shown in fig. 2 (or fig. 3), or combine some components, or a different arrangement of components, in addition to the components shown in fig. 2 (or fig. 3).
The following describes a message transmission method provided in an embodiment of the present application in detail with reference to the accompanying drawings.
The message transmission method provided by the embodiment of the application comprises the following steps: the method includes a process of establishing an index relationship between the node device and the simplified identifier by the server (referred to as an "index relationship establishment process" for short) and a process of performing message transmission from the first node device to the second node device corresponding to the simplified identifier of the second node device (referred to as a "message transmission process" for short).
The "index relationship establishing flow" is described first below.
As shown in fig. 4, the method of "index relationship establishing flow" is applied to a server, and includes: S401-S402.
S401, the server obtains the initial identification of the node equipment.
Specifically, in order to enable the server to establish the simplified identifier of the node device with the byte length smaller than the initial identifier of the node device, the server may obtain the initial identifier of the node device.
The node equipment comprises first node equipment and second node equipment.
Optionally, the method for the server to obtain the initial identifier of the node device may be to receive the initial identifier sent by the node device.
Optionally, before the server receives the initial identifier sent by the node device, a request message for obtaining the initial identifier may be sent to the node device, and the node device sends the initial identifier to the server in response to the request message.
Optionally, when the initial identifier of the node device is changed, a message for changing the initial identifier may be sent to the server.
Optionally, the node device may also periodically send the updated initial identifier to the server.
Alternatively, the initial identification may be a standard SID.
S402, the server establishes an index relation between the node equipment and the simplified identifier.
Specifically, after the initial identifier of the node device is obtained, the server may establish a simplified identifier of the node device whose byte length is smaller than the initial identifier of the node device, so as to obtain an index relationship between the node device and the simplified identifier.
The simplified identifiers correspond to the node devices one to one.
Optionally, when the initial identifier is the standard SID, the byte length of the simplified identifier of the standard SID is any length smaller than 128 bits, and may be specifically set according to actual requirements.
Illustratively, the server obtains that the initial identifier of the node device 1 is the standard SID "AAAA" (128bit), the initial identifier of the node device 2 is the standard SID "BBBB" (128bit), and the initial identifier of the node device 3 is the standard SID "CCCC" (128bit), and the established index relationship is as follows: the simplified identification of the node device 1 is "a" (32bit), the simplified identification of the node device 2 is "B" (32bit), and the simplified identification of the node device 3 is "C" (32 bit).
The "message transmission flow" is described first.
As shown in fig. 5, the method of "message transmission flow" is applied to the first node device, and includes: S501-S504.
S501, the first node device obtains a simplified identifier of a second node device for transmitting an initial message.
Wherein the byte length of the reduced identification is smaller than the byte length of the initial identification of the second node device.
Specifically, in the message transmission process, the first node device may extract, from the simplified identifier sequence for transmitting the initial message carried by the message header of the initial message, the simplified identifier of the next-hop node device from the simplified identifier of the first node device, and determine the simplified identifier of the second node device.
The simplified identification sequence is composed of a plurality of simplified identifications, and the byte length of the simplified identification sequence is smaller than that of the path sequence.
Optionally, the first node device may be a source node device or an intermediate node device.
Optionally, the simplified identification sequence may be established by the first node device, or may be established by the server.
Optionally, the initial message may be any SRv6 message.
S502, the first node device obtains a destination address corresponding to the simplified identification of the second node device.
Specifically, after obtaining the simplified identifier of the second node device, the first node device may obtain a destination address corresponding to the simplified identifier of the second node device, so that the band transmission data in the initial message is transmitted to the second node device indicated by the destination address.
Optionally, after obtaining the simplified identifier of the second node device, the first node device may send, to the server, a target request message including the simplified identifier of the second node device. The server responds to the target request message, reads the pre-established index relation between the node equipment and the simplified identification, determines the initial identification of the second node equipment corresponding to the simplified identification of the second node equipment, and sends a target response message including the initial identification of the second node equipment to the first node equipment. The first node device determines an initial identity of the second node device as the destination address in response to the target response message.
Illustratively, the index relationship established by the preset server is as follows: the simplified identification of the node device 1 is "a" (32bit), the simplified identification of the node device 2 is "B" (32bit), and the simplified identification of the node device 3 is "C" (32 bit). The simplified identifier of the second node device acquired by the first node device is "a". The first node device sends a target request message including a reduced identification "a" to the server. The server determines that the initial identifier of the second node device corresponding to the simplified identifier "A" is a standard SID "AAAA", and transmits a target response message including the standard SID "AAAA" to the first node device. The first node apparatus determines the standard SID "AAAA" as the destination address.
S503, the first node equipment generates a target message according to the destination address and the initial message.
Specifically, after the destination address corresponding to the simplified identifier of the second node device is obtained, the first node device generates a target message according to the destination address and the initial message.
Optionally, when the first node device is a source node device, the first node device adds the destination address to the initial message to generate a target message.
And when the first node equipment is the intermediate node equipment, the first node equipment updates the initial address in the initial message into the destination address to obtain the target message.
S504, the first node device sends the target message to the second node device according to the destination address.
Specifically, after generating the target packet, the first node device may transmit the target packet to the second node device indicated by the destination address according to the destination address carried in the packet header of the target packet.
Optionally, the second node device may be an intermediate node device or a tail node device.
In an embodiment, with reference to fig. 5, as shown in fig. 6, when the simplified identifier sequence is established by the first node device, the method for the first node device to obtain the simplified identifier of the second node device for transmitting the initial packet in S501 specifically includes: S601-S603.
S601, the first node equipment sends a first request message to the server.
The first request message is used for requesting to acquire an index relationship between the node equipment and the simplified identifier, which is pre-established by the server.
Specifically, in the message transmission process, after acquiring the initial message, the first node device may send a first request message to the server, so that the first node device acquires an index relationship between the node device and the simplified identifier, which is pre-established by the server.
S602, the first node equipment receives the index relation sent by the server.
Specifically, after the first node device sends the first request message to the server, the server responds to the first request message and sends the pre-established index relationship between the node device and the simplified identifier to the first node device, so that the first node device can determine the simplified identifier sequence according to the path sequence for transmitting the initial packet.
S603, the first node device reads the index relation and determines the simplified identification corresponding to the second node device.
Specifically, after receiving the index relationship, the first node device may replace the path sequence carried in the packet header of the initial packet with the simplified identifier sequence, and then extract the simplified identifier of the next-hop node device of the simplified identifier of the first node device from the simplified identifier sequence, and determine the simplified identifier of the second node device.
Illustratively, the index relationship established by the preset server is as follows: the simplified identification of the node device 1 is "a" (32bit), the simplified identification of the node device 2 is "B" (32bit), and the simplified identification of the node device 3 is "C" (32 bit). The path sequence for transmitting the initial packet acquired by the node device 3 is "node device 3-node device 1-node device 2".
After receiving the initial message, the node device 3 sends a first request message to the server. The server transmits the index relationship to the node apparatus 3 in response to the first request message. The node device 3 replaces the path sequence carried in the packet header of the initial packet with the simplified identifier sequence "C-a-B" according to the index relationship, and determines that the simplified identifier "a" of the next-hop node device is the simplified identifier of the second node device.
In an embodiment, with reference to fig. 5, as shown in fig. 7, when the simplified identifier sequence is a server establishment, the method for the first node device to obtain the simplified identifier of the second node device for transmitting the initial packet in S501 specifically includes: S701-S703.
S701, the first node equipment sends a second request message to the server.
The second request message is used for requesting to acquire the simplified identifier of the second node device.
Specifically, in the message transmission process, after the first node device obtains the initial message, the second node device may send a second request message to the server, so that the first node device obtains the simplified identifier of the second node device.
Optionally, the second request message includes an initial identifier of the first node device and a path sequence of the initial packet.
S702, the server reads the pre-established index relationship between the node equipment and the simplified identifier, and determines the simplified identifier of the second node equipment.
Specifically, after the first node device sends the second request message to the server, the server responds to the second request message to acquire a path sequence for transmitting the initial packet. And then, the server reads the pre-established index relationship between the node equipment and the simplified identifier, and determines the simplified identifier corresponding to the next-hop node equipment of the first node equipment in the path sequence as the simplified identifier of the second node equipment.
Illustratively, the index relationship established by the preset server is as follows: the simplified identification of the node device 1 is "a" (32bit), the simplified identification of the node device 2 is "B" (32bit), and the simplified identification of the node device 3 is "C" (32 bit). The path sequence for transmitting the initial packet acquired by the node device 3 is "node device 3-node device 1-node device 2".
After receiving the initial message, the node device 3 sends a second request message to the server. The server responds to the second request message, obtains a path sequence for transmitting the initial message as 'node equipment 3-node equipment 1-node equipment 2', determines that the next hop node equipment of the node equipment 3 is the node equipment 1, and determines the simplified identifier 'A' of the node equipment 1 as the simplified identifier of the second node equipment.
S703, the first node device receives the simplified identifier of the second node device sent by the server.
The simplified identifier of the second node device is determined by the server reading the pre-established index relationship between the node device and the simplified identifier.
Specifically, after the server determines the simplified identifier of the second node device, the first node device may receive the simplified identifier of the second node device sent by the server.
In an embodiment, with reference to fig. 5, as shown in fig. 8, when the first node device is a source node device that transmits data to be transmitted, the method for the first node device to obtain a simplified identifier of a second node device that is used for transmitting an initial packet in S501 specifically includes: and S801.
S801, when the first node device is a source node device for transmitting data to be transmitted, the first node device obtains simplified identifiers of all node devices for transmitting the data to be transmitted.
Specifically, when the first node device is a source node device for transmitting data to be transmitted, the first node device may obtain simplified identifiers of all node devices for transmitting the data to be transmitted, so that the first node device establishes simplified identifier sequences of all nodes for transmitting the data to be transmitted to replace a path sequence in a header of the initial packet.
In an embodiment, with reference to fig. 5, as shown in fig. 9, when the first node device is a source node device that transmits data to be transmitted, the method for generating, by the first node device in S503, a target packet according to a destination address and an initial packet specifically includes: and S901.
S901, the first node device adds the destination address to the initial message to obtain a target message.
Specifically, after the destination address corresponding to the simplified identifier of the second node device is obtained, the first node device may add the destination address to the initial message to obtain the target message.
In an embodiment, with reference to fig. 5, as shown in fig. 10, when the first node device is an intermediate node device for transmitting data to be transmitted, the method for the first node device to obtain the simplified identifier of the second node device for transmitting the initial packet in S501 specifically includes: and S1001.
S1001, when the first node device is an intermediate node device for transmitting data to be transmitted, the first node device obtains simplified identifications of next hop node devices adjacent to the first node device in all node devices for transmitting the data to be transmitted.
Specifically, when the first node device is an intermediate node device for transmitting data to be transmitted, the first node device may obtain a simplified identifier of a next hop node device adjacent to the first node device in all node devices for transmitting the data to be transmitted, so that the first node device determines a destination address of packet transmission according to the simplified identifier of the next hop node device.
In an embodiment, with reference to fig. 5, as shown in fig. 11, when the first node device is an intermediate node device that transmits data to be transmitted, the method for the first node device to generate the target packet according to the destination address and the initial packet in S503 specifically includes: s1101.
S1101, the first node equipment updates the initial address in the initial message to be a destination address so as to obtain a target message.
Specifically, after the destination address corresponding to the simplified identifier of the second node device is obtained, the first node device may update the initial address in the initial message to the destination address, so as to obtain the target message.
In summary, in the message transmission process, the message transmission apparatus in the embodiment of the present application obtains the simplified identifier of the second node device for transmitting the initial message, where a byte length of the simplified identifier is smaller than a byte length of the initial identifier of the second node device, then obtains the destination address corresponding to the simplified identifier of the second node device, generates the target message, and then sends the target message to the second node device according to the destination address. Therefore, the initial identifier in the path sequence carried by the message header can be replaced by the simplified identifier with shorter byte length, the byte length of the message header of the initial message is effectively shortened, and the message transmission efficiency is improved.
The scheme provided by the embodiment of the application is mainly introduced from the perspective of a method. To implement the above functions, it includes hardware structures and/or software modules for performing the respective functions. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the terminal may be divided into the functional modules according to the method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. Optionally, the division of the modules in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 12 is a schematic structural diagram of a message transmission apparatus according to an embodiment of the present application. The message transmission apparatus may be configured to execute the message transmission method shown in fig. 4, fig. 5, fig. 6, fig. 7, fig. 8, fig. 9, fig. 10, or fig. 11. The message transmission apparatus shown in fig. 12 includes: an acquisition unit 1201, a generation unit 1202, and a transmission unit 1203.
An obtaining unit 1201, configured to obtain a simplified identifier of a second node device used for transmitting an initial packet. For example, in conjunction with fig. 5, the obtaining unit 1201 is configured to perform S501.
The obtaining unit 1201 is further configured to obtain a destination address corresponding to the simplified identifier of the second node device. For example, in conjunction with fig. 5, the acquisition unit 1201 is configured to execute S502.
A generating unit 1202, configured to generate a target packet according to the destination address and the initial packet acquired by the acquiring unit 1201. For example, in conjunction with fig. 5, the generation unit 1202 is configured to perform S503.
A sending unit 1203, configured to send the target packet generated by the generating unit 1202 to the second node device according to the destination address acquired by the acquiring unit 1201. For example, in conjunction with fig. 5, the sending unit 1203 is configured to execute S504.
Optionally, the obtaining unit 1201 is specifically configured to: sending a first request message to a server; the first request message is used for requesting to acquire an index relation between the node equipment and the simplified identifier which is pre-established by the server; receiving an index relation sent by a server; and reading the index relation, and determining the simplified identification corresponding to the second node equipment. For example, in conjunction with fig. 6, the obtaining unit 1201 is configured to execute S601.
Optionally, the obtaining unit 1201 is specifically configured to: sending a second request message to the server; the second request message is used for requesting to acquire the simplified identifier of the second node equipment; receiving a simplified identifier of the second node equipment sent by the server; the simplified identifier of the second node device is determined by the server reading the pre-established index relationship between the node device and the simplified identifier. For example, in conjunction with fig. 7, the obtaining unit 1201 is configured to execute S701.
Optionally, the obtaining unit 1201 is specifically configured to: when the first node device is a source node device for transmitting data to be transmitted, simplified identifiers of all node devices for transmitting the data to be transmitted are obtained. For example, in conjunction with fig. 8, the acquisition unit 1201 is configured to execute S801.
The obtaining unit 1201 is specifically configured to: when the first node device is an intermediate node device for transmitting data to be transmitted, simplified identifiers of next hop node devices adjacent to the first node device in all the node devices for transmitting the data to be transmitted are obtained. For example, in conjunction with fig. 10, the acquisition unit 1201 is configured to execute S1001.
Optionally, when the first node device is a source node device, the generating unit 1202 is specifically configured to: the destination address acquired by the acquiring unit 1201 is added to the initial message to obtain a target message. For example, in conjunction with fig. 10, the generation unit 1202 is configured to execute S901.
Optionally, when the first node device is an intermediate node device, the generating unit 1202 is specifically configured to: the initial address in the initial message is updated to the destination address acquired by the acquiring unit 1201, so as to obtain the target message. For example, in conjunction with fig. 11, the generation unit 1202 is configured to execute S1101.
An embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes computer-executable instructions, and when the computer-executable instructions are executed on a computer, the computer is enabled to execute the message transmission method provided in the foregoing embodiment.
The embodiment of the present application further provides a computer program, where the computer program may be directly loaded into the memory and contains a software code, and the computer program is loaded and executed by the computer, so as to implement the message transmission method provided in the foregoing embodiment.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, 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-readable storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical function division, and there may be other division ways in actual implementation. For example, various elements or components may be combined or may be integrated into another device, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form. Units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed to a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (14)

1. A message transmission method is applied to a first node device, and comprises the following steps:
acquiring a simplified identifier of second node equipment for transmitting an initial message; the byte length of the simplified identifier is less than the byte length of the initial identifier of the second node device;
acquiring a destination address corresponding to the simplified identifier of the second node device;
generating a target message according to the destination address and the initial message;
and sending the target message to the second node equipment according to the destination address.
2. The message transmission method according to claim 1, wherein the obtaining of the simplified identifier of the second node device for transmitting the initial message specifically includes:
sending a first request message to a server; the first request message is used for requesting to acquire an index relation between node equipment and a simplified identifier which is pre-established by the server;
receiving the index relation sent by the server;
and reading the index relation, and determining the simplified identification corresponding to the second node equipment.
3. The message transmission method according to claim 1, wherein the obtaining of the simplified identifier of the second node device for transmitting the initial message specifically includes:
sending a second request message to the server; the second request message is used for requesting to acquire the simplified identifier of the second node device;
receiving a simplified identifier of the second node device sent by the server; and the simplified identifier of the second node device is determined by the server reading the pre-established index relationship between the node device and the simplified identifier.
4. The message transmission method according to claim 1, wherein the initial message and the target message comprise data to be transmitted; the obtaining of the simplified identifier of the second node device for transmitting the initial packet specifically includes:
when the first node equipment is source node equipment for transmitting the data to be transmitted, acquiring simplified identifiers of all node equipment for transmitting the data to be transmitted;
and when the first node equipment is the intermediate node equipment for transmitting the data to be transmitted, acquiring simplified identifications of next hop node equipment adjacent to the first node equipment in all the node equipment for transmitting the data to be transmitted.
5. The message transmission method according to claim 4, wherein, when the first node device is the source node device, the generating a target message according to the destination address and the initial message specifically includes:
and adding the destination address into the initial message to obtain the target message.
6. The message transmission method according to claim 4, wherein, when the first node device is the intermediate node device, the generating a target message according to the destination address and the initial message specifically includes:
and updating the initial address in the initial message to the destination address to obtain the target message.
7. A message transmission apparatus, comprising: an acquisition unit, a generation unit and a transmission unit;
the acquiring unit is used for acquiring a simplified identifier of a second node device for transmitting an initial message; the byte length of the simplified identifier is less than the byte length of the initial identifier of the second node device;
the obtaining unit is further configured to obtain a destination address corresponding to the simplified identifier of the second node device;
the generating unit is used for generating a target message according to the destination address and the initial message acquired by the acquiring unit;
the sending unit is configured to send the target packet generated by the generating unit to the second node device according to the destination address acquired by the acquiring unit.
8. The message transmission apparatus according to claim 7, wherein the obtaining unit is specifically configured to:
sending a first request message to a server; the first request message is used for requesting to acquire an index relation between node equipment and a simplified identifier which is pre-established by the server;
receiving the index relation sent by the server;
and reading the index relation, and determining the simplified identification corresponding to the second node equipment.
9. The message transmission apparatus according to claim 7, wherein the obtaining unit is specifically configured to:
sending a second request message to the server; the second request message is used for requesting to acquire the simplified identifier of the second node device;
receiving a simplified identifier of the second node device sent by the server; and the simplified identifier of the second node device is determined by the server reading the pre-established index relationship between the node device and the simplified identifier.
10. The message transmission apparatus according to claim 7, wherein the obtaining unit is specifically configured to:
when the first node equipment is source node equipment for transmitting the data to be transmitted, acquiring simplified identifiers of all node equipment for transmitting the data to be transmitted;
and when the first node equipment is the intermediate node equipment for transmitting the data to be transmitted, acquiring simplified identifications of next hop node equipment adjacent to the first node equipment in all the node equipment for transmitting the data to be transmitted.
11. The message transmission apparatus according to claim 10, wherein when the first node device is the source node device, the generating unit is specifically configured to:
and adding the destination address acquired by the acquisition unit into the initial message to obtain the target message.
12. The message transmission apparatus according to claim 10, wherein when the first node device is the intermediate node device, the generating unit is specifically configured to:
and updating the initial address in the initial message to the destination address acquired by the acquisition unit to obtain the target message.
13. A message transmission device is characterized by comprising a memory and a processor; the memory is used for storing computer execution instructions, and the processor is connected with the memory through a bus; the processor executes the computer-executable instructions stored by the memory when the message transmitting apparatus is operating to cause the message transmitting apparatus to perform the message transmitting method of any of claims 1-6.
14. A computer-readable storage medium comprising computer-executable instructions that, when executed on a computer, cause the computer to perform the messaging method of any of claims 1-6.
CN202111439001.2A 2021-11-29 2021-11-29 Message transmission method, device and storage medium Active CN114157601B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111439001.2A CN114157601B (en) 2021-11-29 2021-11-29 Message transmission method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111439001.2A CN114157601B (en) 2021-11-29 2021-11-29 Message transmission method, device and storage medium

Publications (2)

Publication Number Publication Date
CN114157601A true CN114157601A (en) 2022-03-08
CN114157601B CN114157601B (en) 2024-03-29

Family

ID=80454846

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111439001.2A Active CN114157601B (en) 2021-11-29 2021-11-29 Message transmission method, device and storage medium

Country Status (1)

Country Link
CN (1) CN114157601B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105208022A (en) * 2015-09-14 2015-12-30 北京交通大学 Alarm information generation method and device
CN111628995A (en) * 2020-05-26 2020-09-04 新华三信息安全技术有限公司 SID compression method, SID compression device, SID compression equipment and storage medium based on SRv6
CN112804148A (en) * 2021-03-24 2021-05-14 新华三信息安全技术有限公司 Message forwarding method and device
WO2021135468A1 (en) * 2019-12-30 2021-07-08 华为技术有限公司 Segment identifier determining method and device
WO2021179732A1 (en) * 2020-03-10 2021-09-16 中兴通讯股份有限公司 Message encapsulating method, message forwarding method, notification method, electronic device, and storage medium
CN113438160A (en) * 2020-03-23 2021-09-24 中兴通讯股份有限公司 Routing method, routing device and computer readable storage medium
CN113709031A (en) * 2021-08-30 2021-11-26 烽火通信科技股份有限公司 Method and device for restricting transmission and distribution of route

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105208022A (en) * 2015-09-14 2015-12-30 北京交通大学 Alarm information generation method and device
WO2021135468A1 (en) * 2019-12-30 2021-07-08 华为技术有限公司 Segment identifier determining method and device
CN113132229A (en) * 2019-12-30 2021-07-16 华为技术有限公司 Segment identifier determination method and device
WO2021179732A1 (en) * 2020-03-10 2021-09-16 中兴通讯股份有限公司 Message encapsulating method, message forwarding method, notification method, electronic device, and storage medium
CN113438160A (en) * 2020-03-23 2021-09-24 中兴通讯股份有限公司 Routing method, routing device and computer readable storage medium
CN111628995A (en) * 2020-05-26 2020-09-04 新华三信息安全技术有限公司 SID compression method, SID compression device, SID compression equipment and storage medium based on SRv6
CN112804148A (en) * 2021-03-24 2021-05-14 新华三信息安全技术有限公司 Message forwarding method and device
CN113709031A (en) * 2021-08-30 2021-11-26 烽火通信科技股份有限公司 Method and device for restricting transmission and distribution of route

Also Published As

Publication number Publication date
CN114157601B (en) 2024-03-29

Similar Documents

Publication Publication Date Title
WO2018156421A1 (en) Load balancing in distributed computing systems
CN111431803A (en) Routing method and device
CN111510386B (en) Method and device for processing message
CN112583745A (en) Method, equipment and system for forwarding message in SR network
CN106921578B (en) Method and device for generating forwarding table item
JP7448597B2 (en) Message generation method and device and message processing method and device
EP4024782A1 (en) Method by which host network performance requirements may be programmed, device and system
KR102579060B1 (en) Routing information sending method, packet sending method, and related apparatus
CN113179215B (en) Networking communication method, system, node device, storage medium and electronic device
CN114650255B (en) Message processing method and network equipment
CN111464443B (en) Message forwarding method, device, equipment and storage medium based on service function chain
US20030225931A1 (en) Supporting multiple protocols with a single device driver
CN113452475A (en) Data transmission method, device and related equipment
CN113163276A (en) Method, device and system for issuing routing information
CN110995609A (en) Message sending method and device, electronic equipment and storage medium
CN114157601A (en) Message transmission method, device and storage medium
CN114978986A (en) Data transmission method, device and storage medium
CN115296989B (en) Subscription address configuration method, related equipment and storage medium
CN114567679B (en) Data transmission method and device
CN114125038B (en) Service scheduling method, device and storage medium
JP2023544713A (en) User group-based packet forwarding methods, devices and systems
CN115801663A (en) Route generation method, device and storage medium
CN115484152A (en) Information processing method, device and system
CN117354394A (en) Data forwarding method, device and storage medium
CN116170363A (en) Drainage method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant