CN101808035A - Session record optimization method and device - Google Patents
Session record optimization method and device Download PDFInfo
- Publication number
- CN101808035A CN101808035A CN201010132669A CN201010132669A CN101808035A CN 101808035 A CN101808035 A CN 101808035A CN 201010132669 A CN201010132669 A CN 201010132669A CN 201010132669 A CN201010132669 A CN 201010132669A CN 101808035 A CN101808035 A CN 101808035A
- Authority
- CN
- China
- Prior art keywords
- conversation recording
- reverse
- state information
- recording
- 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.)
- Pending
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention relates to the technical field of data streams, and discloses a session record optimization method and a device which can reduce excess consumption of network equipment storage resources. The method comprises the following steps: creating at least one forward session record and reverse session record of data streams, extracting the identical status information from the forward session record and the reverse session record, storing the extracted identical status information as the common session information, and respectively associating with the forward session record and the reverse session record. The embodiment of the invention can reduce the excess consumption of the network equipment storage resources.
Description
Technical field
The present invention relates to technical field of data streams, relate in particular to a kind of session record optimization method and device.
Background technology
Along with development of internet technology, the network equipment has entered the state-detection epoch.In the network equipment, safeguarding the conversation recording of each data flow, rely on the conversation recording of each data flow, the network equipment can carry out state-detection and forwarding to each message of this data flow, thereby improves forward efficiency and speed.
In order to improve the search efficiency of conversation recording, the network equipment is generally different data streams and sets up forward and reverse two conversation recordings, each bar conversation recording is distinguished the state information of a direction in record communication process, is respectively the message service of a direction of data flow.When first message of data flow arrived, the network equipment extracted the information that this message carries, and apply for that two contents are the conversation recording of sky, and one as the forward conversation recording, the reverse conversation recording of conduct; The information that to extract from this message is filled to confirmable part in these two conversation recordings, such as the source address of message and destination address, port numbers, network address translation (Network Address Transfer, NAT), route sends outlet or the like.Wherein, oppositely some information is on all four in conversation recording and the forward conversation recording, such as transport layer protocol information etc., some information may be opposite relation, is opposite with reverse source address and destination address just such as the source address of forward and destination address.The message of each direction all carries out necessary state-detection and forwarding based on the conversation recording of own direction.
In the network equipment, the forward conversation recording of each data flow and reverse conversation recording all come index according to one group of same key assignments, and these key assignments can extract from the information that message carries.After message arrived, the network equipment can extract key assignments from the information that message carries, and then the conversation recording of searching this message place data flow carries out state-detection and forwarding.Because the forward conversation recording is all pressed same one group of key assignments index together with reverse conversation recording, so just can find the conversation recording of place data flow behind the message of the whichever direction extraction key assignments by a secondary index.
The inventor finds in practice, the above-mentioned network equipment is the forward of the establishment respectively conversation recording of same data flow and the record of oppositely replying, because forward conversation recording and reverse some identical state informations of existence in the reply record, caused the additive decrementation of network equipment storage resources.
Summary of the invention
Embodiment of the invention technical problem to be solved provides a kind of session record optimization method and device, can reduce the additive decrementation of network equipment storage resources.
In order to solve the problems of the technologies described above, the embodiment of the invention provides following technical scheme:
The embodiment of the invention provides a kind of session record optimization method, comprising:
Create the forward conversation recording and reverse conversation recording of at least one data flow;
From described forward conversation recording and reverse conversation recording, extract equal state information;
Described identical state information is stored as the session public information, and according to related described forward conversation recording of described identical state information difference and reverse conversation recording.
The embodiment of the invention provides a kind of session record optimization device, comprising:
Creation module is used to create the forward conversation recording of at least one data flow and reverse conversation recording;
Extraction module is used for extracting equal state information from the forward conversation recording that described creation module is created with reverse conversation recording;
Relating module, the equal state information that is used for described extraction module is extracted is stored as the session public information, and carries out related with reverse conversation recording the forward conversation recording that the related respectively described creation module of described session public information is created.
The embodiment of the invention provides a kind of network equipment, comprises the above-mentioned session record optimization device that the embodiment of the invention provides.
Compared with prior art, the embodiment of the invention has following beneficial effect:
In the embodiment of the invention, for different data streams is created forward conversation recording and reverse conversation recording respectively, and state information total in forward conversation recording and the reverse conversation recording extracted as the session public information share, the forward conversation recording comprises the session public information indirectly with reverse conversation recording mode by reference.Like this, just there is not the state information of redundancy or repetition in the forward conversation recording of same data flow and the reverse conversation recording, thereby can reduces additive decrementation network equipment storage resources.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use among the embodiment below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
The schematic flow sheet of a kind of session record optimization method of providing in the embodiment of the invention is provided Fig. 1;
Fig. 2 is a kind of bi-directional session record schematic diagram of data flow;
A kind of data flow conversation recording management schematic diagram of Fig. 3 for providing in the embodiment of the invention;
The structural representation of a kind of session record optimization device of providing in the embodiment of the invention is provided Fig. 4;
The structural representation of the another kind of session record optimization device that provides in the embodiment of the invention is provided Fig. 5;
The structural representation of the another kind of session record optimization device that provides in the embodiment of the invention is provided Fig. 6;
The structural representation of another session record optimization device of providing in the embodiment of the invention is provided Fig. 7.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Embodiment one:
See also Fig. 1, the schematic flow sheet of a kind of session record optimization method that Fig. 1 provides for the embodiment of the invention one.As shown in Figure 1, this method can comprise:
101, create the forward conversation recording and reverse conversation recording of at least one data flow;
As shown in Figure 2, when first message of data flow arrives, the network equipment can extract the information that this message carries, apply for that two contents are empty conversation recording, article one, as the forward conversation recording,, a reverse conversation recording of conduct, and the information that will extract from this message is filled to confirmable part in forward conversation recording and the reverse conversation recording, and for example the source address of message and destination address, port numbers, NAT address transition, route send outlet or the like.
Wherein, the quantity and the kind of the state information in the quantity of the state information in the forward conversation recording and kind and the reverse conversation recording are identical.
Wherein, write down the state information of forward data stream in the forward conversation recording, be used to the forward message service of data flow; And oppositely write down the state information of reverse data flow in the conversation recording, be used to the reverse message service of data flow.In other words, the message of forward carries out necessary state-detection and forwarding based on the forward conversation recording, and reverse message carries out necessary state-detection and forwarding based on reverse conversation recording.
For same data flow, some state information is on all four in its forward conversation recording and the reverse conversation recording, such as transport layer protocol information, application layer protocol information etc., some state information may be opposite relation, is opposite with reverse source address and destination address just such as the source address of forward and destination address.
Need to prove, the forward conversation recording that the network equipment is created at least one data flow in the specific implementation process of the forward conversation recording of above-mentioned establishment at least one data flow and reverse conversation recording and the prior art is identical with the specific implementation process of reverse conversation recording, the forward conversation recording also is identical with the concrete form of reverse conversation recording, and the embodiment of the invention does not describe in detail.
102, from above-mentioned forward conversation recording and reverse conversation recording, extract equal state information;
For instance, whether the state information of same kind is identical in the forward conversation recording that can compare different data streams one by one and the reverse conversation recording, if then the equal state information with same kind extracts from above-mentioned forward conversation recording and reverse conversation recording respectively; Otherwise, then do not extract.Like this, extracting from above-mentioned forward conversation recording and reverse conversation recording respectively by the equal state information with same kind can be so that just exist the state information of redundancy or repetition in the forward conversation recording of same data flow and the reverse conversation recording.
For instance, the source address of message in the forward conversation recording, the source address of message in destination address and the reverse conversation recording, destination address belongs to the state information of same kind, for example the port numbers in the forward conversation recording and the port numbers in the reverse conversation recording belong to the state information of same kind again, for example the NAT address transition in the forward conversation recording and the NAT address transition in the reverse conversation recording belong to the state information of same kind again, and for example the route in the forward conversation recording sends outlet and sends outlet with route in the reverse conversation recording and belong to state information of same kind or the like again.
State information for inverse relationship also can extract, and for example, in the forward conversation recording source address is worked as in address 1, and destination address is worked as in address 2; And oppositely in the conversation recording source address is being worked as in address 2, destination address is worked as in address 1.Therefore, can from forward conversation recording and reverse conversation recording, address 1, address 2 be extracted.Thus, equal state information also comprises the state information of the inverse relationship in the same kind.
103, above-mentioned equal state information is stored as the session public information, and related respectively above-mentioned forward conversation recording and reverse conversation recording.
For instance, can get the portion of above-mentioned equal state information and store as the session public information, and to above-mentioned session public information allocation identification;
Wherein, the forward conversation recording of different data streams is different with the sign of the session public information of reverse conversation recording;
The sign of above-mentioned session public information is write respectively in above-mentioned forward conversation recording and the reverse conversation recording, thereby realized the related of above-mentioned session public information and above-mentioned forward conversation recording, reverse conversation recording.
As shown in Figure 3, in the network equipment, the forward conversation recording of each data flow and reverse conversation recording all come index according to one group of same key assignments, and these key assignments can extract from the information that message carries.After message arrived, the network equipment can extract key assignments from the information that message carries, and then the conversation recording of searching this message place data flow carries out state-detection and forwarding.Because the forward conversation recording is all pressed same one group of key assignments index together with reverse conversation recording, so just can find the conversation recording of place data flow behind the message of the whichever direction extraction key assignments by a secondary index.
Because the forward conversation recording of same data flow is shared a session public information with reverse conversation recording, so when the forward conversation recording of creating same data flow and reverse conversation recording, must create the piece that is used for the store session public information earlier, the session public information in the session public information piece must visit by conversation recording.
When the conversation recording of any one direction of destroying a data flow, need the related of cancellation earlier and session public information, after the conversation recording of the both direction of a data flow was all destroyed, their associated session public informations also should be destroyed.
Simultaneously, message is carried out in the safety detection process based on state, in the conversation recording of the direction at message place, obtain state information, and need not be concerned about that state information comes from conversation recording itself or related with it session public information piece.
In the embodiment of the invention one, for different data streams is created forward conversation recording and reverse conversation recording respectively, and state information total in forward conversation recording and the reverse conversation recording extracted as the session public information share, the forward conversation recording comprises the session public information indirectly with reverse conversation recording mode by reference.Like this, just there is not the state information of redundancy or repetition in the forward conversation recording of same data flow and the reverse conversation recording, thereby can reduces additive decrementation network equipment storage resources.
In addition, the embodiment of the invention is that same data flow created the forward conversation recording respectively and reverse conversation recording can also can improve the conversation recording search efficiency, reduces and handles complexity.
Embodiment two:
See also Fig. 4, the structural representation of a kind of session record optimization device that Fig. 4 provides for the embodiment of the invention two.As shown in Figure 4, this device can comprise:
Relating module 403, the equal state information that is used for said extracted module 402 is extracted are as the storage of session public information, and the forward conversation recording that the related respectively above-mentioned creation module 401 of above-mentioned session public information is created carries out related with reverse conversation recording.
The session record optimization device that the embodiment of the invention provides is respectively different data streams and creates forward conversation recording and reverse conversation recording respectively, and state information total in forward conversation recording and the reverse conversation recording extracted as the session public information share, the forward conversation recording comprises the session public information indirectly with reverse conversation recording mode by reference.Like this, just there is not the state information of redundancy or repetition in the forward conversation recording of same data flow and the reverse conversation recording, thereby can reduces additive decrementation network equipment storage resources.
See also Fig. 5, Fig. 5 is the embodiment of the invention is further improved the another kind of session record optimization device that obtains on the basis of a session record optimization device shown in Figure 4 structural representation.In session record optimization device shown in Figure 5, extraction module 402 can comprise:
Relating module 403, the equal state information that specifically can be used for said extracted submodule 4022 is extracted is as the storage of session public information, and the forward conversation recording that the related respectively above-mentioned creation module 401 of above-mentioned session public information is created carries out related with reverse conversation recording.
Like this, can be by extracting forward conversation recording that the equal state information of same kind is created from above-mentioned creation module 401 respectively and the reverse conversation recording so that just there is not the state information of redundancy or repetition in the forward conversation recording of same data flow and the reverse conversation recording.
See also Fig. 6, Fig. 6 is the embodiment of the invention is further improved the another kind of session record optimization device that obtains on the basis of a session record optimization device shown in Figure 4 structural representation.In session record optimization device shown in Figure 6, relating module 403 can comprise:
First processing sub 4031 is used for the equal state information that said extracted module 402 is extracted is stored as the session public information, and to above-mentioned session public information allocation identification;
Second processing sub 4032 is used for the sign of above-mentioned session public information is write the forward conversation recording and reverse conversation recording that above-mentioned creation module 401 is created respectively.
The sign of above-mentioned session public information is write respectively in the forward conversation recording and reverse conversation recording of above-mentioned creation module 401 establishments, make above-mentioned session public information distinguish related above-mentioned forward conversation recording and reverse conversation recording, so not only can be or oppositely conversation recording can the access session public information by the forward conversation recording, just there is not the state information of redundancy or repetition in the forward conversation recording that can also make same data flow and the reverse conversation recording, can reduces additive decrementation network equipment storage resources.
See also Fig. 7, session record optimization device shown in Figure 7 is to be obtained by session record optimization device shown in Figure 5 and session record optimization device combination shown in Figure 6.As shown in Figure 7,
First processing sub 4031 can be stored the equal state information that said extracted submodule 4022 extracts as the session public information, and to above-mentioned session public information allocation identification;
Second processing sub 4032 is used for the sign of above-mentioned session public information is write the forward conversation recording and reverse conversation recording that above-mentioned creation module 401 is created respectively.
Need illustrate that the forward conversation recording of different data streams is different with the sign of the session public information of reverse conversation recording in the embodiment of the invention, thereby can distinguish out the forward conversation recording and reverse conversation recording of session public information correspondence.
The above-mentioned session record optimization device that the embodiment of the invention provides both can be used as an independent device, be used to optimize the conversation recording of data flow, can be used as the newly-increased part of conventional network equipment yet, be used to optimize the conversation recording of data flow, the embodiment of the invention does not limit.
In the embodiment of the invention two, for different data streams is created forward conversation recording and reverse conversation recording respectively, and state information total in forward conversation recording and the reverse conversation recording extracted as the session public information share, the forward conversation recording comprises the session public information indirectly with reverse conversation recording mode by reference.Like this, just there is not the state information of redundancy or repetition in the forward conversation recording of same data flow and the reverse conversation recording, thereby can reduces additive decrementation network equipment storage resources.
In addition, the embodiment of the invention is that same data flow created the forward conversation recording respectively and reverse conversation recording can also can improve the conversation recording search efficiency, reduces and handles complexity.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), various media that can be program code stored such as magnetic disc or CD.
More than a kind of session record optimization method and device that the embodiment of the invention provided are described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.
Claims (10)
1. a session record optimization method is characterized in that, comprising:
Create the forward conversation recording and reverse conversation recording of at least one data flow;
From described forward conversation recording and reverse conversation recording, extract equal state information;
Described identical state information is stored as the session public information, and according to related described forward conversation recording of described identical state information difference and reverse conversation recording.
2. method according to claim 1 is characterized in that, extracts equal state information and comprise from described forward conversation recording and reverse conversation recording:
Whether the state information of same kind identical in more described forward conversation recording and the reverse conversation recording, if, then with the equal state information of same kind respectively from described forward conversation recording with oppositely extract the conversation recording.
3. method according to claim 1 is characterized in that, described with described identical state information as session public information storage, and comprise according to related respectively described forward conversation recording of described identical state information and reverse conversation recording:
Described identical state information is stored as the session public information, and to described session public information allocation identification;
The sign of described session public information is write respectively in described forward conversation recording and the reverse conversation recording.
4. method according to claim 3 is characterized in that, the forward conversation recording of different data streams is different with the sign of the session public information of reverse conversation recording.
5. according to each described method of claim 1~4, it is characterized in that the quantity and the kind of the state information in the quantity of the state information in the described forward conversation recording and kind and the corresponding described reverse conversation recording are identical.
6. a session record optimization device is characterized in that, comprising:
Creation module is used to create the forward conversation recording of at least one data flow and reverse conversation recording;
Extraction module is used for extracting equal state information from the forward conversation recording that described creation module is created with reverse conversation recording;
Relating module, the equal state information that is used for described extraction module is extracted is stored as the session public information, and carries out related with reverse conversation recording the forward conversation recording that the related respectively described creation module of described session public information is created.
7. device according to claim 6 is characterized in that, described extraction module comprises:
Comparison sub-module, whether the forward conversation recording that is used for more described creation module establishment is identical with the state information of the reverse same kind of conversation recording;
Extract submodule, be used at the comparative result of described comparison sub-module when being, then extract the forward conversation recording that the equal state information of same kind is created from described creation module respectively and the reverse conversation recording.
8. device according to claim 6 is characterized in that, described relating module comprises:
First processing sub, the equal state information that is used for described extraction module is extracted is stored as the session public information, and to described session public information allocation identification;
Second processing sub is used for the sign of described session public information is write the forward conversation recording and reverse conversation recording that described creation module is created respectively.
9. according to each described device of claim 6~8, it is characterized in that the quantity and the kind of the state information in the quantity of the state information in the described forward conversation recording and kind and the described reverse conversation recording are identical.
10. a network equipment is characterized in that, comprises aforesaid right requirement 6~9 each described session record optimization devices.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010132669A CN101808035A (en) | 2010-03-24 | 2010-03-24 | Session record optimization method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010132669A CN101808035A (en) | 2010-03-24 | 2010-03-24 | Session record optimization method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101808035A true CN101808035A (en) | 2010-08-18 |
Family
ID=42609657
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010132669A Pending CN101808035A (en) | 2010-03-24 | 2010-03-24 | Session record optimization method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101808035A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102487422A (en) * | 2010-12-02 | 2012-06-06 | 北京市三希电子科技开发公司 | Voice prompted file processing method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101102155A (en) * | 2007-08-10 | 2008-01-09 | 中兴通讯股份有限公司 | Method for storing configuration script of passive optical network terminal devices |
CN101329719A (en) * | 2008-08-01 | 2008-12-24 | 西安西电捷通无线网络通信有限公司 | Anonymous authentication method suitable for homogeneous electronic label |
CN101404620A (en) * | 2008-11-17 | 2009-04-08 | 杭州华三通信技术有限公司 | Method for creating routing list item and switching equipment |
-
2010
- 2010-03-24 CN CN201010132669A patent/CN101808035A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101102155A (en) * | 2007-08-10 | 2008-01-09 | 中兴通讯股份有限公司 | Method for storing configuration script of passive optical network terminal devices |
CN101329719A (en) * | 2008-08-01 | 2008-12-24 | 西安西电捷通无线网络通信有限公司 | Anonymous authentication method suitable for homogeneous electronic label |
CN101404620A (en) * | 2008-11-17 | 2009-04-08 | 杭州华三通信技术有限公司 | Method for creating routing list item and switching equipment |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102487422A (en) * | 2010-12-02 | 2012-06-06 | 北京市三希电子科技开发公司 | Voice prompted file processing method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103731356B (en) | Message processing method and device | |
CN102467408A (en) | Method and device for accessing data of virtual machine | |
CN108809836A (en) | Multicast data packet forwarding method and device | |
CA2396263A1 (en) | System and method for translating to and from hierarchical information systems | |
CN101021858A (en) | Data storing method and device, and data seeking, adding and deleting method | |
CN107786638A (en) | A kind of data processing method, apparatus and system | |
CN103873567A (en) | Task-based data transmission method and device | |
CN102142032A (en) | Method and system for reading and writing data of distributed file system | |
CN101052011B (en) | MPLS label distribution method, system and device | |
CN102546461A (en) | Multi-hierarchy message middleware system and message forwarding control method and device thereof | |
CN101534477A (en) | List item management method and device | |
CN101753434B (en) | Radio frequency identification router and radio frequency identification network system | |
CN107682446A (en) | A kind of message mirror-image method, device and electronic equipment | |
CN103810204A (en) | Information search method and information search device | |
CN101808035A (en) | Session record optimization method and device | |
CN102938711A (en) | Internet access information configuration method and network equipment | |
CN102609310A (en) | Computer operating system and inter-process communication method therefor | |
CN100596087C (en) | FTN matching management method | |
CN102081845B (en) | Preprocessing method and device of traffic information | |
CN101150420B (en) | Realization method and network server based on network virtual community exchange | |
CN101867524B (en) | Seamless mobile communication method and system in locator-identifier split network | |
CN100450028C (en) | System resource management method for telecommunication apparatus | |
CN104410588A (en) | Method of implementing virtual switching on router equipment and router equipment | |
CN103731347A (en) | VPNV4 routing processing method and device based on nested VPN | |
CN102480410A (en) | Single board for centralized business processing and virtualized resource dividing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20100818 |