WO2016058401A1 - 一种超文本传输协议数据还原方法及装置 - Google Patents

一种超文本传输协议数据还原方法及装置 Download PDF

Info

Publication number
WO2016058401A1
WO2016058401A1 PCT/CN2015/081516 CN2015081516W WO2016058401A1 WO 2016058401 A1 WO2016058401 A1 WO 2016058401A1 CN 2015081516 W CN2015081516 W CN 2015081516W WO 2016058401 A1 WO2016058401 A1 WO 2016058401A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
hypertext transfer
transfer protocol
uri
restored
Prior art date
Application number
PCT/CN2015/081516
Other languages
English (en)
French (fr)
Inventor
吴建新
朱柳辉
蒋宏斌
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016058401A1 publication Critical patent/WO2016058401A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • This paper relates to the field of data restoration technology of hypertext transfer protocol, and in particular to a method and device for data restoration of hypertext transfer protocol.
  • the related art http-based protocol data restoration method needs to deeply analyze the obtained http protocol data, and analyze the specific types of the data are hypertext markup language html, literal translation script language JS, cascading style sheet CSS or pictures, etc. Format, and then save the data into a file of the corresponding format, in fact, imitate the function of saving the webpage by the web browser. Since it cannot directly participate in the process of data interaction of the http protocol like a web browser, this method is complicated and restored. The effect is not good, and the effect on some complicated web pages is even worse.
  • the object of the present invention is to provide a method and a device for restoring data of a hypertext transfer protocol, so as to solve the problem that the data restoration method of the hypertext transfer protocol is complicated and the restoration effect is not good.
  • a hypertext transfer protocol data restoration method comprising:
  • the hypertext transfer protocol request carrying a uniform resource identifier URI to be restored;
  • the method before the step of receiving the hypertext transfer protocol request sent by the web browser, the method further includes:
  • the method before the step of acquiring the record data to be restored corresponding to the URI to be restored according to the index relationship between the pre-established URI and the record data, the method further includes:
  • the index relationship between the URI and the recorded data is established as follows:
  • hypertext transfer protocol data exchanged between the terminal forwarded by the network device image and the web server, where the hypertext transfer protocol data includes hypertext transfer protocol request data and hypertext transfer protocol response data;
  • the interaction Hypertext transfer protocol response data is the number of records corresponding to the URI according to;
  • the step of acquiring the storage data area for storing the uplink data quad information according to the uplink data quad information in the interactive hypertext transfer protocol request data comprises:
  • the step of acquiring the to-be-restored record data corresponding to the URI to be restored according to the index relationship between the pre-established URI and the record data includes:
  • the to-be-restored record data corresponding to the URI to be restored is obtained.
  • the web browser is configured with proxy server information having a preset IP address and a preset port;
  • the step of receiving the hypertext transfer protocol request sent by the web browser comprises: receiving the hypertext transfer protocol request sent by the web browser on the preset IP address and the preset port.
  • a hypertext transfer protocol data restoration device includes a first receiving module, a first obtaining module, a second acquiring module, and a first sending module, where
  • the first receiving module is configured to: receive a hypertext transfer protocol request sent by a web browser, where the hypertext transfer protocol request carries a URI to be restored;
  • the first obtaining module is configured to: parse the hypertext transfer protocol request, and obtain the URI of the record to be restored in the hypertext transfer protocol request;
  • the second obtaining module is configured to: obtain, according to an index relationship between the URI and the record data, a record to be restored corresponding to the URI to be restored;
  • the first sending module is configured to: convert the acquired to-be-restored record data into hypertext transfer protocol response data, and send the response data to the web browser, so that the web browser responds to the data according to the hypertext transfer protocol Restore the record to be restored.
  • the hypertext transfer protocol data restoring device further includes a second receiving module and a second sending module, where
  • the second receiving module is configured to: receive a to-be-restored record selected from a plurality of to-be-restored records saved in advance;
  • the second sending module is configured to: acquire the received URI of the record to be restored, and send the URI to the web browser, so that the web browser initiates the hypertext transfer protocol according to the URI request.
  • the second obtaining module includes a first acquiring submodule, a second acquiring submodule, a third obtaining submodule, a fourth acquiring submodule, and a establishing submodule, where
  • the first obtaining submodule is configured to: obtain hypertext transfer protocol data exchanged between the terminal forwarded by the network device and the web server, where the hypertext transfer protocol data includes hypertext transfer protocol request data and hypertext transfer protocol response data;
  • the second obtaining sub-module is configured to: obtain, according to the uplink data quad-group information in the hypertext transfer protocol requesting data, a storage data area for storing the uplink data quad-group information;
  • the third obtaining submodule is configured to: parse the interacting hypertext transfer protocol request data, obtain a uniform resource tag URI in the interacted hypertext transfer protocol request data, and set the URI and the uplink Data quaternion information is saved to the storage data area;
  • the fourth obtaining submodule is configured to: respond to the data according to the interacting hypertext transfer protocol And obtaining, by the downlink data quad-group information corresponding to the uplink data quad-group information, a storage data area for storing the uplink data quad-group information; wherein the hypertext transfer protocol response data is Record data corresponding to the URI;
  • the establishing sub-module is configured to: save the record data to the acquired storage data area storing the uplink data quad-group information, and establish an index relationship between the record data and the URI.
  • the second obtaining module further includes a fifth obtaining submodule, a sixth obtaining submodule, a searching submodule, and a seventh obtaining submodule, where
  • the fifth obtaining submodule is configured to: obtain the hypertext transfer protocol request data sent by the web browser;
  • the sixth obtaining sub-module is configured to: parse the obtained hypertext transfer protocol request data, and obtain the uplink data quad-group information and the URI of the to-be-restored record in the hypertext transfer protocol request data;
  • the searching sub-module is configured to: search, according to the uplink data quad-group information, a storage data area that stores the uplink data quad-group information;
  • the seventh obtaining sub-module is configured to: after finding the storage data area storing the uplink data quad-group information, acquire the to-be-restored record data corresponding to the URI to be restored.
  • the second obtaining submodule includes a retrieving unit, an obtaining unit, and an establishing unit, where
  • the searching unit is configured to: retrieve, according to the uplink data quad information in the hypertext transfer protocol request data, the storage data area storing the uplink data quad information;
  • the obtaining unit is configured to: when the storage data area storing the uplink data quad information is retrieved, acquire the storage data area; or
  • the establishing unit is configured to: when the storage data area storing the uplink data quad information is not retrieved, establish a storage data area storing the uplink data quad information.
  • the web browser is configured with proxy server information having a preset IP address and a preset port;
  • the first receiving module includes a receiving unit, wherein
  • the receiving unit is configured to: receive the hypertext transfer protocol request sent by the web browser on the preset IP address and the preset port.
  • a server comprising any of the above hypertext transfer protocol data restoration devices.
  • a computer program comprising program instructions that, when executed by a computer, cause the computer to perform any of the above-described hypertext transfer protocol data restoration methods.
  • a carrier carrying the computer program A carrier carrying the computer program.
  • the solution of the present invention adopts an index relationship between the URI and the record data in advance.
  • the web browser When restoring the record to be restored, the web browser generates a hypertext transfer protocol request carrying the URI of the record to be restored, and the device acquires the URI in the request, and The index data to be restored is obtained by the index relationship between the URI and the record data to be restored, and the record data to be restored is converted into hypertext transfer protocol response data and returned to the browser, so that the browser restores the record to be restored.
  • the solution enables the user to browse to the record to be restored directly in the web browser, the processing scheme is simple, and the restoration effect is good.
  • FIG. 1 is a schematic diagram showing a flow of an http protocol data storage method in a hypertext transfer protocol data restoration method according to an embodiment of the present invention
  • FIG. 2 is a schematic flow chart showing the step 12 in FIG. 1;
  • FIG. 3 is a schematic diagram showing the structure of a module involved in a data reduction method of a hypertext transfer protocol according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart showing the relationship between a URI and a record data index in a specific embodiment of the present invention
  • FIG. 5 is a schematic diagram showing a flow of a http protocol data restoration process in a hypertext transfer protocol data restoration method according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram showing a flow of generating a hypertext transfer protocol request in step 51 of FIG. 5;
  • FIG. 7 is a schematic diagram showing a specific http protocol data restoration process in a hypertext transfer protocol data restoration method according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram 1 of a hypertext transfer protocol data restoration apparatus according to an embodiment of the present invention.
  • FIG. 9 is a second schematic structural diagram of a hypertext transfer protocol data restoration apparatus according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram 1 of a second acquisition module in a hypertext transfer protocol data restoration apparatus according to an embodiment of the present invention
  • FIG. 11 is a second schematic structural diagram of a second acquisition module in a hypertext transfer protocol data restoration apparatus according to an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of a second acquisition submodule in a hypertext transfer protocol data restoration apparatus according to an embodiment of the present invention.
  • the hypertext transfer protocol data restoration method in the embodiment of the present invention is divided into two processes, namely a hypertext transfer protocol data (hereinafter referred to as http protocol data) storage process and an http protocol data restoration process, wherein the correct implementation of the restore process depends on Storage process.
  • a hypertext transfer protocol data hereinafter referred to as http protocol data
  • http protocol data restoration process wherein the correct implementation of the restore process depends on Storage process.
  • the purpose of the http protocol data storage process is to implement an index relationship between the recorded URI and the corresponding record data.
  • the establishment of the index relationship includes the following steps:
  • Step 11 Obtain hypertext transfer protocol data exchanged between the terminal forwarded by the network device image and the web server, where the hypertext transfer protocol data includes hypertext transfer protocol request data and hypertext transfer protocol response data;
  • Mirroring is performed by using the port mirroring basic function of the network device to send packets exchanged between the terminal and the web server through the destination port of the port mirroring function. Belonging to common sense, here No longer.
  • Step 12 request, according to the hypertext transfer protocol, uplink data quad-group information in the data, or according to the downlink data quad-group information corresponding to the uplink data quad-group information in the hypertext transfer protocol response data.
  • the quaternary information includes the source IP address, the source port, the destination IP address, and the destination port, which are common knowledge and are not described here.
  • Step 13 parsing the hypertext transfer protocol request data, acquiring a uniform resource identifier URI in the hypertext transfer protocol request data, and saving the URI to the storage data area; the step may be The server where the HTTP protocol proxy module is located is executed.
  • Step 14 save the record data to the storage data area, and establish an index relationship between the record data and the URI.
  • the above step 12, as shown in FIG. 2, includes:
  • Step 21 Search, according to the uplink data quad-group information in the hypertext transfer protocol request data, a stored data area that stores the uplink data quad-group information;
  • Step 22 When the storage data area storing the uplink data quad information is retrieved, acquiring the storage data area; or when the storage data area storing the uplink data quad information is not retrieved, establishing one A storage data area storing the uplink data quad information.
  • the data processed by the patented method is http protocol data.
  • the source of the http protocol data mainly has two ways:
  • the first type network data mirroring
  • A01 represents a web server and provides an http service
  • A02 represents a generalized network, generally referring to a network constituted by the TCP/IP protocol.
  • A03 indicates some specific network devices such as routers, switches of various levels, etc.
  • A04 indicates a terminal equipped with a web browser.
  • A04 uses a web browser to interact with A01 through A03, A02 and other network devices to realize web page data interaction, such as browsing web pages and downloading files.
  • the A03 network device has the function of mirroring the output of network packets (A11 is the mirror source port and A12 is the destination port).
  • the network port data connected to A04 on A03 can be output to the A05 network data output module through A12 port mirroring. It's an instant way.
  • the image outputted by the A12 is saved into a packet capture file through the network capture tool, and the data source is obtained by reading the capture file through the A05.
  • the http protocol data exchanged between the terminal (equipped with a web browser) and the web server is mirrored and forwarded by the network device A03, and output to the network data analysis module A05 through the A12 mirror data output port.
  • the http protocol data includes http protocol request data and http protocol response data.
  • the http protocol data received by the network data analysis module A05 is IP data encapsulated by the system of the web browser A04, and the network data analysis module A05 performs the steps shown in FIG. 4 after receiving the IP data. S01 to step S03.
  • the network data analysis module A05 mainly implements IP protocol data reorganization, transmission control protocol (TCP protocol) data sorting, and http protocol data identification function.
  • step S01 since the IP protocol data exceeding the maximum packet size MTU value of the network device is fragmented during the transmission by the network device, after the IP protocol data received by the network data analysis module A05 is fragmented data, First, the IP protocol data is reorganized according to the identification field (ip-id) of the IP protocol header, the flag field (three high-order bits of ip-off), and the offset field (13 low-order bits of ip-off); Reorganize to form a complete IP protocol data;
  • step S02 is performed, and the step of sorting the TCP protocol data for the IP protocol data after the reorganization is performed:
  • the transmission path that passes through the network transmission process is different. Therefore, the IP protocol data sent in the order of the sequence cannot be guaranteed to be received in the same order, so the IP protocol must be obtained.
  • the data is sorted according to the TCP protocol: Taking the TCP part of the data, according to the TCP protocol header serial number Seq and the confirmation character Ack field and the TCP protocol to achieve the sorting of the TCP protocol data, after the sorting is completed, step S03;
  • Step S03 performing identification of the http protocol data:
  • step S02 Processing the TCP protocol data sorted in step S02, checking the source port and the destination port of the TCP protocol data. If there is a port number of 80, it is considered to be http protocol data (including http protocol request data (or uplink data) and http protocol. The response data (or downlink data) is forwarded and the entire http protocol data is forwarded to the http protocol data storage module A06.
  • http protocol data including http protocol request data (or uplink data) and http protocol.
  • the response data (or downlink data) is forwarded and the entire http protocol data is forwarded to the http protocol data storage module A06.
  • the http protocol data storage module A06 performs step S401 to step S410 after receiving the http protocol data forwarded by the network data analysis module A05.
  • the main function of the http protocol data storage module A06 is to further analyze the http protocol data outputted by the network data analysis module A05 and generate a file for storage.
  • the http protocol data storage module A06 manages some data storage areas, and the main fields included in the data storage area are URI (multiple), downlink data file name (multiple), storage data area index number, quad group information, suggestion URI and The index relationship of the downlink http protocol data file name, the storage data area index number according to the quaternion information, and the like.
  • Step S401 the http protocol data storage module A06 extracts the quaternion information (source IP, destination IP, source TCP port, and destination TCP port) of the http protocol request data (uplink data or downlink data) forwarded by the network data analysis module, Then performing step S402;
  • Step S402 searching for the stored data area for storing the uplink (or downlink) data quad information according to the uplink (or downlink) data quad information, if it is found to store the uplink (or downlink) data.
  • the stored data area of the tuple information is saved to the stored data area in the uplink (or downlink) data quaternion information extracted in step S401. If not found, the extracted uplink (or downlink) data is indicated.
  • the quaternary information is the first time to enter the http protocol data storage module A06, and then step S403 is performed to create a new quaternary information for the uplink data and the corresponding downlink data quaternary for the extracted quaternion information.
  • step S404 is executed to process the above http protocol data into two categories, one is data sent from the web browser A04 to the web server A01 (the destination TCP port number is 80), that is, the above uplink data; the other is The data sent by the web server A01 to the web browser A04 according to the uplink data (the source TCP port number is 80), that is, the downlink data;
  • step S405 is performed to parse the uplink data, obtain the URI information of the URI and the uplink data in the uplink data, and execute S406, and search for the uplink data according to the uplink data quad-group information. And storing the data area of the quaternary information, and saving the URI and the extracted uplink data quaternary information to the stored storage data area;
  • step S407 is performed to extract http payload data (or record data) in the downlink data
  • step S408 is performed to create a new file
  • the extracted http payload data is saved in the file.
  • step S409 is performed, a record is generated by using the uplink data quad-group information and the URI in the uplink data, and then step S410 is performed to establish a URI and store the downlink http payload data file.
  • the index relationship of the file name is performed.
  • the http protocol data restoration process includes the following steps:
  • Step 51 Receive a hypertext transfer protocol request sent by a web browser and carrying a uniform resource identifier URI of the record to be restored;
  • Step 52 parsing the hypertext transfer protocol request, and acquiring the URI of the to-be-restored record in the hypertext transfer protocol request;
  • Step 53 Acquire, according to an index relationship between the URI and the record data, a record to be restored corresponding to the URI to be restored.
  • Step 54 Convert the obtained to-be-restored record data into hypertext transfer protocol response data, and send the response data to the web browser, so that the web browser restores the to-be-restored record according to the hypertext transfer protocol response data.
  • the web browser described in the step 51 may be the web browser A04 mentioned above, and the processes performed in steps 51 to 54 mainly involve the following modules:
  • the http protocol proxy module A08 the http protocol data storage module A06, and the http protocol data retrieval module A07.
  • the http protocol proxy module can bind an IP address and port, and receive the http protocol data request of the web browser on the IP and the port.
  • the browser A04 The IP address and port bound to the http protocol proxy module should also be configured accordingly.
  • step 51 As shown in FIG. 6, the method further includes the following steps:
  • Step 61 Receive a to-be-restored record selected by the user from the plurality of records to be restored saved in advance;
  • Step 62 Acquire the received Uniform Resource Identifier URI of the record to be restored, and send the URI to a web browser, so that the web browser initiates the hypertext transfer protocol request according to the URI.
  • the IP address and port bound to the http protocol proxy module are pre-configured on the web browser A04.
  • steps 61 to 62 steps are performed.
  • step M04 is executed: the http protocol request is sent to the http protocol data retrieval module A07.
  • the http protocol data retrieval module A07 parses the http protocol request, obtains the URI of the to-be-restored record in the http protocol request, and the uplink data quad-group information, and then acquires the storage according to the uplink data quad-group information.
  • the storage data area of the quaternary information is returned to the http protocol proxy according to the index relationship between the pre-established URI and the stored record data file name after finding the storage data area storing the uplink data quaternary information.
  • step M06 is executed: the http protocol proxy module A08 receives the read file name.
  • step M07 the http protocol proxy module A08 goes to the http protocol data storage module A06 to obtain the to-be-restored record data corresponding to the URI according to the index relationship between the pre-established URI and the file name of the file storing the record file data.
  • step M08 is executed: the http protocol proxy module A08 converts the acquired record data to be restored into hypertext transfer protocol response data.
  • step M09 is executed: the http protocol proxy module A08 sends the converted hypertext transfer protocol response data to the mirror web browser A09, so that the mirror web browser A09 restores the response according to the hypertext transfer protocol response data. The record to be restored.
  • the foregoing is a detailed introduction to the method for restoring data of the hypertext transfer protocol according to the embodiment of the present invention.
  • the solution of the embodiment of the present invention enables the user to directly browse the webpage. Browse to the record to be restored, the processing scheme is simple, and the restoration effect is good.
  • an embodiment of the present invention further provides a hypertext transfer protocol data restoration device, where the device includes:
  • the first receiving module 81 is configured to: receive a hypertext transfer protocol request sent by the web browser and carrying a uniform resource identifier URI of the record to be restored;
  • the first obtaining module 82 is configured to: parse the hypertext transfer protocol request, and obtain the URI of the to-be-restored record in the hypertext transfer protocol request;
  • the second obtaining module 83 is configured to: obtain, according to an index relationship between the URI and the record data, a record to be restored corresponding to the URI to be restored;
  • the first sending module 84 is configured to: convert the acquired to-be-restored record data into hypertext transfer protocol response data, and send the response data to the web browser, so that the web browser responds to the data according to the hypertext transfer protocol. Restore the record to be restored.
  • the hypertext transfer protocol data restoration device further includes:
  • the second receiving module 91 is configured to: receive a to-be-restored record selected by the user from the plurality of to-be-restored records saved in advance;
  • the second sending module 92 is configured to: obtain the unified resource identifier URI of the received record to be restored, and send the URI to a web browser, so that the web browser initiates the super according to the URI Text Transfer Protocol request.
  • the second obtaining module 83 includes:
  • the first obtaining sub-module 101 is configured to: obtain hypertext transfer protocol data exchanged between the terminal forwarded by the network device and the web server, where the hypertext transfer protocol data includes hypertext transfer protocol request data and hypertext transfer protocol response data;
  • the second obtaining sub-module 102 is configured to: obtain, according to the uplink data quad-group information in the hypertext transfer protocol request data, a storage data area for storing the uplink data quad-group information;
  • the third obtaining sub-module 103 is configured to: parse the hypertext transfer protocol request data, obtain a uniform resource identifier URI in the hypertext transfer protocol request data, and set the URI and the uplink data to four The tuple information is saved to the storage data area;
  • the fourth obtaining submodule 104 is configured to: respond to the data according to the hypertext transfer protocol And obtaining, by the downlink data quad-group information corresponding to the uplink data quad-group information, a storage data area for storing the uplink data quad-group information; wherein the hypertext transfer protocol response data is the URI Corresponding record data
  • the establishing submodule 105 is configured to: save the record data to the acquired storage data area storing the uplink data quad information, and establish an index relationship between the record data and the URI.
  • the second obtaining module 83 further includes:
  • the fifth obtaining sub-module 111 is configured to: obtain hypertext transfer protocol request data sent by the web browser and carrying the URI of the record to be restored selected by the user;
  • the sixth obtaining sub-module 112 is configured to: parse the obtained hypertext transfer protocol request data, and obtain the uplink data quad in the hypertext transfer protocol request data carrying the URI of the to-be-restored record selected by the user. Group information and the URI of the record to be restored;
  • the searching sub-module 113 is configured to: search, according to the uplink data quad-group information, a storage data area that stores the uplink data quad-group information;
  • the seventh obtaining sub-module 114 is configured to: after finding the storage data area storing the uplink data quad-group information, acquire the to-be-restored record data corresponding to the URI to be restored.
  • the second obtaining submodule 102 includes:
  • the searching unit 121 is configured to: perform, according to the uplink data quad information in the hypertext transfer protocol request data, a stored data area that stores the uplink data quad information;
  • the obtaining unit 122 is configured to: when the storage data area storing the uplink data quad information is retrieved, acquire the storage data area; or
  • the establishing unit 123 is configured to: when the storage data area storing the uplink data quad information is not retrieved, establish a storage data area storing the uplink data quad information.
  • the web browser is configured with proxy server information having a preset IP address and a preset port;
  • the first receiving module 81 includes:
  • the receiving unit is configured to: receive the hypertext transfer protocol request sent by the web browser on the preset IP address and the preset port.
  • the embodiment of the invention also discloses a server, including any number of hypertext transmission protocols mentioned above According to the reduction device.
  • the embodiment of the invention also discloses a computer program, comprising program instructions, when the program instruction is executed by a computer, so that the computer can execute any of the above-mentioned hypertext transfer protocol data restoration methods.
  • the embodiment of the invention also discloses a carrier carrying the computer program.
  • the device is a device including the above method, and the implementation manner of the embodiment of the above method is applicable to the embodiment of the device, and the same technical effect can be achieved.
  • the solution of the present invention adopts an index relationship between the URI and the record data in advance.
  • the web browser When restoring the record to be restored, the web browser generates a hypertext transfer protocol request carrying the URI of the record to be restored, and the device acquires the URI in the request, and The index data to be restored is obtained by the index relationship between the URI and the record data to be restored, and the record data to be restored is converted into hypertext transfer protocol response data and returned to the browser, so that the browser restores the record to be restored.
  • the solution enables the user to browse to the record to be restored directly in the web browser, the processing scheme is simple, and the restoration effect is good. Therefore, the present invention has strong industrial applicability.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种超文本传输协议数据还原方法及装置,该方法包括:接收网页浏览器发送的携带有一待还原记录的统一资源标识符URI的超文本传输协议请求;对所述超文本传输协议请求进行解析,获取所述超文本传输协议请求中的所述待还原记录的URI;根据预先建立的URI与记录数据的索引关系,获取与所述待还原记录的URI对应的待还原记录数据;将所述获取到的待还原记录数据转换成超文本传输协议响应数据发送至所述网页浏览器,使得所述网页浏览器根据所述超文本传输协议响应数据还原所述待还原记录。本发明的方案使得用户能够直接在网页浏览器上浏览到待还原记录,处理方案简单,且还原效果好。

Description

一种超文本传输协议数据还原方法及装置 技术领域
本文涉及超文本传输协议数据还原技术领域,特别是涉及一种超文本传输协议数据还原方法及装置。
背景技术
随着互联网的普及以及中国宽带上网用户的爆发式增长,网络应用也在不断的增多,而浏览网页又是所有应用中使用率最高最普遍的应用。同时网络上信息的安全问题已经越来越被人们所重视,网络上绝大多数的不良信息是通过使用者在网页浏览器上打开各种不良网站这种方式传递的,网页浏览器和服务器之间都是通过超文本传输协议(http协议)来交换数据,因此,对http协议数据的还原有利于监控和识别这些不良信息。相关技术的一些网络信息监控方法可以通过检测敏感词来识别这些不良信息,但是识别出不良信息后还没有比较好的方法能直观的还原出使用者当时在浏览器上所看到内容。
相关技术的基于http的协议数据还原方法需要把获取到的http协议数据做深度解析,分析出数据的具体类型是超文本标记语言html、直译式脚本语言JS、级联样式表CSS或者图片等具体格式,再将这些数据保存成对应格式的文件,实际上是模仿网页浏览器保存网页的功能,由于不能像网页浏览器一样直接参与到http协议数据交互的过程,所以这种方法处理复杂而且还原的效果不好,对于一些复杂的网页效果就更差了。
发明内容
本发明的目的是提供一种超文本传输协议数据还原方法及装置,以解决目前超文本传输协议数据还原方法复杂且还原效果不好的问题。
为了解决上述技术问题,采用如下技术方案:
一种超文本传输协议数据还原方法,包括:
接收网页浏览器发送的超文本传输协议请求,该超文本传输协议请求携带有一待还原记录的统一资源标识符URI;
对所述超文本传输协议请求进行解析,获取所述超文本传输协议请求中的所述待还原记录的URI;
根据预先建立的URI与记录数据的索引关系,获取与所述待还原记录的URI对应的待还原记录数据;
将所述获取到的待还原记录数据转换成超文本传输协议响应数据发送至所述网页浏览器,使得所述网页浏览器根据所述超文本传输协议响应数据还原所述待还原记录。
可选地,所述接收网页浏览器发送的超文本传输协议请求的步骤之前,所述方法还包括:
接收从预先保存的多个待还原记录中选择的一待还原记录;
获取所接收的待还原记录的URI,并将所述URI发送给所述网页浏览器,以使所述网页浏览器根据所述URI发起所述超文本传输协议请求。
可选地,所述根据预先建立的URI与记录数据的索引关系,获取与所述待还原记录的URI对应的待还原记录数据的步骤之前,该方法还包括:
按照如下方式建立URI与记录数据的索引关系:
获取网络设备镜像转发的终端与网页服务器之间交互的超文本传输协议数据,所述超文本传输协议数据包括超文本传输协议请求数据和超文本传输协议响应数据;
根据所交互的超文本传输协议请求数据中的上行数据四元组信息,获取用于存储所述上行数据四元组信息的存储数据区;
对所交互的超文本传输协议请求数据进行解析,获取所交互的超文本传输协议请求数据中的URI,并将所述URI和所述上行数据四元组信息保存至所述存储数据区;
根据所交互的超文本传输协议响应数据中与所述上行数据四元组信息对应的下行数据四元组信息,查询用于存储所述上行数据四元组信息的存储数据区;其中,所交互的超文本传输协议响应数据为与所述URI对应的记录数 据;
将所述记录数据保存至所获取的存储所述上行数据四元组信息的存储数据区,并建立所述记录数据与所述URI的索引关系。
可选地,所述根据所交互的超文本传输协议请求数据中的上行数据四元组信息,获取用于存储所述上行数据四元组信息的存储数据区的步骤包括:
根据所交互的超文本传输协议请求数据中的上行数据四元组信息,对存储所述上行数据四元组信息的存储数据区进行检索;
在检索到存储所述上行数据四元组信息的存储数据区时,获取所述存储数据区,在未检索到存储所述上行数据四元组信息的存储数据区时,建立一存储所述上行数据四元组信息的存储数据区。
可选地,所述根据预先建立的URI与记录数据的索引关系,获取与所述待还原记录的URI对应的待还原记录数据的步骤包括:
获取网页浏览器发送的超文本传输协议请求数据;
对所述获取的超文本传输协议请求数据进行解析,获取所述超文本传输协议请求数据中的上行数据四元组信息和所述待还原记录的URI;
根据所述上行数据四元组信息,查找存储所述上行数据四元组信息的存储数据区;
在查找到存储所述上行数据四元组信息的存储数据区后,获取与所述待还原记录的URI对应的待还原记录数据。
可选地,所述网页浏览器配置有具有预设IP地址和预设端口的代理服务器信息;
所述接收网页浏览器发送的超文本传输协议请求的步骤包括:在所述预设IP地址和预设端口上,接收所述网页浏览器发送的所述超文本传输协议请求。
一种超文本传输协议数据还原装置,包括第一接收模块、第一获取模块、第二获取模块和第一发送模块,其中,
所述第一接收模块设置成:接收网页浏览器发送的超文本传输协议请求,其中,该超文本传输协议请求中携带有一待还原记录的URI;
所述第一获取模块设置成:对所述超文本传输协议请求进行解析,获取所述超文本传输协议请求中的所述待还原记录的URI;
所述第二获取模块设置成:根据预先建立的URI与记录数据的索引关系,获取与所述待还原记录的URI对应的待还原记录数据;
所述第一发送模块设置成:将所述获取到的待还原记录数据转换成超文本传输协议响应数据发送至所述网页浏览器,使得所述网页浏览器根据所述超文本传输协议响应数据还原所述待还原记录。
可选地,所述超文本传输协议数据还原装置还包括第二接收模块和第二发送模块,其中
所述第二接收模块设置成:接收从预先保存的多个待还原记录中选择的一待还原记录;
所述第二发送模块设置成:获取所接收的待还原记录的URI,并将所述URI发送给所述网页浏览器,以使所述网页浏览器根据所述URI发起所述超文本传输协议请求。
可选地,所述第二获取模块包括第一获取子模块、第二获取子模块、第三获取子模块、第四获取子模块和建立子模块,其中
所述第一获取子模块设置成:获取网络设备镜像转发的终端与网页服务器之间交互的超文本传输协议数据,所述超文本传输协议数据包括超文本传输协议请求数据和超文本传输协议响应数据;
所述第二获取子模块设置成:根据所交互的超文本传输协议请求数据中的上行数据四元组信息,获取用于存储所述上行数据四元组信息的存储数据区;
所述第三获取子模块设置成:对所交互的超文本传输协议请求数据进行解析,获取所交互的超文本传输协议请求数据中的统一资源标符URI,并将所述URI和所述上行数据四元组信息保存至所述存储数据区;
所述第四获取子模块设置成:根据所交互的超文本传输协议响应数据中 的与所述上行数据四元组信息对应的下行数据四元组信息,获取用于存储所述上行数据四元组信息的存储数据区;其中,所述超文本传输协议响应数据为与所述URI对应的记录数据;
所述建立子模块设置成:将所述记录数据保存至所述获取的存储所述上行数据四元组信息的存储数据区,并建立所述记录数据与所述URI的索引关系。
可选地,所述第二获取模块还包括第五获取子模块、第六获取子模块、查找子模块和第七获取子模块,其中
所述第五获取子模块设置成:获取所述网页浏览器发送的所述超文本传输协议请求数据;
所述第六获取子模块设置成:对所获取的超文本传输协议请求数据进行解析,获取所述超文本传输协议请求数据中的上行数据四元组信息和所述待还原记录的URI;
所述查找子模块设置成:根据所述上行数据四元组信息,查找存储所述上行数据四元组信息的存储数据区;
所述第七获取子模块设置成:在查找到存储所述上行数据四元组信息的存储数据区后,获取与所述待还原记录的URI对应的待还原记录数据。
可选地,所述第二获取子模块包括检索单元、获取单元和建立单元,其中
所述检索单元设置成:根据所交互的超文本传输协议请求数据中的上行数据四元组信息,对存储所述上行数据四元组信息的存储数据区进行检索;
所述获取单元设置成:在检索到存储所述上行数据四元组信息的存储数据区时,获取所述存储数据区;或
所述建立单元设置成:在未检索到存储所述上行数据四元组信息的存储数据区时,建立一存储所述上行数据四元组信息的存储数据区。
可选地,
所述网页浏览器配置有具有预设IP地址和预设端口的代理服务器信息;
所述第一接收模块包括接收单元,其中
所述接收单元设置成:在所述预设IP地址和预设端口上,接收所述网页浏览器发送的所述超文本传输协议请求。
一种服务器,包括上述任意的超文本传输协议数据还原装置。
一种计算机程序,包括程序指令,当该程序指令被计算机执行时,使得该计算机可执行上述任意的超文本传输协议数据还原方法。
一种载有所述计算机程序的载体。
本发明技术方案的有益效果是:
本发明的方案采用预先建立记录的URI与记录数据的索引关系,在还原待还原记录时,网页浏览器生成携带待还原记录的URI的超文本传输协议请求,装置获取该请求中的URI,并通过URI与待还原记录数据的索引关系,获取待还原记录数据,并将该待还原记录数据转换成超文本传输协议响应数据返回该浏览器,使得该浏览器还原该待还原纪录。本方案使得用户能够直接在网页浏览器上浏览到待还原记录,处理方案简单,且还原效果好。
附图概述
图1表示本发明实施例的超文本传输协议数据还原方法中http协议数据存储流程示意图;
图2表示图1中步骤12的流程示意图;
图3表示本发明实施例的超文本传输协议数据还原方法中涉及到的模块的构成示意图;
图4表示本发明实施例的具体实施例中URI与记录数据索引关系建立的流程示意图;
图5表示本发明实施例的超文本传输协议数据还原方法中http协议数据还原流程示意图;
图6表示图5中的步骤51中超文本传输协议请求的产生流程示意图;
图7表示本发明实施例的超文本传输协议数据还原方法中具体的http协议数据还原流程示意图;
图8表示本发明实施例的超文本传输协议数据还原装置结构示意图一;
图9表示本发明实施例的超文本传输协议数据还原装置结构示意图二;
图10表示本发明实施例的超文本传输协议数据还原装置中第二获取模块的结构示意图一;
图11表示本发明实施例的超文本传输协议数据还原装置中第二获取模块的结构示意图二;
图12表示本发明实施例的超文本传输协议数据还原装置中第二获取子模块的结构示意图。
本发明的较佳实施方式
下面将结合附图以及具体的实施例对本发明进行详细描述。
本发明实施例的超文本传输协议数据还原方法分为两个流程,分别是超文本传输协议数据(下文称http协议数据)存储流程和http协议数据还原流程,其中,还原流程的正确实施依赖于存储流程。
下面,将结合附图以及具体的实施例详细介绍一下http协议数据存储流程。
该http协议数据存储流程的目的是实现记录的URI与对应记录数据的索引关系,其中,该索引关系的建立,如图1所示,包括如下步骤:
步骤11,获取网络设备镜像转发的终端与网页服务器之间交互的超文本传输协议数据,所述超文本传输协议数据包括超文本传输协议请求数据和超文本传输协议响应数据;
镜像转发是指利用网络设备的端口镜像基本功能把终端与网页服务器之间交互的报文通过端口镜像功能的目的端口发送出去。属于公知常识,在此 不再赘述。
步骤12,根据所述超文本传输协议请求数据中的上行数据四元组信息,或根据所述超文本传输协议响应数据中的与所述上行数据四元组信息对应的下行数据四元组信息,获取用于存储所述上行数据四元组信息和所述下行数据四元组信息的存储数据区;其中,所述超文本传输协议响应数据为与所述URI对应的记录数据;
可选地,四元组信息包括源IP,源端口,目的IP,目的端口,属于公知常识,在此不再赘述。
步骤13,对所述超文本传输协议请求数据进行解析,获取所述超文本传输协议请求数据中的统一资源标识符URI,并将所述URI保存至所述存储数据区;该步骤可以是由HTTP协议代理模块所在的服务器执行的。
步骤14,将所述记录数据保存至所述存储数据区,并建立所述记录数据与所述URI的索引关系。
其中,上述步骤12,如图2所示,包括:
步骤21,根据所述超文本传输协议请求数据中的上行数据四元组信息,对存储所述上行数据四元组信息的存储数据区进行检索;
步骤22,在检索到存储所述上行数据四元组信息的存储数据区时,获取所述存储数据区;或在未检索到存储所述上行数据四元组信息的存储数据区时,建立一存储所述上行数据四元组信息的存储数据区。
下面将结合附图以及更加详细的流程,对上述索引关系的建立做详细说明:
本专利方法处理的数据是http协议数据,在具体实施例中,结合图3,该http协议数据的来源主要有两种方式:
第一种:网络数据镜像方式
在由A01、A02、A03、A04所组成的网络中,A01表示网页服务器,提供http服务,A02表示广义的网络,一般是指符合TCP/IP协议所构成的网络。A03表示一些具体的网络设备如路由器、各层次的交换机等,A04表示装有网页浏览器的终端。A04使用网页浏览器,通过A03、A02等网络设备与A01交互实现网页数据的交互实现各种在线业务,如浏览网页,下载文件等。在 A03的网络设备上有镜像输出网络报文的功能(A11是镜像源端口,A12是目的端口),可以将A03上与A04相连的网络端口数据通过A12端口镜像输出给A05网络数据输出模块,这是一种即时的方式。
第二种:网络数据保存方式
这种方式是在方式1的基础上,将A12输出的镜像通过网络抓包工具保存成抓包文件,通过A05读取抓包文件的方式来获得数据源,这是一种离线方式。
本专利描述的方法对于这两种方式的处理是一致的,下面以第一种方式对上述步骤11至步骤15作详细描述。
在图3中,终端(装有网页浏览器)与网页服务器之间交互的http协议数据,通过网络设备A03镜像转发,并通过A12镜像数据输出端口输出至网络数据分析模块A05。其中,该http协议数据包含了http协议请求数据和http协议响应数据。
其中,上述网络数据分析模块A05接收到的http协议数据为经过网页浏览器A04的系统被封装成的IP数据,该网络数据分析模块A05在接收到该IP数据之后执行如图4所示的步骤S01至步骤S03。
首先,介绍一下该网络数据分析模块的基本功能:该网络数据分析模块A05主要实现IP协议数据重组、传输控制协议(TCP协议)数据排序、http协议数据识别功能。
步骤S01,由于超过网络设备最大数据包大小MTU值的IP协议数据在通过网络设备传输过程中会被分片,所以该网络数据分析模块A05接收到的该IP协议数据为分片的数据后,首先根据该IP协议头部的标识字段(ip-id)、标志字段(ip-off的三个高位比特)和偏移字段(ip-off的13个低位比特)对IP协议数据进行重组;经过重组后形成一个完整的IP协议数据;
重组之后执行步骤S02,对重组之后的IP协议数据进行TCP协议数据排序的步骤:
经过步骤S01重组之后的IP协议数据,在网络传输过程中所经过的传输路径不同,因此按照先后顺序发送的IP协议数据在接收端不能保证是按照同样的顺序接收到,因此必须要对IP协议数据依据TCP协议进行排序处理:提 取数据中的TCP部分,根据TCP协议头部的序列号Seq和确认字符Ack字段以及TCP协议来实现TCP协议数据的排序,排序完成后执行步骤S03;
步骤S03,进行http协议数据的识别:
处理经过步骤S02排序后的TCP协议数据,检查TCP协议数据的源端口和目的端口,如果有一个端口号为80则认为是http协议数据(包括http协议请求数据(或称上行数据)和http协议响应数据(或称下行数据)),并将整个http协议数据向http协议数据存储模块A06转发。
该http协议数据存储模块A06在接收到该网络数据分析模块A05转发的http协议数据后执行步骤S401至步骤S410。
首先,介绍一下该http协议数据存储模块A06的基本功能:该http协议数据存储模块A06主要功能是将网络数据分析模块A05输出的http协议数据进行进一步的分析并生成文件进行存储。该http协议数据存储模块A06管理一些数据存储区,数据存储区包含的主要字段有URI(多个)、下行数据文件名称(多个)、存储数据区索引号、四元组信息、建议URI与下行http协议数据文件名的索引关系、根据四元组信息查找存储数据区索引号等等。
步骤S401,该http协议数据存储模块A06提取该网络数据分析模块转发的http协议请求数据(上行数据或下行数据)的四元组信息(源IP、目的IP、源TCP端口、目的TCP端口),然后执行步骤S402;
步骤S402,根据上行(或下行)数据四元组信息查找是否存在用于存储该上行(或下行)数据四元组信息的存储数据区,若查找到用于存储该上行(或下行)数据四元组信息的存储数据区,则将该步骤S401中提取出来的上行(或下行)数据四元组信息保存至该存储数据区,若没有查找到,说明该提取到的上行(或下行)数据四元组信息为第一次进入该http协议数据存储模块A06,则执行步骤S403,为该提取到的四元组信息新建一个用于存储该上行数据四元组信息和对应的下行数据四元组信息的存储数据区;
然后执行步骤S404,将上述http协议数据分成两类来处理,一类是从网页浏览器A04发送至网页服务器A01的数据(目的TCP端口号为80),即上述的上行数据;另一类是网页服务器A01根据该上行数据发送给网页浏览器A04的数据(源TCP端口号为80),即下行数据;
如果是上行数据,则执行步骤S405,对上行数据进行解析,获取上行数据中的URI和上行数据的四元组信息,并执行S406,根据该上行数据四元组信息查找用于存储该上行数据四元组信息的存储数据区,并将所述URI和上述提取出来的上行数据四元组信息保存至上述查找到的存储数据区;
如果是下行数据,则执行步骤S407,提取下行数据中的http净荷数据(或称记录数据),然后执行步骤S408,新建一个文件,并将该提取到的http净荷数据保存在该文件中,并将文件的路径和名称写入到根据该下行数据中的与上述上行数据四元组对应的下行数据四元组信息查找到的、上述用于存储该上行数据四元组信息和对应的下行数据四元组信息的存储数据区中,然后执行步骤S409,使用上行数据中的上行数据四元组信息和URI产生一条记录,然后执行步骤S410,建立URI与存放下行http净荷数据文件的文件名的索引关系。
上述描述的是超文本传输协议数据存储流程的详细介绍,在索引关系建立之后,开始http协议数据的还原流程,具体描述如下:
如图5所示,该http协议数据还原流程包括如下步骤:
步骤51,接收网页浏览器发送的携带有一待还原记录的统一资源标识符URI的超文本传输协议请求;
步骤52,对所述超文本传输协议请求进行解析,获取所述超文本传输协议请求中的所述待还原记录的URI;
步骤53,根据预先建立的URI与记录数据的索引关系,获取与所述待还原记录的URI对应的待还原记录数据;
步骤54,将所述获取到的待还原记录数据转换成超文本传输协议响应数据发送至所述网页浏览器,使得所述网页浏览器根据所述超文本传输协议响应数据还原所述待还原记录。
其中,该步骤51中描述的网页浏览器,可为上述提及的网页浏览器A04,步骤51至步骤54所执行的流程主要涉及如下几个模块:
http协议代理模块A08、http协议数据存储模块A06和http协议数据检索模块A07。其中,该http协议代理模块能够绑定一个IP地址和端口,并在这个IP和端口上接收网页浏览器的http协议数据请求,当然,该浏览器A04 也应该相应配置有该http协议代理模块绑定的IP地址和端口。
在步骤51之前,如图6所示,还包括如下步骤:
步骤61,接收用户从预先保存的多个待还原记录中选择的一待还原记录;
步骤62,获取所述接收的待还原记录的统一资源标识符URI,并将所述URI发送给网页浏览器,以使所述网页浏览器根据所述URI发起所述超文本传输协议请求。
在上述步骤61至步骤62之后执行上述步骤51至步骤54,下面将对上述步骤51至步骤54作详细说明:
结合图7,在网页浏览器A04上预先配置好该http协议代理模块绑定的IP地址和端口,在上述步骤61至步骤62(对应于图7中的步骤M01至步骤M02)之后,执行步骤M03:该http协议代理模块A08在该绑定的IP地址和端口上接收镜像浏览器A09发送的携带有用户选择的一待还原记录的统一资源标识符URI的http协议请求。然后执行步骤M04:将该http协议请求发送至http协议数据检索模块A07。然后执行M05:该http协议数据检索模块A07对该http协议请求进行解析,获取该http协议请求中的待还原记录的URI和上行数据四元组信息,然后根据该上行数据四元组信息获取存储该四元组信息的存储数据区,在查找到存储该上行数据四元组信息的存储数据区之后,根据预先建立的URI与存储记录数据文件名的索引关系,将该文件名返回http协议代理模块A08。然后执行步骤M06:该http协议代理模块A08接收该读取出的文件名。然后执行步骤M07:该http协议代理模块A08根据预先建立的URI与存储记录文件数据的文件的文件名的索引关系,去http协议数据存储模块A06去获取与该URI对应的待还原记录数据。然后执行步骤M08:该http协议代理模块A08将所述获取到的待还原记录数据转换成超文本传输协议响应数据。然后执行步骤M09:该http协议代理模块A08将该转换后的超文本传输协议响应数据发送至镜像网页浏览器A09,使得所述镜像网页浏览器A09根据所述超文本传输协议响应数据还原所述待还原记录。
上述所有的步骤都可以是由服务器执行的。
综上,上述是对本发明实施例的超文本传输协议数据还原方法的详细介绍,通过上述介绍可知,本发明实施例的方案使得用户能够直接在网页浏览 器上浏览到待还原记录,处理方案简单,且还原效果好。
如图8所示,本发明的实施例还提供一种超文本传输协议数据还原装置,该装置包括:
第一接收模块81,设置成:接收网页浏览器发送的携带有一待还原记录的统一资源标识符URI的超文本传输协议请求;
第一获取模块82,设置成:对所述超文本传输协议请求进行解析,获取所述超文本传输协议请求中的所述待还原记录的URI;
第二获取模块83,设置成:根据预先建立的URI与记录数据的索引关系,获取与所述待还原记录的URI对应的待还原记录数据;
第一发送模块84,设置成:将所述获取到的待还原记录数据转换成超文本传输协议响应数据发送至所述网页浏览器,使得所述网页浏览器根据所述超文本传输协议响应数据还原所述待还原记录。
其中,如图9所示,该超文本传输协议数据还原装置还包括:
第二接收模块91,设置成:接收用户从预先保存的多个待还原记录中选择的一待还原记录;
第二发送模块92,设置成:获取所述接收的待还原记录的统一资源标识符URI,并将所述URI发送给网页浏览器,以使所述网页浏览器根据所述URI发起所述超文本传输协议请求。
其中,如图10所示,该第二获取模块83包括:
第一获取子模块101,设置成:获取网络设备镜像转发的终端与网页服务器之间交互的超文本传输协议数据,所述超文本传输协议数据包括超文本传输协议请求数据和超文本传输协议响应数据;
第二获取子模块102,设置成:根据所述超文本传输协议请求数据中的上行数据四元组信息,获取用于存储所述上行数据四元组信息的存储数据区;
第三获取子模块103,设置成:对所述超文本传输协议请求数据进行解析,获取所述超文本传输协议请求数据中的统一资源标符URI,并将所述URI和所述上行数据四元组信息保存至所述存储数据区;
第四获取子模块104,设置成:根据所述超文本传输协议响应数据中的 与所述上行数据四元组信息对应的下行数据四元组信息,获取用于存储所述上行数据四元组信息的存储数据区;其中,所述超文本传输协议响应数据为与所述URI对应的记录数据
建立子模块105,设置成:将所述记录数据保存至所述获取的存储所述上行数据四元组信息的存储数据区,并建立所述记录数据与所述URI的索引关系。
其中,如图11所示,该第二获取模块83还包括:
第五获取子模块111,设置成:获取网页浏览器发送的携带有用户选择的待还原记录的URI的超文本传输协议请求数据;
第六获取子模块112,设置成:对所述获取的超文本传输协议请求数据进行解析,获取所述携带有用户选择的待还原记录的URI的超文本传输协议请求数据中的上行数据四元组信息和所述待还原记录的URI;
查找子模块113,设置成:根据所述上行数据四元组信息,查找存储所述上行数据四元组信息的存储数据区;
第七获取子模块114,设置成:在查找到存储所述上行数据四元组信息的存储数据区后,获取与所述待还原记录的URI对应的待还原记录数据。
其中,如图12所示,该第二获取子模块102包括:
检索单元121,设置成:根据所述超文本传输协议请求数据中的上行数据四元组信息,对存储所述上行数据四元组信息的存储数据区进行检索;
获取单元122,设置成:在检索到存储所述上行数据四元组信息的存储数据区时,获取所述存储数据区;或
建立单元123,设置成:在未检索到存储所述上行数据四元组信息的存储数据区时,建立一存储所述上行数据四元组信息的存储数据区。
其中,所述网页浏览器配置有具有预设IP地址和预设端口的代理服务器信息;
该第一接收模块81包括:
接收单元,设置成:在所述预设IP地址和预设端口上,接收网页浏览器发送的所述超文本传输协议请求。
本发明实施例还公开了一种服务器,包括上述任意的超文本传输协议数 据还原装置。
本发明实施例还公开了一种计算机程序,包括程序指令,当该程序指令被计算机执行时,使得该计算机可执行上述任意的超文本传输协议数据还原方法。
本发明实施例还公开了一种载有所述计算机程序的载体。
需要说明的是,该装置是包括上述方法的装置,上述方法的实施例的实现方式适用于该装置的实施例中,也能达到相同的技术效果。
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。
工业实用性
本发明的方案采用预先建立记录的URI与记录数据的索引关系,在还原待还原记录时,网页浏览器生成携带待还原记录的URI的超文本传输协议请求,装置获取该请求中的URI,并通过URI与待还原记录数据的索引关系,获取待还原记录数据,并将该待还原记录数据转换成超文本传输协议响应数据返回该浏览器,使得该浏览器还原该待还原纪录。本方案使得用户能够直接在网页浏览器上浏览到待还原记录,处理方案简单,且还原效果好。因此本发明具有很强的工业实用性。

Claims (15)

  1. 一种超文本传输协议数据还原方法,包括:
    接收网页浏览器发送的超文本传输协议请求,该超文本传输协议请求携带有一待还原记录的统一资源标识符URI;
    对所述超文本传输协议请求进行解析,获取所述超文本传输协议请求中的所述待还原记录的URI;
    根据预先建立的URI与记录数据的索引关系,获取与所述待还原记录的URI对应的待还原记录数据;
    将所述获取到的待还原记录数据转换成超文本传输协议响应数据发送至所述网页浏览器,使得所述网页浏览器根据所述超文本传输协议响应数据还原所述待还原记录。
  2. 根据权利要求1所述的超文本传输协议数据还原方法,其中,所述接收网页浏览器发送的超文本传输协议请求的步骤之前,所述方法还包括:
    接收从预先保存的多个待还原记录中选择的一待还原记录;
    获取所接收的待还原记录的URI,并将所述URI发送给所述网页浏览器,以使所述网页浏览器根据所述URI发起所述超文本传输协议请求。
  3. 根据权利要求1所述的超文本传输协议数据还原方法,其中,所述根据预先建立的URI与记录数据的索引关系,获取与所述待还原记录的URI对应的待还原记录数据的步骤之前,该方法还包括:
    按照如下方式建立URI与记录数据的索引关系:
    获取网络设备镜像转发的终端与网页服务器之间交互的超文本传输协议数据,所述超文本传输协议数据包括超文本传输协议请求数据和超文本传输协议响应数据;
    根据所交互的超文本传输协议请求数据中的上行数据四元组信息,获取用于存储所述上行数据四元组信息的存储数据区;
    对所交互的超文本传输协议请求数据进行解析,获取所交互的超文本传输协议请求数据中的URI,并将所述URI和所述上行数据四元组信息保存至所述存储数据区;
    根据所交互的超文本传输协议响应数据中与所述上行数据四元组信息对应的下行数据四元组信息,查询用于存储所述上行数据四元组信息的存储数据区;其中,所交互的超文本传输协议响应数据为与所述URI对应的记录数据;
    将所述记录数据保存至所获取的存储所述上行数据四元组信息的存储数据区,并建立所述记录数据与所述URI的索引关系。
  4. 根据权利要求3所述的超文本传输协议数据还原方法,其中,所述根据所交互的超文本传输协议请求数据中的上行数据四元组信息,获取用于存储所述上行数据四元组信息的存储数据区的步骤包括:
    根据所交互的超文本传输协议请求数据中的上行数据四元组信息,对存储所述上行数据四元组信息的存储数据区进行检索;
    在检索到存储所述上行数据四元组信息的存储数据区时,获取所述存储数据区,在未检索到存储所述上行数据四元组信息的存储数据区时,建立一存储所述上行数据四元组信息的存储数据区。
  5. 根据权利要求3所述的超文本传输协议数据还原方法,其中,所述根据预先建立的URI与记录数据的索引关系,获取与所述待还原记录的URI对应的待还原记录数据的步骤包括:
    获取网页浏览器发送的超文本传输协议请求数据;
    对所述获取的超文本传输协议请求数据进行解析,获取所述超文本传输协议请求数据中的上行数据四元组信息和所述待还原记录的URI;
    根据所述上行数据四元组信息,查找存储所述上行数据四元组信息的存储数据区;
    在查找到存储所述上行数据四元组信息的存储数据区后,获取与所述待还原记录的URI对应的待还原记录数据。
  6. 权利要求1所述的超文本传输协议数据还原方法,其中,
    所述网页浏览器配置有具有预设IP地址和预设端口的代理服务器信息;
    所述接收网页浏览器发送的超文本传输协议请求的步骤包括:在所述预设IP地址和预设端口上,接收所述网页浏览器发送的所述超文本传输协议请求。
  7. 一种超文本传输协议数据还原装置,包括第一接收模块、第一获取模块、第二获取模块和第一发送模块,其中,
    所述第一接收模块设置成:接收网页浏览器发送的超文本传输协议请求,其中,该超文本传输协议请求中携带有一待还原记录的URI;
    所述第一获取模块设置成:对所述超文本传输协议请求进行解析,获取所述超文本传输协议请求中的所述待还原记录的URI;
    所述第二获取模块设置成:根据预先建立的URI与记录数据的索引关系,获取与所述待还原记录的URI对应的待还原记录数据;
    所述第一发送模块设置成:将所述获取到的待还原记录数据转换成超文本传输协议响应数据发送至所述网页浏览器,使得所述网页浏览器根据所述超文本传输协议响应数据还原所述待还原记录。
  8. 根据权利要求6所述的超文本传输协议数据还原装置,其中,所述超文本传输协议数据还原装置还包括第二接收模块和第二发送模块,其中
    所述第二接收模块设置成:接收从预先保存的多个待还原记录中选择的一待还原记录;
    所述第二发送模块设置成:获取所接收的待还原记录的URI,并将所述URI发送给所述网页浏览器,以使所述网页浏览器根据所述URI发起所述超文本传输协议请求。
  9. 根据权利要求7所述的超文本传输协议数据还原装置,其中,所述第二获取模块包括第一获取子模块、第二获取子模块、第三获取子模块、第四获取子模块和建立子模块,其中
    所述第一获取子模块设置成:获取网络设备镜像转发的终端与网页服务器之间交互的超文本传输协议数据,所述超文本传输协议数据包括超文本传输协议请求数据和超文本传输协议响应数据;
    所述第二获取子模块设置成:根据所交互的超文本传输协议请求数据中的上行数据四元组信息,获取用于存储所述上行数据四元组信息的存储数据区;
    所述第三获取子模块设置成:对所交互的超文本传输协议请求数据进行解析,获取所交互的超文本传输协议请求数据中的统一资源标符URI,并将 所述URI和所述上行数据四元组信息保存至所述存储数据区;
    所述第四获取子模块设置成:根据所交互的超文本传输协议响应数据中的与所述上行数据四元组信息对应的下行数据四元组信息,获取用于存储所述上行数据四元组信息的存储数据区;其中,所述超文本传输协议响应数据为与所述URI对应的记录数据;
    所述建立子模块设置成:将所述记录数据保存至所述获取的存储所述上行数据四元组信息的存储数据区,并建立所述记录数据与所述URI的索引关系。
  10. 根据权利要求9所述的超文本传输协议数据还原装置,其中,所述第二获取模块还包括第五获取子模块、第六获取子模块、查找子模块和第七获取子模块,其中
    所述第五获取子模块设置成:获取所述网页浏览器发送的所述超文本传输协议请求数据;
    所述第六获取子模块设置成:对所获取的超文本传输协议请求数据进行解析,获取所述超文本传输协议请求数据中的上行数据四元组信息和所述待还原记录的URI;
    所述查找子模块设置成:根据所述上行数据四元组信息,查找存储所述上行数据四元组信息的存储数据区;
    所述第七获取子模块设置成:在查找到存储所述上行数据四元组信息的存储数据区后,获取与所述待还原记录的URI对应的待还原记录数据。
  11. 根据权利要求9所述的超文本传输协议数据还原装置,其中,所述第二获取子模块包括检索单元、获取单元和建立单元,其中
    所述检索单元设置成:根据所交互的超文本传输协议请求数据中的上行数据四元组信息,对存储所述上行数据四元组信息的存储数据区进行检索;
    所述获取单元设置成:在检索到存储所述上行数据四元组信息的存储数据区时,获取所述存储数据区;或
    所述建立单元设置成:在未检索到存储所述上行数据四元组信息的存储数据区时,建立一存储所述上行数据四元组信息的存储数据区。
  12. 根据权利要求7所述的超文本传输协议数据还原装置,其中,
    所述网页浏览器配置有具有预设IP地址和预设端口的代理服务器信息;
    所述第一接收模块包括接收单元,其中
    所述接收单元设置成:在所述预设IP地址和预设端口上,接收所述网页浏览器发送的所述超文本传输协议请求。
  13. 一种服务器,包括如权利要求7-12中任一项所述的超文本传输协议数据还原装置。
  14. 一种计算机程序,包括程序指令,当该程序指令被计算机执行时,使得该计算机可执行如权利要求1-6中任一项所述的超文本传输协议数据还原方法。
  15. 一种载有如权利要求14所述计算机程序的载体。
PCT/CN2015/081516 2014-10-16 2015-06-16 一种超文本传输协议数据还原方法及装置 WO2016058401A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410548620.9A CN105577620B (zh) 2014-10-16 2014-10-16 一种超文本传输协议数据还原方法及装置
CN201410548620.9 2014-10-16

Publications (1)

Publication Number Publication Date
WO2016058401A1 true WO2016058401A1 (zh) 2016-04-21

Family

ID=55746087

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/081516 WO2016058401A1 (zh) 2014-10-16 2015-06-16 一种超文本传输协议数据还原方法及装置

Country Status (2)

Country Link
CN (1) CN105577620B (zh)
WO (1) WO2016058401A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111382378B (zh) * 2018-12-28 2023-04-25 北京字节跳动网络技术有限公司 一种资源加载方法、装置、移动终端及存储介质
CN110839060B (zh) * 2019-10-16 2022-02-01 武汉绿色网络信息服务有限责任公司 一种DPI场景中http多会话的文件还原方法和装置
CN112398863A (zh) * 2020-11-19 2021-02-23 全知科技(杭州)有限责任公司 一种tcp长连接非完整流量的数据分析方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101867932A (zh) * 2010-05-21 2010-10-20 武汉虹旭信息技术有限责任公司 一种基于移动互联网的有害信息过滤系统及其方法
CN101887463A (zh) * 2010-07-22 2010-11-17 北京天融信科技有限公司 一种基于虚拟域的http还原展示方法
CN102098331A (zh) * 2010-12-29 2011-06-15 北京锐安科技有限公司 一种还原web类应用内容的方法及其系统
CN102833111A (zh) * 2012-08-30 2012-12-19 北京锐安科技有限公司 一种可视化http数据监管方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1141659C (zh) * 2001-12-04 2004-03-10 上海复旦光华信息科技股份有限公司 远程用户操作过程记录和还原的方法
CN1997030A (zh) * 2006-12-13 2007-07-11 武汉虹旭信息技术有限责任公司 用于http数据还原的方法
CN101827068B (zh) * 2009-03-02 2012-07-11 中国移动通信集团公司 一种业务场景还原方法与装置
CN102098328B (zh) * 2010-12-10 2014-06-11 华为技术有限公司 超文本传输协议http流关联方法和设备
CN102882703B (zh) * 2012-08-31 2015-08-19 赛尔网络有限公司 一种基于http分析的url自动分类分级的系统及方法
CN103491089B (zh) * 2013-09-22 2017-06-20 北京锐安科技有限公司 一种基于http的数据还原中的转码方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101867932A (zh) * 2010-05-21 2010-10-20 武汉虹旭信息技术有限责任公司 一种基于移动互联网的有害信息过滤系统及其方法
CN101887463A (zh) * 2010-07-22 2010-11-17 北京天融信科技有限公司 一种基于虚拟域的http还原展示方法
CN102098331A (zh) * 2010-12-29 2011-06-15 北京锐安科技有限公司 一种还原web类应用内容的方法及其系统
CN102833111A (zh) * 2012-08-30 2012-12-19 北京锐安科技有限公司 一种可视化http数据监管方法及装置

Also Published As

Publication number Publication date
CN105577620A (zh) 2016-05-11
CN105577620B (zh) 2019-12-03

Similar Documents

Publication Publication Date Title
US10860567B2 (en) Storing state in a dynamic content routing network
US7127720B2 (en) Storing state in a dynamic content routing network
US9460222B2 (en) System for rewriting dynamically generated uniform resource locators in proxied hyper text markup language content in accordance with proxy server rules
US7277914B2 (en) Proxy server apparatus and method for providing service using the same
US9348665B2 (en) Mapping messages between web services
US7934252B2 (en) Filtering technique for processing security measures in web service messages
US7089560B1 (en) Architecture for building web applications
CN104268082B (zh) 浏览器的压力测试方法和装置
CN110769009B (zh) 用户身份认证方法及系统
US10469560B1 (en) Reduced latency for subresource transfer
CN102487403B (zh) 由服务器端执行js的方法和装置
RU2642833C2 (ru) Способ и устройство для обеспечения медиаресурса
WO2016058401A1 (zh) 一种超文本传输协议数据还原方法及装置
CN116634046A (zh) 报文处理方法、装置、电子设备及存储介质
US10225358B2 (en) Page push method, device, server and system
CN106582013B (zh) 游戏服务系统、用于向在线的游戏更新数据的方法和装置
US8230002B2 (en) Method and system for automatic setup in web-based applications
WO2013120315A1 (zh) 域名信息的处理方法、无线路由器和客户端
US20130268662A1 (en) Hypertext transfer protocol http stream association method and device
CN115580666B (zh) 面向内容访问的ip-ndn互通方法、系统、设备及存储介质
US8959216B2 (en) Channel manager for accessing elements for a secure web page through a non-secure channel
JP5410487B2 (ja) キャッシュサーバ、ウェブサーバ及び方法
CN103747325B (zh) 一种利用智能电视进行音视频播放的方法及其装置
WO2023067301A1 (en) Subdomain repurposing
Liu et al. A network monitor for HTTPS protocol based on proxy

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15850263

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15850263

Country of ref document: EP

Kind code of ref document: A1