WO2017049971A1 - Packet transmission method and gateway - Google Patents

Packet transmission method and gateway Download PDF

Info

Publication number
WO2017049971A1
WO2017049971A1 PCT/CN2016/086551 CN2016086551W WO2017049971A1 WO 2017049971 A1 WO2017049971 A1 WO 2017049971A1 CN 2016086551 W CN2016086551 W CN 2016086551W WO 2017049971 A1 WO2017049971 A1 WO 2017049971A1
Authority
WO
WIPO (PCT)
Prior art keywords
gateway
upgrade
user equipment
upgrade information
protocol
Prior art date
Application number
PCT/CN2016/086551
Other languages
French (fr)
Chinese (zh)
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 WO2017049971A1 publication Critical patent/WO2017049971A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways

Definitions

  • the present invention relates to the field of communications, and in particular, to a message sending method and a gateway.
  • hypertext is compared to traditional text. Traditional texts, whether textbooks or computer text files, are linear. Readers must read pages one by one in order to read them. The reader has no choice. Unlike hypertext, hypertext is not a linear structure, but a nonlinear mesh structure. When reading, readers don't have to read down in a sequential manner when reading linear articles, but instead selectively read the parts of interest.
  • HTTP1.x uses multiple quintuples to connect to the server to obtain data.
  • the gateway performs DPI (English: Deep packet inspection, Chinese: deep packet inspection) analysis to obtain accurate accounting information of the user. .
  • DPI Korean: Deep packet inspection, Chinese: deep packet inspection
  • the GET in different stream IDs matches the corresponding rules, and it is precisely because this quintuple has many streams of different service data, the same message.
  • the gateway is not practical based on the quintuple and requires a comprehensive upgrade of the base stream ID.
  • HTTP 2.0 brings upgrades to server and gateway device synchronization. Especially when the server also supports HTTP2.0, the gateway is passive, because many versions of the current network may still be earlier versions, and HTTP2.0 is not fully supported. Currently, it takes a lot of time to use the online device version upgrade to support HTTP2.0. Manpower and time period.
  • the invention provides a message sending method and a gateway, which are used to solve the problem of upgrading the device version brought by the HTTP2.0 upgrade.
  • a first aspect of the present invention provides a packet sending method, including:
  • the gateway obtains the packet sent by the user equipment, where the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, where the upgrade information includes the following key fields: a connection field, an upgrade field, and a setting.
  • the gateway parses and identifies the upgrade information
  • the gateway modifies the key fields in the upgrade information separately, so that the server identifies the received message as an HTTP1.x protocol message and then responds to the user equipment with HTTP1.x. Confirmation message of the agreement.
  • the modifying, by the gateway, the keyword segments in the upgrade information separately includes:
  • the gateway inverts the character strings corresponding to the key fields respectively.
  • the modifying, by the gateway, the keyword segments in the upgrade information separately includes:
  • the gateway deletes the key field.
  • the gateway analysis and identification specifically includes:
  • the gateway records the key segment and performs deep packet detection DPI analysis.
  • a second aspect of the present invention provides a gateway, including:
  • An obtaining unit configured to obtain a packet sent by the user equipment, where the packet carries the upgrade information of the Hypertext Transfer Protocol (HTTP2.0) of the user equipment, where the upgrade information includes the following key fields: a connection field, Upgrade fields and set fields;
  • HTTP2.0 Hypertext Transfer Protocol
  • An identification unit configured to parse and identify the upgrade information
  • a modifying unit configured to modify the key fields in the upgrade information separately, so that the server identifies the received message as an HTTP1.x protocol message and then responds to the user equipment with the HTTP1 A confirmation message for the .x protocol.
  • the modifying unit is specifically configured to invert a character string corresponding to the key field.
  • the modifying unit is specifically configured to delete the key field.
  • the The key segment is recorded, and DPI analysis is performed for deep packet inspection.
  • the gateway obtains the packet sent by the user equipment, and the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, and the upgrade information
  • the key field includes: a connection field, an upgrade field, and a setting field; the gateway parses and identifies the upgrade information; the gateway separately modifies the key fields in the upgrade information, so that the server side
  • the received message is identified as a message of the HTTP 1.x protocol and then acknowledges the HTTP1.x protocol confirmation message to the user equipment. Therefore, the information that the user equipment wants to upgrade to HTTP2.0 is dropped back to HTTP1.x, so that the user equipment can not perceive and still continue the service, and can allow the user to continue the service and control the user flow.
  • FIG. 1 is a schematic flowchart diagram of an embodiment of a packet sending method according to the present invention
  • FIG. 2 is a schematic flowchart diagram of another embodiment of a method for sending a packet according to the present invention.
  • FIG. 3 is a schematic flowchart diagram of another embodiment of a packet sending method according to the present invention.
  • FIG. 4 is a schematic structural diagram of an embodiment of a gateway provided by the present invention.
  • FIG. 5 is a schematic structural diagram of another embodiment of a gateway provided by the present invention.
  • first, second, etc. may be used in the embodiments of the present invention to describe each Users or terminals, but users or terminals should not be limited to these terms. These terms are only used to distinguish users or terminals from each other.
  • first user may also be referred to as a second user without departing from the scope of the embodiments of the present invention.
  • second user may also be referred to as a first user; similarly, the second user may also be This is not limited by the embodiment of the present invention.
  • the working process of HTTP is a typical client/server working mode, the client is the WWW browser, and the server is the WWW server.
  • the HTTP working process uses the request/response handshake method: 1 the client connects, the two parties establish a TCP connection; 2 the client makes the request; 3 the server processes the request, returns the response; 4 the server closes the connection.
  • HTTP itself is both simple and efficient in handling large numbers of requests. After the client connects to the server, the information that the client must pass is just the request method and path. Because HTTP is simple, the HTTP server program is small and simple. Therefore, the communication speed via HTTP is very fast, and the time overhead is much smaller than other protocols.
  • HTTP is a connectionless protocol. It means limiting each connection to only one request, the client submits a request after connecting to the server, and disconnects immediately after the client receives the response. With this connectionless protocol, the server won't wait for it when there is no request, and the server will not hold the original request after completing a request.
  • Using a connectionless protocol is like writing a letter. Once you write a good letter, it will be fine. The other party has a new message and another letter. Keeping the connection agreement is similar to making a call. The two sides took turns to talk about a lot of words before they hang up. The phone line is always occupied during the conversation. For connectionless protocols, the server side is easier to implement and can take advantage of online resources.
  • HTTP is a stateless protocol: each request, the content, status, and completion of the response are not retained as historical data for use in the next phase. It is both an advantage and a disadvantage. On the one hand, because there is no state, the protocol has no ability to remember things. If subsequent transaction processing requires prior processing For information, then this information must be saved outside the agreement. A lack of state means that the required front information must be reproduced, which inevitably leads to more information being transmitted per connection. On the other hand, it is precisely because of the lack of state that HTTP is less cumbersome, running faster, and the server responds faster.
  • a content negotiation mechanism is required to enable the web server to pick out the resource entity with the most appropriate form of expression that satisfies the user's requirements. Because many times the source server or the intermediate server providing the cache does not have a unified optimal resource form standard, and the client browser does not necessarily have the ability to handle all entity types.
  • HTTP has good scalability, and it transmits more than just hypertext data. Based on this, the application developer's research and development requirements can easily increase the request method and response state, and run it in the user-customized system.
  • the expanded server can respond to the original standard browser, and can also distinguish the dedicated client program developed by the user and respond accordingly.
  • the HTTP protocol has gone through three phases of 0.9, 1.0, and 1.1.
  • Added meta information add a piece of information, that is, information information, in front of the main data. It enables the server to provide information about the transfer of data. For example, what type of object is being transferred, in which language it is written, and so on;
  • identity authentication a simple "question-answer" basic access authorization method. The process is to first send an identity authentication request to the client by the server, and then the customer sends a confirmation message;
  • Cache mechanism Temporarily save the contents of the previous client request and the response of the web server corresponding to the request in the memory or physical memory of the machine, so that it can be utilized when processing a new client request.
  • HTTP 2.0 Hypertext Transfer Protocol 2.0
  • HTTP 2.0 is the next generation HTTP protocol. It was developed by the IETF's Hypertext Transfer Protocol Bis (httpbis) working group. It is the first update since the release of http1.1 in 1999. HTTP 2.0 conducted its first collaborative collaboration test in August 2013. HTTP/2.0 provides HTTP semantically optimized transport.
  • An HTTP/2.0 connection is made through a TCP connection (application-level protocol [TCP] running above).
  • the client is the TCP connection initiator.
  • the client can initiate an HTTP2.0 negotiation upgrade. If the server supports the HTTP2.0 protocol, the server will answer the HTTPOK 100OK confirmation, otherwise it will directly answer the 100OK confirmation of HTTP1.x.
  • the client can also directly initiate an HTTP 2.0 request message, and the server must respond to the HTTP 2.0 request.
  • the present invention provides a packet sending method, which is mainly executed by a gateway; 1.
  • An embodiment of a message sending method provided by the present invention includes:
  • the gateway obtains the packet sent by the user equipment, where the packet carries the upgrade information of the Hypertext Transfer Protocol (HTTP2.0) of the user equipment, where the upgrade information includes the following key fields: a connection field, an upgrade field, and an upgrade field. , setting the field;
  • HTTP2.0 Hypertext Transfer Protocol
  • the user equipment initiates a TCP connection, establishes a TCP connection with the server, and the gateway acquires a packet sent by the user equipment, where the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment,
  • the upgrade information includes the following key fields: connection field Connection, upgrade field Upgrade, and setting field HTTP2-Setting.
  • the gateway parses and identifies the upgrade information.
  • the gateway identifies the key field in the upgrade information, records the keyword information, and performs DPI and content charging.
  • the gateway separately modifies the key fields in the upgrade information, so that the server identifies the received message as an HTTP1.x protocol message and then responds to the user equipment with the HTTP1. A confirmation message for the .x protocol.
  • the gateway separately modifies the key fields in the upgrade information, for example, respectively, the Connection, Upgrade, and HTTP2-Setting fields in the HTTP header field are reversed or the sequence of the strings is scrambled; or Delete the Connection, Upgrade, and HTTP2-Setting fields. If you choose to delete the device, you need to add the deleted key fields to the HTTP header field before the server responds to the HTTP1.x acknowledgment message from the user device to ensure TCP. The correctness of the sequence.
  • the gateway obtains the packet sent by the user equipment, where the packet carries the upgrade information of the Hypertext Transfer Protocol (HTTP2.0) of the user equipment, where the upgrade information includes the following key fields: a field, an upgrade field, and a setting field; the gateway parses the upgrade information; the gateway separately modifies the key fields in the upgrade information, so that the server identifies the received message A message confirming the HTTP 1.x protocol is sent to the user equipment after the message of the HTTP 1.x protocol. Therefore, the information that the user equipment wants to upgrade to HTTP2.0 is dropped back to HTTP1.x, so that the user equipment can not perceive and still continue the service, and can allow the user to continue the service and control the user flow.
  • HTTP2.0 Hypertext Transfer Protocol
  • another embodiment of a packet sending method provided by the present invention includes:
  • the gateway obtains the packet sent by the user equipment, where the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, where the upgrade information includes the following key fields: a connection field, an upgrade field. , setting the field;
  • the gateway parses and identifies the upgrade information.
  • Steps 201 and 202 refer to the related descriptions in steps 101 and 102, and details are not described herein again.
  • the gateway reverses the character string corresponding to the key field, so that the server identifies the received message as the HTTP1.x protocol message and then responds to the user equipment with HTTP1.
  • a confirmation message for the x protocol is
  • the gateway inverts the character strings corresponding to the key fields respectively, for example, respectively, the Connection, Upgrade, and HTTP2-Setting fields in the HTTP header field are reversed; for example, the system is passing HTTP.
  • the Upgrade request is modified to ensure the correctness of the data transfer.
  • the HTTP to HTTP 2.0 upgrade header field is in the following format:
  • HTTP2-Settings ⁇ base64url encoding of HTTP/2SETTINGS payload>
  • the gateway UGW needs to identify the Connection, Upgrade, and HTTP2-Setting fields in the above example and reverse it:
  • sgnitteS-2PTTH ⁇ base64url encoding of HTTP/2SETTINGS payload>
  • the string order of the Connection, Upgrade, and HTTP2-Setting fields can be disturbed, or a few letters can be added/reduced, and the same effect can be achieved.
  • the gateway obtains the packet sent by the user equipment, where the packet carries the upgrade information of the Hypertext Transfer Protocol (HTTP2.0) of the user equipment, where the upgrade information includes the following key fields: Field, upgrade field, setting field; the gateway parsing identifies the liter Level information; the gateway inverts the character string corresponding to the key field, respectively, so that the server recognizes the received message as an HTTP1.x protocol message and then responds to the user equipment with HTTP1. A confirmation message for the .x protocol. Therefore, the information that the user equipment wants to upgrade to HTTP2.0 is dropped back to HTTP1.x, so that the user equipment can not perceive and still continue the service, and can allow the user to continue the service and control the user flow.
  • HTTP2.0 Hypertext Transfer Protocol
  • another embodiment of a packet sending method provided by the present invention includes:
  • the gateway obtains a packet sent by the user equipment, where the packet carries the upgrade information of the Hypertext Transfer Protocol (HTTP2.0) of the user equipment, where the upgrade information includes the following key fields: a connection field, an upgrade field, and an upgrade field. , setting the field;
  • HTTP2.0 Hypertext Transfer Protocol
  • the gateway parses and identifies the upgrade information.
  • Steps 301 and 302 refer to the related descriptions in steps 101 and 102, and details are not described herein again.
  • the gateway deletes the key field, so that the server identifies the received message as an HTTP1.x protocol message and then responds to the user equipment with an acknowledgement message of the HTTP1.x protocol.
  • the gateway deletes the key field, for example, deletes the Connection, Upgrade, and HTTP2-Setting fields in the HTTP header field; for example, the system ensures the correctness of data transmission after modifying the HTTP Upgrade request.
  • the HTTP to HTTP 2.0 upgrade header field is in the following format:
  • HTTP2-Settings ⁇ base64url encoding of HTTP/2SETTINGS payload>
  • the gateway UGW needs to identify the Connection, Upgrade, and HTTP2-Setting fields in the above example and delete it:
  • the TCP layer needs to maintain the serial numbers on the left and right sides:
  • the gateway UGW modifies the HTTP request header field initiated by the user equipment UE, the TCP sequence will follow The change, therefore, the gateway UGW needs to ensure the correctness of the TCP sequence to avoid protocol-level errors.
  • the gateway obtains the packet sent by the user equipment, where the packet carries the upgrade information of the Hypertext Transfer Protocol (HTTP2.0) of the user equipment, where the upgrade information includes the following key fields: a field, an upgrade field, and a setting field; the gateway parses the upgrade information; the gateway deletes the key field, so that the server identifies the received message as an HTTP1.x protocol message. The acknowledgment message of the HTTP1.x protocol is then replied to the user equipment. Therefore, the information that the user equipment wants to upgrade to HTTP2.0 is dropped back to HTTP1.x, so that the user equipment can not perceive and still continue the service, and can allow the user to continue the service and control the user flow.
  • HTTP2.0 Hypertext Transfer Protocol
  • the user equipment initiates a TCP connection, establishes a TCP connection with the server, and the gateway obtains the packet sent by the user equipment, where the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, and the upgrade information includes the following information.
  • Key field Connection field Connection, upgrade field Upgrade, setting field HTTP2-Setting.
  • the gateway identifies the key fields in the upgrade information, records the keyword information, and performs DPI and content charging.
  • the gateway inverts the character string corresponding to the key field, so that the server recognizes the received message as a packet of the HTTP 1.x protocol, and then responds to the user equipment with the HTTP 1.x protocol. Confirmation message.
  • the Connection, Upgrade, and HTTP2-Setting fields in the HTTP header field are reversed respectively; for example, the system ensures the correctness of data transmission by modifying the HTTP Upgrade request, and the HTTP to HTTP 2.0 upgrade header field is in the following format. :
  • HTTP2-Settings ⁇ base64url encoding of HTTP/2SETTINGS payload>
  • the gateway UGW needs to identify the Connection, Upgrade, and HTTP2-Setting fields in the above example. Points and reverses it:
  • sgnitteS-2PTTH ⁇ base64url encoding of HTTP/2SETTINGS payload>
  • the packet is sent to the server.
  • the server identifies the received packet as the HTTP1.x protocol packet and then responds to the user equipment with HTTP1.
  • the confirmation message of the x protocol ie HTTP1.x 200OK.
  • the gateway includes:
  • the obtaining unit 401 is configured to obtain a packet sent by the user equipment, where the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, where the upgrade information includes the following key field: a connection field. , upgrade fields, set fields;
  • the identifying unit 402 is configured to parse and identify the upgrade information
  • the modifying unit 403 is configured to modify the key fields in the upgrade information to enable the server to identify the received message as a packet of the HTTP 1.x protocol and then respond to the user equipment. A confirmation message for the HTTP1.x protocol.
  • the obtaining unit 401 obtains the packet sent by the user equipment, where the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, where the upgrade information includes the following key segments. a connection field, an upgrade field, and a setting field; the identification unit 402 parses and identifies the upgrade information; the modifying unit 403 separately modifies the key fields in the upgrade information, so that the server receives the report.
  • the message is identified as a message of the HTTP 1.x protocol
  • the user device is replied to the HTTP1.x protocol confirmation message. Therefore, the information that the user equipment wants to upgrade to HTTP2.0 is dropped back to HTTP1.x, so that the user equipment can not perceive and still continue the service, and can allow the user to continue the service and control the user flow.
  • the modifying unit The 403 is specifically configured to invert the character string corresponding to the key field, so that the server identifies the received message as an HTTP1.x protocol message and then responds to the user equipment with the HTTP1.x. Confirmation message of the agreement.
  • the modifying unit 403 is specifically configured to delete the key field, so that the server identifies the received message as HTTP1.
  • the message of the x protocol is replied to the user equipment with an acknowledgement message of the HTTP 1.x protocol.
  • the identifying unit 402 is specifically configured to record the key segment and perform deep packet detection DPI analysis.
  • FIG. 4 illustrates the specific structure of the gateway from the perspective of the functional unit.
  • the specific structure of the gateway is described from the hardware point of view below with reference to the embodiment shown in FIG. 5:
  • the gateway includes a receiver 501, a transmitter 502, a processor 503, and a memory 504.
  • Memory 504 can include read only memory and random access memory and provides instructions and data to processor 503.
  • a portion of the memory 504 can also include a non-volatile random access memory.
  • Memory 504 stores the following elements, executable modules or data structures, or subsets thereof, or their extended sets:
  • Operation instructions include various operation instructions for implementing various operations.
  • Operating system Includes a variety of system programs for implementing various basic services and handling hardware-based tasks.
  • the gateway according to an embodiment of the present invention may have more or less components than those shown in FIG. 5, may combine two or more components, or may have different component configurations or settings, and each component may include one Hardware, software, or a combination of hardware and software, including multiple signal processing and/or application specific integrated circuits.
  • the processor 503 is configured to perform the following operations:
  • the packet carries the upgrade information of the Hypertext Transfer Protocol (HTTP2.0) of the user equipment, where the upgrade information includes the following key fields: a connection field, an upgrade field, and a setting field. ;
  • HTTP2.0 Hypertext Transfer Protocol
  • the received message is identified as a message of the HTTP 1.x protocol and then acknowledges the HTTP1.x protocol confirmation message to the user equipment.
  • the processor 503 obtains the packet sent by the user equipment, where the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, where the upgrade information includes the following key segments. a connection field, an upgrade field, and a setting field; the processor 503 parses and identifies the upgrade information, and separately modifies the key fields in the upgrade information, so that the server identifies the received message.
  • a message confirming the HTTP 1.x protocol is sent to the user equipment after the message of the HTTP 1.x protocol. Therefore, the information that the user equipment wants to upgrade to HTTP2.0 is dropped back to HTTP1.x, so that the user equipment can not perceive and still continue the service, and can allow the user to continue the service and control the user flow.
  • the processor 503 is specifically configured to:
  • the character string corresponding to the key segment is inverted, so that the server recognizes the received message as an HTTP1.x protocol message and then acknowledges the HTTP1.x protocol confirmation message to the user equipment. .
  • the processor 503 is specifically configured to:
  • the key segment is deleted, so that the server recognizes the received message as a packet of the HTTP 1.x protocol, and then responds to the user equipment with an acknowledgement message of the HTTP 1.x protocol.
  • the processor 503 is specifically configured to:
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • Another point that is shown or discussed between each other The coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

Disclosed are a packet transmission method and a gateway for solving a problem in which an equipment has to be upgraded to support Hypertext Transfer Protocol 2.0 (HTTP 2.0). The method comprises: acquiring, by a gateway, a packet transmitted by a user equipment, wherein the packet carries upgrade information for upgrading the user equipment to support HTTP 2.0, and the upgrade information comprises the following key fields: a connection field, an upgrade field, and a setting field; analyzing and identifying, by the gateway, the upgrade information; modifying, by the gateway, the key fields in the upgrade information, respectively, and after identifying, by a server end, the received packet as a packet associated with HTTP 1.x, responding, to the user equipment, with an HTTP 1.x confirmation message.

Description

一种报文发送方法及网关Message sending method and gateway
本申请要求于2015年9月22日提交中国专利局、申请号为201510608336.0、发明名称为“一种报文发送方法及网关”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201510608336.0, entitled "A Message Delivery Method and Gateway", filed on September 22, 2015, the entire contents of which is incorporated herein by reference. in.
技术领域Technical field
本发明涉及通信领域,特别涉及一种报文发送方法及网关。The present invention relates to the field of communications, and in particular, to a message sending method and a gateway.
背景技术Background technique
万维网(英文:World Wide Web,英文缩写:WWW)之父蒂姆·贝纳斯·李早在1990年就提出了超文本传输协议(英文:Hyper Text Transport Protocol,英文缩写:HTTP),HTTP是WWW的基本协议。所谓超文本是与传统文本相比较而言。传统文本,无论是书本、计算机的文本文件,都是线性的,读者在阅读时,必须一页一页顺序地读,读者没有选择的余地。超文本与此不同,它不是一个线性的结构,而是一个非线性的网状结构。读者在阅读时,就不必像读线性文章时以顺序方式向下读,而是有选择地读自己感兴趣的部分。The father of the World Wide Web (English: World Wide Web, English abbreviation: WWW), Tim Benas-Lee, proposed the Hypertext Transport Protocol (English: Hypertext Transport Protocol, HTTP) in 1990. The basic protocol of WWW. The so-called hypertext is compared to traditional text. Traditional texts, whether textbooks or computer text files, are linear. Readers must read pages one by one in order to read them. The reader has no choice. Unlike hypertext, hypertext is not a linear structure, but a nonlinear mesh structure. When reading, readers don't have to read down in a sequential manner when reading linear articles, but instead selectively read the parts of interest.
当前HTTP1.x是采用多五元组形式连接服务器获取数据,当用户请求数据GET到达网关设备,网关进行DPI(英文:Deep packet inspection,中文:深度报文检测)分析,获取用户精确计费信息。HTTP2.0后是相同五元组里面有不同流ID进行传输数据,不同流ID里面的GET进行匹配对应规则,而正是因为这一个五元组里面有很多流传输不同业务数据,相同报文里面也存在多个流的数据,导致业务控制需要更精确、更细,网关基于五元组已经不实用,需要基流ID的全面升级。Currently, HTTP1.x uses multiple quintuples to connect to the server to obtain data. When the user requests data GET to reach the gateway device, the gateway performs DPI (English: Deep packet inspection, Chinese: deep packet inspection) analysis to obtain accurate accounting information of the user. . After HTTP2.0, there are different stream IDs in the same quintuple to transmit data. The GET in different stream IDs matches the corresponding rules, and it is precisely because this quintuple has many streams of different service data, the same message. There are also multiple streams of data in it, which leads to more precise and finer service control. The gateway is not practical based on the quintuple and requires a comprehensive upgrade of the base stream ID.
HTTP2.0给服务器和网关设备同步带来升级。特别是服务器也支持HTTP2.0时候,网关就被动了,因为现网很多版本可能还是比较早的版本,还没有全面支持HTTP2.0,而目前使用网上设备版本升级支持HTTP2.0需要花费大量的人力和时间周期。 HTTP 2.0 brings upgrades to server and gateway device synchronization. Especially when the server also supports HTTP2.0, the gateway is passive, because many versions of the current network may still be earlier versions, and HTTP2.0 is not fully supported. Currently, it takes a lot of time to use the online device version upgrade to support HTTP2.0. Manpower and time period.
发明内容Summary of the invention
本发明提供了一种报文发送方法及网关,用于解决HTTP2.0升级带来的设备版本升级问题。The invention provides a message sending method and a gateway, which are used to solve the problem of upgrading the device version brought by the HTTP2.0 upgrade.
本发明第一方面提供了一种报文发送方法,包括:A first aspect of the present invention provides a packet sending method, including:
网关获取用户设备发送的报文,所述报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段、升级字段、设置字段;The gateway obtains the packet sent by the user equipment, where the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, where the upgrade information includes the following key fields: a connection field, an upgrade field, and a setting. Field
所述网关解析识别所述升级信息;The gateway parses and identifies the upgrade information;
所述网关对所述升级信息中的所述关键字段分别进行修改,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。The gateway modifies the key fields in the upgrade information separately, so that the server identifies the received message as an HTTP1.x protocol message and then responds to the user equipment with HTTP1.x. Confirmation message of the agreement.
结合本发明的第一方面,在本发明第一方面的第一种实现方式中,所述网关对所述升级信息中的所述关键字段分别进行修改具体包括:With reference to the first aspect of the present invention, in a first implementation manner of the first aspect of the present disclosure, the modifying, by the gateway, the keyword segments in the upgrade information separately includes:
所述网关将所述关键字段对应的字符串分别进行反转。The gateway inverts the character strings corresponding to the key fields respectively.
结合本发明的第一方面,在本发明第一方面的第二种实现方式中,所述网关对所述升级信息中的所述关键字段分别进行修改具体包括:With reference to the first aspect of the present invention, in a second implementation manner of the first aspect of the present disclosure, the modifying, by the gateway, the keyword segments in the upgrade information separately includes:
所述网关将所述关键字段删除。The gateway deletes the key field.
结合本发明的第一方面、或第一方面的第一种实现方式、或第一方面的第二种实现方式,在本发明第一方面的第三种实现方式中,所述网关解析识别所述升级信息具体包括:With reference to the first aspect of the present invention, or the first implementation manner of the first aspect, or the second implementation manner of the first aspect, in a third implementation manner of the first aspect of the present invention, the gateway analysis and identification The upgrade information specifically includes:
所述网关记录所述关键字段,并进行深度报文检测DPI分析。The gateway records the key segment and performs deep packet detection DPI analysis.
本发明第二方面提供了一种网关,包括:A second aspect of the present invention provides a gateway, including:
获取单元,用于获取用户设备发送的报文,所述报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段、升级字段、设置字段;An obtaining unit, configured to obtain a packet sent by the user equipment, where the packet carries the upgrade information of the Hypertext Transfer Protocol (HTTP2.0) of the user equipment, where the upgrade information includes the following key fields: a connection field, Upgrade fields and set fields;
识别单元,用于解析识别所述升级信息;An identification unit, configured to parse and identify the upgrade information;
修改单元,用于对所述升级信息中的所述关键字段分别进行修改,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。 a modifying unit, configured to modify the key fields in the upgrade information separately, so that the server identifies the received message as an HTTP1.x protocol message and then responds to the user equipment with the HTTP1 A confirmation message for the .x protocol.
结合本发明的第二方面,在本发明第二方面的第一种实现方式中,所述修改单元具体用于将所述关键字段对应的字符串分别进行反转。With reference to the second aspect of the present invention, in a first implementation manner of the second aspect of the present invention, the modifying unit is specifically configured to invert a character string corresponding to the key field.
结合本发明的第二方面,在本发明第二方面的第二种实现方式中,所述修改单元具体用于将所述关键字段删除。In conjunction with the second aspect of the present invention, in a second implementation manner of the second aspect of the present disclosure, the modifying unit is specifically configured to delete the key field.
结合本发明的第二方面、或第二方面的第一种实现方式、或第二方面的第二种实现方式,在本发明第二方面的第三种实现方式中,所述识别单元具体用于记录所述关键字段,并进行深度报文检测DPI分析。With reference to the second aspect of the present invention, or the first implementation manner of the second aspect, or the second implementation manner of the second aspect, in the third implementation manner of the second aspect of the present invention, the The key segment is recorded, and DPI analysis is performed for deep packet inspection.
从以上技术方案可以看出,本发明具有以下优点:网关获取用户设备发送的报文,所述报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段、升级字段、设置字段;所述网关解析识别所述升级信息;所述网关对所述升级信息中的所述关键字段分别进行修改,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。从而将用户设备想升级到HTTP2.0的信息回落到HTTP1.x,让用户设备感知不到并仍然能继续业务,既能让用户继续业务,也能控制用户流。It can be seen from the above technical solution that the present invention has the following advantages: the gateway obtains the packet sent by the user equipment, and the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, and the upgrade information The key field includes: a connection field, an upgrade field, and a setting field; the gateway parses and identifies the upgrade information; the gateway separately modifies the key fields in the upgrade information, so that the server side The received message is identified as a message of the HTTP 1.x protocol and then acknowledges the HTTP1.x protocol confirmation message to the user equipment. Therefore, the information that the user equipment wants to upgrade to HTTP2.0 is dropped back to HTTP1.x, so that the user equipment can not perceive and still continue the service, and can allow the user to continue the service and control the user flow.
附图说明DRAWINGS
图1为本发明所提供的报文发送方法的一个实施例流程示意图;FIG. 1 is a schematic flowchart diagram of an embodiment of a packet sending method according to the present invention;
图2为本发明所提供的报文发送方法的另一实施例流程示意图;2 is a schematic flowchart diagram of another embodiment of a method for sending a packet according to the present invention;
图3为本发明所提供的报文发送方法的另一实施例流程示意图;FIG. 3 is a schematic flowchart diagram of another embodiment of a packet sending method according to the present invention;
图4为本发明所提供的网关的一个实施例结构示意图;4 is a schematic structural diagram of an embodiment of a gateway provided by the present invention;
图5为本发明所提供的网关的另一实施例结构示意图。FIG. 5 is a schematic structural diagram of another embodiment of a gateway provided by the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
应当理解,尽管在本发明实施例中可能采用术语第一、第二等来描述各 个用户或终端,但用户或终端不应限于这些术语。这些术语仅用来将用户或终端彼此区分开。例如,在不脱离本发明实施例范围的情况下,第一用户也可以被称为第二用户,类似地,第二用户也可以被称为第一用户;同样的,第二用户也可以被称为第三用户等等,本发明实施例对此不做限制。It should be understood that although the terms first, second, etc. may be used in the embodiments of the present invention to describe each Users or terminals, but users or terminals should not be limited to these terms. These terms are only used to distinguish users or terminals from each other. For example, the first user may also be referred to as a second user without departing from the scope of the embodiments of the present invention. Similarly, the second user may also be referred to as a first user; similarly, the second user may also be This is not limited by the embodiment of the present invention.
为便于读者理解,首先对本发明所涉及的知识领域以及应用场景做简单介绍:For the convenience of the reader, the knowledge field and application scenarios involved in the present invention are briefly introduced:
HTTP的工作过程为典型的客户/服务器工作模式,客户即为WWW浏览器,服务器即是WWW服务器。HTTP的工作过程使用请求/响应握手方式:①客户发生连接,双方建立起一个TCP连接;②客户发出请求;③服务器处理请求,返回应答;④服务器关闭连接。The working process of HTTP is a typical client/server working mode, the client is the WWW browser, and the server is the WWW server. The HTTP working process uses the request/response handshake method: 1 the client connects, the two parties establish a TCP connection; 2 the client makes the request; 3 the server processes the request, returns the response; 4 the server closes the connection.
HTTP的主要特点如下:The main features of HTTP are as follows:
1)简单快速1) Simple and fast
HTTP本身既简单,又能有效地处理大量请求。在客户机与服务器连接后,客户机必须传送的信息只是请求方法和路径。正是因为HTTP简单,使得HTTP服务器程序规模小,而且简单。因此经由HTTP的通信速度很快,与其它协议相比,时间开销小得多。HTTP itself is both simple and efficient in handling large numbers of requests. After the client connects to the server, the information that the client must pass is just the request method and path. Because HTTP is simple, the HTTP server program is small and simple. Therefore, the communication speed via HTTP is very fast, and the time overhead is much smaller than other protocols.
2)无连接2) No connection
HTTP是一个无连接协议。它的含义是限制每次连接只处理一个请求、客户机与服务器连接后提交一个请求,在客户机接到应答后马上断开连接。使用这种无连接协议,在没有请求时,服务器不会在那里闲等着,服务器更不会在完成一个请求后还把着原来的请求不放。使用无连接协议就好像是写信,一旦写好信发出便没事了。对方回信有了新信息,再写另一封信。而保持连接协议就跟打电话相似。双方轮番说许多话后才挂断。在对话期间电话线一直被占用。对于无连接协议而言,服务器一方实现起来比较容易,又能充分利用网上的资源。HTTP is a connectionless protocol. It means limiting each connection to only one request, the client submits a request after connecting to the server, and disconnects immediately after the client receives the response. With this connectionless protocol, the server won't wait for it when there is no request, and the server will not hold the original request after completing a request. Using a connectionless protocol is like writing a letter. Once you write a good letter, it will be fine. The other party has a new message and another letter. Keeping the connection agreement is similar to making a call. The two sides took turns to talk about a lot of words before they hang up. The phone line is always occupied during the conversation. For connectionless protocols, the server side is easier to implement and can take advantage of online resources.
3)无状态3) No state
HTTP是无状态的协议:每一次请求,应答的内容、状态及完成情况不作为历史数据保留到下一阶段使用。它既是优点也是缺点。一方面,由于没有状态,协议对事物处理没有记忆能力。如果后续事物处理需要前面处理的 有关信息,那么这些信息必须在协议外面保存。缺少状态意味着所需要的前面信息必须重现,势必导致每次连接要传送较多的信息。另一方面,也正是由于缺少状态使得HTTP累赘少,运行速度高,服务器应答快。HTTP is a stateless protocol: each request, the content, status, and completion of the response are not retained as historical data for use in the next phase. It is both an advantage and a disadvantage. On the one hand, because there is no state, the protocol has no ability to remember things. If subsequent transaction processing requires prior processing For information, then this information must be saved outside the agreement. A lack of state means that the required front information must be reproduced, which inevitably leads to more information being transmitted per connection. On the other hand, it is precisely because of the lack of state that HTTP is less cumbersome, running faster, and the server responds faster.
4)内容协商4) Content negotiation
当服务器能够对客户的请求提供多种表示形式应答时,需要使用内容协商机制,使Web服务器可以从中挑选出能满足用户要求的具有最适合表达形式的资源实体。因为很多时候源服务器或提供缓存的中间服务器并不会有一个统一的最佳资源形式标准,而用户端浏览器也不一定有能力处理所有的实体类型。When the server is able to provide multiple representation responses to the client's request, a content negotiation mechanism is required to enable the web server to pick out the resource entity with the most appropriate form of expression that satisfies the user's requirements. Because many times the source server or the intermediate server providing the cache does not have a unified optimal resource form standard, and the client browser does not necessarily have the ability to handle all entity types.
5)易于扩充5) Easy to expand
作为一个公开发布使用协议,HTTP具有良好的可扩充性,它传输的已不仅仅是超文本数据。在此基础上针对应用开发者的研究、开发要求,可以很容易地增加请求方法和响应状态,运行于用户定制的系统之中。经过扩充的服务器,能够响应原有标准的浏览器,也能够区别出用户自己开发的专用客户程序,做出相应的响应处理。As a publicly available usage protocol, HTTP has good scalability, and it transmits more than just hypertext data. Based on this, the application developer's research and development requirements can easily increase the request method and response state, and run it in the user-customized system. The expanded server can respond to the original standard browser, and can also distinguish the dedicated client program developed by the user and respond accordingly.
HTTP协议发展HTTP protocol development
WWW联盟成立后,组织了IETF(英文:Internet Engineering Task Force,中文:因特网工程任务组)小组进一步完善和发布HTTP协议。至今,HTTP协议经历了0.9、1.0、1.1三个阶段。After the establishment of the WWW Alliance, the IETF (English: Internet Engineering Task Force) group was further developed to further improve and publish the HTTP protocol. So far, the HTTP protocol has gone through three phases of 0.9, 1.0, and 1.1.
1)HTTP/0.9特征:1) HTTP/0.9 features:
①用于各种数据信息的简洁快速协议;1 a simple and fast protocol for various data information;
②具有典型的无状态性;2 has a typical statelessness;
③无连接性;3 no connectivity;
④无法使用内容协商;4 can not use content negotiation;
⑤无法显示和处理图片。5 Cannot display and process images.
2)HTTP/1.0特征:2) HTTP/1.0 features:
①单快速;1 single fast;
②无状态性;2 stateless;
③无连接性; 3 no connectivity;
④无法使用内容协商;4 can not use content negotiation;
⑤增加了元信息:在主要数据前加上一块信息,即信息的信息。它使服务器能够提供传送数据的有关信息。例如,传送对象是哪种类型,是用哪种语言书写的等等;5 Added meta information: add a piece of information, that is, information information, in front of the main data. It enables the server to provide information about the transfer of data. For example, what type of object is being transferred, in which language it is written, and so on;
⑥支持多种内容的形式,如图片、音频等。6 supports a variety of content forms, such as pictures, audio, and so on.
3)HTTP/1.1特征:3) HTTP/1.1 features:
①持续性连接:允许请求一个web页面的浏览器发起一次连接就可从服务器上下载多个文件;1Continuous connection: Allows a browser requesting a web page to initiate a connection to download multiple files from the server;
②仍无状态性,但可提供状态控制;2 is still stateless, but provides state control;
③新增加了资源请求:在原有GET、HEAD、POST几种方法的基础上增加了OPTIONS、PUT、DELETE和TRACE;3 new resource request has been added: OPTIONS, PUT, DELETE and TRACE have been added based on the original GET, HEAD and POST methods;
④身份认证:一种简单的“提问-回答”式的基本访问授权方法。过程是先由服务器向客户发出身份鉴别请求,再由客户发出确认信息;4 identity authentication: a simple "question-answer" basic access authorization method. The process is to first send an identity authentication request to the client by the server, and then the customer sends a confirmation message;
⑤使用内容协商机制;5 use the content negotiation mechanism;
⑥缓存(Cache)机制:将先前的客户请求以及请求所对应的Web服务器响应的内容暂时保存在机器的内存或物理存储器中,使得在处理新的客户请求时可以利用。6 Cache mechanism: Temporarily save the contents of the previous client request and the response of the web server corresponding to the request in the memory or physical memory of the machine, so that it can be utilized when processing a new client request.
3)HTTP/2.0介绍:3) Introduction to HTTP/2.0:
HTTP2.0即超文本传输协议2.0,是下一代HTTP协议。是由IETF的Hypertext Transfer Protocol Bis(httpbis)工作小组进行开发。是自1999年http1.1发布后的首个更新。HTTP 2.0在2013年8月进行首次合作共事性测试。HTTP/2.0提供的HTTP语义优化的运输。HTTP 2.0, Hypertext Transfer Protocol 2.0, is the next generation HTTP protocol. It was developed by the IETF's Hypertext Transfer Protocol Bis (httpbis) working group. It is the first update since the release of http1.1 in 1999. HTTP 2.0 conducted its first collaborative collaboration test in August 2013. HTTP/2.0 provides HTTP semantically optimized transport.
一个HTTP/2.0连接通过一个TCP连接(上面运行的应用程序级协议[TCP])。客户端是TCP连接发起者。逻辑结构的HTTP/2.0协议:成帧,溪流,和应用程序映射。客户端可以发起HTTP2.0协商升级,如果服务器支持HTTP2.0协议的话,服务器就应答HTTP2.0的100OK确认,否则直接应答HTTP1.x的100OK确认。客户端也可以直接发起HTTP2.0请求报文,服务器必须应答HTTP2.0的请求。An HTTP/2.0 connection is made through a TCP connection (application-level protocol [TCP] running above). The client is the TCP connection initiator. Logical structure of the HTTP/2.0 protocol: framing, streams, and application mapping. The client can initiate an HTTP2.0 negotiation upgrade. If the server supports the HTTP2.0 protocol, the server will answer the HTTPOK 100OK confirmation, otherwise it will directly answer the 100OK confirmation of HTTP1.x. The client can also directly initiate an HTTP 2.0 request message, and the server must respond to the HTTP 2.0 request.
本发明提供了一种报文发送方法,本方法主要由网关执行;请参阅图 1,本发明所提供的报文发送方法的一个实施例包括:The present invention provides a packet sending method, which is mainly executed by a gateway; 1. An embodiment of a message sending method provided by the present invention includes:
101、网关获取用户设备发送的报文,所述报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段、升级字段、设置字段;The gateway obtains the packet sent by the user equipment, where the packet carries the upgrade information of the Hypertext Transfer Protocol (HTTP2.0) of the user equipment, where the upgrade information includes the following key fields: a connection field, an upgrade field, and an upgrade field. , setting the field;
需要说明的是,用户设备发起TCP连接,与服务器建立TCP连接,网关获取用户设备发送的报文,该报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段Connection、升级字段Upgrade、设置字段HTTP2-Setting。It should be noted that the user equipment initiates a TCP connection, establishes a TCP connection with the server, and the gateway acquires a packet sent by the user equipment, where the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, The upgrade information includes the following key fields: connection field Connection, upgrade field Upgrade, and setting field HTTP2-Setting.
102、所述网关解析识别所述升级信息;102. The gateway parses and identifies the upgrade information.
需要说明的是,网关识别该升级信息中的关键字段,记录关键字信息,做DPI、内容计费。It should be noted that the gateway identifies the key field in the upgrade information, records the keyword information, and performs DPI and content charging.
103、所述网关对所述升级信息中的所述关键字段分别进行修改,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。103. The gateway separately modifies the key fields in the upgrade information, so that the server identifies the received message as an HTTP1.x protocol message and then responds to the user equipment with the HTTP1. A confirmation message for the .x protocol.
需要说明的是,网关对所述升级信息中的所述关键字段分别进行修改,例如分别将HTTP头域中的Connection、Upgrade、HTTP2-Setting字段进行反转或者打乱字符串的顺序;或者将Connection、Upgrade、HTTP2-Setting字段删除,若选择删除的方式,在服务器应答用户设备HTTP1.x协议的确认消息之前,还需将删除的上述关键字段添加到HTTP头域中,以保证TCP序列的正确性。It should be noted that the gateway separately modifies the key fields in the upgrade information, for example, respectively, the Connection, Upgrade, and HTTP2-Setting fields in the HTTP header field are reversed or the sequence of the strings is scrambled; or Delete the Connection, Upgrade, and HTTP2-Setting fields. If you choose to delete the device, you need to add the deleted key fields to the HTTP header field before the server responds to the HTTP1.x acknowledgment message from the user device to ensure TCP. The correctness of the sequence.
本发明实施例中,网关获取用户设备发送的报文,所述报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段、升级字段、设置字段;所述网关解析识别所述升级信息;所述网关对所述升级信息中的所述关键字段分别进行修改,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。从而将用户设备想升级到HTTP2.0的信息回落到HTTP1.x,让用户设备感知不到并仍然能继续业务,既能让用户继续业务,也能控制用户流。In the embodiment of the present invention, the gateway obtains the packet sent by the user equipment, where the packet carries the upgrade information of the Hypertext Transfer Protocol (HTTP2.0) of the user equipment, where the upgrade information includes the following key fields: a field, an upgrade field, and a setting field; the gateway parses the upgrade information; the gateway separately modifies the key fields in the upgrade information, so that the server identifies the received message A message confirming the HTTP 1.x protocol is sent to the user equipment after the message of the HTTP 1.x protocol. Therefore, the information that the user equipment wants to upgrade to HTTP2.0 is dropped back to HTTP1.x, so that the user equipment can not perceive and still continue the service, and can allow the user to continue the service and control the user flow.
请参阅图2,本发明所提供的报文发送方法的另一实施例包括: Referring to FIG. 2, another embodiment of a packet sending method provided by the present invention includes:
201、网关获取用户设备发送的报文,所述报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段、升级字段、设置字段;The gateway obtains the packet sent by the user equipment, where the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, where the upgrade information includes the following key fields: a connection field, an upgrade field. , setting the field;
202、所述网关解析识别所述升级信息;202. The gateway parses and identifies the upgrade information.
步骤201、202对应参考步骤101、102中相关说明,此处不再赘述。 Steps 201 and 202 refer to the related descriptions in steps 101 and 102, and details are not described herein again.
203、所述网关将所述关键字段对应的字符串分别进行反转,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。203. The gateway reverses the character string corresponding to the key field, so that the server identifies the received message as the HTTP1.x protocol message and then responds to the user equipment with HTTP1. A confirmation message for the x protocol.
需要说明的是,所述网关将所述关键字段对应的字符串分别进行反转,例如分别将HTTP头域中的Connection、Upgrade、HTTP2-Setting字段进行反转;例如,系统在通过将HTTP Upgrade请求修改后确保数据传输的正确性,HTTP到HTTP2.0的升级头域按照以下格式:It should be noted that the gateway inverts the character strings corresponding to the key fields respectively, for example, respectively, the Connection, Upgrade, and HTTP2-Setting fields in the HTTP header field are reversed; for example, the system is passing HTTP. The Upgrade request is modified to ensure the correctness of the data transfer. The HTTP to HTTP 2.0 upgrade header field is in the following format:
GET/default.htm HTTP/1.1GET/default.htm HTTP/1.1
Host:server.example.comHost:server.example.com
Connection:Upgrade,HTTP2-SettingsConnection:Upgrade,HTTP2-Settings
Upgrade:h2cUpgrade: h2c
HTTP2-Settings:<base64url encoding of HTTP/2SETTINGS payload>HTTP2-Settings: <base64url encoding of HTTP/2SETTINGS payload>
网关UGW需识别上例中的Connection、Upgrade、HTTP2-Setting字段部分,并将其反转:The gateway UGW needs to identify the Connection, Upgrade, and HTTP2-Setting fields in the above example and reverse it:
GET/default.htm HTTP/1.1GET/default.htm HTTP/1.1
Host:server.example.comHost:server.example.com
noitcennoC:Upgrade,HTTP2-SettingsnoitcennoC:Upgrade,HTTP2-Settings
edargpU:h2cedargpU:h2c
sgnitteS-2PTTH:<base64url encoding of HTTP/2SETTINGS payload>sgnitteS-2PTTH: <base64url encoding of HTTP/2SETTINGS payload>
上述实施例中,还可将Connection、Upgrade、HTTP2-Setting字段的字符串顺序打乱,抑或增加/减少几个字母,也可达到同样的效果。In the above embodiment, the string order of the Connection, Upgrade, and HTTP2-Setting fields can be disturbed, or a few letters can be added/reduced, and the same effect can be achieved.
本发明实施例中,网关获取用户设备发送的报文,所述报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段、升级字段、设置字段;所述网关解析识别所述升 级信息;所述网关将所述关键字段对应的字符串分别进行反转,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。从而将用户设备想升级到HTTP2.0的信息回落到HTTP1.x,让用户设备感知不到并仍然能继续业务,既能让用户继续业务,也能控制用户流。In the embodiment of the present invention, the gateway obtains the packet sent by the user equipment, where the packet carries the upgrade information of the Hypertext Transfer Protocol (HTTP2.0) of the user equipment, where the upgrade information includes the following key fields: Field, upgrade field, setting field; the gateway parsing identifies the liter Level information; the gateway inverts the character string corresponding to the key field, respectively, so that the server recognizes the received message as an HTTP1.x protocol message and then responds to the user equipment with HTTP1. A confirmation message for the .x protocol. Therefore, the information that the user equipment wants to upgrade to HTTP2.0 is dropped back to HTTP1.x, so that the user equipment can not perceive and still continue the service, and can allow the user to continue the service and control the user flow.
请参阅图3,本发明所提供的报文发送方法的另一实施例包括:Referring to FIG. 3, another embodiment of a packet sending method provided by the present invention includes:
301、网关获取用户设备发送的报文,所述报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段、升级字段、设置字段;301. The gateway obtains a packet sent by the user equipment, where the packet carries the upgrade information of the Hypertext Transfer Protocol (HTTP2.0) of the user equipment, where the upgrade information includes the following key fields: a connection field, an upgrade field, and an upgrade field. , setting the field;
302、所述网关解析识别所述升级信息;302. The gateway parses and identifies the upgrade information.
步骤301、302对应参考步骤101、102中相关说明,此处不再赘述。 Steps 301 and 302 refer to the related descriptions in steps 101 and 102, and details are not described herein again.
303、所述网关将所述关键字段删除,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。303. The gateway deletes the key field, so that the server identifies the received message as an HTTP1.x protocol message and then responds to the user equipment with an acknowledgement message of the HTTP1.x protocol.
需要说明的是,所述网关将所述关键字段删除,例如将HTTP头域中的Connection、Upgrade、HTTP2-Setting字段删除;例如,系统在通过将HTTP Upgrade请求修改后确保数据传输的正确性,HTTP到HTTP2.0的升级头域按照以下格式:It should be noted that the gateway deletes the key field, for example, deletes the Connection, Upgrade, and HTTP2-Setting fields in the HTTP header field; for example, the system ensures the correctness of data transmission after modifying the HTTP Upgrade request. The HTTP to HTTP 2.0 upgrade header field is in the following format:
GET/default.htm HTTP/1.1GET/default.htm HTTP/1.1
Host:server.example.comHost:server.example.com
Connection:Upgrade,HTTP2-SettingsConnection:Upgrade,HTTP2-Settings
Upgrade:h2cUpgrade: h2c
HTTP2-Settings:<base64url encoding of HTTP/2SETTINGS payload>HTTP2-Settings: <base64url encoding of HTTP/2SETTINGS payload>
网关UGW需识别上例中的Connection、Upgrade、HTTP2-Setting字段部分,并将其删除:The gateway UGW needs to identify the Connection, Upgrade, and HTTP2-Setting fields in the above example and delete it:
GET/default.htm HTTP/1.1GET/default.htm HTTP/1.1
Host:server.example.comHost:server.example.com
在选择删除方式后,TCP层需要维护左右两侧序列号:After selecting the deletion mode, the TCP layer needs to maintain the serial numbers on the left and right sides:
网关UGW修改了用户设备UE发起的HTTP请求头域后,TCP序列会随 之变化,因此网关UGW需保证TCP序列的正确性,避免发生协议层面的错误。After the gateway UGW modifies the HTTP request header field initiated by the user equipment UE, the TCP sequence will follow The change, therefore, the gateway UGW needs to ensure the correctness of the TCP sequence to avoid protocol-level errors.
本发明实施例中,网关获取用户设备发送的报文,所述报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段、升级字段、设置字段;所述网关解析识别所述升级信息;所述网关将所述关键字段删除,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。从而将用户设备想升级到HTTP2.0的信息回落到HTTP1.x,让用户设备感知不到并仍然能继续业务,既能让用户继续业务,也能控制用户流。In the embodiment of the present invention, the gateway obtains the packet sent by the user equipment, where the packet carries the upgrade information of the Hypertext Transfer Protocol (HTTP2.0) of the user equipment, where the upgrade information includes the following key fields: a field, an upgrade field, and a setting field; the gateway parses the upgrade information; the gateway deletes the key field, so that the server identifies the received message as an HTTP1.x protocol message. The acknowledgment message of the HTTP1.x protocol is then replied to the user equipment. Therefore, the information that the user equipment wants to upgrade to HTTP2.0 is dropped back to HTTP1.x, so that the user equipment can not perceive and still continue the service, and can allow the user to continue the service and control the user flow.
为便于理解,下面以一具体应用场景对本发明实施例中报文发送方法进行具体描述:For the sake of understanding, the packet sending method in the embodiment of the present invention is specifically described in a specific application scenario:
用户设备发起TCP连接,与服务器建立TCP连接,网关获取用户设备发送的报文,该报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段Connection、升级字段Upgrade、设置字段HTTP2-Setting。The user equipment initiates a TCP connection, establishes a TCP connection with the server, and the gateway obtains the packet sent by the user equipment, where the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, and the upgrade information includes the following information. Key field: Connection field Connection, upgrade field Upgrade, setting field HTTP2-Setting.
网关识别该升级信息中的关键字段,记录关键字信息,做DPI、内容计费。The gateway identifies the key fields in the upgrade information, records the keyword information, and performs DPI and content charging.
所述网关将所述关键字段对应的字符串分别进行反转,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。例如分别将HTTP头域中的Connection、Upgrade、HTTP2-Setting字段进行反转;例如,系统在通过将HTTP Upgrade请求修改后确保数据传输的正确性,HTTP到HTTP2.0的升级头域按照以下格式:The gateway inverts the character string corresponding to the key field, so that the server recognizes the received message as a packet of the HTTP 1.x protocol, and then responds to the user equipment with the HTTP 1.x protocol. Confirmation message. For example, the Connection, Upgrade, and HTTP2-Setting fields in the HTTP header field are reversed respectively; for example, the system ensures the correctness of data transmission by modifying the HTTP Upgrade request, and the HTTP to HTTP 2.0 upgrade header field is in the following format. :
GET/default.htm HTTP/1.1GET/default.htm HTTP/1.1
Host:server.example.comHost:server.example.com
Connection:Upgrade,HTTP2-SettingsConnection:Upgrade,HTTP2-Settings
Upgrade:h2cUpgrade: h2c
HTTP2-Settings:<base64url encoding of HTTP/2SETTINGS payload>HTTP2-Settings: <base64url encoding of HTTP/2SETTINGS payload>
网关UGW需识别上例中的Connection、Upgrade、HTTP2-Setting字段部 分,并将其反转:The gateway UGW needs to identify the Connection, Upgrade, and HTTP2-Setting fields in the above example. Points and reverses it:
GET/default.htm HTTP/1.1GET/default.htm HTTP/1.1
Host:server.example.comHost:server.example.com
noitcennoC:Upgrade,HTTP2-SettingsnoitcennoC:Upgrade,HTTP2-Settings
edargpU:h2cedargpU:h2c
sgnitteS-2PTTH:<base64url encoding of HTTP/2SETTINGS payload>sgnitteS-2PTTH: <base64url encoding of HTTP/2SETTINGS payload>
或者还可将Connection、Upgrade、HTTP2-Setting字段的字符串顺序打乱,抑或增加/减少几个字母,也可达到同样的效果。Or you can also mess up the string order of the Connection, Upgrade, and HTTP2-Setting fields, or increase/decrease a few letters to achieve the same effect.
网关将上述Connection、Upgrade、HTTP2-Setting字段反转后将报文发送给服务器端,服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息,即HTTP1.x 200OK。After the gateway reverses the above Connection, Upgrade, and HTTP2-Setting fields, the packet is sent to the server. The server identifies the received packet as the HTTP1.x protocol packet and then responds to the user equipment with HTTP1. The confirmation message of the x protocol, ie HTTP1.x 200OK.
以上对报文发送方法进行了说明,下面将从装置的角度对网关的结构进行说明,请参阅图4,该网关包括:The method for sending a message is described above. The structure of the gateway will be described from the perspective of the device. Referring to FIG. 4, the gateway includes:
获取单元401,用于获取用户设备发送的报文,所述报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段、升级字段、设置字段;The obtaining unit 401 is configured to obtain a packet sent by the user equipment, where the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, where the upgrade information includes the following key field: a connection field. , upgrade fields, set fields;
识别单元402,用于解析识别所述升级信息;The identifying unit 402 is configured to parse and identify the upgrade information;
修改单元403,用于对所述升级信息中的所述关键字段分别进行修改,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。The modifying unit 403 is configured to modify the key fields in the upgrade information to enable the server to identify the received message as a packet of the HTTP 1.x protocol and then respond to the user equipment. A confirmation message for the HTTP1.x protocol.
本发明实施例中,获取单元401获取用户设备发送的报文,所述报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段、升级字段、设置字段;识别单元402解析识别所述升级信息;修改单元403对所述升级信息中的所述关键字段分别进行修改,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。从而将用户设备想升级到HTTP2.0的信息回落到HTTP1.x,让用户设备感知不到并仍然能继续业务,既能让用户继续业务,也能控制用户流。In the embodiment of the present invention, the obtaining unit 401 obtains the packet sent by the user equipment, where the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, where the upgrade information includes the following key segments. a connection field, an upgrade field, and a setting field; the identification unit 402 parses and identifies the upgrade information; the modifying unit 403 separately modifies the key fields in the upgrade information, so that the server receives the report. After the message is identified as a message of the HTTP 1.x protocol, the user device is replied to the HTTP1.x protocol confirmation message. Therefore, the information that the user equipment wants to upgrade to HTTP2.0 is dropped back to HTTP1.x, so that the user equipment can not perceive and still continue the service, and can allow the user to continue the service and control the user flow.
基于上述实施例中的网关,可选的,在一个实施方式中,所述修改单元 403具体用于将所述关键字段对应的字符串分别进行反转,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。Based on the gateway in the above embodiment, optionally, in one embodiment, the modifying unit The 403 is specifically configured to invert the character string corresponding to the key field, so that the server identifies the received message as an HTTP1.x protocol message and then responds to the user equipment with the HTTP1.x. Confirmation message of the agreement.
基于上述实施例中的网关,可选的,在一个实施方式中,所述修改单元403具体用于将所述关键字段删除,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。Based on the gateway in the foregoing embodiment, optionally, in an implementation manner, the modifying unit 403 is specifically configured to delete the key field, so that the server identifies the received message as HTTP1. The message of the x protocol is replied to the user equipment with an acknowledgement message of the HTTP 1.x protocol.
基于上述实施例中的网关,可选的,在一个实施方式中,所述识别单元402具体用于记录所述关键字段,并进行深度报文检测DPI分析。Based on the gateway in the foregoing embodiment, optionally, in an implementation manner, the identifying unit 402 is specifically configured to record the key segment and perform deep packet detection DPI analysis.
图4所示的实施例从功能单元的角度对网关的具体结构进行了说明,以下结合图5所示的实施例从硬件角度对网关的具体结构进行说明:The embodiment shown in FIG. 4 illustrates the specific structure of the gateway from the perspective of the functional unit. The specific structure of the gateway is described from the hardware point of view below with reference to the embodiment shown in FIG. 5:
如图5所示,该网关包括:接收器501、发射器502、处理器503和存储器504。存储器504可以包括只读存储器和随机存取存储器,并向处理器503提供指令和数据。存储器504的一部分还可以包括非易失性随机存取存储器。As shown in FIG. 5, the gateway includes a receiver 501, a transmitter 502, a processor 503, and a memory 504. Memory 504 can include read only memory and random access memory and provides instructions and data to processor 503. A portion of the memory 504 can also include a non-volatile random access memory.
存储器504存储了如下的元素,可执行模块或者数据结构,或者它们的子集,或者它们的扩展集: Memory 504 stores the following elements, executable modules or data structures, or subsets thereof, or their extended sets:
操作指令:包括各种操作指令,用于实现各种操作。Operation instructions: include various operation instructions for implementing various operations.
操作系统:包括各种系统程序,用于实现各种基础业务以及处理基于硬件的任务。Operating system: Includes a variety of system programs for implementing various basic services and handling hardware-based tasks.
本发明实施例涉及的网关可以具有比图5所示出的更多或更少的部件,可以组合两个或更多个部件,或者可以具有不同的部件配置或设置,各个部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件或硬件和软件的组合实现。The gateway according to an embodiment of the present invention may have more or less components than those shown in FIG. 5, may combine two or more components, or may have different component configurations or settings, and each component may include one Hardware, software, or a combination of hardware and software, including multiple signal processing and/or application specific integrated circuits.
本发明实施例中,该处理器503用于执行如下操作:In the embodiment of the present invention, the processor 503 is configured to perform the following operations:
获取用户设备发送的报文,所述报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段、升级字段、设置字段;Obtaining a packet sent by the user equipment, where the packet carries the upgrade information of the Hypertext Transfer Protocol (HTTP2.0) of the user equipment, where the upgrade information includes the following key fields: a connection field, an upgrade field, and a setting field. ;
解析识别所述升级信息;Parsing and identifying the upgrade information;
对所述升级信息中的所述关键字段分别进行修改,以使服务器端将接收 到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。Modifying the key fields in the upgrade information separately so that the server side will receive The received message is identified as a message of the HTTP 1.x protocol and then acknowledges the HTTP1.x protocol confirmation message to the user equipment.
本发明实施例中,处理器503获取用户设备发送的报文,所述报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段、升级字段、设置字段;处理器503解析识别所述升级信息,并对所述升级信息中的所述关键字段分别进行修改,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。从而将用户设备想升级到HTTP2.0的信息回落到HTTP1.x,让用户设备感知不到并仍然能继续业务,既能让用户继续业务,也能控制用户流。In the embodiment of the present invention, the processor 503 obtains the packet sent by the user equipment, where the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, where the upgrade information includes the following key segments. a connection field, an upgrade field, and a setting field; the processor 503 parses and identifies the upgrade information, and separately modifies the key fields in the upgrade information, so that the server identifies the received message. A message confirming the HTTP 1.x protocol is sent to the user equipment after the message of the HTTP 1.x protocol. Therefore, the information that the user equipment wants to upgrade to HTTP2.0 is dropped back to HTTP1.x, so that the user equipment can not perceive and still continue the service, and can allow the user to continue the service and control the user flow.
可选的,在一个实施方式中,该处理器503具体用于:Optionally, in an implementation manner, the processor 503 is specifically configured to:
将所述关键字段对应的字符串分别进行反转,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。The character string corresponding to the key segment is inverted, so that the server recognizes the received message as an HTTP1.x protocol message and then acknowledges the HTTP1.x protocol confirmation message to the user equipment. .
可选的,在一个实施方式中,该处理器503具体用于:Optionally, in an implementation manner, the processor 503 is specifically configured to:
将所述关键字段删除,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。The key segment is deleted, so that the server recognizes the received message as a packet of the HTTP 1.x protocol, and then responds to the user equipment with an acknowledgement message of the HTTP 1.x protocol.
可选的,在一个实施方式中,该处理器503具体用于:Optionally, in an implementation manner, the processor 503 is specifically configured to:
记录所述关键字段,并进行深度报文检测DPI分析。Record the key fields and perform deep packet inspection DPI analysis.
上述装置的相关描述可以对应参阅方法实施例部分的相关描述和效果进行理解,本处不做过多赘述。The related descriptions of the above-mentioned devices can be understood by referring to the related descriptions and effects of the method embodiments, and no further description is made herein.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间 的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. Another point that is shown or discussed between each other The coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。 The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the embodiments are modified, or the equivalents of the technical features are replaced by the equivalents of the technical solutions of the embodiments of the present invention.

Claims (8)

  1. 一种报文发送方法,其特征在于,包括:A message sending method, comprising:
    网关获取用户设备发送的报文,所述报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段、升级字段、设置字段;The gateway obtains the packet sent by the user equipment, where the packet carries the upgrade information of the hypertext transfer protocol HTTP2.0 protocol of the user equipment, where the upgrade information includes the following key fields: a connection field, an upgrade field, and a setting. Field
    所述网关解析识别所述升级信息;The gateway parses and identifies the upgrade information;
    所述网关对所述升级信息中的所述关键字段分别进行修改,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。The gateway modifies the key fields in the upgrade information separately, so that the server identifies the received message as an HTTP1.x protocol message and then responds to the user equipment with HTTP1.x. Confirmation message of the agreement.
  2. 根据权利要求1所述的方法,其特征在于,所述网关对所述升级信息中的所述关键字段分别进行修改具体包括:The method according to claim 1, wherein the modifying, by the gateway, the keyword segments in the upgrade information separately comprises:
    所述网关将所述关键字段对应的字符串分别进行反转。The gateway inverts the character strings corresponding to the key fields respectively.
  3. 根据权利要求1所述的方法,其特征在于,所述网关对所述升级信息中的所述关键字段分别进行修改具体包括:The method according to claim 1, wherein the modifying, by the gateway, the keyword segments in the upgrade information separately comprises:
    所述网关将所述关键字段删除。The gateway deletes the key field.
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述网关解析识别所述升级信息具体包括:The method according to any one of claims 1 to 3, wherein the gateway parsing and identifying the upgrade information specifically includes:
    所述网关记录所述关键字段,并进行深度报文检测DPI分析。The gateway records the key segment and performs deep packet detection DPI analysis.
  5. 一种网关,其特征在于,包括:A gateway, comprising:
    获取单元,用于获取用户设备发送的报文,所述报文中携带所述用户设备的超文本传输协议HTTP2.0协议的升级信息,所述升级信息中包括如下关键字段:连接字段、升级字段、设置字段;An obtaining unit, configured to obtain a packet sent by the user equipment, where the packet carries the upgrade information of the Hypertext Transfer Protocol (HTTP2.0) of the user equipment, where the upgrade information includes the following key fields: a connection field, Upgrade fields and set fields;
    识别单元,用于解析识别所述升级信息;An identification unit, configured to parse and identify the upgrade information;
    修改单元,用于对所述升级信息中的所述关键字段分别进行修改,以使服务器端将接收到的所述报文识别为HTTP1.x协议的报文后向所述用户设备应答HTTP1.x协议的确认消息。a modifying unit, configured to modify the key fields in the upgrade information separately, so that the server identifies the received message as an HTTP1.x protocol message and then responds to the user equipment with the HTTP1 A confirmation message for the .x protocol.
  6. 根据权利要求5所述的网关,其特征在于,所述修改单元具体用于将所述关键字段对应的字符串分别进行反转。The gateway according to claim 5, wherein the modifying unit is specifically configured to invert a character string corresponding to the key segment.
  7. 根据权利要求5所述的网关,其特征在于,所述修改单元具体用于将 所述关键字段删除。The gateway according to claim 5, wherein said modifying unit is specifically configured to The key field is deleted.
  8. 根据权利要求5至7任一项所述的网关,其特征在于,所述识别单元具体用于记录所述关键字段,并进行深度报文检测DPI分析。 The gateway according to any one of claims 5 to 7, wherein the identification unit is specifically configured to record the key field and perform deep packet detection DPI analysis.
PCT/CN2016/086551 2015-09-22 2016-06-21 Packet transmission method and gateway WO2017049971A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510608336.0A CN105245446B (en) 2015-09-22 2015-09-22 A kind of file transmitting method and gateway
CN201510608336.0 2015-09-22

Publications (1)

Publication Number Publication Date
WO2017049971A1 true WO2017049971A1 (en) 2017-03-30

Family

ID=55042954

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/086551 WO2017049971A1 (en) 2015-09-22 2016-06-21 Packet transmission method and gateway

Country Status (2)

Country Link
CN (1) CN105245446B (en)
WO (1) WO2017049971A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112448933A (en) * 2019-09-02 2021-03-05 浙江宇视科技有限公司 Method and system for self-adapting compatible platform inter-domain protocol
CN114338272A (en) * 2021-12-30 2022-04-12 上海集度汽车有限公司 Communication control method, device, vehicle and readable storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105245446B (en) * 2015-09-22 2019-02-19 上海华为技术有限公司 A kind of file transmitting method and gateway

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546800A (en) * 2012-01-06 2012-07-04 华为技术有限公司 Handshake and communication methods for gateway, gateway and Web communication system
CN102694754A (en) * 2012-06-07 2012-09-26 广州睿哲网络科技有限公司 Application gateway technology and system for realizing content interchange of Internet protocol version 4/Internet protocol version 6 (IPv4/IPv6) websites
US20120300777A1 (en) * 2011-05-25 2012-11-29 Ravikumar Chandrasekaran Supporting multiple iec-101/iec-104 masters on an iec-101/iec-104 translation gateway
CN105245446A (en) * 2015-09-22 2016-01-13 上海华为技术有限公司 Message sending method and gateway

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101505307B (en) * 2009-03-09 2012-02-01 华为技术有限公司 Message processing method, network node and system oriented to service architecture
CN103227788B (en) * 2013-04-17 2016-02-03 广州市和声信息技术有限公司 Realize the method and system that Web page application program and SIP equipment carry out communicating

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120300777A1 (en) * 2011-05-25 2012-11-29 Ravikumar Chandrasekaran Supporting multiple iec-101/iec-104 masters on an iec-101/iec-104 translation gateway
CN102546800A (en) * 2012-01-06 2012-07-04 华为技术有限公司 Handshake and communication methods for gateway, gateway and Web communication system
CN102694754A (en) * 2012-06-07 2012-09-26 广州睿哲网络科技有限公司 Application gateway technology and system for realizing content interchange of Internet protocol version 4/Internet protocol version 6 (IPv4/IPv6) websites
CN105245446A (en) * 2015-09-22 2016-01-13 上海华为技术有限公司 Message sending method and gateway

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112448933A (en) * 2019-09-02 2021-03-05 浙江宇视科技有限公司 Method and system for self-adapting compatible platform inter-domain protocol
CN112448933B (en) * 2019-09-02 2022-12-23 浙江宇视科技有限公司 Method and system for self-adapting compatible platform inter-domain protocol
CN114338272A (en) * 2021-12-30 2022-04-12 上海集度汽车有限公司 Communication control method, device, vehicle and readable storage medium

Also Published As

Publication number Publication date
CN105245446B (en) 2019-02-19
CN105245446A (en) 2016-01-13

Similar Documents

Publication Publication Date Title
CN104253857B (en) Virtual WEB real-time Communication for Power agency is with and related methods, system back-to-back
US8898260B2 (en) Automatic multimedia upload for publishing data and multimedia content
EP3275162B1 (en) Systems and techniques for web communication
US8332476B2 (en) Social network virtual private network
US10225354B2 (en) Proximity session mobility
US20160149964A1 (en) Apparatus and method for communications involving a legacy device
US20070157304A1 (en) Method, apparatus and computer program product for automatic cookie synchronization between distinct web browsers
WO2017167132A1 (en) Method and apparatus for implementing instant messaging
US9686506B2 (en) Method, apparatus, system, and storage medium for video call and video call control
JP2014209343A (en) System and method for enabling drag and drop
EP2745467A1 (en) Method for flow control and for reliable communication in a collaborative environment
CN107463453B (en) Method, device, equipment and storage medium for communication between different applications of same terminal
WO2013112953A1 (en) Method and apparatus for automatic service discovery and connectivity
US9094433B2 (en) Systems and methods for bearer independent protocol gateway optimization
WO2014127675A1 (en) Method, device, and terminal for information sharing
CN107278361A (en) The transmission media content during Transit time flow meter
WO2017114190A1 (en) File uploading processing method and device
WO2017049971A1 (en) Packet transmission method and gateway
WO2013174265A1 (en) Data transmission method and device
WO2016086755A1 (en) Packet processing method and transparent proxy server
CN108156223A (en) A kind of accurate supplying system of message based on websocket and method
EP2813051B1 (en) Dynamic sharing of a webservice
WO2017054510A1 (en) Data communication method, apparatus and system in communication process
WO2016180220A1 (en) Conversation setup method and apparatus
JP2016066265A (en) Information processing device, communication system, and program

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: 16847853

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: 16847853

Country of ref document: EP

Kind code of ref document: A1