CN101252508B - Apparatus and method for processing stream information - Google Patents
Apparatus and method for processing stream information Download PDFInfo
- Publication number
- CN101252508B CN101252508B CN200810008348XA CN200810008348A CN101252508B CN 101252508 B CN101252508 B CN 101252508B CN 200810008348X A CN200810008348X A CN 200810008348XA CN 200810008348 A CN200810008348 A CN 200810008348A CN 101252508 B CN101252508 B CN 101252508B
- Authority
- CN
- China
- Prior art keywords
- data structure
- information
- forwarding module
- flow
- structure information
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000012545 processing Methods 0.000 title claims description 33
- 238000003672 processing method Methods 0.000 claims abstract description 5
- 230000005540 biological transmission Effects 0.000 abstract description 9
- 230000010365 information processing Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention provides a flow information processing method and the device thereof. The method mainly comprises the steps that a main transmission module is used to acquire data structure information of the stored flow and transmit the data structure information to a standby transmission module, and according to the data structure information transmitted by the transmission module, the data structure information of the stored flow is updated through the standby transmission module. The device mainly comprises the transmission module and the standby transmission module. The embodiment of the invention ensures that the synchronization of the flow information between the transmission module and the standby transmission module is achieved, the realization is easy, and the cost is low.
Description
Technical Field
The present invention relates to the field of wireless communications, and in particular, to a method and an apparatus for processing stream information.
Background
The message forwarding model in the internet is mainly a packet-by-packet forwarding model based on the Internet Protocol (IP). In some specific application scenarios, such as Network Address Translation (NAT) scenarios, there is also a flow-based message forwarding Model according to the seven-layer protocol of the Open System interconnection Reference Model (OSI).
In order to improve the reliability of message forwarding, a flow-based forwarding model is divided into a main forwarding module and a standby forwarding module, and the identity of each module and the corresponding relation of the identity and the standby forwarding module are controlled by a control module. Under normal conditions, only the main forwarding module processes the stream. The standby forwarding module is used as a backup and replaces the main forwarding module to work in time when the main forwarding module fails, so that the service is not interrupted.
The implementation principle of a backup method of stream information in the prior art is shown in fig. 1, and the specific processing procedure is as follows: the control module sends the configuration information to the main forwarding module and the standby forwarding module respectively. The main forwarding module collects, creates and stores a flow table of the flow information, and the control module reads the flow table information from the main forwarding module and issues the flow table information to the standby forwarding module.
The backup method of the stream information has the following disadvantages: the complexity of the control module is increased, the realization difficulty is high, the execution efficiency is reduced, and the speed of stream information backup is slow; the coupling relation among all the modules is increased, the maintenance is inconvenient, and the cost is high.
The implementation principle of another backup method for stream information in the prior art is shown in fig. 2, and the specific processing procedure is as follows: the main forwarding module copies one part of the flow and forwards the flow to the standby forwarding module, and the standby forwarding module collects and learns the flow table information according to the flow sent by the main forwarding module, so that the backup of the flow table information between the main forwarding module and the standby forwarding module is realized. The control module is responsible for maintaining the identity marks of the main-use/standby forwarding modules and the corresponding relation of the identity marks.
The backup method of the stream information has the following disadvantages: the main forwarding module needs to send the copied flow information to the standby forwarding module while performing normal flow forwarding, thereby reducing the processing capability of the main forwarding module for normal flow forwarding.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for processing stream information, thereby solving the defects of high complexity, high cost, slow speed of stream information backup, reduction of stream forwarding processing capacity of a main forwarding module and the like of a system in the prior scheme,
the purpose of the embodiment of the invention is realized by the following technical scheme:
a method for processing stream information, comprising:
the main forwarding module obtains data structure information of a stream stored by the main forwarding module, and sends the data structure information to the standby forwarding module, wherein the data structure information of the stream comprises: the DATA processing method comprises the steps that KEY information KEY and DATA information DATA of a flow are obtained, the KEY of the flow is used for identifying the flow, the DATA of the flow comprises the attribute of the flow and the operation action of a message in the flow, and the KEY and the DATA of the flow correspond to each other;
and the standby forwarding module updates the data structure information of the stored stream according to the data structure information sent by the main forwarding module.
A processing device of flow information comprises a main forwarding module, wherein the main forwarding module specifically comprises:
the DATA structure information creating module is used for creating and storing DATA structure information of the flow, the DATA structure information comprises flow KEY information KEY and DATA information DATA, the flow KEY is used for identifying the flow, the flow DATA comprises flow attributes and operation actions of messages in the flow, and the flow KEY and the flow DATA correspond to the flow;
a data structure information acquisition module for acquiring the data structure information of the stream stored in the data structure information creation module, encapsulating the data structure information into a backup message,
and the data structure information sending module is used for sending the backup message packaged by the data structure information acquisition module to the standby forwarding module.
A processing device of flow information comprises a standby forwarding module, wherein the standby forwarding module specifically comprises:
the DATA structure information storage module is used for storing DATA structure information of the flow, the DATA structure information comprises flow KEY information KEY and DATA DATA, the flow KEY is used for identifying the flow, the flow DATA comprises flow attributes and operation actions of messages in the flow, and the flow KEY and the flow DATA correspond to the flow;
the data structure information receiving module is used for receiving the backup message which carries the data structure information of the stream and is sent by the main forwarding module;
and the data structure information updating module is used for updating the data structure information of the stream stored in the data structure information storage module according to the backup message carrying the data structure information of the stream received by the data structure information receiving module.
An apparatus for processing stream information, comprising:
the main forwarding module is used for creating DATA structure information of the stream, the DATA structure information comprises KEY information of the stream packet and DATA information DATA, generating a backup message according to the DATA structure information, and sending the backup message carrying the DATA structure information to the standby forwarding module;
and the standby forwarding module is used for receiving the backup message which is sent by the main forwarding module and carries the data structure information of the stream, and updating the stored data structure information of the stream according to the received data structure information.
It can be seen from the technical solutions provided in the embodiments of the present invention that, in the embodiments of the present invention, the data structure information of the stream stored in the active forwarding module is sent to the standby forwarding module by the active forwarding module, and the standby forwarding module updates the data structure information of the stream stored in the standby forwarding module according to the data structure information sent by the active forwarding module. Therefore, the synchronization of the flow information between the main forwarding module and the standby forwarding module can be realized quickly, and the method is simple to realize and low in cost.
Drawings
Fig. 1 is a schematic diagram illustrating an implementation of a backup method for streaming information in the prior art;
fig. 2 is a schematic diagram of another implementation of a backup method for stream information in the prior art;
fig. 3 is a processing flow chart of a master forwarding module in the method for processing stream information according to the embodiment of the present invention;
fig. 4 is a flowchart illustrating processing of a standby forwarding module in a method for processing stream information according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a device for processing stream information according to an embodiment of the present invention.
Detailed Description
In the embodiment of the invention, based on the existing Transmission Control Protocol (TCP)/IP Protocol family, each flow is processed by using a KEY (KEY) and a DATA (DATA) mode by using a main forwarding module and a standby forwarding module, wherein the KEY can be composed of a plurality of KEYs,
the main forwarding module accesses or regularly traverses the DATA information of the stored stream in real time, and sequentially reads out all DATA. And sequentially reading the KEY corresponding to each DATA from the KEY information of the stored stream according to the corresponding relation between the DATA and the KEY. And sending a backup message carrying all KEY and corresponding DATA information to the standby forwarding module.
After receiving the backup message, the standby forwarding module updates the KEY and DATA information in the stored flow table according to the flow table entry carried in the backup message, namely the KEY and the corresponding DATA information.
The processing flow of the active forwarding module in the processing method of the stream information provided in the embodiment of the present invention is shown in fig. 3, and includes the following processing steps:
step 31, in this embodiment, the KEY of the flow is composed of a five-tuple of the packet in the flow (source IP + destination IP + protocol number + source port number + destination port number), and may identify a certain flow. The stream is composed of forward and reverse messages with the same keywords, the stream attribute can be that the forward message in the stream corresponds to the forward KEY, the reverse message in the stream corresponds to the reverse KEY, and the forward and reverse KEY together correspond to one DATA.
The DATA stores the attributes of the flow, the operation action of the packet in the forward and reverse directions, and the like. All KEY in the main forwarding module and the standby forwarding module form a KEY table, and all DATA form a DATA table. The KEY table, the DATA table, and the correspondence relationship between the KEY and the DATA together constitute a flow table.
In practical applications, the KEY of the flow may also be user id (user identification) information of a message in a sending flow.
The main forwarding module regularly traverses the stored flow table according to a set time interval. First, the DATA table in the flow table is traversed by DATA _ index (index of DATA), and all DATA are sequentially read from the DATA table.
In practical application, the active forwarding module may also adopt a non-timing mode, for example, after the set trigger condition is satisfied, the active forwarding module accesses the stored flow table in a real-time mode to acquire DATA information. If the flow is created/deleted/aged, the active forwarding module is triggered to access the flow table stored therein, and at this time, the active forwarding module does not need to traverse the flow table, but only needs to acquire information of the created/deleted/aged flow.
Step 32, the primary forwarding module reads the forward and reverse KEYs corresponding to each DATA from the KEY table respectively according to the correspondence between the DATA and the KEYs recorded in the flow table, and checks the consistency between the forward and reverse KEYs and the DATA, that is, checks whether the DATA and the KEYs are correct, and whether the correspondence between the DATA and the KEYs is correct.
Step 33, after determining that the positive and negative KEYs are consistent with the DATA through checking, the primary forwarding module encapsulates all the positive and negative KEYs, corresponding DATA, DATA _ index information, and an auxiliary DATA structure of the flow table into the backup message. The auxiliary DATA structure of the flow table includes information such as a main/standby flag of the forwarding module, a correspondence between the main and standby modules, and correspondence information between KEY and DATA.
And step 34, the active forwarding module sends the backup message to the standby forwarding module according to the corresponding relationship between the active and standby modules.
The processing flow of the standby forwarding module in the processing method of the stream information provided by the embodiment of the present invention is shown in fig. 4, and includes the following processing steps:
step 41, the standby forwarding module receives the backup message sent by the main forwarding module, and determines the correctness of the backup message, for example, whether the correspondence between KEY and DATA is correct or not. The standby forwarding module can determine whether the message is correct by using a checksum calculation method, for example, calculating Cyclic Redundancy Check (CRC) or simple computer parity Check (parity checksum), and a more complicated determination method uses a digital signature.
And 42, after judging that the backup message is correct, the standby forwarding module obtains the DATA _ index information from the backup message, and sequentially reads all DATA from the backup message according to the DATA _ index. Then, the DATA table stored therein is updated based on the read DATA.
And step 43, the standby forwarding module further reads out all the forward and reverse KEY from the backup message in sequence according to the corresponding relation between the forward and reverse KEY and the DATA. Then, the stored KEY table is updated according to the read positive and negative KEY.
Step 44, after the DATA table and the KEY table are updated respectively, the standby forwarding module also updates the auxiliary DATA structure of the stream stored therein according to the auxiliary DATA structure information carried in the backup message. Then, the backup message is discarded.
Through the processing flow of the main forwarding module and the standby forwarding module, the consistency of the flow table information in the standby forwarding module and the main forwarding module can be ensured.
When the control module detects that the main forwarding module has a fault, the corresponding relation between the identity mark of the main forwarding module and the identity mark of the standby forwarding module is updated, and the original standby forwarding module automatically rises to the main forwarding module to completely replace the original main forwarding module to work, so that the service is not interrupted.
After the fault of the original main forwarding module is eliminated, the system enters the system again to work, and becomes a standby forwarding module of the system or is used as the main forwarding module of the system again. The corresponding relation between the identity mark of each module and the main/standby forwarding module is refreshed by the control module.
The structure of the apparatus for processing stream information according to the embodiment of the present invention is shown in fig. 5, and includes the following modules:
the main forwarding module is configured to obtain DATA structure information of a flow stored by the main forwarding module, where the DATA structure information includes flow KEY and DATA information, the flow KEY may be a quintuple of a message in the flow or user identification information such as UserID for sending the message in the flow, the flow DATA includes a flow attribute and an operation action on the message in the flow, and the flow KEY and DATA correspond to each other. And generating a backup message according to the data structure information, and sending the backup message to a standby forwarding module. The method comprises the following steps: the device comprises a data structure information creating module, a data structure information acquiring module and a data structure information sending module.
The DATA structure information creating module is used for creating and storing DATA structure information of the stream, wherein the DATA structure information comprises KEY and DATA information of the stream.
The data structure information acquisition module is used for acquiring the data structure information of the stream stored in the data structure information creation module and packaging the data structure information into the backup message.
The data structure information sending module is used for sending the backup message packaged by the data structure information acquisition module to the standby forwarding module.
And the standby forwarding module is used for receiving the data structure information of the stream sent by the main forwarding module and updating the stored data structure information of the stream according to the received data structure information. The method comprises the following steps: the device comprises a data structure information creating module, a data structure information receiving module and a data structure information updating module.
The DATA structure information storage module is used for storing DATA structure information of the flow, the DATA structure information comprises KEY and DATA information of the flow, the KEY of the flow is used for identifying the flow, the DATA of the flow comprises flow attributes and operation actions of messages in the flow, and the KEY and the DATA of the flow correspond to the flow;
the data structure information receiving module is used for receiving a backup message which is sent by the main forwarding module and carries the data structure information of the stream;
the data structure information updating module is used for updating the data structure information of the stream stored in the data structure information storage module according to the backup message which carries the data structure information of the stream and is received by the data structure information receiving module.
In summary, in the embodiments of the present invention, the active forwarding module and the standby forwarding module cooperate with each other to quickly synchronize stream information between the active forwarding module and the standby forwarding module (e.g., at 50 ms level) without the assistance or participation of other modules. Meanwhile, the backup message flow for transmitting the synchronous data between the main forwarding module and the standby forwarding module is very low, the influence on the performance of the forwarding modules can be ignored, and the reliability of the system is improved.
The embodiment of the invention is simple to realize and low in cost. The method can realize the rapid switching of the main use/standby forwarding module, so that the service is not interrupted, and the method is safe and reliable.
The above description is only for the preferred 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 (10)
1. A method for processing stream information, comprising:
the main forwarding module obtains data structure information of the stream stored by the main forwarding module, and sends the data structure information to the standby forwarding module, wherein the data structure information comprises: the DATA processing method comprises the steps that KEY information KEY and DATA information DATA of a flow are obtained, the KEY of the flow is used for identifying the flow, the DATA of the flow comprises the attribute of the flow and the operation action of a message in the flow, and the KEY and the DATA of the flow correspond to each other;
and the standby forwarding module updates the data structure information of the stored stream according to the data structure information sent by the main forwarding module.
2. The method for processing stream information according to claim 1, wherein the KEY of the stream comprises: a quintuple of a message in a flow or a subscriber identity that sent the message in the flow.
3. The method for processing flow information according to claim 1, wherein the acquiring, by the active forwarding module, the data structure information of the flow stored in the active forwarding module specifically includes:
the main forwarding module regularly traverses the DATA information of the stored flow according to a set time interval, and sequentially reads all DATA; sequentially reading out the KEY corresponding to each DATA from the KEY information of the stored stream according to the corresponding relation between the DATA and the KEY;
or,
after the set triggering condition is met, the main forwarding module accesses the DATA information of the stored stream in real time and reads the DATA; and reading out the corresponding KEY from the KEY information of the stored stream according to the corresponding relation between the DATA and the KEY.
4. The method for processing flow information according to claim 3, wherein the sending, by the active forwarding module, the data structure information to the standby forwarding module specifically includes:
and the main forwarding module sends a backup message carrying all KEY and corresponding DATA information to the standby forwarding module.
5. The method for processing flow information according to claim 4, wherein the updating, by the standby forwarding module, the data structure information of the flow stored in the standby forwarding module according to the data structure information sent by the active forwarding module specifically includes:
and after receiving the backup message, the standby forwarding module updates the KEY and DATA information of the stored stream according to the KEY and the corresponding DATA information carried in the backup message.
6. The method for processing stream information according to claim 4 or 5, wherein the method further comprises:
the main forwarding module carries auxiliary DATA structure information of the stream in the backup message and sends the auxiliary DATA structure information to the standby forwarding module, wherein the auxiliary DATA structure comprises marks of the main forwarding module and the standby forwarding module, the corresponding relation between the main forwarding module and the standby forwarding module, and the corresponding relation information between the KEY and the DATA.
And the standby forwarding module updates the auxiliary data structure information of the storage stream according to the auxiliary data structure information carried in the backup message.
7. A device for processing flow information, comprising an active forwarding module, wherein the active forwarding module specifically includes:
the DATA structure information creating module is used for creating and storing DATA structure information of the flow, the DATA structure information comprises flow KEY information KEY and DATA information DATA, the flow KEY is used for identifying the flow, the flow DATA comprises flow attributes and operation actions of messages in the flow, and the flow KEY and the flow DATA correspond to each other;
a data structure information acquisition module for acquiring the data structure information of the stream stored in the data structure information creation module, encapsulating the data structure information into a backup message,
and the data structure information sending module is used for sending the backup message packaged by the data structure information acquisition module to the standby forwarding module.
8. The device for processing flow information is characterized by comprising a standby forwarding module, wherein the standby forwarding module specifically comprises:
the DATA structure information storage module is used for storing DATA structure information of the flow, the DATA structure information comprises flow KEY information KEY and DATA information DATA, the flow KEY is used for identifying the flow, the flow DATA comprises flow attributes and operation actions of messages in the flow, and the flow KEY and the flow DATA are corresponding to each other;
the data structure information receiving module is used for receiving the backup message which carries the data structure information of the stream and is sent by the main forwarding module;
and the data structure information updating module is used for updating the data structure information of the stream stored in the data structure information storage module according to the backup message carrying the data structure information of the stream received by the data structure information receiving module.
9. An apparatus for processing stream information, comprising:
the main forwarding module is used for creating DATA structure information of the stream, the DATA structure information comprises keyword information KEY and DATA information DATA of the stream packet, generating a backup message according to the DATA structure information, and sending the backup message carrying the DATA structure information to the standby forwarding module;
and the standby forwarding module is used for receiving the backup message which is sent by the main forwarding module and carries the data structure information of the stream, and updating the stored data structure information of the stream according to the received data structure information.
10. The apparatus for processing stream information according to claim 9, wherein:
the primary forwarding module is further configured to send auxiliary DATA structure information of the stream to the standby forwarding module, where the auxiliary DATA structure includes a flag of the primary forwarding module and the standby forwarding module, a correspondence between the primary forwarding module and the standby forwarding module, and correspondence information between KEY and DATA;
the standby forwarding module is further configured to update the auxiliary data structure information of the stored stream according to the auxiliary data structure information sent by the active forwarding module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810008348XA CN101252508B (en) | 2008-02-26 | 2008-02-26 | Apparatus and method for processing stream information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810008348XA CN101252508B (en) | 2008-02-26 | 2008-02-26 | Apparatus and method for processing stream information |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101252508A CN101252508A (en) | 2008-08-27 |
CN101252508B true CN101252508B (en) | 2010-09-15 |
Family
ID=39955703
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200810008348XA Expired - Fee Related CN101252508B (en) | 2008-02-26 | 2008-02-26 | Apparatus and method for processing stream information |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101252508B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1491000A (en) * | 2002-10-15 | 2004-04-21 | 华为技术有限公司 | Method for realizing RTP stream continuity after switching host facility with stand-by one |
CN1812409A (en) * | 2006-01-16 | 2006-08-02 | 杭州华为三康技术有限公司 | Method and system for realizing synchronization of major and auxiliary state |
-
2008
- 2008-02-26 CN CN200810008348XA patent/CN101252508B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1491000A (en) * | 2002-10-15 | 2004-04-21 | 华为技术有限公司 | Method for realizing RTP stream continuity after switching host facility with stand-by one |
CN1812409A (en) * | 2006-01-16 | 2006-08-02 | 杭州华为三康技术有限公司 | Method and system for realizing synchronization of major and auxiliary state |
Also Published As
Publication number | Publication date |
---|---|
CN101252508A (en) | 2008-08-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112738791B (en) | User information correlation backfill method, device, equipment and medium based on 5G core network | |
US7969976B2 (en) | Gateway apparatus, packet forwarding method, and program | |
CN110752943B (en) | Distributed fault diagnosis system and method for power transmission line | |
CN112822276B (en) | Substation control layer communication method and system, electronic equipment and storage medium | |
CN108600124B (en) | Network unpacking and packing method based on safety protocol | |
JP2016526863A (en) | Data processing method and apparatus | |
CN107347062A (en) | A kind of method, electronic equipment and the readable storage medium storing program for executing of daily record data processing | |
CN102394944B (en) | Method and equipment for correcting IP (Internet Protocol) address in Web access | |
US20230216758A1 (en) | Information acquisition method and apparatus, storage medium, and electronic apparatus | |
CN113315665A (en) | Message sending method, device, equipment and medium of dual-network-card terminal equipment | |
CN111787098B (en) | Earphone upgrading method and device, earphone and storage medium | |
WO2023098430A1 (en) | Data packet processing method, communication apparatus and communication system | |
CN114389792A (en) | WEB log NAT (network Address translation) front-back association method and system | |
JP5889218B2 (en) | Data transfer apparatus and data transfer method | |
US10680930B2 (en) | Method and apparatus for communication in virtual network | |
CN101252508B (en) | Apparatus and method for processing stream information | |
CN109067503B (en) | Data retransmission method and device | |
CN116095003A (en) | Address mapping method and device for Ethernet data frame and FC data frame | |
CN115617611A (en) | Generation method and device of signaling flow chart, electronic equipment and storage medium | |
WO2016184025A1 (en) | Device management method and apparatus | |
CN114189565B (en) | Head area restoration system, method and related equipment | |
WO2024087692A1 (en) | Device management method, and devices, system and storage medium | |
CN117544588B (en) | Information transmission method, system and related device | |
CN117560306B (en) | Packet loss reporting method, network switch and related device | |
CN117041272B (en) | Data processing method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20100915 Termination date: 20190226 |