CN102769658A - Method and device for restoring network files - Google Patents

Method and device for restoring network files Download PDF

Info

Publication number
CN102769658A
CN102769658A CN2011103988809A CN201110398880A CN102769658A CN 102769658 A CN102769658 A CN 102769658A CN 2011103988809 A CN2011103988809 A CN 2011103988809A CN 201110398880 A CN201110398880 A CN 201110398880A CN 102769658 A CN102769658 A CN 102769658A
Authority
CN
China
Prior art keywords
file
packet
buffer memory
write
files
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
Application number
CN2011103988809A
Other languages
Chinese (zh)
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 Antiy Electronic Equipment Co Ltd
Original Assignee
Beijing Antiy Electronic Equipment 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 Antiy Electronic Equipment Co Ltd filed Critical Beijing Antiy Electronic Equipment Co Ltd
Priority to CN2011103988809A priority Critical patent/CN102769658A/en
Publication of CN102769658A publication Critical patent/CN102769658A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method for restoring network files. The method is used after flow of network packets is reassembled and the packets are sorted again. The method includes capturing a packet, and determining initial positions of files; writing the files in the packet to a cache; and capturing a next packet, and judging whether end positions of files are included or not, if not, continuing writing the files in the packet to the cache and capturing a next packet, and otherwise after writing the files in the packet to the cache, writing all the files to a hard disk or memory. By the method for restoring the network files, file restoration can be achieved without relying on the protocol identification technology.

Description

Network file method of reducing and device
Technical field
The present invention relates to the network data processing field, particularly a kind of network file method of reducing and device.
Background technology
Transfer of data in the computer network is based on the transmission and the reception of packet, through after a series of background process, presents to required text of user data or file, and therefore packet is transparent existence concerning the user.The traditional document method of reducing depends on the agreement recognition technology; Packet is judged its agreement when handling through protocol stack, carry out the file reduction according to agreement then; Yet; When unknown protocol occurring, the traditional document method of reducing then can't restore file or can't accurately go back original because of its dependence to the agreement recognition technology.
Summary of the invention
The invention provides a kind of network file method of reducing and device, solved in the traditional file method of reducing, when unknown protocol occurring, can't go back the problem of original.
A kind of network file method of reducing is used for the reorganization of network packet flow, after the packet rearrangement, comprising:
Catch packet, confirm the file original position;
The packet file is write buffer memory;
Catch next packet, judge whether the include file end position,, then the packet file is continued to write buffer memory, and catch next packet, otherwise after the packet file write buffer memory, All Files in the buffer memory is write hard disk or internal memory if do not comprise.
In the described method, said definite file original position is file header identification.
In the described method,, then file is write in a plurality of buffer memory chains continuously if file size surpasses cache size.
A kind of network file reduction apparatus comprises:
Acquiring unit is used to obtain packet, confirms the file original position;
First writing unit is used for the file of packet is write buffer memory;
Finish judging unit, be used for whether include file end position of judgment data bag, if do not comprise, then first writing unit continues to write buffer memory with the packet file, otherwise after first writing unit writes buffer memory with the packet file, gets into second writing unit;
Second writing unit is used for when finishing judgment unit judges behind packet include file end position the All Files in the buffer memory being write hard disk or internal memory.
In the described device, said definite file original position is file header identification.
In the described device,, then file is write in a plurality of buffer memory chains continuously if file size surpasses cache size.
The invention solves legacy network file method of reducing and depend on the bottleneck of agreement recognition technology; Invented a kind of new network file method of reducing; Solved the difficult problem that the file reduction depends on the agreement recognition technology; As long as packet is non-encrypted partial data stream, then can accurately restore network file.
The present invention provides a kind of network file method of reducing, is used for the reorganization of network packet flow, and after the packet rearrangement, method comprises: catch packet, confirm the file original position; The packet file is write buffer memory; Catch next packet, judge whether the include file end position,, then the packet file is continued to write buffer memory, and catch next packet, otherwise after the packet file write buffer memory, All Files in the buffer memory is write hard disk or internal memory if do not comprise.Through method of the present invention, can not rely on the agreement recognition technology and carry out the file reduction.
Description of drawings
In order to be illustrated more clearly in the present invention or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below; Obviously, the accompanying drawing in describing below only is some embodiment that put down in writing among 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.
Fig. 1 is a kind of network file method of reducing flow chart;
Fig. 2 is a kind of network file reduction apparatus structural representation.
Embodiment
In order to make those skilled in the art person understand the technical scheme in the embodiment of the invention better, and make above-mentioned purpose of the present invention, feature and advantage can be more obviously understandable, below in conjunction with accompanying drawing technical scheme among the present invention done further detailed explanation.
The invention provides a kind of network file method of reducing and device, solved in the traditional file method of reducing, when the unknown protocol file occurring, can't go back the problem of original.
A kind of network file method of reducing is used for the reorganization of network packet flow, and is as shown in Figure 1 after the packet rearrangement, comprising:
S101: catch packet, confirm the file original position;
S102: the packet file is write buffer memory;
S103: catch next packet, judge whether the include file end position,, then carry out S104, otherwise carry out S105 if do not comprise;
S104: the packet file is continued to write buffer memory, and catch next packet;
S105: after the packet file write buffer memory, All Files in the buffer memory is write hard disk or internal memory.
In the described method, said definite file original position is file header identification.
In the described method,, then file is write in a plurality of buffer memory chains continuously if file size surpasses cache size.Cache size can rule of thumb be judged, selects 20 to 50k, and this implementation process is example with 16k, if file size surpasses 16k, then can write a plurality of 16k buffer memory chains, until the end of file.
A kind of network file reduction apparatus, as shown in Figure 2, comprising:
Acquiring unit 201 is used to obtain packet, confirms the file original position;
First writing unit 202 is used for the file of packet is write buffer memory;
Finish judging unit 203; Be used for whether include file end position of judgment data bag, if do not comprise, then first writing unit 202 continues to write buffer memory with the packet file; Otherwise first writing unit 202 gets into second writing unit 204 after the packet file is write buffer memory;
Second writing unit 204 is used for after end judging unit 203 determines packet include file end position, the All Files in the buffer memory being write hard disk or internal memory.
In the described device, said definite file original position is file header identification.
In the described device,, then file is write in a plurality of buffer memory chains continuously if file size surpasses cache size.
The invention solves legacy network file method of reducing and depend on the bottleneck of agreement recognition technology; Invented a kind of new network file method of reducing; Solved the difficult problem that the file reduction depends on the agreement recognition technology; As long as packet is non-encrypted partial data stream, then can accurately restore network file.
The present invention provides a kind of network file method of reducing, is used for the reorganization of network packet flow, and after the packet rearrangement, method comprises: catch packet, confirm the file original position; The packet file is write buffer memory; Catch next packet, judge whether the include file end position,, then the packet file is continued to write buffer memory, and catch next packet, otherwise after the packet file write buffer memory, All Files in the buffer memory is write hard disk or internal memory if do not comprise.Through method of the present invention, can not rely on the agreement recognition technology and carry out the file reduction.
Description through above execution mode can know, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform.
Though described the present invention through embodiment, those of ordinary skills know, the present invention has many distortion and variation and do not break away from spirit of the present invention, hope that appended claim comprises these distortion and variation and do not break away from spirit of the present invention.

Claims (6)

1. a network file method of reducing is used for the reorganization of network packet flow, after the packet rearrangement, it is characterized in that, comprising:
Catch packet, confirm the file original position;
The packet file is write buffer memory;
Catch next packet, judge whether the include file end position,, then the packet file is continued to write buffer memory, and catch next packet, otherwise after the packet file write buffer memory, All Files in the buffer memory is write hard disk or internal memory if do not comprise.
2. the method for claim 1 is characterized in that, said definite file original position is file header identification.
3. the method for claim 1 is characterized in that, if file size surpasses cache size, then file is write in a plurality of buffer memory chains continuously.
4. a network file reduction apparatus is characterized in that, comprising:
Acquiring unit is used to obtain packet, confirms the file original position;
First writing unit is used for the file of packet is write buffer memory;
Finish judging unit, be used for whether include file end position of judgment data bag, if do not comprise, then first writing unit continues to write buffer memory with the packet file, otherwise after first writing unit writes buffer memory with the packet file, gets into second writing unit;
Second writing unit is used for when finishing judgment unit judges behind packet include file end position the All Files in the buffer memory being write hard disk or internal memory.
5. device as claimed in claim 4 is characterized in that, said definite file original position is file header identification.
6. device as claimed in claim 4 is characterized in that, if file size surpasses cache size, then file is write in a plurality of buffer memory chains continuously.
CN2011103988809A 2011-12-06 2011-12-06 Method and device for restoring network files Pending CN102769658A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103988809A CN102769658A (en) 2011-12-06 2011-12-06 Method and device for restoring network files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103988809A CN102769658A (en) 2011-12-06 2011-12-06 Method and device for restoring network files

Publications (1)

Publication Number Publication Date
CN102769658A true CN102769658A (en) 2012-11-07

Family

ID=47096908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103988809A Pending CN102769658A (en) 2011-12-06 2011-12-06 Method and device for restoring network files

Country Status (1)

Country Link
CN (1) CN102769658A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425930A (en) * 2012-12-27 2013-12-04 北京安天电子设备有限公司 Online real-time script detecting method and online real-time script detecting system
WO2017128299A1 (en) * 2016-01-29 2017-08-03 瑞斯康微电子(深圳)有限公司 Method and system for parsing multi-protocol message based on file mode
CN110545271A (en) * 2019-08-28 2019-12-06 北京天融信网络安全技术有限公司 method and system for restoring file

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852100A (en) * 2005-07-22 2006-10-25 华为技术有限公司 Method for receiving-end to regroup data bag
CN101583930A (en) * 2006-12-14 2009-11-18 微软公司 Nonvolatile disk cache for data security
CN101626384A (en) * 2009-08-05 2010-01-13 腾讯科技(深圳)有限公司 Method and system for transmitting data packet based on TPC protocol
CN101895736A (en) * 2010-07-07 2010-11-24 杭州华三通信技术有限公司 Media stream data processing method and device thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852100A (en) * 2005-07-22 2006-10-25 华为技术有限公司 Method for receiving-end to regroup data bag
CN101583930A (en) * 2006-12-14 2009-11-18 微软公司 Nonvolatile disk cache for data security
CN101626384A (en) * 2009-08-05 2010-01-13 腾讯科技(深圳)有限公司 Method and system for transmitting data packet based on TPC protocol
CN101895736A (en) * 2010-07-07 2010-11-24 杭州华三通信技术有限公司 Media stream data processing method and device thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425930A (en) * 2012-12-27 2013-12-04 北京安天电子设备有限公司 Online real-time script detecting method and online real-time script detecting system
CN103425930B (en) * 2012-12-27 2016-09-07 北京安天电子设备有限公司 A kind of online script detection method and system in real time
WO2017128299A1 (en) * 2016-01-29 2017-08-03 瑞斯康微电子(深圳)有限公司 Method and system for parsing multi-protocol message based on file mode
CN110545271A (en) * 2019-08-28 2019-12-06 北京天融信网络安全技术有限公司 method and system for restoring file

Similar Documents

Publication Publication Date Title
CN105357006A (en) Method and equipment for performing security authentication based on voiceprint feature
CN107634915A (en) Data transmission method, device and storage medium
EP1830249A3 (en) Print system, job processing method, storage medium and program
CN104750620B (en) A kind of internal memory migration method and device
ATE475254T1 (en) FILE PROTOCOL FOR TRANSACTION BASED COMMUNICATIONS
US20130318262A1 (en) Data Transmission Method and Apparatus
CN103139157A (en) Network communication method based on socket, device and system
CN102355501A (en) Data processing method, access review equipment and system
CN109803016A (en) A kind of method and apparatus using virtual switch forwarding data packet
US20160139720A1 (en) Virtual Multi-Device Navigation in Surface Computing System
CN102769658A (en) Method and device for restoring network files
CN104486442B (en) Data transmission method, the device of distributed memory system
CN104219639A (en) Method and device for displaying text message record
CN107579929A (en) A kind of method to set up, system and relevant apparatus for being reliably connected communication queue pair
US8639836B2 (en) Smart nagling in a TCP connection
CN106557535B (en) Method and system for processing big data level Pcap file
CN104202269A (en) Compression method of network data packet
CN104102530B (en) A kind of method and system for improving electronic product replication rate
CN108241639A (en) A kind of data duplicate removal method
CN106294877A (en) A kind of removing applies the method for data, device and terminal
CN102929799A (en) Data collection and storage method and system
CN103324623A (en) Mobile terminal and data batch operating method
CN113253956B (en) Print file processing method and device
CN109491807A (en) Data exchange method, device and system
CN106293996A (en) Method of data synchronization, main equipment, alternate device and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 100080 Haidian District City, Zhongguancun, the main street, No. 1 Hailong building, room 1415, room 14

Applicant after: Beijing Antiy Electronic Installation Co., Ltd.

Address before: 100084, 2B-521, bright city, No. 1, Nongda South Road, Beijing, Haidian District

Applicant before: Beijing Antiy Electronic Installation Co., Ltd.

C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20121107