CN113114569B - Method and device for unloading data stream - Google Patents

Method and device for unloading data stream Download PDF

Info

Publication number
CN113114569B
CN113114569B CN202010027710.9A CN202010027710A CN113114569B CN 113114569 B CN113114569 B CN 113114569B CN 202010027710 A CN202010027710 A CN 202010027710A CN 113114569 B CN113114569 B CN 113114569B
Authority
CN
China
Prior art keywords
message
identifier
identification
learning
value corresponding
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.)
Active
Application number
CN202010027710.9A
Other languages
Chinese (zh)
Other versions
CN113114569A (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010027710.9A priority Critical patent/CN113114569B/en
Publication of CN113114569A publication Critical patent/CN113114569A/en
Application granted granted Critical
Publication of CN113114569B publication Critical patent/CN113114569B/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/02Topology update or discovery
    • 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
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/253Routing or path finding in a switch fabric using establishment or release of connections between ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5053Lease time; Renewal aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling

Landscapes

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

Abstract

The invention discloses a method and a device for unloading data streams, and relates to the technical field of computers. One embodiment of the method comprises the following steps: determining a numerical value corresponding to a domain identifier corresponding to the message to be forwarded according to a self-learning mechanism; adding the value corresponding to the domain identifier into the message to be forwarded in the form of associated information; and transmitting the message added with the associated information to a communication unit. According to the technical means of adding the domain identifier and the corresponding numerical value in the message sent by the software to the communication unit, the communication unit can unload the data stream only through a self-learning mechanism, so that the technical defects of high cost and bandwidth expenditure for maintaining the communication unit in the prior art are overcome, and the technical effects of reducing the maintenance cost of the communication unit and the expenditure for communication between the soft communication units are achieved.

Description

Method and device for unloading data stream
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for offloading data streams.
Background
Ovs (Open VSwitch, multi-layer virtual switch) is a function commonly used in cloud computing technology, and it is also a very popular technology to enhance ovs forwarding performance through hardware offloading (offfload). In the prior art, the first packet forwarding is performed on the software in a first packet uploading mode, and meanwhile, the hardware unloading is realized by updating a flow table in hardware.
In the process of implementing the present invention, the inventor finds that at least the following problems exist in the prior art:
1. the prior art has large bandwidth overhead required to be maintained when unloading the flow table;
2. the prior art requires maintaining a hardware flow table in addition to forwarding when offloading the flow table.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a method and apparatus for offloading data streams, which can achieve the technical effects of reducing the maintenance cost of a communication unit and reducing the overhead of communication between software and hardware.
To achieve the above object, according to one aspect of an embodiment of the present invention, there is provided a method for offloading a data stream, including:
determining a numerical value corresponding to a domain identifier corresponding to the message to be forwarded according to a self-learning mechanism;
adding the value corresponding to the domain identifier into the message to be forwarded in the form of associated information;
and transmitting the message added with the associated information to a communication unit.
Optionally, adding the value corresponding to the domain identifier to the message to be forwarded in the form of path information, including:
determining the numerical value of each domain identifier in the first packet and the last packet of the message to be forwarded;
adding the domain identifier corresponding to the first packet and the corresponding numerical value into the first packet of the message to be forwarded in the form of the channel associated information;
and adding the domain identifier corresponding to the tail packet and the corresponding numerical value into the tail packet of the message to be forwarded in the form of the channel associated information.
Optionally, the message includes: quintuple and the forwarding action corresponding to the message;
wherein the five-tuple comprises: source IP address, destination IP address, protocol number, source port address, destination port address.
Optionally, the domain identification includes: learning the identification, deleting the identification and the port identification to be forwarded;
the numerical value corresponding to the learning identification is used for identifying whether the message in which the learning identification is positioned needs to be learned or not:
the numerical value corresponding to the deletion identifier is used for identifying whether the forwarding table item of the five-tuple corresponding to the message is deleted from the five-tuple;
and the numerical value corresponding to the port identification to be forwarded is used for identifying the unique identification of the forwarding port of the communication unit corresponding to the message.
Optionally, the domain identifier further includes: updating the serial number identification;
and the numerical value corresponding to the updated serial number identifier is used for identifying the serial number added and/or deleted by the maintenance serial number.
Optionally, the domain identifier further includes: a time-to-live setting identifier, a time-to-live deleting identifier and/or a time-to-live counting identifier;
the value corresponding to the survival time setting identifier is used for identifying the initial value of the value corresponding to the survival time counting identifier;
the value corresponding to the time-to-live deleting identifier is used for identifying whether the value corresponding to the time-to-live counting identifier is shortened when the message is forwarded.
Optionally, the domain identifier further includes: a tunnel information identifier;
the numerical value corresponding to the tunnel information identifier is used for identifying whether the encapsulation content of the message is replaced when the message is forwarded.
According to another aspect of an embodiment of the present invention, there is provided a method for offloading a data stream, including:
receiving a message sent by software;
judging whether the message needs to be learned or not according to a self-learning mechanism;
if yes, automatically maintaining the addition of the stream according to the message, and unloading the data stream according to the message; if not, ignoring the flow in the message;
and feeding back the learning result to the software according to a feedback mechanism.
Optionally, determining whether the message needs to be learned according to a self-learning mechanism includes:
according to a self-learning mechanism, determining a numerical value corresponding to a learning identifier in a message sent by the software; wherein the numerical value corresponds to a message which needs to be learned by a communication unit or does not need to be learned;
and determining whether the message needs to be learned or not according to the numerical value corresponding to the learning identification.
Optionally, automatically maintaining addition of a flow according to the message, and unloading a data flow according to the message, including:
acquiring a preset domain identifier in the message;
according to the preset domain identification, learning the five-tuple and the corresponding forwarding action of the message;
and automatically maintaining the addition of the flow according to the preset domain identifier.
Optionally, feeding back the learning result to the software according to a feedback mechanism, including:
generating the channel associated information of the feedback message according to the learning result;
feeding back the associated information to the software according to the feedback mechanism;
the identifier carried by the associated information comprises at least one of the following:
update sequence number identification, update operation success identification, update index identification, failure reason identification.
According to another aspect of an embodiment of the present invention, there is provided a system for offloading a data stream, including: a software section and a communication unit section;
the software part determines a domain identifier corresponding to the message to be forwarded according to a self-learning mechanism; adding the domain identifier into the message to be forwarded in the form of associated information; the message added with the channel associated information is issued to a communication unit;
the communication unit part receives a message sent by software; judging whether the message needs to be learned or not according to a self-learning mechanism; if yes, automatically maintaining the addition of the stream according to the message, and unloading the data stream according to the message; if not, ignoring the flow in the message; and feeding back the learning result to the software according to a feedback mechanism.
According to another aspect of an embodiment of the present invention, there is provided an apparatus for offloading a data stream, including:
the domain identification determining module is used for determining a numerical value corresponding to a domain identification corresponding to the message to be forwarded according to the self-learning mechanism;
the channel associated information adding module is used for adding the numerical value corresponding to the domain identifier into the message to be forwarded in the form of channel associated information;
and the message issuing module is used for issuing the message added with the associated information to the communication unit.
According to another aspect of an embodiment of the present invention, there is provided an apparatus for offloading a data stream, including:
the message receiving module is used for receiving the message sent by the software;
the learning judging module is used for judging whether the message needs to be learned or not according to a self-learning mechanism;
the self-learning module is used for: if yes, automatically maintaining the addition of the stream according to the message, and unloading the data stream according to the message; if not, ignoring the flow in the message;
and the learning result feedback module is used for feeding back the learning result to the software according to a feedback mechanism.
According to another aspect of an embodiment of the present invention, there is provided a data stream offload electronic apparatus, including:
one or more processors;
storage means for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the data stream offloading method provided by the present invention.
According to yet another aspect of an embodiment of the present invention, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the data stream offloading method provided by the present invention.
One embodiment of the above invention has the following advantages or benefits:
according to the technical means of adding the domain identifier and the corresponding numerical value in the message sent to the communication unit by the software, the communication unit can unload the data stream only through the self-learning mechanism, so that the technical defects of high cost and high bandwidth expenditure for maintaining the communication unit in the prior art are overcome, and the technical effects of reducing the maintenance cost of the communication unit and the communication expenditure between the soft communication units are achieved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main flow of a method of data stream offloading according to an embodiment of the invention;
FIG. 2 is a schematic diagram of the main flow of a method of data stream offloading according to another embodiment of the invention;
FIG. 3 is a schematic diagram of the main modules of an apparatus 300 for data stream offloading according to an embodiment of the invention;
FIG. 4 is a schematic diagram of the main modules of an apparatus 400 for data stream offloading according to yet another embodiment of the invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 6 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the prior art, when unloading a data flow in Ovs (Open VSwitch, multi-layer virtual switch), after forwarding a first packet, a flow table needs to be maintained, and a data flow is added in the flow table; after forwarding the tail packet, a flow table needs to be maintained, and one data flow is deleted in the flow table.
However, when the data stream is unloaded, that is, when the communication unit receives the data stream sent by the software, each data stream table needs to be learned, which results in the technical defect of high cost and bandwidth overhead of maintaining the communication unit in the prior art.
In an alternative embodiment of the application, a self-learning mechanism is adopted to add a channel associated message in a message sent to hardware (specifically, only a communication unit and/or a network card communication unit) by software, so that when the hardware receives the message transmitted by the software, whether the message needs to be learned or not is determined according to channel associated data in the message, and if so, the learning is performed; if the information of the associated channel is displayed without learning the message, a great deal of bandwidth overhead and maintenance cost of the communication unit are saved. The main flow for data stream offloading by software generation is shown in fig. 1. Specifically:
FIG. 1 is a schematic diagram of the main flow of a method for offloading data flows according to an embodiment of the present invention, as shown in FIG. 1, including:
step 101, determining a numerical value corresponding to a field identifier (field) corresponding to a message to be forwarded according to a self-learning mechanism;
step 102, adding the domain identifier and the corresponding numerical value into the message to be forwarded in the form of associated information;
and step 103, the message added with the associated information is issued to hardware.
In practical applications, the message needs to carry information about the data packet, such as a source IP address, a destination IP address, a protocol number, a source port address, a destination port address, and the like, and a forwarding action (action) to be performed after receiving the message. The forwarding action may include: information such as which location to forward or discard, or to which specific location, whether the maximum network segment data size needs to be changed, etc.
The communication unit automatically maintains the adding process of the data stream through self-learning of the messages transmitted by the software, thereby achieving the technical effect of reducing the cost of communication between the soft communication units.
The selection of the domain identifier can be preset according to actual needs, or can be set by software according to conditions when a message is sent.
Optionally, adding the domain identifier and the corresponding numerical value to the message to be forwarded in the form of associated information includes:
determining the numerical value of each domain identifier in the first packet and the last packet of the message to be forwarded;
adding the domain identifier corresponding to the first packet and the corresponding numerical value into the first packet of the message to be forwarded in the form of the channel associated information;
and adding the domain identifier corresponding to the tail packet and the corresponding numerical value into the tail packet of the message to be forwarded in the form of the channel associated information.
The domain identifier and the corresponding numerical value are added in the first packet, so that the effect of conveniently transmitting the data to the communication unit and learning according to the first packet can be achieved, and the effect of determining the unloading data flow can be further achieved. The technical effect of deleting the data flow corresponding to the message can be achieved by adding the domain identifier and the corresponding numerical value in the tail packet.
The domain identifier in the first packet may be the same as or different from the domain identifier in the last packet, and the values corresponding to the domain identifiers in the first packet and the last packet may be different.
Wherein, the message at least includes: quintuple and the forwarding action corresponding to the message;
wherein the five-tuple comprises: source IP address, destination IP address, protocol number, source port address, destination port address.
Optionally, the domain identification includes: learning identity (Learn), delete identity (Delete) and port identity to be forwarded (forward_port);
the numerical value corresponding to the learning identification is used for identifying whether the message in which the learning identification is positioned needs to be learned or not: the value length of the learning identifier may be set to 1 bit, specifically, the value "0" is used to indicate that the message does not need to be learned by hardware, and the value "1" is used to indicate that the message needs to be learned by hardware. The use of a value of "0" indicates that the message does not need to be learned by hardware. The task amount of part of hardware can be reduced by learning the numerical value of the identifier, the technical effect that all messages need to be read in the prior art is avoided, and further the beneficial effects of saving the communication bandwidth between the software and the hardware and improving the reliability of maintenance of the flow table by the OVS are achieved.
When the message is a message carrying tunnel (tunnel) information, a five-tuple of the message in the tunnel needs to be determined. The content of the hardware self-learning is mainly five-tuple corresponding to the message, namely source IP address, destination IP address, protocol number, source port address and destination port address information.
The numerical value corresponding to the deletion identifier is used for identifying whether the forwarding table item of the five-tuple corresponding to the message is deleted from the five-tuple; the value length of the delete flag may be set to 1 bit. Specifically, when the value of the deletion identifier is set to 0, the communication unit does not need to perform any processing on the message; when the value of the deletion identifier is set to 1, the data stream of the five-tuple corresponding to the message is deleted from the stream table.
And the numerical value corresponding to the port identification to be forwarded is used for identifying the unique identification of the forwarding port of the communication unit corresponding to the message. The numerical length of the forwarding port identification is determined according to the specification of the forwarding port corresponding device.
When the learning identifier is located in the first packet and the message needs to be learned, the value corresponding to the learning identifier is 1, and the value corresponding to the deleting identifier is 0. For the message, the value corresponding to the learning identification in the tail packet is 0, and the value corresponding to the deleting identification is 1.
Optionally, the domain identifier further includes: updating a sequence number identification (update_sn);
and the numerical value corresponding to the updated serial number identifier is used for identifying the serial number added and/or deleted by the maintenance serial number. The value length corresponding to the update sequence number identification is 16 bits. When the communication unit receives the message, a response sequence number needs to be returned, and when the response sequence number returned by the communication unit is inconsistent with the expected sequence number, the condition that the packet loss exists in the message sent to the communication unit is indicated, and a retransmission mechanism can be started at the moment.
Optionally, the domain identifier further includes: a time-to-live setting flag (ttl_set), a time-to-live deletion flag (ttl_dec), and/or a time-to-live count flag (ttl_num);
the value corresponding to the survival time setting identifier is used for identifying the initial value of the value corresponding to the survival time counting identifier;
the value corresponding to the time-to-live deleting identifier is used for identifying whether the value corresponding to the time-to-live counting identifier is shortened when the message is forwarded.
The numerical length of the time-to-live setting flag and the time-to-live deletion flag (ttl_dec) may be set to 1 bit.
Specifically, when the value of the time to live setting identifier is set to 1, setting the time to live counting identifier to the value corresponding to the time to live counting identifier in the current message; when the value of the survival time setting identifier is set to 0, the condition that any operation is not needed to be performed on the survival time counting identifier is indicated;
when the value of the time to live deletion identifier is set to 1, performing a decrementing operation on the time to live counting identifier of the message during message forwarding, and optionally, setting the decrementing value to 1; when the value of the time-to-live deletion identifier is set to 0, the fact that no operation is needed on the time-to-live counting identifier is indicated.
Optionally, the domain identifier further includes: tunnel information identification (Tunnel);
the numerical value corresponding to the tunnel information identifier is used for identifying whether the encapsulation content of the message is replaced when the message is forwarded.
Specifically, the numerical length of the tunnel information identifier may be set to 1 bit. When the value of the tunnel information identifier is set to be 1, when the message is forwarded, the outer package of the message is replaced by the outer package content of the inner message; when the value of the survival time setting identifier is set to 0, the outer packaging is not required to be added.
Optionally, the domain identifier further includes: a field identification (srcnw_before_mod) for replacing the source address. The length of the value for the field identification for the replacement source address may be set to 32 bits. Specifically, when the value of the domain identifier for replacing the source address is set to 0, the source address (i.e., the source IP address) is not modified; when the value of the domain identifier for replacing the source address is set to be non-0, the source IP address in the message quintuple is used as the source IP address to be replaced in forwarding and used for corresponding mod_nw_src in open flow.
Optionally, the domain identifier further includes: a domain identification (destnw_before_mod) for replacing the destination address. The numerical length of the field identification for replacing the destination address may be set to 32 bits. Specifically, when the value of the domain identifier for replacing the source address is set to 0, the destination address (i.e., the destination IP address) is not modified; when the value of the domain identifier for replacing the destination address is set to be non-0, the destination IP address in the message five-tuple is used as the destination IP address to be replaced in forwarding, and is used for corresponding mod_nw_dest in open flow.
The domain identification in the associated information is not limited to one or more of the above-described specific embodiments.
Fig. 2 is a schematic diagram of the main flow of a method for offloading data flows according to another embodiment of the present invention, as shown in fig. 2, including:
step S201, receiving a message sent by software;
step S202, judging whether the message needs to be learned or not according to a self-learning mechanism;
if yes, executing step S203, automatically maintaining the addition of the stream according to the message, and unloading the data stream according to the message; if not, executing step S204, and ignoring the flow in the message;
step S205, the learning result is fed back to the software according to a feedback mechanism.
Optionally, determining whether the message needs to be learned according to a self-learning mechanism includes:
according to a self-learning mechanism, determining a numerical value corresponding to a learning identification (Learn) in a message sent by the software; wherein, the value corresponds to the message (the value corresponding to the Learn is 1) which needs hardware learning or the message (the value corresponding to the Learn is 0) which does not need learning;
and determining whether the message needs to be learned or not according to the numerical value (0 or 1) corresponding to the learning identification.
Optionally, automatically maintaining addition of a flow according to the message, and unloading a data flow according to the message, including:
acquiring a preset domain identifier in the message;
according to the preset domain identification, learning a five-tuple and a corresponding forwarding action (action) of the message;
and automatically maintaining the addition of the flow according to the preset domain identifier.
In an alternative embodiment of the present application, a manner that the communication unit brings the flow information to the software through the associated information of the report packet may be adopted, so that the software knows whether to learn a successful message.
Optionally, feeding back the learning result to the software according to a feedback mechanism, including:
generating the channel associated information of the feedback message according to the learning result;
feeding back the associated information to the software according to the feedback mechanism;
the identifier carried by the associated information comprises at least one of the following:
update sequence number identification, update operation success identification, update index identification, failure reason identification.
The Update sequence number identification (update_sn) may be set to 16 bits in value for transmitting the Update sequence number that the hardware has received and completed in a message back to the software.
The value length of the update_success flag (update_success) may be set to 1 bit; the method comprises the steps of judging whether an updating operation corresponding to an updating sequence number identifier is successful or not, and if yes, setting a value corresponding to the updating operation successful identifier to be 1; if not, the corresponding value of the update operation successful identification is 0.
The Update index identifier (update_index) is used for carrying the hardware index corresponding to the learned stream table when the Update operation is successful, and the length is related to the table entry specification, and is usually 20-24bits.
The failure reason identifier (fail_reason) is used for providing the reason of failure when the update operation fails, and the length is determined according to specific implementation and is generally within 8 bits.
The numerical value corresponding to the tunnel information identifier is used for identifying whether the encapsulation content of the message is replaced when the message is forwarded.
Specifically, the numerical length of the tunnel information identifier may be set to 1 bit. When the value of the tunnel information identifier is set to be 1, when the message is forwarded, the outer package of the message is replaced by the outer package content of the inner message; when the value of the survival time setting identifier is set to 0, the outer packaging is not required to be added.
According to another aspect of an embodiment of the present invention, there is provided a system for offloading a data stream, including: a software section and a communication unit section;
the software part determines a domain identifier corresponding to the message to be forwarded according to a self-learning mechanism; adding the domain identifier into the message to be forwarded in the form of associated information; the message added with the channel associated information is issued to a communication unit;
the communication unit part receives a message sent by software; judging whether the message needs to be learned or not according to a self-learning mechanism; if yes, automatically maintaining the addition of the stream according to the message, and unloading the data stream according to the message; if not, ignoring the flow in the message; and feeding back the learning result to the software according to a feedback mechanism.
FIG. 3 is a schematic diagram of the main modules of an apparatus 300 for data stream offloading according to an embodiment of the invention; as shown in fig. 3, includes:
the domain identifier determining module 301 is configured to determine, according to a self-learning mechanism, a value corresponding to a domain identifier corresponding to a message to be forwarded;
the channel information adding module 302 is configured to add the domain identifier and the corresponding numerical value to the message to be forwarded in the form of channel information;
and the message issuing module 303 is configured to issue the message with the added associated information to a communication unit.
Optionally, adding the value corresponding to the domain identifier to the message to be forwarded in the form of path information, including:
determining the numerical value of each domain identifier in the first packet and the last packet of the message to be forwarded;
adding the domain identifier corresponding to the first packet and the corresponding numerical value into the first packet of the message to be forwarded in the form of the channel associated information;
and adding the domain identifier corresponding to the tail packet and the corresponding numerical value into the tail packet of the message to be forwarded in the form of the channel associated information.
Optionally, the message includes: quintuple and the forwarding action corresponding to the message;
wherein the five-tuple comprises: source IP address, destination IP address, protocol number, source port address, destination port address.
Optionally, the domain identification includes: learning the identification, deleting the identification and the port identification to be forwarded;
the numerical value corresponding to the learning identification is used for identifying whether the message in which the learning identification is positioned needs to be learned or not:
the numerical value corresponding to the deletion identifier is used for identifying whether the forwarding table item of the five-tuple corresponding to the message is deleted from the five-tuple;
and the numerical value corresponding to the port identification to be forwarded is used for identifying the unique identification of the forwarding port of the communication unit corresponding to the message.
Optionally, the domain identifier further includes: updating the serial number identification;
and the numerical value corresponding to the updated serial number identifier is used for identifying the serial number added and/or deleted by the maintenance serial number.
Optionally, the domain identifier further includes: a time-to-live setting identifier, a time-to-live deleting identifier and/or a time-to-live counting identifier;
the value corresponding to the survival time setting identifier is used for identifying the initial value of the value corresponding to the survival time counting identifier;
the value corresponding to the time-to-live deleting identifier is used for identifying whether the value corresponding to the time-to-live counting identifier is shortened when the message is forwarded.
Optionally, the domain identifier further includes: a tunnel information identifier;
the numerical value corresponding to the tunnel information identifier is used for identifying whether the encapsulation content of the message is replaced when the message is forwarded.
FIG. 4 is a schematic diagram of the main modules of an apparatus 400 for data stream offloading according to yet another embodiment of the invention; as shown in fig. 4, includes:
a message receiving module 401, configured to receive a message sent by software;
a learning judgment module 402, configured to judge whether the message needs to be learned according to a self-learning mechanism;
a self-learning module 403 for: if yes, automatically maintaining the addition of the stream according to the message, and unloading the data stream according to the message; if not, ignoring the flow in the message;
and the learning result feedback module 404 is configured to feedback the learning result to the software according to a feedback mechanism.
Fig. 5 illustrates an exemplary system architecture 500 in which a data stream offload method or data stream offload device of embodiments of the present invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 is used as a medium to provide communication links between the terminal devices 501, 502, 503 and the server 505. The network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 505 via the network 504 using the terminal devices 501, 502, 503 to receive or send messages or the like. Various communication client applications may be installed on the terminal devices 501, 502, 503, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 501, 502, 503 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server (by way of example only) providing support for shopping-type websites browsed by users using the terminal devices 501, 502, 503. The background management server may analyze and process the received data such as the product information query request, and feedback the processing result (e.g., the target push information, the product information—only an example) to the terminal device.
It should be noted that, the data stream offloading method provided in the embodiment of the present invention is generally executed by the server 505, and accordingly, the data stream offloading device is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, there is illustrated a schematic diagram of a computer system 600 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 6 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 6, the computer system 600 includes a central processing module (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a central processing module (CPU) 601.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose communications unit-based systems which perform the specified functions or acts, or combinations of special purpose communications units and computer instructions.
The modules involved in the embodiments of the present invention may be implemented by software, or may be implemented by a communication unit. The described modules may also be provided in a processor, for example, as: a processor includes a sending module, an obtaining module, a determining module, and a first processing module. The names of these modules do not in some cases limit the module itself, and for example, the transmitting module may also be described as "a module that transmits a picture acquisition request to a connected server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include:
determining a numerical value corresponding to a domain identifier corresponding to the message to be forwarded according to a self-learning mechanism;
adding the value corresponding to the domain identifier into the message to be forwarded in the form of associated information;
and transmitting the message added with the associated information to a communication unit.
According to the technical scheme provided by the embodiment of the invention, the following technical effects can be achieved:
according to the technical means of adding the domain identifier and the corresponding numerical value in the message sent to the communication unit by the software, the communication unit can unload the data stream only through the self-learning mechanism, so that the technical defects of high cost and high bandwidth expenditure for maintaining the communication unit in the prior art are overcome, and the technical effects of reducing the maintenance cost of the communication unit and the communication expenditure between the soft communication units are achieved.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (11)

1. A method of data stream offloading, comprising:
determining a numerical value corresponding to a domain identifier corresponding to the message to be forwarded according to a self-learning mechanism;
adding the value corresponding to the domain identifier into the message to be forwarded in the form of associated information; the domain identification comprises a learning identification, and a numerical value corresponding to the learning identification is used for identifying whether the message in which the domain identification is positioned needs to be learned or not; the adding the value corresponding to the domain identifier to the message to be forwarded in the form of associated information includes:
determining the numerical value of each domain identifier in the first packet and the last packet of the message to be forwarded;
adding the domain identifier corresponding to the first packet and the corresponding numerical value into the first packet of the message to be forwarded in the form of the channel associated information;
adding the domain identifier corresponding to the tail packet and the corresponding numerical value into the tail packet of the message to be forwarded in the form of channel associated information;
and transmitting the message added with the associated information to a communication unit.
2. The method of claim 1, wherein the message comprises: quintuple and the forwarding action corresponding to the message;
wherein the five-tuple comprises: source IP address, destination IP address, protocol number, source port address, destination port address.
3. The method of claim 1, wherein the domain identification further comprises: deleting the identification and the port identification to be forwarded;
the numerical value corresponding to the deletion identifier is used for identifying whether the forwarding table item of the five-tuple corresponding to the message is deleted from the five-tuple;
and the numerical value corresponding to the port identification to be forwarded is used for identifying the unique identification of the forwarding port of the communication unit corresponding to the message.
4. The method of claim 2, wherein the domain identification further comprises: updating the serial number identification;
and the numerical value corresponding to the updated serial number identifier is used for identifying the serial number added and/or deleted by the maintenance serial number.
5. A method according to claim 3, wherein the domain identification further comprises: a time-to-live setting identifier, a time-to-live deleting identifier and/or a time-to-live counting identifier;
the value corresponding to the survival time setting identifier is used for identifying the initial value of the value corresponding to the survival time counting identifier;
the value corresponding to the time-to-live deleting identifier is used for identifying whether the value corresponding to the time-to-live counting identifier is shortened when the message is forwarded.
6. A method according to claim 3, wherein the domain identification further comprises: a tunnel information identifier;
the numerical value corresponding to the tunnel information identifier is used for identifying whether the encapsulation content of the message is replaced when the message is forwarded.
7. A method of data stream offloading, comprising:
receiving a message sent by software;
judging whether the message needs to be learned or not according to a self-learning mechanism; judging whether the message needs to be learned according to a self-learning mechanism, wherein the method comprises the following steps: according to a self-learning mechanism, determining a numerical value corresponding to a learning identifier indicated by a domain identifier in a message sent by the software; wherein the numerical value corresponds to a message which needs to be learned by a communication unit or does not need to be learned;
determining whether the message needs to be learned according to the numerical value corresponding to the learning identification;
if yes, automatically maintaining the addition of the stream according to the message, and unloading the data stream according to the message; if not, ignoring the flow in the message;
and feeding back the learning result to the software according to a feedback mechanism.
8. The method of claim 7, wherein automatically maintaining the addition of flows based on the messages and offloading data flows based on the messages comprises:
acquiring a preset domain identifier in the message;
according to the preset domain identification, learning the five-tuple and the corresponding forwarding action of the message;
and automatically maintaining the addition of the flow according to the preset domain identifier.
9. The method of claim 8, wherein feeding back learning results to the software according to a feedback mechanism comprises:
generating the channel associated information of the feedback message according to the learning result;
feeding back the associated information to the software according to the feedback mechanism;
the identifier carried by the associated information comprises at least one of the following:
update sequence number identification, update operation success identification, update index identification, failure reason identification.
10. An electronic device for data stream offloading, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-9.
11. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-9.
CN202010027710.9A 2020-01-10 2020-01-10 Method and device for unloading data stream Active CN113114569B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010027710.9A CN113114569B (en) 2020-01-10 2020-01-10 Method and device for unloading data stream

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010027710.9A CN113114569B (en) 2020-01-10 2020-01-10 Method and device for unloading data stream

Publications (2)

Publication Number Publication Date
CN113114569A CN113114569A (en) 2021-07-13
CN113114569B true CN113114569B (en) 2023-06-02

Family

ID=76708753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010027710.9A Active CN113114569B (en) 2020-01-10 2020-01-10 Method and device for unloading data stream

Country Status (1)

Country Link
CN (1) CN113114569B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647716A (en) * 2013-11-22 2014-03-19 上海斐讯数据通信技术有限公司 A data packet rapid forwarding method and an apparatus
CN103891216A (en) * 2011-10-18 2014-06-25 思科技术公司 Fhrp optimizations for n-way gateway load balancing in fabric path switching networks
CN109274592A (en) * 2018-11-22 2019-01-25 新华三技术有限公司 MAC Address table entry processing method, device and computer-readable medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488899B (en) * 2008-01-17 2011-11-23 中兴通讯股份有限公司 MAC address learning limitation method and apparatus used in 1:1 VLAN access network
JP5594171B2 (en) * 2011-02-02 2014-09-24 富士通株式会社 Communication processing apparatus, address learning program, and address learning method
CN102209348B (en) * 2011-05-26 2015-06-17 中国电信股份有限公司 Flow downloading method and system as well as packet data network gateway
CN103686837B (en) * 2012-08-31 2017-11-14 中国电信股份有限公司 Flow discharging method, system and strategy and charging rule functions equipment
JP6086020B2 (en) * 2013-04-24 2017-03-01 富士通株式会社 Communication device, address learning method, and address learning program
US9313121B2 (en) * 2013-06-28 2016-04-12 Ciena Corporation Method and system for traffic engineered MPLS ethernet switch
CN103931144B (en) * 2013-07-08 2015-11-25 华为技术有限公司 A kind of method, apparatus and system communicated in virtual Domain
CN104639671B (en) * 2015-02-11 2018-03-20 新华三技术有限公司 MAC address learning control method and equipment in stacking
CN106470156B (en) * 2015-08-19 2020-07-10 中兴通讯股份有限公司 Method and device for forwarding message
CN108055202B (en) * 2017-12-07 2020-11-20 锐捷网络股份有限公司 Message processing equipment and method
CN108173753A (en) * 2017-12-28 2018-06-15 迈普通信技术股份有限公司 Message forwarding method, switching card, service card and distribution switch

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103891216A (en) * 2011-10-18 2014-06-25 思科技术公司 Fhrp optimizations for n-way gateway load balancing in fabric path switching networks
CN103647716A (en) * 2013-11-22 2014-03-19 上海斐讯数据通信技术有限公司 A data packet rapid forwarding method and an apparatus
CN109274592A (en) * 2018-11-22 2019-01-25 新华三技术有限公司 MAC Address table entry processing method, device and computer-readable medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Qiang Ma ; Yuna Miao ; Guangzheng Li.An autonomous learning system of maritime disciplines based on topic map.《2010 International Conference on Computer, Mechatronics, Control and Electronic Engineering》.2010,全文. *
汪波涛 ; 张 ; .基于EFM32GG230单片机的红外无线自学习***.单片机与嵌入式***应用.2014,(第12期),全文. *

Also Published As

Publication number Publication date
CN113114569A (en) 2021-07-13

Similar Documents

Publication Publication Date Title
CN110708393B (en) Method, device and system for transmitting data
CN112866111B (en) Method and device for managing flow table
KR101717000B1 (en) Method and device for packet handling
US9571417B2 (en) Processing resource access request in network
CN110581812A (en) Data message processing method and device
CN110572422A (en) Data downloading method and device
CN110545230B (en) Method and device for forwarding VXLAN message
CN114500633B (en) Data forwarding method, related device, program product and data transmission system
CN113595927A (en) Method and device for processing mirror flow in bypass mode
CN110798495B (en) Method and server for end-to-end message push in cluster architecture mode
CN112702229B (en) Data transmission method, device, electronic equipment and storage medium
CN113364887A (en) File downloading method based on FTP, proxy server and system
CN113114569B (en) Method and device for unloading data stream
CN110247847B (en) Method and device for back source routing between nodes
EP3488569B1 (en) System and method for ephemeral entries in a forwarding information base in a content centric network
CN113079055B (en) AGV operation data dynamic acquisition method and device
CN114064803A (en) Data synchronization method and device
CN111866100A (en) Method, device and system for controlling data transmission rate
CN113742617A (en) Cache updating method and device
US20180241674A1 (en) Selectively processing network packets
CN112511440A (en) Message forwarding method, system, storage medium and electronic equipment
CN113556370A (en) Service calling method and device
CN112436951A (en) Method and device for predicting flow path
US20130007369A1 (en) Transparent Cache for Mobile Users
CN115242733B (en) Message multicast method, multicast gateway, electronic device and storage medium

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