WO2014110754A1 - Method for transmitting http packet, encoding device, and decoding device - Google Patents

Method for transmitting http packet, encoding device, and decoding device Download PDF

Info

Publication number
WO2014110754A1
WO2014110754A1 PCT/CN2013/070595 CN2013070595W WO2014110754A1 WO 2014110754 A1 WO2014110754 A1 WO 2014110754A1 CN 2013070595 W CN2013070595 W CN 2013070595W WO 2014110754 A1 WO2014110754 A1 WO 2014110754A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
header
http message
encoding
transmitted
Prior art date
Application number
PCT/CN2013/070595
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 华为技术有限公司
Priority to CN201380000201.5A priority Critical patent/CN104081747B/en
Priority to PCT/CN2013/070595 priority patent/WO2014110754A1/en
Publication of WO2014110754A1 publication Critical patent/WO2014110754A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Definitions

  • the present invention relates to the field of communications, and in particular, to a method, an encoding device, and a decoding device for transmitting an HTTP message in the communication field. Background technique
  • HyperText Transfer Protocol (HyperText Transfer Protocol) is a widely used protocol on the Internet, such as web browsing, HTTP Progressive Download, Live Streaming, and Social Networking. Services, such as "SNS", and Weibo, use the HTTP protocol, which constitutes a mainstream application on the mobile Internet.
  • the HTTP protocol works in the Request-Response mode, that is, the client or terminal sends an HTTP Request (HTTP Request) message to the server to request the resource, and the server sends an HTTP Response (HTTP Response) message to the client or the terminal. Respond to a request from a client or terminal.
  • HTTP Request HTTP Request
  • HTTP Response HTTP Response
  • HTTP request/response In the HTTP request/response (Request/Response) message, there are several header fields, including the acceptable language, acceptable encoding, user agent, browser type, cookie, etc., and these fields. It may be constant for a user, or at least for a period of time. For example, in a user's four consecutive HTTP access (GET) request messages, the Accept, User Agent, Host, Pragma, and Cookie fields in the HTTP header are identical, the first line of the HTTP message, and the HTTP message. The first few characters of the requested Uniform Resource Identifier ("URI") are also the same as "/client/", and the version number of the HTTP message is " ⁇ /1. ⁇ ".
  • URI Uniform Resource Identifier
  • the data of the HTTP layer is the payload of the Transmission Control Protocol ("TCP") / Internet Protocol (“IP”) layer, HTTP layer data plus TCP header and IP.
  • TCP Transmission Control Protocol
  • IP Internet Protocol
  • the header constitutes an IP packet that is transmitted over the Internet.
  • the IP packet is transmitted as a payload in the wireless network, and the HTTP layer data (including all fields in the header) is transmitted in plain text in the wireless network.
  • consecutive HTTP messages contain a large number of identical fields in the header. These are redundant information and occupy a large amount of valuable wireless air interface resources. Summary of the invention
  • the invention provides a method for transmitting an HTTP message, an encoding device and a decoding device, which can reduce the wireless air interface resource occupied by the same field in the continuous HTTP message.
  • the first aspect provides a method for transmitting an HTTP packet, where the method includes: determining a value of each bit of the coding header part map, where the values of the bits are respectively indicated as corresponding to the bit Whether the value of the transmitted coding header is the same as the value of the corresponding coding header in the recorded HTTP message; according to the value of each bit, generating and transmitting the to-be-transmitted picture including the coding header part map
  • the HTTP address of the HTTP packet to be transmitted so that the receiver of the HTTP packet to be transmitted determines the value of the encoding header in the HTTP packet to be transmitted according to the encoding header part map and the recorded HTTP packet.
  • the first encoding header of the corresponding encoding header in the recorded HTTP packet has the same value and the value of the first encoding header.
  • the method further includes: determining a value in an encoding header to be transmitted and a corresponding encoding header in the recorded HTTP packet a second encoding header having a different value, and a value of the second encoding header; determining a header encoding of the second encoding header, the header encoding being used to refer to the second encoding header; And generating, according to the value of each bit, the HTTP message to be transmitted, including the code header part map, includes: according to the value of each bit, the header code of the second coding header And the value of the second encoding header is generated, and the HTTP packet to be transmitted is generated and transmitted.
  • the method further includes: determining a first compression indication and a first number of bytes, the first compression indication The value indicating the second encoding header is compressed, and the first byte number is associated with the first identical number of bytes, where the first identical number of bytes is the value of the second encoding header to be transmitted.
  • the value according to the bit, the header encoding of the second encoding header, and the first The value of the second encoding header, the generating and transmitting the HTTP packet to be transmitted including: according to the value of each bit, the header encoding of the second encoding header, the first compression indication, and the One byte, generating and transmitting the HTTP message to be transmitted.
  • the method further includes: determining a second compression indication, and the first HTTP packet in the recorded HTTP report Sequence information in the text, where the second compression indication is used to indicate that the value of the second encoding header and the corresponding encoding header in the first HTTP packet corresponding to the order information are taken
  • the value is the same.
  • the HTTP message to be transmitted is generated and transmitted according to the value of the bit, the header code of the second encoding header, and the value of the second encoding header.
  • the HTTP message to be transmitted is generated and transmitted according to the value of each bit, the header code of the second encoding header, the second compression indication, and the order information.
  • the method further includes: determining a third compression indication and a second byte number, where the third compression indication is used to indicate a universal resource identifier to be transmitted
  • the URI is compressed
  • the second number of bytes is associated with a second identical number of bytes, the second identical number of bytes being the same number of bytes of the URI to be transmitted and the URI in the recorded HTTP message
  • generating, according to the value of each bit, the HTTP message to be transmitted, including the code header part map includes: determining, according to the value of each bit, the third compression indication, and The second byte number generates and transmits the HTTP message to be transmitted.
  • the method further includes: determining whether the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP packet; And generating, according to the value of the bit, the HTTP packet to be transmitted, including the part of the encoding header, to be transmitted, including: the HTTP version number information to be transmitted and the recorded HTTP packet
  • the HTTP message to be transmitted is generated and transmitted according to the value of each bit, and the HTTP message to be transmitted includes the code header part map; the HTTP version number to be transmitted.
  • the HTTP message to be transmitted is generated and transmitted according to the value of each bit and the HTTP version number information to be transmitted.
  • the HTTP packet includes the encoding header portion map and the HTTP version number information to be transmitted.
  • the generating, by using the value of the bit, the HTTP packet to be transmitted that includes the coded part part map is generated and transmitted, including: And generating, according to the value of each bit, a protocol data unit PDU packet including a type field, where the type field is used to indicate that the PDU packet is a header encoded and compressed HTTP message.
  • the method further includes: When the HTTP packet is transmitted for the first time, the encoding header value, URI, and HTTP version number information of the HTTP packet transmitted for the first time are recorded. When the HTTP packet is not transmitted for the first time, the recorded packet is updated according to the HTTP packet to be transmitted. HTTP message.
  • the updating the recorded HTTP packet according to the HTTP packet to be transmitted includes: If the value of the encoding header of the transmitted HTTP packet is the same as the value of the encoding header of the recorded HTTP packet, the encoding header of the recorded HTTP packet and the value thereof are kept unchanged; or if If the value of the encoding header of the HTTP packet to be transmitted is different from the value of the encoding header of the HTTP packet, the value of the encoding header in the recorded HTTP packet is replaced by the value to be transmitted.
  • the encoding header of the HTTP packet takes the value; or if the recorded HTTP packet has an encoding header that the HTTP packet to be transmitted does not have, the encoding header of the recorded HTTP packet is maintained and its encoding is maintained. The value is unchanged; or if the HTTP message to be transmitted has an encoding header that the recorded HTTP packet does not have, the HTTP message to be transmitted has the encoding that the recorded HTTP packet does not have.
  • the header and its value; or if the HTTP message to be transmitted If the version number information is the same as the version number information of the recorded HTTP message, the version number information of the recorded HTTP message is kept unchanged; or if the version number information of the HTTP message to be transmitted and the recorded number are If the version number of the HTTP packet is different, the version number information of the HTTP packet is replaced with the version number of the HTTP packet to be transmitted.
  • the second aspect provides a method for transmitting an HTTP packet, where the method includes: acquiring a value of each bit of the encoded header portion map in the received HTTP packet; The value of a bit is indicated as the value of the first encoding header to be decoded corresponding to the first bit is the same as the value of the corresponding encoding header in the recorded HTTP packet, and the recorded value is recorded.
  • the encoding header corresponding to the first bit in the HTTP packet and the value thereof are respectively determined as values of the first encoding header and the first encoding header.
  • the method further includes: determining, by the second bit of the coding header part, that the second bit is corresponding to the second bit to be decoded
  • the header encoding refers to the The second encoding header.
  • the method further includes: determining, according to the first compression indication and the first byte in the received HTTP packet And determining a first identical number of bytes associated with the first number of bytes, wherein the first compression indication is used to indicate that the value of the second encoding header is compressed; according to the first identical number of bytes, Will The number of bytes is determined as the value to be decoded of the second encoding header.
  • the method further includes: determining, according to the second compression indication and the sequence information in the received HTTP packet, a first HTTP packet corresponding to the sequence information in the recorded HTTP packet, where the second compression indication is used to indicate the value of the second encoding header and the corresponding encoding in the first HTTP packet.
  • the value of the header is the same; the value of the corresponding encoding header in the first HTTP packet is determined as the value of the second encoding header.
  • the method further includes: determining, according to the third compression indication and the second byte number in the received HTTP packet, the second word a second identical number of bytes associated with the number of sections, wherein the third compressed indication is used to indicate that the URI to be decoded is compressed; according to the second identical number of bytes, corresponding to the URI of the recorded HTTP message The second consecutive byte of the same number of bytes is determined as the URL to be decoded in the received HTTP message.
  • the method further includes: when determining that the received HTTP packet does not have the HTTP version number information, in the recorded HTTP packet The version number information is determined as the version number information of the received HTTP message.
  • the method further includes: receiving a protocol data unit PDU packet including a type field, where the type field is used to indicate that the PDU packet is header encoded and Compressed HTTP ⁇ text.
  • the method further includes: When the HTTP packet is transmitted for the first time, the encoding header value, URI, and HTTP version number information of the HTTP packet transmitted for the first time are recorded. When the HTTP packet is not transmitted for the first time, the recorded HTTP packet is updated according to the received HTTP packet. Message.
  • the updating the recorded HTTP packet according to the received HTTP packet includes: The value of the encoding header of the HTTP packet is the same as the value of the encoding header of the recorded HTTP packet, and the encoding header of the recorded HTTP packet and the value thereof are kept unchanged; or if the received The value of the encoding header of the HTTP packet is different from the value of the encoding header of the recorded HTTP packet, and the value of the encoding header in the recorded HTTP packet is replaced by the received HTTP packet.
  • Encoding header value or if the recorded HTTP message has the received If the encoding header that the HTTP packet does not have, keep the encoding header of the recorded HTTP packet and its value unchanged; or if the received HTTP packet has an encoding that the recorded HTTP packet does not have a header, where the received HTTP message has an encoding header that does not have the recorded HTTP packet and its value; or if the received HTTP packet has the version number information and the recorded HTTP packet If the version number information of the document is the same, the version number information of the recorded HTTP packet is kept unchanged; or if the version number information of the received HTTP packet is different from the version number information of the recorded HTTP packet, The version number information in the recorded HTTP packet is replaced with the version number information of the received HTTP packet.
  • the third aspect provides an apparatus for encoding an HTTP packet, where the encoding apparatus includes: a first determining module, configured to determine a value of each bit of the code header part map, where the values of the bits are respectively Determining whether the value of the encoding header to be transmitted corresponding to the bit is the same as the value of the corresponding encoding header in the recorded HTTP packet; the transmitting module, configured to determine the per-determination according to the first determining module The value of the bit is generated, and the HTTP message to be transmitted including the code header part map is generated and transmitted, so that the receiver of the HTTP message to be transmitted according to the code header part map and the recorded HTTP Determining, by the packet, the first encoding header in the HTTP packet to be transmitted and the value of the corresponding encoding header in the recorded HTTP packet, and the first encoding header value.
  • the encoding apparatus further includes: a second determining module, configured to determine a value in the encoding header to be transmitted and the recorded HTTP packet a second encoding header having a different value of the corresponding encoding header, and a value of the second encoding header; a third determining module, configured to determine the second encoding header determined by the second determining module a header encoding, the header encoding is used to refer to the second encoding header; wherein the transmitting module is configured to: determine, according to the value of each bit determined by the first determining module, the third determining module The header of the second encoding header and the value of the second encoding header determined by the second determining module generate and transmit the HTTP packet to be transmitted.
  • the encoding apparatus further includes: a fourth determining module, configured to determine the first compression indication and the first byte The first compression indication is used to indicate that the value of the second encoding header is compressed, and the first number of bytes is associated with the first identical number of bytes, where the first identical number of bytes is to be transmitted. a second number of bytes; wherein the transmission module is configured to: determine each bit according to the first determining module The value of the header, the header encoding of the second encoding header determined by the third determining module, the first compression indication determined by the fourth determining module, and the first number of bytes, generating and transmitting the HTTP to be transmitted Message.
  • the encoding apparatus further includes: a fifth determining module, configured to determine the second compression indication and the first HTTP The order information in the recorded HTTP message, where the second compression indication is used to indicate the value of the second encoding header and the corresponding encoding in the first HTTP packet corresponding to the order information.
  • the value of the header is the same;
  • the transmission module is configured to: determine, according to the value of each bit determined by the first determining module, a header code of the second encoding header determined by the third determining module, The second compression indication determined by the fifth determining module and the sequence information generate and transmit the HTTP message to be transmitted.
  • the encoding apparatus further includes: a sixth determining module, configured to determine a third compression indication and a second byte number, where the third compression indication is used Generating a universal resource identifier URI to be transmitted, the second byte number being associated with a second identical number of bytes, the second identical number of bytes being a URI to be transmitted and the recorded HTTP message
  • the URIs are consecutively the same number of bytes; wherein, the transmission module is configured to: determine, according to the value of each bit determined by the first determining module, the third compression indication determined by the sixth determining module, and the second The number of bytes, the HTTP message to be transmitted is generated and transmitted.
  • the encoding apparatus further includes: a seventh determining module, configured to determine the HTTP version number information to be transmitted and the recorded HTTP packet Whether the version number information is the same; wherein, the transmission module is configured to: when the seventh determining module determines that the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP message, according to the each bit The value of the bit is generated, and the HTTP message to be transmitted is generated and transmitted, where the HTTP file to be transmitted includes the code header portion map; and the seventh determining module determines the HTTP version number information to be transmitted and the recorded When the version number information in the HTTP packet is different, the HTTP packet to be transmitted is generated and transmitted according to the value of each bit and the HTTP version number information to be transmitted, and the HTTP packet to be transmitted includes the Encoding the header part map and the HTTP version number information to be transmitted.
  • the transmission module is configured to: when the seventh determining module determines that the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP message, according to the each bit The value of the bit
  • the transmitting module is configured to: generate and transmit a protocol data unit PDU packet including a type field according to the value of each bit, the type The field is used to indicate that the PDU packet is a header encoded and compressed HTTP packet. Text.
  • the encoding apparatus further includes: a recording module, configured to record, during the first transmission of the HTTP packet, an encoding header value, a URI, and an HTTP version number information of the first transmitted HTTP packet; and an update module, configured to: when not transmitting the HTTP packet for the first time, according to the The HTTP message to be transmitted updates the recorded HTTP message.
  • the updating module is configured to: if the encoding header of the HTTP packet to be transmitted takes the value and the If the encoding header of the HTTP packet is the same, the encoding header of the recorded HTTP packet is kept unchanged; or if the encoding header of the HTTP packet to be transmitted is the value and the If the value of the encoding header of the HTTP packet is different, the value of the encoding header in the recorded HTTP packet is replaced with the value of the encoding header of the HTTP packet to be transmitted; or if the recording is performed.
  • the HTTP packet has an encoding header that is not included in the HTTP packet to be transmitted, and the encoding header of the recorded HTTP packet is kept unchanged; or if the HTTP packet to be transmitted has the If the encoded HTTP packet does not have an encoding header, the HTTP header to be transmitted has an encoding header that the recorded HTTP packet does not have and its value; or if the HTTP packet to be transmitted Version number information and the recorded If the version number information of the HTTP packet is the same, the version number information of the HTTP packet is kept unchanged; or the version number information of the HTTP packet to be transmitted and the version number information of the recorded HTTP packet The version number information in the recorded HTTP packet is replaced with the version number information of the HTTP packet to be transmitted.
  • the fourth aspect provides a decoding apparatus for an HTTP packet, where the decoding apparatus includes: an obtaining module, configured to acquire a value of each bit of the encoded header part map in the received HTTP packet; The module, the value of the first bit of the coded part location map obtained by the acquiring module is a value of the first encoding header to be decoded corresponding to the first bit and the recorded HTTP packet.
  • the encoding header corresponding to the first bit in the recorded HTTP packet and the value thereof are respectively determined as the first encoding header and the The value of the first encoding header.
  • the decoding apparatus further includes: a second determining module, configured to obtain, by the acquiring module, the second bit of the encoding header part map
  • the value indication is the value of the second encoding header to be decoded corresponding to the second bit and the recorded value
  • the second encoding header indicated by the header encoding is determined according to the header encoding in the received HTTP packet.
  • the decoding apparatus further includes: a third determining module, configured to be used according to the first part of the received HTTP packet a compression indication and a first number of bytes, determining a first identical number of bytes associated with the first number of bytes, wherein the first compression indication is used to indicate that the value of the second encoding header is compressed; And a determining module, configured to determine, according to the first identical number of bytes determined by the third determining module, the counted to be the value of the second encoding header to be decoded.
  • the decoding apparatus further includes: a fifth determining module, configured to be used according to the first part of the received HTTP packet Determining, by the second compression indication, the first HTTP message corresponding to the order information in the recorded HTTP message, where the second compression indication is used to indicate the value of the second coding header and the first The value of the corresponding encoding header in the HTTP packet is the same; the sixth determining module is configured to determine the value of the corresponding encoding header in the first HTTP packet determined by the fifth determining module as the second The value of the encoding header.
  • the decoding apparatus further includes: a seventh determining module, configured to: according to the third compression indication and the second byte in the received HTTP packet And determining a second identical number of bytes associated with the second number of bytes, wherein the third compression indication is used to indicate that the URI to be decoded is compressed; and the eighth determining module is configured to determine, according to the seventh determining module The second identical number of bytes determines the corresponding consecutive second identical number of bytes in the URI of the recorded HTTP message as the URI to be decoded in the received HTTP message.
  • the decoding apparatus further includes: a ninth determining module, configured to: when it is determined that the received HTTP packet does not have the HTTP version number information, The version number information in the recorded HTTP packet is determined as the version number information of the received HTTP packet.
  • the decoding apparatus further includes: a receiving module, configured to receive a protocol data unit PDU packet including a type field, where the type field is used to indicate the PDU packet HTTP headers that are header encoded and compressed.
  • the decoding device further The method includes: a recording module, configured to record an encoding header value, a URI, and an HTTP version number information of an HTTP packet transmitted for the first time when the HTTP packet is first transmitted; and an update module, when the HTTP packet is not transmitted for the first time, Updating the recorded HTTP message according to the received HTTP message.
  • the updating module is configured to: if the encoded header of the received HTTP packet takes a value and the recorded The encoding header of the HTTP packet has the same value, and the encoding header of the recorded HTTP packet is kept unchanged; or if the encoding header of the received HTTP packet is the value and the recorded value If the encoding header of the HTTP packet is different, the value of the encoding header in the recorded HTTP packet is replaced with the encoding header value of the received HTTP packet; or if the recorded HTTP is recorded.
  • the packet has an encoding header that is not included in the received HTTP packet, and the encoding header of the recorded HTTP packet is kept unchanged; or if the received HTTP packet has the recorded HTTP If the encoded header does not have a packet header, the received HTTP packet has an encoding header that does not have the recorded HTTP packet and its value; or if the received HTTP packet has the version number information and The version of the recorded HTTP message If the number information is the same, the version number information of the recorded HTTP message is kept unchanged; or if the version number information of the received HTTP message is different from the version number information of the recorded HTTP message, The version number information in the recorded HTTP packet is replaced with the version number information of the received HTTP packet.
  • a fifth aspect provides an apparatus for encoding an HTTP message, the encoding apparatus comprising: a processor, a memory, a bus, and a transmitter; wherein the processor, the memory, and the transmitter are connected by the bus, and the memory is used by the memory And storing, by the processor, the instruction stored in the memory, by the processor, for determining a value of each bit of the code header portion map, where the value of each bit is indicated as the bit
  • the value of the corresponding encoding header to be transmitted is the same as the value of the corresponding encoding header in the recorded HTTP packet;
  • the processor is further configured to generate, according to the value of each bit, the Encoding an HTTP message to be transmitted in the header part map;
  • the processor is further configured to control the sender to send the HTTP message to be transmitted to the receiver, so that the receiver according to the code header part map and the Determining, by the recorded HTTP packet, the first encoding header of the value of the encoding header in the HTTP packet to be transmitted and the value of the corresponding
  • a sixth aspect provides a decoding apparatus for an HTTP message, the decoding apparatus comprising: a processor, a memory, and a bus; wherein the processor and the memory are connected by the bus, the memory is used to store an instruction, the processor Calling the instruction stored in the memory through the bus to use Obtaining a value of each bit of the coding header part map in the received HTTP packet; the processor is further configured to: use the value of the first bit of the coding header part map as the first bit When the value of the first encoding header to be decoded is the same as the value of the corresponding encoding header in the recorded HTTP packet, the first HTTP bit in the recorded HTTP packet is corresponding.
  • the encoding header and its value are respectively determined as values of the first encoding header and the first encoding header.
  • the method for transmitting an HTTP message, the encoding device, and the decoding device in the embodiment of the present invention indicate, by using the value of the bit of the encoding header portion map, the encoding header to be transmitted corresponding to the bit.
  • the value is the same as the value of the corresponding encoding header in the recorded HTTP packet, and the encoding header with the same value and its value are not transmitted, thereby reducing the occupation of the same field in the continuous HTTP packet.
  • Wireless air interface resources thereby improving resource utilization efficiency.
  • FIG. 1 is a schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
  • FIG. 2 is another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
  • FIG. 3 is still another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
  • FIG. 4 is still another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
  • FIG. 5 is still another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
  • FIG. 6 is still another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
  • FIG. 7 is still another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
  • FIG. 8 is a schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
  • FIG. 9 is another schematic flowchart of a method for transmitting an HTTP packet according to an embodiment of the present invention;
  • FIG. 10 is still another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
  • FIG. 10 is still another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
  • Still another schematic flowchart 13 of a method for transmitting an HTTP message is a schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
  • FIG. 14 is a method for transmitting an HTTP message according to an embodiment of the present invention.
  • Still another schematic flowchart 15 is a schematic flowchart of a method for reporting coding compression capability according to an embodiment of the present invention.
  • 16 is a schematic flow chart of a method of relocation according to an embodiment of the present invention.
  • FIG. 17 is another schematic flowchart of a method for relocation according to an embodiment of the present invention.
  • FIG. 18 is still another schematic flowchart of a method for relocation according to an embodiment of the present invention.
  • Figure 19 is a schematic block diagram of an encoding device in accordance with an embodiment of the present invention.
  • Figure 20 is another schematic block diagram of an encoding apparatus in accordance with an embodiment of the present invention.
  • Figure 21 is still another schematic block diagram of an encoding apparatus according to an embodiment of the present invention.
  • Figure 22 is still another schematic block diagram of an encoding apparatus in accordance with an embodiment of the present invention.
  • Figure 23 is still another schematic block diagram of an encoding apparatus in accordance with an embodiment of the present invention.
  • Figure 24 is still another schematic block diagram of an encoding apparatus according to an embodiment of the present invention.
  • Figure 25 is still another schematic block diagram of an encoding apparatus according to an embodiment of the present invention.
  • Figure 26 is a schematic block diagram of a decoding device in accordance with an embodiment of the present invention.
  • Figure 27 is another schematic block diagram of a decoding device in accordance with an embodiment of the present invention.
  • FIG. 28 is still another schematic block diagram of a decoding apparatus according to an embodiment of the present invention.
  • FIG. 29 is still another schematic block diagram of a decoding apparatus according to an embodiment of the present invention.
  • Figure 30 is still another schematic block diagram of a decoding device in accordance with an embodiment of the present invention.
  • Figure 31 is still another schematic block diagram of a decoding device in accordance with an embodiment of the present invention.
  • Figure 32 is still another schematic block diagram of a decoding device in accordance with an embodiment of the present invention.
  • Figure 33 is a schematic block diagram of an encoding apparatus according to another embodiment of the present invention.
  • FIG. 34 is a schematic block diagram of a decoding apparatus according to another embodiment of the present invention. detailed description
  • GSM Global System of Mobile communication
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • General Packet Radio Service General Packet Radio Service
  • LTE Long Term Evolution
  • LTE frequency division duplex Frequency Division Duplex
  • TDD Time Division Duplex
  • UMTS Unicom Mobile Telecommunication System
  • WiMAX Worldwide Interoperability for Microwave Access
  • FIG. 1 is a schematic flowchart of a method 100 for transmitting an HTTP message according to an embodiment of the present invention.
  • the method 100 may be performed by an encoding device, which may be a user equipment, such as a UE, or the like.
  • the device for example, a radio network controller (Radio Network Controller, referred to as "RNC"), an evolved base station (Evolved Node B, called “eNB”), and the like.
  • RNC Radio Network Controller
  • eNB evolved Node B
  • the method 100 includes:
  • the encoding device may first compare the HTTP message to be transmitted with the recorded The value of each bit of the graph. For example, when the value is the same, the corresponding bit position is the first value, and when the value is different, the corresponding bit position is the second value, so that the value of each bit can be respectively indicated as the corresponding bit to be transmitted.
  • the value of the encoding header is the same as the value of the corresponding encoding header in the recorded HTTP packet.
  • the bit of the encoding header part map has a correspondence with the encoding header in the HTTP packet.
  • each bit corresponds to an encoding header in the HTTP packet.
  • the encoding device may generate and transmit a file to be transmitted including the code header portion map according to the value of each bit, thereby facilitating the receiver of the HTTP message to be transmitted according to the code header.
  • the part map and the recorded HTTP message may determine a first encoding header in which the value of the encoding header to be transmitted is the same as the value of the corresponding encoding header in the recorded HTTP packet, and the first The value of an encoding header.
  • the encoding device may correspond to the encoding header Host in the encoding header portion map. If the bit position is 1, the value of the encoding header Host and the encoding header Host is no longer transmitted; the receiver of the HTTP packet may according to the correspondence between the bit position in the encoding header part and the encoding header. Determining that the encoding header corresponding to the bit is Host; on the other hand, the receiver of the HTTP packet can determine the encoding header Host corresponding to the bit in the HTTP packet to be transmitted according to the bit being 1.
  • the value is the same as the value of the encoding header Host in the recorded HTTP packet.
  • the receiver can use the value of the encoding header Host in the recorded HTTP packet as the HTTP packet to be transmitted.
  • the encoding header portion map may be corresponding to the encoding header Accept.
  • the bit position is 0. At this time, the value of the encoding header Accept and the encoding header Accept needs to be transmitted.
  • the method for transmitting an HTTP message in the embodiment of the present invention indicates, by using the value of the bit of the encoding header part map, the value of the encoding header to be transmitted corresponding to the bit, and the recorded HTTP packet. Whether the values of the corresponding encoding headers in the text are the same, and the same encoding values are not transmitted.
  • the header and its value can reduce the wireless air interface resources occupied by the same field in consecutive HTTP packets, thereby improving resource utilization efficiency.
  • the bit may also have a one-to-many relationship with the encoding header.
  • the value of one bit may represent multiple encoding headers to be transmitted corresponding to the bit.
  • the value is the same as the value of the corresponding multiple encoding headers in the recorded HTTP packet; the bit may have a many-to-one relationship with the encoding header, for example, the value of multiple bits is used.
  • the value of an encoding header to be transmitted corresponding to the multiple bits is the same as the value of the corresponding encoding header in the recorded HTTP packet, and the embodiment of the present invention is not limited thereto.
  • the sender and the receiver of the HTTP packet may be pre-configured with the correspondence between the bit of the encoding header part map and the encoding header in the HTTP packet, but the embodiment of the present invention is not limited thereto. this.
  • the encoding device is a sender of an HTTP packet
  • the HTTP packet may be an HTTP request packet or an HTTP response packet
  • the embodiment of the present invention is not limited thereto.
  • the encoding device may be a packet data convergence protocol ("Packet Data Convergence Protocol") in the sender of the HTTP message, or may be a new coding compression layer in the sender.
  • Packet Data Convergence Protocol Packet Data Convergence Protocol
  • Embodiments of the invention are not limited thereto.
  • the common headers in the HTTP Request/Response message are encoded, and the common headers for encoding are at most 30, so that the headers can be encoded as 0-9. 11 - 12, 14 - 31 , where 10, 13 are not involved in coding because they are confused with line feeds (Line, LF, OxOA) and Carriage Return (CR, OxOD); these are encoded heads.
  • the more common encoding headers are: Accept, Host, Referer, User-Agent, Cookie, etc.
  • the code header map may be used to define a header map, for example, may be set to a total of 32 bits. Starting from the lowest bit of the code header map, each bit can represent one of the foregoing encoding headers. If the encoding header of the HTTP Request packet is the same as the Accept field of the previously recorded HTTP Request packet (Accept field) If the value is "*/* ⁇ r ⁇ n"), the corresponding bit in the encoding header part map can be set to 1, otherwise set to 0; for the encoding header whose corresponding bit is set to 1, the plaintext no longer needs to be transmitted.
  • the encoding header part map can be placed in front of the Request-Line of the HTTP message (Request-Line is the IP header, the first line after the TCP header, ending with a carriage return, a newline character), that is, the HTTP data is the most front.
  • Request-Line is the IP header, the first line after the TCP header, ending with a carriage return, a newline character
  • the HTTP data is the most front.
  • the encoding header of the encoding header to be transmitted and the corresponding encoding header of the recorded HTTP text may be transmitted in plaintext, or may be further encoded and compressed. To further improve the utilization rate of resources, a detailed description will be made below with reference to FIGS. 2 to 4.
  • the method 100 further includes:
  • S140 Determine a header encoding of the second encoding header, where the header encoding is used to refer to the second encoding header.
  • the HTTP packet to be transmitted that includes the code header part map, including:
  • S121 Generate and transmit the HTTP message to be transmitted according to the value of each bit, the header code of the second encoding header, and the value of the second encoding header.
  • the second encoding header can be replaced by an encoding.
  • the encoding header User-Agent can be encoded as
  • the HTTP message to be transmitted that is generated and transmitted may include: an encoding header part map and a header encoding of the second encoding header; the HTTP message to be transmitted may further include a second encoding header.
  • the value, or the HTTP packet to be transmitted may also indicate the value of the second encoding header.
  • the embodiment of the present invention is not limited thereto. That is, the value of the second encoding header may be directly transmitted in plaintext, or the value of the encoding header to be transmitted and the value of the recorded encoding header may be compared character by character, and consecutive consecutive bytes are performed.
  • Encoding compression processing for example, as shown in FIG. 3, the method 100 further includes:
  • S150 Determine a first compression indication, where the value of the second compression header is compressed, and the first number of bytes is associated with the first identical number of bytes.
  • the first identical number of bytes is the same number of bytes of the value of the second encoding header to be transmitted and the value of the corresponding encoding header in the recorded HTTP packet;
  • the HTTP packet to be transmitted including:
  • the header code of the second coding header the first Compressing the indication and the first number of bytes, generating and transmitting the HTTP message to be transmitted.
  • the The two bytes of a compression indication "and the first byte number" represent consecutive equal bytes, that is, two bytes are compressed to represent the first identical number of bytes, and the second encoding header to be transmitted
  • the remaining characters in the value of the part can still be transmitted in plain text.
  • the HTTP message to be transmitted generated and transmitted may include: an encoding header part map, a header encoding of the second encoding header, a first compression indication, and the first byte number; the to-be-transmitted
  • the HTTP message may further include the remaining non-contiguous characters in the value of the second encoding header, or the HTTP message to be transmitted may further indicate the value of the second encoding header by other means, which is implemented by the present invention. The example is not limited to this.
  • the definition of OxFF is the first compression indication, and the first byte number is the difference between the first identical number of bytes and 3, assuming that the coding header to be transmitted and its value is "User-Agent: mozilla/4.0", The value of the corresponding encoding header in the recorded HTTP packet and its value is "User-Agent: mozilla/3.0", then the encoding header User-Agent to be transmitted is followed by the colon ":" and spaces.
  • the first range is more than 3 bytes and less than 258 bytes. If the corresponding bytes are not consecutively more than 3 consecutive, the original byte is transmitted; on the other hand, if the corresponding byte exceeds 258 consecutive words If the sections are the same, the first 258 bytes are replaced by OxFF OxFF, and the corresponding bytes can be re-judged and processed by the same rules.
  • the method for transmitting an HTTP message in the embodiment of the present invention can not only encode and compress the exact same encoding header and its value, but also perform encoding and compression transmission for not completely the same value, thereby being significant
  • the wireless air interface resource occupied by the same field in the continuous HTTP packet is reduced, thereby improving resource utilization efficiency.
  • the first number of bytes is associated with the first identical number of bytes, that is, the first number of bytes has a mapping relationship with the first identical number of bytes, for example, the first number of bytes is
  • the function of the first identical number of bytes, the first number of bytes and the first identical number of bytes may also be equal, and the embodiment of the present invention is not limited thereto.
  • the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention.
  • the implementation process constitutes any limitation.
  • the sender and the receiver of the HTTP message may only store the most recent value of each coding header, and only determine whether the current value of the coding header is the same as the previous one.
  • the received encoding headers have the same value. If they are the same, the corresponding encoding header portion map can be set to 1, and the encoding header is no longer transmitted. If different, the corresponding encoding header portion map can be set to 0.
  • the current value of the encoding header and the previous value of the encoding header are compared byte by byte for compression.
  • the sender of the HTTP message and the record of the receiver can also store multiple values of each coding header, and determine whether the current value of the coding header is corresponding to the HTTP message in the predetermined order. Whether the value of the encoding header is the same, in particular, whether the current value of the encoding header is the same as the value of the corresponding encoding header in the newly transmitted HTTP packet. Similarly, if they are the same, the corresponding code header map can be set to 1, and the code header is no longer transmitted; if different, the corresponding code header map can be set to 0.
  • the encoding device when multiple values of each encoding header are stored in the records of the sender and the receiver of the HTTP message, for example, the most recent M of each encoding header is stored in the record (M is an integer) For example, M takes a value of 5), where the Mth is the farthest one, the first one is the nearest one, and so on, the encoding device can first determine whether the current value of the encoding header is the same as the previous one. The received ears of the coding header have the same value.
  • the encoded byte indication in the encoding header is the same as the value stored in the record, for example, User-Agent header value and record.
  • the user-agent line is replaced by OxlD 0x03; if the same is not found in the first M records, the encoding device can also compare byte by byte with the first one in the record for compression. .
  • the method 100 further includes: S160. Determine a second compression indication and sequence information of the first HTTP packet in the recorded HTTP packet.
  • the second compression indication is used to indicate that the value of the second encoding header is the same as the value of the corresponding encoding header in the first HTTP packet corresponding to the order information;
  • the value of the bit in the coding header part indicates the value of the coding header to be transmitted corresponding to the bit and the corresponding coding header in the latest HTTP message recorded.
  • the encoding device may determine the second compression indication and the order information of the first HTTP packet in the recorded HTTP packet, where the second compression indication is used to indicate the second encoding header.
  • the value is the same as the value of the corresponding encoding header in the first HTTP packet corresponding to the order information, so that the encoding device can obtain the header of the second encoding header according to the value of each bit.
  • the second compression indication and the sequence information generating and transmitting the HTTP message to be transmitted.
  • the HTTP message to be transmitted generated and transmitted may include: an encoding header part map, a header encoding of the second encoding header, a second compression indication, and the order information; the HTTP packet to be transmitted.
  • the text may also include the value of the second encoding header, or the HTTP packet to be transmitted may further indicate the value of the second encoding header by other means, and the embodiment of the present invention is not limited thereto.
  • the embodiment of the present invention is only limited to the value of the coding header to be transmitted and the latest embodiment recorded.
  • the value of the bit in the coding header part indicates that the value of the corresponding coding header to be transmitted is corresponding to the corresponding coding header in the recorded HTTP message having the first order.
  • the encoding device may also determine the second compression indication and the order information of the first HTTP packet in the recorded HTTP packet, where the HTTP packet indicated by the first sequence may be the recorded HTTP. Any HTTP packet in the packet.
  • the value of the bit in the coding header part indicates that the value of the coding header to be transmitted corresponding to the bit and the value of the corresponding coding header in the latest HTTP message recorded.
  • the encoding device can no longer transmit the encoding header and its value.
  • the method for transmitting an HTTP message in the embodiment of the present invention indicates, by using the value of the bit of the encoding header part map, the value of the encoding header to be transmitted corresponding to the bit, and the recorded HTTP packet. Whether the value of the corresponding encoding header in the text is the same, and the encoding header with the same value and its value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resources. Use efficiency.
  • the encoding apparatus may also first determine whether the current value of the encoding header is the same as the value of the corresponding encoding header in the HTTP message of the predetermined order, so as to be The value of each bit of the coded header portion map is not limited to this embodiment.
  • the coding method of the coding header and its value is described in detail above with reference to FIG. 1 to FIG. 4.
  • the coding method of the URI, version number information and the like included in the HTTP message will be described below with reference to FIG. 5 to FIG.
  • the method 100 for transmitting an HTTP packet further includes:
  • S170 Determine a third compression indication, where the third compression indication is used to indicate that the universal resource identifier URI to be transmitted is compressed, and the second number of bytes is associated with the second identical number of bytes.
  • the second identical number of bytes is the number of consecutive consecutive URIs of the URI to be transmitted and the URI in the recorded HTTP message;
  • the HTTP packet to be transmitted that includes the code header part map, including:
  • the two bytes of "third compression indication" and "second byte number” can be used to represent consecutive equal bytes, that is, two bytes are compressed to represent the second identical
  • the bytes are bytes, and the remaining characters in the URI to be transmitted can still be transmitted in plaintext.
  • the HTTP message to be transmitted that is generated and transmitted may include: an encoding header part map, a third compression indication, and the second byte number; the HTTP message to be transmitted may further include a to-be-transmitted The remaining non-contiguous characters in the URI.
  • the HTTP packet to be transmitted may further include a header encoding of the second encoding header, and may further include a first compression indication and the first byte number, etc., and the HTTP packet to be transmitted may also pass other The mode indicates the value of the second coding header, etc., and the embodiment of the present invention is not limited thereto.
  • the URI to be transmitted and the URI of the record are compared character by character.
  • the two bytes are represented by "compression indication OxFF""N-3". Consecutively equal bytes, where N is the number of consecutive identical bytes, and spaces before the URI participate in compression.
  • the URI of the previous request is " /client/qj wl5_MB_201107275457.gif , and the requested URI is " /client/jnzg— MB— 201107142728.jpg", where "/client/" has the same 9 consecutive characters, then
  • the 9 characters of the URI of the second request may be replaced by OxFF 0x06, and there are no more than 3 consecutive identical characters in the subsequent characters, and the original characters are transmitted; if the corresponding bytes are not consecutive If three or more are the same, the original text is transmitted; if the corresponding byte has more than 258 consecutive bytes, the first 258 bytes are replaced by OxFF OxFF, and the corresponding bytes are judged and processed by the same rule.
  • first range and the “second range” may be the same or different, and the embodiment of the present invention is not limited thereto.
  • the "first compression indication”, the “second compression indication”, and the “third compression indication” may be the same.
  • each compression indication is OxFF, and each compression indication may also be different. Or partially identical, the embodiment of the present invention is not limited thereto.
  • the method 100 further includes:
  • the HTTP packet to be transmitted that includes the code header part map, including:
  • the HTTP message to be transmitted is generated and transmitted according to the value of each bit.
  • the transmitted HTTP message includes the coding header part map
  • the HTTP message to be transmitted includes the code header part map and the HTTP version number information to be transmitted.
  • the HTTP version number information to be transmitted when the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP message, the HTTP version number information may not be transmitted; otherwise, when the HTTP version to be transmitted is When the number information is different from the version number information in the recorded HTTP message, the HTTP version number information needs to be transmitted.
  • the HTTP file to be transmitted generated and transmitted may include an encoding header part map, but may not include the HTTP version number information to be transmitted.
  • the HTTP packet to be transmitted is generated and transmitted.
  • the encoding header part map and the HTTP version number information to be transmitted may be included; it should be understood that the HTTP message to be transmitted may further include a header encoding of the second encoding header, a first compression indication, a first byte number, The third compression indication or the third byte number, etc., the HTTP message to be transmitted may also indicate the value of the second coding header, etc. by other means, and the embodiment of the present invention is not limited thereto.
  • the method for transmitting an HTTP message in the embodiment of the present invention indicates, by using the value of the bit of the encoding header part map, the value of the encoding header to be transmitted corresponding to the bit, and the recorded HTTP packet. Whether the value of the corresponding encoding header in the text is the same, and the encoding header with the same value and its value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resources. Use efficiency.
  • the HTTP message to be transmitted including the code header part map, is generated and transmitted according to the value of each bit, and includes:
  • a protocol data unit PDU packet including a type field is generated and transmitted, and the type field is used to indicate that the PDU packet is a header encoded and compressed HTTP message.
  • the sender may indicate that the data packet is an HTTP message that has been encoded and compressed by the HTTP header by adding indication information in the header portion of the PDCP.
  • the PDCP protocols 25.323 and 36.323 can be modified, and a new PDU type field can be added. For example, as shown in Table 1, this type field is used to indicate that the current PDU is encoded and compressed by the HTTP header.
  • the PDU type field may take values of "011", "100", "101”, etc.
  • the PDU type field has a value of "011”, it may indicate that the data has been encoded and compressed by the HTTP header;
  • the value is "100”, it can be expressed as a PDCP data PDU and is subjected to HTTP header encoding and compression.
  • the PDU type field is "101”, it can be expressed as a PDCP SeqNum PDU and has been HTTP header encoded and compression.
  • the method 100 further includes:
  • S195 Update the recorded HTTP message according to the HTTP message to be transmitted when the HTTP message is not transmitted for the first time.
  • the first transmission of the HTTP Request message after the UE transitions from the RRCJDLE state to the RRC_Connected state may be referred to as the first transmission of the HTTP message; the UE is in the serving radio network subsystem (Serving Radio Network Subsystem) , the cylinder is called "SRNS".
  • the relocation is completed.
  • the first HTTP HTTP transmission message is received after the start of the HTTP HTTP HEADER CODING AND COMPRESSION message. It can also be called the first transmission of the HTTP message. .
  • the HTTP Response packet transmitted for the first time is also referred to as the first transmission of the HTTP packet, and the embodiment of the present invention is not limited thereto.
  • updating the recorded HTTP message according to the HTTP message to be transmitted includes:
  • the encoding header of the HTTP packet to be transmitted is the same as the value of the encoding header of the recorded HTTP packet, the encoding header of the recorded HTTP packet and the value thereof are kept unchanged;
  • the value of the encoding header of the HTTP packet to be transmitted is different from the value of the encoding header of the HTTP packet, the value of the encoding header in the recorded HTTP packet is replaced with the value of the encoding header.
  • the recorded HTTP packet has an encoding header that is not included in the HTTP packet to be transmitted, the encoding header of the recorded HTTP packet is kept unchanged;
  • the HTTP header to be transmitted has an encoding header that is not included in the recorded HTTP packet and is obtained. Value; or
  • the version number information of the HTTP packet to be transmitted is the same as the version number information of the recorded HTTP packet, the version number information of the recorded HTTP packet is kept unchanged;
  • the version number information of the HTTP packet to be transmitted is different from the version number of the HTTP packet, the version number information of the recorded HTTP packet is replaced with the HTTP packet to be transmitted. Version number information.
  • the encoding apparatus may perform the update processing on the recorded HTTP message according to one or more of the foregoing rules, but the embodiment of the present invention is not limited thereto.
  • the HTTP message to be transmitted when the number of recorded HTTP messages is less than a preset value, the HTTP message to be transmitted is recorded; when the recorded HTTP message is recorded When the number of the packets is equal to the preset value, the latest HTTP packet in the recorded HTTP packet is updated according to the HTTP packet to be transmitted, and may be according to one of the above rules or A plurality of updates are performed on the latest HTTP packet that has been recorded, but the embodiment of the present invention is not limited thereto.
  • the test is performed on the live network data.
  • the result shows that the method of transmitting HTTP packets according to the embodiment of the present invention compresses the uplink data by 67% of the HTTP Request message and accounts for 17% of the total uplink data.
  • the data compressed by the upstream accounted for 75% of the HTTP Request 4, accounting for 19% of the total uplink data.
  • the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention.
  • the implementation process constitutes any limitation.
  • the method for transmitting an HTTP message in the embodiment of the present invention indicates, by using the value of the bit of the encoding header part map, the value of the encoding header to be transmitted corresponding to the bit, and the recorded HTTP packet. Whether the value of the corresponding encoding header in the text is the same, and the encoding header with the same value and its value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resources. Use efficiency.
  • FIG. 8 is a schematic flowchart of a method 200 for transmitting an HTTP message, which may be performed by a decoding device, which may be a user equipment, such as a UE, etc., or a network, according to an embodiment of the present invention.
  • Equipment such as RNC, eNB, etc.
  • the method 200 includes:
  • S210 Obtain a value of each bit of the coding header part map in the received HTTP packet.
  • S220 The value of the first bit in the coding header part indication is indicated by the first bit.
  • the encoding header corresponding to the first bit in the recorded HTTP packet is used. The part and its value are respectively determined as values of the first coding header and the first coding header.
  • the decoding apparatus may obtain, according to the received HTTP packet, a value of each bit of the encoded header part map in the received HTTP packet, where the value of each bit is indicated as the bit respectively.
  • the value of the corresponding encoding header to be decoded is the same as the value of the corresponding encoding header in the recorded HTTP packet.
  • the bit when the bit is the first value, it may represent the encoding header to be decoded.
  • the value is the same as the value of the corresponding encoding header in the recorded HTTP packet;
  • the bit of the coding header part map has a correspondence relationship with the coding header in the HTTP message.
  • each bit corresponds to one coding header in the HTTP message.
  • the value of the first bit in the coding header portion is indicated as the value of the first coding header to be decoded corresponding to the first bit and the corresponding coding header in the recorded HTTP message.
  • the encoding header corresponding to the first bit in the recorded HTTP packet and the value thereof may be determined as the first encoding header and the first encoding header, respectively. The value.
  • the receiver of the HTTP text can determine the encoding header Host and the value corresponding to the bit in the received HTTP packet according to the bit position of the encoding header part map, and the encoding in the HTTP packet.
  • the host and the value of the header are the same, so that the receiver can use the encoding header Host and its value in the recorded HTTP packet as the corresponding encoding header and its value in the HTTP packet received this time.
  • the method for transmitting an HTTP packet in the embodiment of the present invention determines the value of the encoding header to be decoded corresponding to the bit according to the value of the bit of the encoding header portion map, and the recorded HTTP packet. Whether the values of the corresponding coding headers in the text are the same, so that the coding header and its value in the received HTTP message can be determined according to the coding header part map, thereby reducing the occupation of the same field in the continuous HTTP message. Wireless air interface resources and can improve resource utilization efficiency.
  • the bit may also have a one-to-many relationship with the encoding header.
  • the value of one bit may represent multiple encoding headers to be transmitted corresponding to the bit.
  • the value is the same as the value of the corresponding multiple encoding headers in the recorded HTTP packet; the bit may have a many-to-one relationship with the encoding header, for example, the value of multiple bits is used.
  • the value of an encoding header to be transmitted corresponding to the multiple bits is the same as the value of the corresponding encoding header in the recorded HTTP packet, and the embodiment of the present invention is not limited thereto.
  • the decoding device is a receiver of an HTTP message
  • the HTTP packet can be either an HTTP request message or an HTTP response message.
  • the embodiment of the present invention is not limited thereto.
  • the decoding device may be a packet data convergence protocol ("Packet Data Convergence Protocol") in the receiver of the HTTP message, or may be a new coding compression layer in the receiver. Embodiments of the invention are not limited thereto.
  • the method 200 further includes:
  • the value of the second bit in the coding part location map is indicated as corresponding to the second bit.
  • the header encoding finger is determined according to the header encoding in the received HTTP packet. The second encoding header of the generation.
  • the encoding may be replaced by, for example, the encoding header User-Agent may be encoded as 29, A total of 12 bytes of "User-Agent:” can be replaced with one byte "OxlD". Therefore, the decoding device can determine the byte as the encoding header User-Agent according to the byte "OxlD", and Subsequent colons ":” and spaces ",,.
  • the second encoding header can also be transmitted in plaintext, in which case the transmitted information can be obtained without decoding.
  • the value of the second encoding header may be directly transmitted in plaintext, or the value of the encoding header to be transmitted and the value of the encoded encoding header to be transmitted may be compared character by character.
  • the same byte is encoded and compressed.
  • the decoding method 200 further includes:
  • S240 Determine, according to the first compression indication and the first number of bytes in the received HTTP packet, a first identical number of bytes associated with the first number of bytes, where the first compression indication is used to indicate the The value of the second encoding header is compressed;
  • the decoding device can read the code header portion map, and take the value of the corresponding HTTP header record for the bit of 1; the decoding device can read the first line of the HTTP message body, that is, Request-Line, if When the OxFF character is encountered, the value N of the following byte is read, and then N+3 bytes are taken in the corresponding position in the recorded URI; if there is no HTTP version number information in the first line, the recorded HTTP version number information is taken. For example, the decoding device reads the first byte of each line of the HTTP message.
  • the character recovers the header and the colon ":" and the space "", for example, User-Agent is encoded as 29, the first byte is "User-Agent:” if it is "OxlD"; For subsequent bytes, if OxFF character is encountered, the value of the next byte is read N Then, take N+3 bytes at the position corresponding to the value of the recorded encoding header, otherwise take the received original text; if the byte is not the encoding of the HTTP header, the line directly takes the original text, and does not need to be decompressed. In the embodiment of the present invention, optionally, as shown in FIG.
  • the method 200 further includes: S260, determining, according to the second compression indication and the sequence information in the received HTTP packet, the recorded HTTP packet. a first HTTP packet corresponding to the sequence information, where the second compression indication is used to indicate that the value of the second encoding header is the same as the value of the corresponding encoding header in the first HTTP packet;
  • the method 200 further includes: S280, determining, according to the third compression indication and the second byte number in the received HTTP packet, the second a second identical number of bytes associated with the number of bytes, wherein the third compressed indication is used to indicate that the URI to be decoded is compressed;
  • the method for transmitting an HTTP packet in the embodiment of the present invention determines the value of the encoding header to be decoded corresponding to the bit according to the value of the bit of the encoding header portion map, and the recorded HTTP packet. Whether the values of the corresponding coding headers in the text are the same, so that the coding header and its value in the received HTTP message can be determined according to the coding header part map, thereby reducing the occupation of the same field in the continuous HTTP message. Wireless air interface resources and can improve resource utilization efficiency.
  • the decoding device when there is no HTTP version number information in the HTTP packet received by the decoding device, it indicates that the received HTTP version number information is the same as the version number information in the recorded HTTP packet, thereby The version number information of the received HTTP packet is determined as the version number information of the received HTTP packet. Conversely, when the HTTP version number information exists in the received HTTP packet, the HTTP version number information of the received HTTP packet is displayed. The version number information of the received HTTP packet is the version number information of the HTTP packet transmitted.
  • the method 200 further includes:
  • the receiving end may determine, according to the PDU type field of the PDCP header, whether the PDCP PDU is compressed by HTTP header encoding, and the type field may be used to indicate the Whether the PDU packet is HTTP ⁇ encoded with header encoding compression. For packets that are encoded and compressed by HTTP, they are decoded or decompressed.
  • the HTTP message is compressed by encoding the HTTP message; similarly, the HTTP message is decompressed by decoding the HTTP file, but the present invention is implemented.
  • the example is not limited to this.
  • the method 200 further includes:
  • S310 Receive a protocol data unit PDU packet including a type field, where the type field is used to indicate that the PDU packet is a header encoded and compressed HTTP.
  • the encoding method described from the perspective of the encoding device corresponds to the decoding method described from the perspective of the decoding device, and is not described herein again.
  • the method 200 further includes:
  • S330 Update the recorded HTTP packet according to the received HTTP packet when the HTTP packet is not transmitted for the first time.
  • the updating the recorded HTTP packet according to the received HTTP packet includes:
  • the encoding header of the recorded HTTP packet is kept unchanged
  • the value of the encoding header of the received HTTP packet is different from the value of the encoding header of the recorded HTTP packet, the value of the encoding header in the recorded HTTP packet is replaced by the received value.
  • the encoding header of the HTTP packet takes the value; or
  • the recorded HTTP packet has an encoding header that the received HTTP packet does not have, the encoding header of the recorded HTTP packet is kept unchanged;
  • the received HTTP packet has an encoding header that is not included in the recorded HTTP packet, record the received HTTP packet with an encoding header that the recorded HTTP packet does not have and its value;
  • the version number information of the received HTTP packet is the same as the version number information of the recorded HTTP packet, the version number information of the recorded HTTP packet is kept unchanged;
  • the version number of the received HTTP packet and the version of the recorded HTTP packet If the version number of the received HTTP packet and the version of the recorded HTTP packet If the number information is different, the version number information in the recorded HTTP packet is replaced with the version number information of the received HTTP packet.
  • the first transmission of the HTTP Request message after the UE transitions from the RRC JDLE state to the RRC_Connected state may be referred to as the first transmission of the HTTP message; the UE is in the serving radio network subsystem (Serving Radio Network Subsystem) , the cylinder is called "SRNS".
  • the relocation is completed.
  • the first HTTP HTTP transmission message is received after the start of the HTTP HTTP HEADER CODING AND COMPRESSION message. It can also be called the first transmission of the HTTP message.
  • the HTTP response packet transmitted for the first time is also referred to as the first transmission of the HTTP packet, and the embodiment of the present invention is not limited thereto.
  • the receiver when the receiver cannot correctly decode and decompress the received data, the receiver may construct a PDCP PDU, and request the sender to transmit the recorded URI, the HTTP version number, the encoding header value, and the like. After receiving the request PDU, the sender may send the recorded URI, HTTP version number, encoding header value and other information to the receiver. If the receiver determines that the overall efficiency is lower than if the HTTP header encoding is not used, the header encoding compression may be suspended.
  • the encoding method described from the perspective of the encoding device corresponds to the decoding method described from the perspective of the decoding device, and is not described herein again.
  • the method for transmitting an HTTP packet in the embodiment of the present invention determines the value of the encoding header to be decoded corresponding to the bit according to the value of the bit of the encoding header portion map, and the recorded HTTP packet. Whether the values of the corresponding coding headers in the text are the same, so that the coding header and its value in the received HTTP message can be determined according to the coding header part map, thereby reducing the occupation of the same field in the continuous HTTP message. Wireless air interface resources and can improve resource utilization efficiency.
  • the UE reports to the network device whether the HTTP header coding and compression capability report is supported, and the network device is, for example, an RNC, or the network device is an eNB.
  • the network device is, for example, an RNC, or the network device is an eNB.
  • the embodiment of the present invention is not limited thereto; in S420, if the network device also supports the HTTP header encoding and compression function, the network The device can configure the user equipment to enable the HTTP header coding and compression algorithm (Enable HTTP header coding and compression algorithm);
  • the UE may reply to the network device (Enable HTTP header coding and compression algorithm Response) to report the encoding result of the HTTP header and the startup result of the compression function.
  • the network device Enable HTTP header coding and compression algorithm Response
  • the handover in the normal RNC does not involve process modification, for inter-RNC handover, but not with SRNS relocation, and the source RNC supports HTTP header coding and compression, and the target RNC does not.
  • the source RNC decides to perform inter-RNC handover without SRNS relocation, and through the background configuration query to the target RNC does not support HTTP header encoding and compression, the source RNC may go to the UE.
  • the STOP HTTP HEADER CODING AND COMPRESSION message is sent to inform the UE to stop using the HTTP header encoding and compression function; after that, the source RNC, the target RNC, and the UE jointly perform the handover procedure.
  • the PDCP entity on the network side is transferred from the source RNC to the target RNC, and can be divided into three cases: 1) Both the source RNC and the target RNC support HTTP header coding and Compression function; 2) The source RNC supports HTTP header encoding and compression, the target RNC does not support HTTP header encoding and compression; 3) The source RNC does not support HTTP header encoding and compression, and the target RNC supports HTTP header encoding and compression. Compression function.
  • Both the source RNC and the target RNC support HTTP header coding and compression.
  • the SRNS relocation process is shown in Figure 16.
  • the source RNC sends a relocation request (RELOCATION REQUIRED) message to the core network CN, and the information element IE "Source RNC To Target RNC Transparent Container" of the relocation request message may be added with the HTTP header encoding compression enabled.
  • IE HTTP header coding and compression on-going
  • IE HTTP header coding and compression context
  • the CN sends a relocation request (RELOCATION REQUEST) message to the target RNC, where the relocation request message may include an IE "Source RNC To Target RNC Transparent Container" in the RELOCATION REQUIRED message.
  • RELOCATION REQUEST a relocation request
  • the relocation request message may include an IE "Source RNC To Target RNC Transparent Container" in the RELOCATION REQUIRED message.
  • the target RNC sends a relocation request response (RELOCATION) to the CN.
  • RELOCATION relocation request response
  • the IE "Target" of the relocation request reply message IE "Target RNC support HTTP header coding and compression" can be added to RNC To Source RNC Transparent Container".
  • the CN sends a relocation command (RELOCATION COMMAND) message to the source RNC, where the relocation command message may include an IE "Target RNC To Source RNC Transparent Container" in the RELOCATION REQUEST ACKNOWLEDGE message.
  • RELOCATION COMMAND a relocation command
  • the relocation command message may include an IE "Target RNC To Source RNC Transparent Container" in the RELOCATION REQUEST ACKNOWLEDGE message.
  • the source RNC can know that the target RNC also supports the HTTP header encoding and compression function, so that the related network element can perform the relocation process.
  • the source RNC supports the HTTP header encoding and compression function.
  • the target RNC does not support the HTTP header encoding and compression function.
  • the SRNS relocation process is shown in Figure 17.
  • the source RNC sends a relocation request (RELOCATION REQUIRED) message to the CN, and the IE "Source RNC To Target RNC Transparent Container" of the relocation request message may add an IE "HTTP header” that has started HTTP header encoding compression. Coding and compression on-going” , and the IE “HTTP header coding and compression context" of the previously encoded header value information.
  • the CN sends a Relocation Request (RELOCATION REQUEST) message to the target RNC, which may include an IE "Source RNC To Target RNC Transparent Container" in the RELOCATION REQUIRED message.
  • RELOCATION REQUEST Relocation Request
  • the target RNC sends a RELOCATION REQUEST ACKNOWLEDGE message to the CN.
  • an IE “Target RNC NOT support HTTP” may be added. Header coding and compression” , or IE “Target RNC support HTTP header coding and compression” may not be included in IE "Target RNC To Source RNC Transparent Container”.
  • the CN sends a relocation command (RELOCATION COMMAND) message to the source RNC, which may include an IE "Target RNC To Source RNC Transparent Container" in the RELOCATION REQUEST ACKNOWLEDGE message.
  • RELOCATION COMMAND a relocation command
  • the source RNC sends a Stop ACK HTTP HEADER CODING AND COMPRESSION message to the UE, informing the UE to stop using the HTTP header encoding and compression function.
  • each related network element performs a relocation process.
  • the existing message can be modified without any modification.
  • the source RNC can query the background configuration to obtain information about whether the target RNC supports the function, and then the source RNC receives the CN relocation command (RELOCATION COMMAND) message.
  • the UE can directly send a message to the UE to stop the HTTP header encoding and compression (STOP HTTP HEADER CODING AND COMPRESSION), and notify the UE to stop using the HTTP header encoding and compression function.
  • the source RNC does not support HTTP header encoding and compression.
  • the target RNC supports HTTP header encoding and compression.
  • the SRNS relocation process is shown in Figure 18.
  • the source RNC sends a relocation request (RELOCATION REQUIRED) message to the CN, where the IE “Source radio access Capability” in the IE “Source RNC To Target RNC Transparent Container” of the relocation request message is in the IE "PDCP capability” , you can add IE "HTTP header coding and compression capability”.
  • the CN sends a Relocation Request (RELOCATION REQUEST) message to the target RNC, which may include an IE "Source RNC To Target RNC Transparent Container" in the RELOCATION REQUIRED message.
  • RELOCATION REQUEST Relocation Request
  • the target RNC sends a RELOCATION REQUEST ACKNOWLEDGE message to the CN, which may include the IE "Target RNC To Source RNC Transparent Container".
  • the CN sends a Relocation Command (RELOCATION COMMAND) message to the target RNC, which may include the IE "Target RNC To Source RNC Transparent Container" in the RELOCATION REQUEST ACKNOWLEDGE message.
  • RELOCATION COMMAND Relocation Command
  • the target RNC sends a start HTTP header encoding and compression function (START HTTP HEADER CODING AND COMPRESSION) to the UE.
  • the message informs the UE to start using HTTP header encoding and compression.
  • the existing message can be modified.
  • the new RNC sends a capability query message to the UE, and the UE replies to its own capability, and carries whether to support HTTP header coding and compression.
  • Information if the UE supports the function, the new RNC sends a START HTTP HEADER CODING AND COMPRESSION message to the UE, informing the UE to start using the HTTP header encoding. And compression.
  • the HTTP HTTP header encoding and compression function (START HTTP HEADER CODING AND COMPRESSION ) message can carry the configuration parameter M, and M represents the number of values of the encoding header stored in the record.
  • the method for transmitting an HTTP message in the embodiment of the present invention indicates, by using the value of the bit of the encoding header part map, the value of the encoding header to be transmitted corresponding to the bit, and the recorded HTTP packet.
  • the value of the corresponding encoding header in the text is the same, and the encoding headers with the same value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resource utilization efficiency.
  • Fig. 19 shows a schematic block diagram of an encoding device 800 in accordance with an embodiment of the present invention. As shown in Fig. 19, the encoding device 800 includes:
  • the first determining module 810 is configured to determine a value of each bit of the coding header part map, where the value of each bit is respectively indicated as the value of the coding head to be transmitted corresponding to the bit and the recorded value Whether the value of the corresponding encoding header in the HTTP packet is the same;
  • the transmitting module 820 is configured to generate, according to the value of each bit determined by the first determining module 810, an HTTP packet to be transmitted that includes the encoding header part map, to facilitate the HTTP packet to be transmitted.
  • the receiving end of the text determines the value of the encoding header in the HTTP packet to be transmitted and the corresponding encoding header in the recorded HTTP packet according to the encoding header part map and the recorded HTTP packet.
  • the first encoding header having the same value and the value of the first encoding header.
  • the encoding apparatus of the HTTP packet in the embodiment of the present invention indicates the value of the encoding header to be transmitted corresponding to the bit by using the value of the bit of the encoding header part map, and the recorded HTTP packet.
  • the value of the corresponding encoding header in the text is the same, and the encoding headers with the same value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resource utilization efficiency.
  • the encoding apparatus 800 further includes: a second determining module 830, configured to determine a value in the encoding header to be transmitted and the recorded value a second encoding header having a different value of the corresponding encoding header in the HTTP packet, and a value of the second encoding header;
  • a third determining module 840 configured to determine a header encoding of the second encoding header determined by the second determining module 830, where the header encoding is used to refer to the second encoding header;
  • the transmission module 820 is configured to: determine, according to the value of the bit determined by the first determining module 810, a header code of the second encoding header determined by the third determining module 840, and the second determining The value of the second encoding header determined by the module 830 is generated and transmitted, and the HTTP packet to be transmitted is generated and transmitted.
  • the encoding apparatus 800 further includes: a fourth determining module 850, configured to determine a first compression indication and a first number of bytes, where the first compression indication is used The value indicating the second encoding header is compressed, and the first byte number is associated with the first identical number of bytes, where the first identical number of bytes is the value of the second encoding header to be transmitted.
  • the transmission module 820 is configured to: determine, according to the value of the each bit determined by the first determining module 810, the header code of the second encoding header determined by the third determining module 840, The first compression indicator determined by the fourth determining module 850 and the first number of bytes generate and transmit the HTTP message to be transmitted.
  • the encoding apparatus 800 further includes: a fifth determining module 860, configured to determine a second compression indication, and the first HTTP packet is in the recorded HTTP report.
  • the transmission module 820 is configured to: determine, according to the value of the bit determined by the first determining module 810, a header code of the second encoding header determined by the third determining module 840, and the fifth determining The second compression indication determined by the module 860 and the sequence information generate and transmit the HTTP message to be transmitted.
  • the encoding apparatus 800 further includes: a sixth determining module 870, configured to determine a third compression indication and a second number of bytes, where the third compression indication is used
  • the universal resource identifier URI indicating that the second Byte is to be transmitted is associated with the second identical number of bytes, the second identical number of bytes being the URI to be transmitted and the recorded HTTP message.
  • the URIs are consecutively the same number of bytes;
  • the transmission module 820 is configured to: generate, according to the value of the each bit determined by the first determining module 810, the third compression indication determined by the sixth determining module 870, and the second number of bytes. Transmit the HTTP ⁇ message to be transmitted.
  • the encoding apparatus 800 further includes: a seventh determining module 880, configured to determine the HTTP version number information to be transmitted and the recorded
  • the transmission module 820 is configured to:
  • the HTTP to be transmitted is generated and transmitted according to the value of each bit.
  • the HTTP message to be transmitted includes the code header portion map
  • the seventh determining module 880 determines that the HTTP version number information to be transmitted is different from the version number information in the recorded HTTP message, the value of each bit and the HTTP version number to be transmitted are determined according to the value of the bit number.
  • the HTTP message to be transmitted is generated and transmitted, and the HTTP message to be transmitted includes the code header part map and the HTTP version number information to be transmitted.
  • the transmission module 820 is configured to:
  • a protocol data unit PDU packet including a type field is generated and transmitted, and the type field is used to indicate that the PDU packet is a header encoded and compressed HTTP message.
  • the encoding apparatus 800 further includes: a recording module 890, configured to record the HTTP transmitted for the first time when transmitting the HTTP packet for the first time.
  • the update module 895 is configured to update the recorded HTTP message according to the HTTP message to be transmitted when the HTTP message is not transmitted for the first time.
  • the update module 895 is optionally used to:
  • the encoding header of the HTTP packet to be transmitted is the same as the value of the encoding header of the recorded HTTP packet, the encoding header of the recorded HTTP packet and the value thereof are kept unchanged;
  • the value of the encoding header of the HTTP packet to be transmitted is different from the value of the encoding header of the HTTP packet, the value of the encoding header in the recorded HTTP packet is replaced with the value of the encoding header.
  • the recorded HTTP packet has an encoding header that the HTTP packet to be transmitted does not have And maintaining the encoding header of the recorded HTTP packet and its value unchanged; or if the HTTP packet to be transmitted has an encoding header that the recorded HTTP packet does not have, The transmitted HTTP packet has an encoding header that the recorded HTTP packet does not have and its value; or
  • the version number information of the HTTP packet to be transmitted is the same as the version number information of the recorded HTTP packet, the version number information of the recorded HTTP packet is kept unchanged;
  • the version number information of the HTTP packet to be transmitted is different from the version number of the HTTP packet, the version number information of the recorded HTTP packet is replaced with the HTTP packet to be transmitted. Version number information.
  • the encoding apparatus 800 of the HTTP message may correspond to the sender of the method for transmitting the HTTP message in the embodiment of the present invention, and the above and other operations of the respective modules in the encoding apparatus 800 and/or For the purpose of implementing the corresponding processes of the respective methods in FIG. 1 to FIG. 18, the functions are not described herein.
  • the encoding apparatus of the HTTP packet in the embodiment of the present invention indicates the value of the encoding header to be transmitted corresponding to the bit by using the value of the bit of the encoding header part map, and the recorded HTTP packet.
  • the value of the corresponding encoding header in the text is the same, and the encoding headers with the same value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resource utilization efficiency.
  • an embodiment of the present invention further provides a decoding apparatus, where the decoding apparatus 900 includes:
  • the earphone 5Uf block 910 is configured to obtain the value of each bit position of the coded header part map in the received HTTP message;
  • the first determining module 920 is configured to: the value of the first bit of the coded part location map obtained by the acquiring module 910 is the value of the first encoding header to be decoded corresponding to the first bit When the value of the corresponding encoding header in the recorded HTTP packet is the same, the encoding header corresponding to the first bit in the recorded HTTP packet and the value thereof are respectively determined as the first The encoding header and the value of the first encoding header.
  • the decoding apparatus of the HTTP packet in the embodiment of the present invention determines the value of the encoding header to be decoded corresponding to the bit according to the value of the bit of the encoding header part map, and the recorded HTTP packet. Whether the values of the corresponding coding headers in the text are the same, so that the coding header and its value in the received HTTP message can be determined according to the coding header part map, thereby reducing continuous HTTP.
  • the wireless air interface resources occupied by the same field in the packet can improve the resource usage efficiency.
  • the decoding apparatus 900 further includes: a second determining module 930, configured to acquire, by the acquiring module 910, the second bit of the encoding header part map If the value of the second encoding header corresponding to the second bit is different from the value of the corresponding encoding header in the recorded HTTP packet, according to the received
  • the header encoding in the HTTP message determines the second encoding header that the header encoding refers to.
  • the decoding apparatus 900 further includes: a third determining module 940, configured to: according to the first compression indication and the first byte in the received HTTP packet And determining a first identical number of bytes associated with the first number of bytes, wherein the first compression indication is used to indicate that the value of the second encoding header is compressed;
  • a fourth determining module 950 configured to determine, according to the first identical number of bytes determined by the third determining module 940, a corresponding consecutive first identical word in the value of the corresponding encoding header in the recorded HTTP packet The byte of the number of sections is determined as the value to be decoded of the second encoding header.
  • the decoding apparatus 900 further includes: a fifth determining module 960, configured to determine, according to the second compression indication and the sequence information in the received HTTP packet, a first HTTP packet corresponding to the sequence information in the recorded HTTP packet, where the second compression indication is used to indicate the value of the second encoding header and the corresponding encoding in the first HTTP packet.
  • the value of the head is the same;
  • the sixth determining module 970 is configured to determine, by the fifth determining module 960, a value of a corresponding encoding header in the first HTTP packet as a value of the second encoding header.
  • the decoding apparatus 900 further includes: a seventh determining module 980, configured to: according to the third compressed indication and the second byte in the received HTTP packet a second identical number of bytes associated with the second number of bytes, wherein the third compressed indication is used to indicate that the URI to be decoded is compressed;
  • the eighth determining module 990 is configured to determine, according to the second identical number of bytes determined by the seventh determining module 980, a corresponding consecutive second identical number of bytes in the URI of the recorded HTTP message.
  • the URI to be decoded in the received HTTP message.
  • the decoding apparatus 900 further includes: a ninth determining module 991, configured to: when it is determined that the received HTTP packet does not have the HTTP version number information, The version number information in the recorded HTTP packet is determined as the version number information of the received HTTP packet.
  • the decoding apparatus 900 further includes: a receiving module 992, configured to receive a protocol data unit PDU packet including a type field, where the type field is used to indicate the PDU packet HTTP headers that are header encoded and compressed.
  • the decoding apparatus 900 further includes: a recording module 993, configured to record the HTTP transmitted for the first time when transmitting the HTTP packet for the first time.
  • the update module 994 is configured to update the recorded HTTP message according to the received HTTP message when the HTTP message is not transmitted for the first time.
  • the update module 994 is configured to:
  • the encoding header of the recorded HTTP packet is kept unchanged
  • the value of the encoding header of the received HTTP packet is different from the value of the encoding header of the recorded HTTP packet, the value of the encoding header in the recorded HTTP packet is replaced by the received value.
  • the encoding header of the HTTP packet takes the value; or
  • the recorded HTTP packet has an encoding header that the received HTTP packet does not have, the encoding header of the recorded HTTP packet is kept unchanged;
  • the received HTTP packet has an encoding header that is not included in the recorded HTTP packet, record the received HTTP packet with an encoding header that the recorded HTTP packet does not have and its value;
  • the version number information of the received HTTP packet is the same as the version number information of the recorded HTTP packet, the version number information of the recorded HTTP packet is kept unchanged;
  • the version number information of the received HTTP packet is different from the version number information of the recorded HTTP packet, the version number information in the recorded HTTP packet is replaced with the version number of the received HTTP packet. information.
  • the decoding apparatus 900 of the HTTP message may correspond to the receiver of the method for transmitting the HTTP message in the embodiment of the present invention, and the above and other operations of the respective modules in the decoding apparatus 900 and/or For the purpose of implementing the corresponding processes of the respective methods in FIG. 1 to FIG. 18, the functions are not described herein.
  • the decoding apparatus of the HTTP packet determines the value of the encoding header to be decoded corresponding to the bit according to the value of the bit of the encoding header part map, and the recorded value Whether the value of the corresponding encoding header in the HTTP packet is the same, so that the encoding header and its value in the received HTTP packet can be determined according to the encoding header part map, thereby reducing the number of consecutive HTTP packets.
  • the wireless air interface resources occupied by the same field can improve the efficiency of resource usage.
  • the present invention further provides an encoding apparatus 1000, which includes a processor 1100, a memory 1200, a bus system 1300, and a transmitter 1400.
  • the processor 1100, the memory 1200, and the transmitter 1400 are connected by a bus system 1300.
  • the memory 1200 is used to store instructions.
  • the processor 1100 calls the instruction stored in the memory 1200 through the bus system 1300, and is used to: determine The value of each bit of the coding header part map, and the value of each bit is respectively indicated as the value of the coding header to be transmitted corresponding to the bit and the corresponding coding header in the recorded HTTP message.
  • the processor 1100 is further configured to: generate, according to the value of each bit, an HTTP message to be transmitted that includes the coded part location map; the processor 1100 is further configured to control the The sender 1400 sends the HTTP message to be transmitted to the receiver, so that the receiver determines, according to the code header part map and the recorded HTTP message, the code header in the HTTP message to be transmitted.
  • the first encoding header having the same value as the corresponding encoding header in the recorded HTTP packet and the value of the first encoding header.
  • the encoding apparatus of the HTTP packet in the embodiment of the present invention indicates the value of the encoding header to be transmitted corresponding to the bit by using the value of the bit of the encoding header part map, and the recorded HTTP packet.
  • the value of the corresponding encoding header in the text is the same, and the encoding headers with the same value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resource utilization efficiency.
  • the processor 1100 may be a central processing unit (a central processing unit (CPU), and the processor 1100 may also be another general-purpose processor, a digital signal processor (DSP). ), application specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and the like.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 1200 can include read only memory and random access memory and provides instructions and data to the processor 1100.
  • a portion of the memory 1200 can also include a non-volatile random access memory.
  • the memory 1200 can also store information of the device type.
  • the bus system 1300 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. However, for the sake of clarity, the various buses are marked as total in the figure. Line system 1300.
  • each step of the above method may be completed by an integrated logic circuit of the hardware in the processor 1100 or an instruction in the form of software.
  • the steps of the method disclosed in the embodiments of the present invention may be directly implemented as hardware processor execution completion, or may be performed by a combination of hardware and software modules in the processor.
  • the software modules can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in the memory 1200.
  • the processor 1100 reads the information in the memory 1200 and completes the steps of the above method in combination with hardware. To avoid repetition, it will not be described in detail here.
  • the processor 1100 is configured to: determine an encoding header header to be transmitted, and a value of the second encoding header; determine a header encoding of the second encoding header, the header The part code is used to refer to the second encoding header; wherein, according to the value of each bit, the HTTP message to be transmitted including the encoding header part map is generated and transmitted, including: according to each The value of the bit, the header of the second encoding header, and the value of the second encoding header generate and transmit the HTTP message to be transmitted.
  • the processor 1100 is configured to: determine a first compression indication and a first number of bytes, where the first compression indication is used to indicate that the value of the second encoding header is compressed, the first One byte number is associated with the first identical number of bytes, the first identical number of bytes being the second number of bytes to be transmitted; wherein, according to the value of each bit, the second code The header code of the header and the value of the second encoding header, generating and transmitting the HTTP message to be transmitted, including: according to the value of each bit, the header encoding of the second encoding header And the first compression indication and the first number of bytes, generating and transmitting the HTTP message to be transmitted.
  • the processor 1100 is configured to: determine a second compression indication, and order information of the first HTTP packet in the recorded HTTP packet, where the second compression indication is used to indicate The value of the second encoding header is the same as the value of the corresponding encoding header in the first HTTP packet corresponding to the order information; where the value is determined according to the bit, the second encoding The header code of the header and the value of the second encoding header, generating and transmitting the HTTP message to be transmitted, including: according to the value of each bit, the header encoding of the second encoding header And the second compression indication and the sequence information, generating and transmitting the HTTP message to be transmitted.
  • the processor 1100 is configured to: determine a third compression indication to And a second number of bytes, the third compressed indication is used to indicate that the universal resource identifier URI to be transmitted is compressed, and the second number of bytes is associated with the second identical number of bytes, and the second identical number of bytes is The value of each bit to be transmitted, and the HTTP message to be transmitted including the code header part map is generated and transmitted, including: according to the value of each bit, the third compression indication, and the second The number of bytes, the HTTP message to be transmitted is generated and transmitted.
  • the processor 1100 is configured to: determine whether the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP packet; wherein, according to the each bit The value of the HTTP packet to be transmitted, including the encoding part header map, is generated and transmitted, and includes: when the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP packet, according to the The value of each bit is generated and transmitted, and the HTTP message to be transmitted includes the code header part map; the HTTP version number information to be transmitted and the recorded HTTP message When the version number information in the text is different, the HTTP packet to be transmitted is generated and transmitted according to the value of the bit and the HTTP version number to be transmitted, and the HTTP packet to be transmitted includes the encoding header.
  • the part map and the HTTP version number information to be transmitted is generated and transmitted.
  • the processor 1100 according to the value of each bit, generates and transmits an HTTP message to be transmitted that includes the coded part location map, including: according to each bit bit The value is generated, and a protocol data unit PDU packet including a type field is used, and the type field is used to indicate that the PDU packet is a header encoded and compressed HTTP.
  • the memory 1200 is configured to: when encoding the HTTP packet for the first time, record the encoding header value, the URI, and the HTTP version number information of the first transmitted HTTP text; and not transmit the HTTP packet for the first time. And updating the recorded HTTP packet according to the HTTP packet to be transmitted.
  • the memory 1200 updates the recorded HTTP packet according to the HTTP packet to be transmitted, including:
  • the encoding header of the HTTP packet to be transmitted is the same as the value of the encoding header of the recorded HTTP packet, the encoding header of the recorded HTTP packet and the value thereof are kept unchanged;
  • the value of the encoding header of the HTTP packet to be transmitted is different from the value of the encoding header of the recorded HTTP packet, the value of the encoding header in the recorded HTTP packet is replaced by the value.
  • the recorded HTTP packet has an encoding header that is not included in the HTTP packet to be transmitted, the encoding header of the recorded HTTP packet is kept unchanged;
  • the HTTP header to be transmitted has an encoding header that is not included in the recorded HTTP packet and is obtained. Value; or
  • the version number information of the HTTP packet to be transmitted is the same as the version number information of the recorded HTTP packet, the version number information of the recorded HTTP packet is kept unchanged;
  • the version number information of the HTTP packet to be transmitted is different from the version number of the HTTP packet, the version number information of the recorded HTTP packet is replaced with the HTTP packet to be transmitted. Version number information.
  • the encoding apparatus 1000 of the HTTP message may correspond to the sender of the method for transmitting the HTTP message and the encoding apparatus 800 in the embodiment of the present invention, and the above-mentioned sum of each module in the encoding apparatus 1000
  • the encoding apparatus 1000 may correspond to the sender of the method for transmitting the HTTP message and the encoding apparatus 800 in the embodiment of the present invention, and the above-mentioned sum of each module in the encoding apparatus 1000
  • other operations and/or functions are not described herein.
  • the encoding apparatus of the HTTP packet in the embodiment of the present invention indicates the value of the encoding header to be transmitted corresponding to the bit by using the value of the bit of the encoding header part map, and the recorded HTTP packet.
  • the value of the corresponding encoding header in the text is the same, and the encoding headers with the same value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resource utilization efficiency.
  • the present invention also provides a decoding apparatus 2000, which includes a processor 2100, a memory 2200, and a bus system 2300.
  • the processor 2100 and the memory 2200 are connected by a bus system 2300 for storing instructions.
  • the processor 2100 calls the instruction stored in the memory 2200 through the bus system 2300 to: obtain the received HTTP.
  • the value of each bit of the coded header part map in the message; the value of the first bit of the code header part map is indicated by the first bit of the first bit to be decoded corresponding to the first bit
  • the encoding header corresponding to the first bit in the recorded HTTP packet and its value are respectively determined.
  • the value of the first encoding header and the first encoding header are respectively determined.
  • the decoding apparatus of the HTTP packet determines the value of the encoding header to be decoded corresponding to the bit according to the value of the bit of the encoding header part map, and the recorded value Whether the value of the corresponding encoding header in the HTTP packet is the same, so that the encoding header and its value in the received HTTP packet can be determined according to the encoding header part map, thereby reducing the number of consecutive HTTP packets.
  • the wireless air interface resources occupied by the same field can improve the efficiency of resource usage.
  • the processor 2100 may be a central processing unit (a central processing unit (CPU), and the processor 2100 may also be another general-purpose processor, a digital signal processor (DSP). ), application specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and the like.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 2200 can include read only memory and random access memory and provides instructions and data to the processor 2100.
  • a portion of the memory 2200 can also include a non-volatile random access memory.
  • the memory 2200 can also store information of the device type.
  • the bus system 2300 can include, in addition to the data bus, a power bus, a control bus, and a status signal bus. However, for clarity of description, various buses are labeled as bus system 2300 in the figure.
  • each step of the foregoing method may be completed by an integrated logic circuit of the hardware in the processor 2100 or an instruction in the form of software.
  • the steps of the method disclosed in the embodiments of the present invention may be directly implemented as hardware processor execution completion, or may be performed by a combination of hardware and software modules in the processor.
  • the software modules can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in the memory 2200, and the processor 2100 reads the information in the memory 2200 and completes the steps of the above method in combination with the hardware. To avoid repetition, it will not be described in detail here.
  • the processor 2100 is configured to:: the value of the second bit in the coding part location map indicates that the second coding bit to be decoded is corresponding to the second bit
  • the second encoding header indicated by the header encoding is determined according to the header encoding in the received HTTP packet.
  • the processor 2100 is configured to: determine, according to the first compression indication in the received HTTP packet and the first number of bytes, a first identity associated with the first number of bytes a number of bytes, wherein the first compression indication is used to indicate that the value of the second encoding header is compressed; according to the first identical number of bytes, the corresponding encoding header in the recorded HTTP packet is taken The corresponding consecutive first identical number of bytes in the value is determined as the value of the second encoding header to be decoded.
  • the processor 2100 is configured to: determine, according to the second compression indication and the sequence information in the received HTTP packet, the first corresponding to the sequence information in the recorded HTTP packet An HTTP packet, where the second compression indication is used to indicate that the value of the second encoding header is the same as the value of the corresponding encoding header in the first HTTP packet; The value of the corresponding encoding header is determined as the value of the second encoding header.
  • the processor 2100 is configured to: determine, according to the third compression indication in the received HTTP packet and the second byte number, a second identity associated with the second byte number a number of bytes, wherein the third compression indication is used to indicate that the URI to be decoded is compressed; according to the second identical number of bytes, the corresponding consecutive second identical number of bytes in the URI of the recorded HTTP message Byte, determined as the URI to be decoded in the received HTTP message.
  • the processor 2100 is configured to: when it is determined that the received HTTP packet does not have the HTTP version number information, determine the version number information in the recorded HTTP packet as the received Version number information of the HTTP packet.
  • the decoding apparatus 2000 further includes a receiver 2400, configured to: receive a protocol data unit PDU packet including a type field, where the type field is used to indicate that the PDU packet is a header. Encoded and compressed HTTP ⁇ text.
  • the memory 2200 is configured to: when encoding the HTTP packet for the first time, record the encoding header value, the URI, and the HTTP version number information of the first transmitted HTTP text; and not transmit the HTTP packet for the first time. And updating the recorded HTTP packet according to the received HTTP packet.
  • the memory 2200 updates the recorded HTTP packet according to the received HTTP packet, including:
  • the encoding header of the recorded HTTP packet is kept unchanged
  • the value of the encoding header of the received HTTP packet is different from the value of the encoding header of the recorded HTTP packet, the value of the encoding header in the recorded HTTP packet is replaced by the received value.
  • the encoding header of the HTTP packet takes the value; or
  • the recorded HTTP packet has an encoding header that the received HTTP packet does not have, the encoding header of the recorded HTTP packet is kept unchanged;
  • the received HTTP packet has an encoding header that the recorded HTTP packet does not have And recording the encoded header of the received HTTP message but having the recorded HTTP packet and the value thereof;
  • the version number information of the received HTTP packet is the same as the version number information of the recorded HTTP packet, the version number information of the recorded HTTP packet is kept unchanged;
  • the version number information of the received HTTP packet is different from the version number information of the recorded HTTP packet, the version number information in the recorded HTTP packet is replaced with the version number of the received HTTP packet. information.
  • the decoding apparatus 2000 of the HTTP message may correspond to the receiver and the decoding apparatus 900 of the method for transmitting an HTTP message in the embodiment of the present invention, and the above-mentioned sum of each module in the decoding apparatus 2000
  • the decoding apparatus 2000 may correspond to the receiver and the decoding apparatus 900 of the method for transmitting an HTTP message in the embodiment of the present invention, and the above-mentioned sum of each module in the decoding apparatus 2000
  • other operations and/or functions are not described herein.
  • the decoding apparatus of the HTTP packet in the embodiment of the present invention determines the value of the encoding header to be decoded corresponding to the bit according to the value of the bit of the encoding header part map, and the recorded HTTP packet. Whether the values of the corresponding coding headers in the text are the same, so that the coding header and its value in the received HTTP message can be determined according to the coding header part map, thereby reducing the occupation of the same field in the continuous HTTP message. Wireless air interface resources and can improve resource utilization efficiency.
  • system and “network” are often used interchangeably herein.
  • the term “and/or,” in this context is merely an association that describes an associated object, indicating that there can be three relationships, for example, A and / or B, which can mean: A exists separately, and both A and B exist, alone There are three cases of B.
  • the character ",” in this paper, indicates that the contextual object is an "or" relationship.
  • B corresponding to A means that B is associated with A, and B can be determined based on A.
  • determining B according to A does not mean that B is determined only on the basis of A, but also based on A and/or other information.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • 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.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the components displayed for the unit may or may not be physical units, ie may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • 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 contributes in essence or 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 removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. .

Landscapes

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

Abstract

Disclosed are a method and a device for transmitting an HTTP packet. The method comprises: determining a value of each bit in a code header bitmap, the value of each bit indicating whether a value of a corresponding code header to be transmitted of the bit is the same as a value of a corresponding code header in a recorded HTTP packet; and generating and transmitting, according to the value of each bit, an HTTP packet to be transmitted that comprises the code header bitmap, so that a receiver of the HTTP packet to be transmitted is enabled to determine, according to the code header bitmap and the recorded HTTP packet, a first code header where a value of a code header in the HTTP packet to be transmitted is the same as the value of the corresponding code header in the recorded HTTP packet, and the value of the first code header. The method and the device for transmitting an HTTP packet according to the embodiments of the present invention can reduce wireless air-interface resources occupied by the same field in the continuous HTTP packets, thereby improving resource utilization.

Description

传输 HTTP报文的方法、 编码装置和解码装置 技术领域  Method for transmitting HTTP message, encoding device and decoding device
本发明涉及通信领域, 尤其涉及通信领域中传输 HTTP报文的方法、 编 码装置和解码装置。 背景技术  The present invention relates to the field of communications, and in particular, to a method, an encoding device, and a decoding device for transmitting an HTTP message in the communication field. Background technique
超文本传输协议 (HyperText Transfer Protocol, 筒称为 "HTTP" )是互 联网上广泛使用的协议, 例如网页浏览、 HTTP 渐进下载 ( Progressive Download )、 HTTP实时流( Live Streaming )、社交网络服务( Social Networking Services, 筒称为 "SNS" )、 微博等业务都使用 HTTP协议, 这些业务构成了 移动互联网上的主流应用。  HyperText Transfer Protocol (HyperText Transfer Protocol) is a widely used protocol on the Internet, such as web browsing, HTTP Progressive Download, Live Streaming, and Social Networking. Services, such as "SNS", and Weibo, use the HTTP protocol, which constitutes a mainstream application on the mobile Internet.
HTTP协议采用请求 -响应 (Request-Response )模式工作, 即客户端或 终端向服务器发送 HTTP请求(HTTP Request )报文以请求资源, 服务器向 客户端或终端发送 HTTP响应 ( HTTP Response )报文以响应客户端或终端 的请求。  The HTTP protocol works in the Request-Response mode, that is, the client or terminal sends an HTTP Request (HTTP Request) message to the server to request the resource, and the server sends an HTTP Response (HTTP Response) message to the client or the terminal. Respond to a request from a client or terminal.
在 HTTP请求 /响应( Request/Response )报文中, 均包含若干头部字段, 这些头部字段包括可以接受的语言、 可以接受的编码方式、 用户代理即浏览 器类型、 Cookie等, 而这些字段对于某个用户来说可能是始终不变的, 或至 少在一段时间内保持不变。 例如, 一个用户的四次连续 HTTP获取( GET ) 清求报文中, HTTP头部中的 Accept, User Agent、 Host, Pragma, Cookie 字段完全一致, HTTP报文的第一行以及该 HTTP报文请求的通用资源标识 符( Uniform Resource Identifier, 筒称为 "URI" )的前几个字符 "/client/" 也 一致, 该 HTTP报文的版本号 "ΗΤΤΡ/1.Γ 也完全一致。  In the HTTP request/response (Request/Response) message, there are several header fields, including the acceptable language, acceptable encoding, user agent, browser type, cookie, etc., and these fields. It may be constant for a user, or at least for a period of time. For example, in a user's four consecutive HTTP access (GET) request messages, the Accept, User Agent, Host, Pragma, and Cookie fields in the HTTP header are identical, the first line of the HTTP message, and the HTTP message. The first few characters of the requested Uniform Resource Identifier ("URI") are also the same as "/client/", and the version number of the HTTP message is "ΗΤΤΡ/1.Γ".
目前, HTTP层的数据是传输控制协议( Transmission Control Protocol , 筒称为 "TCP" ) /互联网协议(Internet Protocol, 筒称为 "IP" )层的净荷, HTTP层数据加上 TCP头和 IP头, 就构成了在互联网上传输的 IP包。 IP包 在无线网络中被当作净荷传输, HTTP层数据 (包括头部中的所有字段)在 无线网络中完全明文传输。 但通常而言, 连续的 HTTP报文头部中含有大量 相同的字段, 这些都是冗余信息, 占用了大量的宝贵的无线空口资源。 发明内容 Currently, the data of the HTTP layer is the payload of the Transmission Control Protocol ("TCP") / Internet Protocol ("IP") layer, HTTP layer data plus TCP header and IP. The header constitutes an IP packet that is transmitted over the Internet. The IP packet is transmitted as a payload in the wireless network, and the HTTP layer data (including all fields in the header) is transmitted in plain text in the wireless network. However, in general, consecutive HTTP messages contain a large number of identical fields in the header. These are redundant information and occupy a large amount of valuable wireless air interface resources. Summary of the invention
本发明提供了一种传输 HTTP报文的方法、 编码装置和解码装置, 能够 减少连续 HTTP报文中的相同字段占用的无线空口资源。  The invention provides a method for transmitting an HTTP message, an encoding device and a decoding device, which can reduce the wireless air interface resource occupied by the same field in the continuous HTTP message.
第一方面, 提供了一种传输 HTTP报文的方法, 该方法包括: 确定编码 头部位图的每个比特位的取值,各个该比特位的取值分别指示为该比特位相 应的待传输的编码头部的取值与已记录的 HTTP报文中的相应编码头部的取 值是否相同; 根据该每个比特位的取值, 生成并传输包括该编码头部位图的 待传输的 HTTP ^艮文, 以便于该待传输的 HTTP报文的接收方根据该编码头 部位图和该已记录的 HTTP报文,确定该待传输的 HTTP报文中编码头部取 值与该已记录的 HTTP报文中的相应编码头部的取值相同的第一编码头部以 及该第一编码头部的取值。  The first aspect provides a method for transmitting an HTTP packet, where the method includes: determining a value of each bit of the coding header part map, where the values of the bits are respectively indicated as corresponding to the bit Whether the value of the transmitted coding header is the same as the value of the corresponding coding header in the recorded HTTP message; according to the value of each bit, generating and transmitting the to-be-transmitted picture including the coding header part map The HTTP address of the HTTP packet to be transmitted, so that the receiver of the HTTP packet to be transmitted determines the value of the encoding header in the HTTP packet to be transmitted according to the encoding header part map and the recorded HTTP packet. The first encoding header of the corresponding encoding header in the recorded HTTP packet has the same value and the value of the first encoding header.
结合第一方面,在第一方面的第一种可能的实现方式中,该方法还包括: 确定待传输的编码头部中取值与该已记录的 HTTP报文中的相应编码头部的 取值不同的第二编码头部, 以及该第二编码头部的取值; 确定该第二编码头 部的头部编码, 该头部编码用于指代该第二编码头部; 其中, 该根据该每个 比特位的取值, 生成并传输包括该编码头部位图的待传输的 HTTP报文, 包 括: 根据该每个比特位的取值、 该第二编码头部的头部编码以及该第二编码 头部的取值, 生成并传输该待传输的 HTTP报文。  With reference to the first aspect, in a first possible implementation manner of the first aspect, the method further includes: determining a value in an encoding header to be transmitted and a corresponding encoding header in the recorded HTTP packet a second encoding header having a different value, and a value of the second encoding header; determining a header encoding of the second encoding header, the header encoding being used to refer to the second encoding header; And generating, according to the value of each bit, the HTTP message to be transmitted, including the code header part map, includes: according to the value of each bit, the header code of the second coding header And the value of the second encoding header is generated, and the HTTP packet to be transmitted is generated and transmitted.
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实 现方式中, 该方法还包括: 确定第一压缩指示以及第一字节数, 该第一压缩 指示用于表示该第二编码头部的取值被压缩, 该第一字节数与第一相同字节 数相关联, 该第一相同字节数为待传输的该第二编码头部的取值与该已记录 的 HTTP报文中的相应编码头部的取值连续相同的字节数; 其中, 该根据该 每个比特位的取值、 该第二编码头部的头部编码以及该第二编码头部的取 值, 生成并传输该待传输的 HTTP报文, 包括: 根据该每个比特位的取值、 该第二编码头部的头部编码、 该第一压缩指示以及该第一字节数, 生成并传 输该待传输的 HTTP报文。  In conjunction with the first possible implementation of the first aspect, in a second possible implementation of the first aspect, the method further includes: determining a first compression indication and a first number of bytes, the first compression indication The value indicating the second encoding header is compressed, and the first byte number is associated with the first identical number of bytes, where the first identical number of bytes is the value of the second encoding header to be transmitted. And the number of bytes consecutive to the value of the corresponding encoding header in the recorded HTTP packet; wherein, the value according to the bit, the header encoding of the second encoding header, and the first The value of the second encoding header, the generating and transmitting the HTTP packet to be transmitted, including: according to the value of each bit, the header encoding of the second encoding header, the first compression indication, and the One byte, generating and transmitting the HTTP message to be transmitted.
结合第一方面的第一种可能的实现方式,在第一方面的第三种可能的实 现方式中, 该方法还包括: 确定第二压缩指示以及第一 HTTP报文在该已记 录的 HTTP报文中的次序信息, 其中, 该第二压缩指示用于表示该第二编码 头部的取值与相应于该次序信息的该第一 HTTP报文中的相应编码头部的取 值相同; 其中, 该根据该每个比特位的取值、 该第二编码头部的头部编码以 及该第二编码头部的取值, 生成并传输该待传输的 HTTP报文, 包括: 根据 该每个比特位的取值、 该第二编码头部的头部编码、 该第二压缩指示以及该 次序信息, 生成并传输该待传输的 HTTP报文。 With reference to the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the method further includes: determining a second compression indication, and the first HTTP packet in the recorded HTTP report Sequence information in the text, where the second compression indication is used to indicate that the value of the second encoding header and the corresponding encoding header in the first HTTP packet corresponding to the order information are taken The value is the same. The HTTP message to be transmitted is generated and transmitted according to the value of the bit, the header code of the second encoding header, and the value of the second encoding header. The HTTP message to be transmitted is generated and transmitted according to the value of each bit, the header code of the second encoding header, the second compression indication, and the order information.
结合第一方面,在第一方面的第四种可能的实现方式中,该方法还包括: 确定第三压缩指示以及第二字节数,该第三压缩指示用于表示待传输的通用 资源标识符 URI被压缩,该第二字节数与第二相同字节数相关联,该第二相 同字节数为待传输的 URI与该已记录的 HTTP报文中的 URI连续相同的字 节数; 其中, 该根据该每个比特位的取值, 生成并传输包括该编码头部位图 的待传输的 HTTP报文, 包括: 根据该每个比特位的取值、 该第三压缩指示 以及该第二字节数, 生成并传输该待传输的 HTTP报文。  With reference to the first aspect, in a fourth possible implementation manner of the first aspect, the method further includes: determining a third compression indication and a second byte number, where the third compression indication is used to indicate a universal resource identifier to be transmitted The URI is compressed, and the second number of bytes is associated with a second identical number of bytes, the second identical number of bytes being the same number of bytes of the URI to be transmitted and the URI in the recorded HTTP message And generating, according to the value of each bit, the HTTP message to be transmitted, including the code header part map, includes: determining, according to the value of each bit, the third compression indication, and The second byte number generates and transmits the HTTP message to be transmitted.
结合第一方面,在第一方面的第五种可能的实现方式中,该方法还包括: 确定待传输的 HTTP版本号信息与该已记录的 HTTP报文中的版本号信息是 否相同; 其中, 该根据该每个比特位的取值, 生成并传输包括该编码头部位 图的待传输的 HTTP报文, 包括: 在该待传输的 HTTP版本号信息与该已记 录的 HTTP报文中的版本号信息相同时, 根据该每个比特位的取值, 生成并 传输该待传输的 HTTP报文, 该待传输的 HTTP报文包括该编码头部位图; 在该待传输的 HTTP版本号信息与该已记录的 HTTP报文中的版本号信息不 同时, 根据该每个比特位的取值以及该待传输的 HTTP版本号信息, 生成并 传输该待传输的 HTTP报文, 该待传输的 HTTP报文包括该编码头部位图和 该待传输的 HTTP版本号信息。  With reference to the first aspect, in a fifth possible implementation manner of the first aspect, the method further includes: determining whether the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP packet; And generating, according to the value of the bit, the HTTP packet to be transmitted, including the part of the encoding header, to be transmitted, including: the HTTP version number information to be transmitted and the recorded HTTP packet When the version number information is the same, the HTTP message to be transmitted is generated and transmitted according to the value of each bit, and the HTTP message to be transmitted includes the code header part map; the HTTP version number to be transmitted. When the information is different from the version number information in the recorded HTTP packet, the HTTP message to be transmitted is generated and transmitted according to the value of each bit and the HTTP version number information to be transmitted. The HTTP packet includes the encoding header portion map and the HTTP version number information to be transmitted.
结合第一方面, 在第一方面的第六种可能的实现方式中, 该根据该每个 比特位的取值, 生成并传输包括该编码头部位图的待传输的 HTTP报文, 包 括: 根据该每个比特位的取值, 生成并传输包括类型字段的协议数据单元 PDU包, 该类型字段用于指示该 PDU包为经过头部编码和压缩的 HTTP报 文。  With reference to the first aspect, in a sixth possible implementation manner of the first aspect, the generating, by using the value of the bit, the HTTP packet to be transmitted that includes the coded part part map is generated and transmitted, including: And generating, according to the value of each bit, a protocol data unit PDU packet including a type field, where the type field is used to indicate that the PDU packet is a header encoded and compressed HTTP message.
结合第一方面或第一方面的第一种至第六种可能的实现方式中的任一 种可能的实现方式,在第一方面的第七种可能的实现方式中,该方法还包括: 在首次传输 HTTP报文时,记录首次传输的 HTTP报文的编码头部取值、 URI 和 HTTP版本号信息; 在非首次传输 HTTP报文时, 根据该待传输的 HTTP 报文更新该已记录的 HTTP报文。 结合第一方面的第七种可能的实现方式,在第一方面的第八种可能的实 现方式中,该根据该待传输的 HTTP报文更新该已记录的 HTTP报文,包括: 如果该待传输的 HTTP报文的编码头部取值和该已记录的 HTTP报文的编码 头部取值相同, 则保持该已记录的 HTTP报文的编码头部及其取值不变; 或 如果该待传输的 HTTP报文的编码头部取值和该已记录的 HTTP报文的编码 头部取值不同, 则将该已记录的 HTTP报文中的编码头部取值替换为该待传 输的 HTTP报文的编码头部取值; 或如果该已记录的 HTTP报文具有该待传 输的 HTTP报文不具有的编码头部, 则保持该已记录的 HTTP报文的编码头 部及其取值不变; 或如果该待传输的 HTTP报文具有该已记录的 HTTP报文 不具有的编码头部, 则记录该待传输的 HTTP报文具有但该已记录的 HTTP 报文不具有的编码头部及其取值; 或如果该待传输的 HTTP报文的版本号信 息和该已记录的 HTTP报文的版本号信息相同, 则保持该已记录的 HTTP报 文的版本号信息不变; 或如果该待传输的 HTTP报文的版本号信息和该已记 录的 HTTP报文的版本号信息不同, 则将该已记录的 HTTP报文中的版本号 信息替换为该待传输的 HTTP报文的版本号信息。 With reference to the first aspect, or any one of the first to the sixth possible implementation manners of the first aspect, in a seventh possible implementation manner of the first aspect, the method further includes: When the HTTP packet is transmitted for the first time, the encoding header value, URI, and HTTP version number information of the HTTP packet transmitted for the first time are recorded. When the HTTP packet is not transmitted for the first time, the recorded packet is updated according to the HTTP packet to be transmitted. HTTP message. With the seventh possible implementation of the first aspect, in an eighth possible implementation manner of the first aspect, the updating the recorded HTTP packet according to the HTTP packet to be transmitted includes: If the value of the encoding header of the transmitted HTTP packet is the same as the value of the encoding header of the recorded HTTP packet, the encoding header of the recorded HTTP packet and the value thereof are kept unchanged; or if If the value of the encoding header of the HTTP packet to be transmitted is different from the value of the encoding header of the HTTP packet, the value of the encoding header in the recorded HTTP packet is replaced by the value to be transmitted. The encoding header of the HTTP packet takes the value; or if the recorded HTTP packet has an encoding header that the HTTP packet to be transmitted does not have, the encoding header of the recorded HTTP packet is maintained and its encoding is maintained. The value is unchanged; or if the HTTP message to be transmitted has an encoding header that the recorded HTTP packet does not have, the HTTP message to be transmitted has the encoding that the recorded HTTP packet does not have. The header and its value; or if the HTTP message to be transmitted If the version number information is the same as the version number information of the recorded HTTP message, the version number information of the recorded HTTP message is kept unchanged; or if the version number information of the HTTP message to be transmitted and the recorded number are If the version number of the HTTP packet is different, the version number information of the HTTP packet is replaced with the version number of the HTTP packet to be transmitted.
第二方面, 提供了一种传输 HTTP报文的方法, 该方法包括: 获取接收 的 HTTP报文中的编码头部位图的每个比特位的取值; 在该编码头部位图的 第一比特位的取值指示为该第一比特位相应的待解码的第一编码头部的取 值与已记录的 HTTP报文中的相应编码头部的取值相同时, 将该已记录的 HTTP报文中的与该第一比特位相应的编码头部及其取值, 分别确定为该第 一编码头部以及该第一编码头部的取值。  The second aspect provides a method for transmitting an HTTP packet, where the method includes: acquiring a value of each bit of the encoded header portion map in the received HTTP packet; The value of a bit is indicated as the value of the first encoding header to be decoded corresponding to the first bit is the same as the value of the corresponding encoding header in the recorded HTTP packet, and the recorded value is recorded. The encoding header corresponding to the first bit in the HTTP packet and the value thereof are respectively determined as values of the first encoding header and the first encoding header.
结合第二方面,在第二方面的第一种可能的实现方式中,该方法还包括: 在该编码头部位图的第二比特位的取值指示为该第二比特位相应的待解码 的第二编码头部的取值与已记录的 HTTP报文中的相应编码头部的取值不同 时, 根据该接收的 HTTP报文中的头部编码, 确定该头部编码指代的该第二 编码头部。  With reference to the second aspect, in a first possible implementation manner of the second aspect, the method further includes: determining, by the second bit of the coding header part, that the second bit is corresponding to the second bit to be decoded When the value of the second encoding header is different from the value of the corresponding encoding header in the recorded HTTP packet, determining, according to the header encoding in the received HTTP packet, the header encoding refers to the The second encoding header.
结合第二方面的第一种可能的实现方式,在第二方面的第二种可能的实 现方式中, 该方法还包括: 根据该接收的 HTTP报文中的第一压缩指示以及 第一字节数, 确定与该第一字节数相关联的第一相同字节数, 其中该第一压 缩指示用于表示该第二编码头部的取值被压缩; 根据该第一相同字节数, 将 数的字节, 确定为该第二编码头部的待解码的取值。 In conjunction with the first possible implementation of the second aspect, in a second possible implementation of the second aspect, the method further includes: determining, according to the first compression indication and the first byte in the received HTTP packet And determining a first identical number of bytes associated with the first number of bytes, wherein the first compression indication is used to indicate that the value of the second encoding header is compressed; according to the first identical number of bytes, Will The number of bytes is determined as the value to be decoded of the second encoding header.
结合第二方面的第一种可能的实现方式,在第二方面的第三种可能的实 现方式中, 该方法还包括: 根据该接收的 HTTP报文中的第二压缩指示以及 次序信息,确定该已记录的 HTTP报文中与该次序信息相应的第一 HTTP报 文, 其中, 该第二压缩指示用于表示该第二编码头部的取值与该第一 HTTP 报文中的相应编码头部的取值相同; 将该第一 HTTP报文中的相应编码头部 的取值确定为该第二编码头部的取值。  With reference to the first possible implementation of the second aspect, in a third possible implementation manner of the second aspect, the method further includes: determining, according to the second compression indication and the sequence information in the received HTTP packet, a first HTTP packet corresponding to the sequence information in the recorded HTTP packet, where the second compression indication is used to indicate the value of the second encoding header and the corresponding encoding in the first HTTP packet. The value of the header is the same; the value of the corresponding encoding header in the first HTTP packet is determined as the value of the second encoding header.
结合第二方面,在第二方面的第四种可能的实现方式中,该方法还包括: 根据该接收的 HTTP报文中的第三压缩指示以及第二字节数,确定与该第二 字节数相关联的第二相同字节数, 其中该第三压缩指示用于表示待解码的 URI被压缩; 根据该第二相同字节数,将该已记录的 HTTP报文的 URI中相 应的连续第二相同字节数的字节, 确定为该接收的 HTTP报文中待解码的 URL  With reference to the second aspect, in a fourth possible implementation manner of the second aspect, the method further includes: determining, according to the third compression indication and the second byte number in the received HTTP packet, the second word a second identical number of bytes associated with the number of sections, wherein the third compressed indication is used to indicate that the URI to be decoded is compressed; according to the second identical number of bytes, corresponding to the URI of the recorded HTTP message The second consecutive byte of the same number of bytes is determined as the URL to be decoded in the received HTTP message.
结合第二方面,在第二方面的第五种可能的实现方式中,该方法还包括: 在确定该接收的 HTTP报文中没有 HTTP版本号信息时,将该已记录的 HTTP 报文中的版本号信息确定为该接收的 HTTP报文的版本号信息。  With reference to the second aspect, in a fifth possible implementation manner of the second aspect, the method further includes: when determining that the received HTTP packet does not have the HTTP version number information, in the recorded HTTP packet The version number information is determined as the version number information of the received HTTP message.
结合第二方面,在第二方面的第六种可能的实现方式中,该方法还包括: 接收包括类型字段的协议数据单元 PDU包, 该类型字段用于指示该 PDU包 为经过头部编码和压缩的 HTTP ^艮文。  With reference to the second aspect, in a sixth possible implementation manner of the second aspect, the method further includes: receiving a protocol data unit PDU packet including a type field, where the type field is used to indicate that the PDU packet is header encoded and Compressed HTTP ^ text.
结合第二方面或第二方面的第一种至第六种可能的实现方式中的任一 种可能的实现方式,在第二方面的第七种可能的实现方式中,该方法还包括: 在首次传输 HTTP报文时,记录首次传输的 HTTP报文的编码头部取值、 URI 和 HTTP版本号信息; 在非首次传输 HTTP报文时, 根据该接收的 HTTP报 文更新该已记录的 HTTP报文。  With reference to the second aspect, or any one of the first to the sixth possible implementation manners of the second aspect, in a seventh possible implementation manner of the second aspect, the method further includes: When the HTTP packet is transmitted for the first time, the encoding header value, URI, and HTTP version number information of the HTTP packet transmitted for the first time are recorded. When the HTTP packet is not transmitted for the first time, the recorded HTTP packet is updated according to the received HTTP packet. Message.
结合第二方面的第七种可能的实现方式,在第二方面的第八种可能的实 现方式中, 该根据该接收的 HTTP报文更新该已记录的 HTTP报文, 包括: 如果该接收的 HTTP报文的编码头部取值和该已记录的 HTTP报文的编码头 部取值相同, 则保持该已记录的 HTTP报文的编码头部及其取值不变; 或如 果该接收的 HTTP报文的编码头部取值和该已记录的 HTTP报文的编码头部 取值不同, 则将该已记录的 HTTP报文中的编码头部取值替换为该接收的 HTTP报文的编码头部取值; 或如果该已记录的 HTTP报文具有该接收的 HTTP报文不具有的编码头部, 则保持该已记录的 HTTP报文的编码头部及 其取值不变; 或如果该接收的 HTTP报文具有该已记录的 HTTP报文不具有 的编码头部, 则记录该接收的 HTTP报文具有但该已记录的 HTTP报文不具 有的编码头部及其取值; 或如果该接收的 HTTP报文的版本号信息和该已记 录的 HTTP报文的版本号信息相同, 则保持该已记录的 HTTP报文的版本号 信息不变; 或如果该接收的 HTTP报文的版本号信息和该已记录的 HTTP报 文的版本号信息不同, 则将该已记录的 HTTP报文中的版本号信息替换为该 接收的 HTTP报文的版本号信息。 With the seventh possible implementation of the second aspect, in an eighth possible implementation manner of the second aspect, the updating the recorded HTTP packet according to the received HTTP packet includes: The value of the encoding header of the HTTP packet is the same as the value of the encoding header of the recorded HTTP packet, and the encoding header of the recorded HTTP packet and the value thereof are kept unchanged; or if the received The value of the encoding header of the HTTP packet is different from the value of the encoding header of the recorded HTTP packet, and the value of the encoding header in the recorded HTTP packet is replaced by the received HTTP packet. Encoding header value; or if the recorded HTTP message has the received If the encoding header that the HTTP packet does not have, keep the encoding header of the recorded HTTP packet and its value unchanged; or if the received HTTP packet has an encoding that the recorded HTTP packet does not have a header, where the received HTTP message has an encoding header that does not have the recorded HTTP packet and its value; or if the received HTTP packet has the version number information and the recorded HTTP packet If the version number information of the document is the same, the version number information of the recorded HTTP packet is kept unchanged; or if the version number information of the received HTTP packet is different from the version number information of the recorded HTTP packet, The version number information in the recorded HTTP packet is replaced with the version number information of the received HTTP packet.
第三方面, 提供了一种 HTTP报文的编码装置, 该编码装置包括: 第一 确定模块, 用于确定编码头部位图的每个比特位的取值, 各个该比特位的取 值分别指示为该比特位相应的待传输的编码头部的取值与已记录的 HTTP报 文中的相应编码头部的取值是否相同; 传输模块, 用于根据该第一确定模块 确定的该每个比特位的取值, 生成并传输包括该编码头部位图的待传输的 HTTP报文, 以便于该待传输的 HTTP报文的接收方根据该编码头部位图和 该已记录的 HTTP报文,确定该待传输的 HTTP报文中编码头部取值与该已 记录的 HTTP报文中的相应编码头部的取值相同的第一编码头部以及该第一 编码头部的取值。  The third aspect provides an apparatus for encoding an HTTP packet, where the encoding apparatus includes: a first determining module, configured to determine a value of each bit of the code header part map, where the values of the bits are respectively Determining whether the value of the encoding header to be transmitted corresponding to the bit is the same as the value of the corresponding encoding header in the recorded HTTP packet; the transmitting module, configured to determine the per-determination according to the first determining module The value of the bit is generated, and the HTTP message to be transmitted including the code header part map is generated and transmitted, so that the receiver of the HTTP message to be transmitted according to the code header part map and the recorded HTTP Determining, by the packet, the first encoding header in the HTTP packet to be transmitted and the value of the corresponding encoding header in the recorded HTTP packet, and the first encoding header value.
结合第三方面, 在第三方面的第一种可能的实现方式中, 该编码装置还 包括:第二确定模块,用于确定待传输的编码头部中取值与该已记录的 HTTP 报文中的相应编码头部的取值不同的第二编码头部, 以及该第二编码头部的 取值; 第三确定模块, 用于确定该第二确定模块确定的该第二编码头部的头 部编码, 该头部编码用于指代该第二编码头部; 其中, 该传输模块用于: 根 据该第一确定模块确定的该每个比特位的取值、该第三确定模块确定的该第 二编码头部的头部编码以及该第二确定模块确定的该第二编码头部的取值, 生成并传输该待传输的 HTTP报文。  With reference to the third aspect, in a first possible implementation manner of the third aspect, the encoding apparatus further includes: a second determining module, configured to determine a value in the encoding header to be transmitted and the recorded HTTP packet a second encoding header having a different value of the corresponding encoding header, and a value of the second encoding header; a third determining module, configured to determine the second encoding header determined by the second determining module a header encoding, the header encoding is used to refer to the second encoding header; wherein the transmitting module is configured to: determine, according to the value of each bit determined by the first determining module, the third determining module The header of the second encoding header and the value of the second encoding header determined by the second determining module generate and transmit the HTTP packet to be transmitted.
结合第三方面的第一种可能的实现方式,在第三方面的第二种可能的实 现方式中, 该编码装置还包括: 第四确定模块, 用于确定第一压缩指示以及 第一字节数, 该第一压缩指示用于表示该第二编码头部的取值被压缩, 该第 一字节数与第一相同字节数相关联,该第一相同字节数为待传输的该第二编 字节数; 其中, 该传输模块用于: 根据该第一确定模块确定的该每个比特位 的取值、 该第三确定模块确定的该第二编码头部的头部编码、 该第四确定模 块确定的该第一压缩指示以及该第一字节数, 生成并传输该待传输的 HTTP 报文。 In conjunction with the first possible implementation of the third aspect, in a second possible implementation manner of the third aspect, the encoding apparatus further includes: a fourth determining module, configured to determine the first compression indication and the first byte The first compression indication is used to indicate that the value of the second encoding header is compressed, and the first number of bytes is associated with the first identical number of bytes, where the first identical number of bytes is to be transmitted. a second number of bytes; wherein the transmission module is configured to: determine each bit according to the first determining module The value of the header, the header encoding of the second encoding header determined by the third determining module, the first compression indication determined by the fourth determining module, and the first number of bytes, generating and transmitting the HTTP to be transmitted Message.
结合第三方面的第一种可能的实现方式,在第三方面的第三种可能的实 现方式中, 该编码装置还包括: 第五确定模块, 用于确定第二压缩指示以及 第一 HTTP报文在该已记录的 HTTP报文中的次序信息, 其中, 该第二压缩 指示用于表示该第二编码头部的取值与相应于该次序信息的该第一 HTTP报 文中的相应编码头部的取值相同; 其中, 该传输模块用于: 根据该第一确定 模块确定的该每个比特位的取值、该第三确定模块确定的该第二编码头部的 头部编码、 该第五确定模块确定的该第二压缩指示以及该次序信息, 生成并 传输该待传输的 HTTP报文。  In conjunction with the first possible implementation of the third aspect, in a third possible implementation of the third aspect, the encoding apparatus further includes: a fifth determining module, configured to determine the second compression indication and the first HTTP The order information in the recorded HTTP message, where the second compression indication is used to indicate the value of the second encoding header and the corresponding encoding in the first HTTP packet corresponding to the order information. The value of the header is the same; the transmission module is configured to: determine, according to the value of each bit determined by the first determining module, a header code of the second encoding header determined by the third determining module, The second compression indication determined by the fifth determining module and the sequence information generate and transmit the HTTP message to be transmitted.
结合第三方面, 在第三方面的第四种可能的实现方式中, 该编码装置还 包括: 第六确定模块, 用于确定第三压缩指示以及第二字节数, 该第三压缩 指示用于表示待传输的通用资源标识符 URI被压缩,该第二字节数与第二相 同字节数相关联, 该第二相同字节数为待传输的 URI 与该已记录的 HTTP 报文中的 URI连续相同的字节数; 其中, 该传输模块用于: 根据该第一确定 模块确定的该每个比特位的取值、该第六确定模块确定的该第三压缩指示以 及该第二字节数, 生成并传输该待传输的 HTTP报文。  With the third aspect, in a fourth possible implementation manner of the third aspect, the encoding apparatus further includes: a sixth determining module, configured to determine a third compression indication and a second byte number, where the third compression indication is used Generating a universal resource identifier URI to be transmitted, the second byte number being associated with a second identical number of bytes, the second identical number of bytes being a URI to be transmitted and the recorded HTTP message The URIs are consecutively the same number of bytes; wherein, the transmission module is configured to: determine, according to the value of each bit determined by the first determining module, the third compression indication determined by the sixth determining module, and the second The number of bytes, the HTTP message to be transmitted is generated and transmitted.
结合第三方面, 在第三方面的第五种可能的实现方式中, 该编码装置还 包括: 第七确定模块, 用于确定待传输的 HTTP版本号信息与该已记录的 HTTP报文中的版本号信息是否相同; 其中, 该传输模块用于: 在该第七确 定模块确定该待传输的 HTTP版本号信息与该已记录的 HTTP报文中的版本 号信息相同时, 根据该每个比特位的取值, 生成并传输该待传输的 HTTP报 文, 该待传输的 HTTP 文包括该编码头部位图; 在该第七确定模块确定该 待传输的 HTTP版本号信息与该已记录的 HTTP报文中的版本号信息不同 时, 根据该每个比特位的取值以及该待传输的 HTTP版本号信息, 生成并传 输该待传输的 HTTP报文, 该待传输的 HTTP报文包括该编码头部位图和该 待传输的 HTTP版本号信息。  With reference to the third aspect, in a fifth possible implementation manner of the third aspect, the encoding apparatus further includes: a seventh determining module, configured to determine the HTTP version number information to be transmitted and the recorded HTTP packet Whether the version number information is the same; wherein, the transmission module is configured to: when the seventh determining module determines that the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP message, according to the each bit The value of the bit is generated, and the HTTP message to be transmitted is generated and transmitted, where the HTTP file to be transmitted includes the code header portion map; and the seventh determining module determines the HTTP version number information to be transmitted and the recorded When the version number information in the HTTP packet is different, the HTTP packet to be transmitted is generated and transmitted according to the value of each bit and the HTTP version number information to be transmitted, and the HTTP packet to be transmitted includes the Encoding the header part map and the HTTP version number information to be transmitted.
结合第三方面, 在第三方面的第六种可能的实现方式中, 该传输模块用 于: 根据该每个比特位的取值, 生成并传输包括类型字段的协议数据单元 PDU包, 该类型字段用于指示该 PDU包为经过头部编码和压缩的 HTTP报 文。 With reference to the third aspect, in a sixth possible implementation manner of the third aspect, the transmitting module is configured to: generate and transmit a protocol data unit PDU packet including a type field according to the value of each bit, the type The field is used to indicate that the PDU packet is a header encoded and compressed HTTP packet. Text.
结合第三方面或第三方面的第一种至第六种可能的实现方式中的任一 种可能的实现方式, 在第三方面的第七种可能的实现方式中, 该编码装置还 包括: 记录模块, 用于在首次传输 HTTP报文时, 记录首次传输的 HTTP报 文的编码头部取值、 URI和 HTTP版本号信息; 更新模块, 用于在非首次传 输 HTTP报文时, 根据该待传输的 HTTP报文更新该已记录的 HTTP报文。  With reference to the third aspect, or any one of the first to the sixth possible implementation manners of the third aspect, in a seventh possible implementation manner of the third aspect, the encoding apparatus further includes: a recording module, configured to record, during the first transmission of the HTTP packet, an encoding header value, a URI, and an HTTP version number information of the first transmitted HTTP packet; and an update module, configured to: when not transmitting the HTTP packet for the first time, according to the The HTTP message to be transmitted updates the recorded HTTP message.
结合第三方面的第七种可能的实现方式,在第三方面的第八种可能的实 现方式中, 该更新模块用于: 如果该待传输的 HTTP报文的编码头部取值和 该已记录的 HTTP报文的编码头部取值相同, 则保持该已记录的 HTTP报文 的编码头部及其取值不变; 或如果该待传输的 HTTP 文的编码头部取值和 该已记录的 HTTP报文的编码头部取值不同, 则将该已记录的 HTTP报文中 的编码头部取值替换为该待传输的 HTTP报文的编码头部取值; 或如果该已 记录的 HTTP报文具有该待传输的 HTTP报文不具有的编码头部, 则保持该 已记录的 HTTP报文的编码头部及其取值不变; 或如果该待传输的 HTTP报 文具有该已记录的 HTTP报文不具有的编码头部, 则记录该待传输的 HTTP 报文具有但该已记录的 HTTP报文不具有的编码头部及其取值; 或如果该待 传输的 HTTP报文的版本号信息和该已记录的 HTTP报文的版本号信息相 同, 则保持该已记录的 HTTP报文的版本号信息不变; 或如果该待传输的 HTTP报文的版本号信息和该已记录的 HTTP报文的版本号信息不同, 则将 该已记录的 HTTP报文中的版本号信息替换为该待传输的 HTTP报文的版本 号信息。  With the seventh possible implementation of the third aspect, in an eighth possible implementation manner of the third aspect, the updating module is configured to: if the encoding header of the HTTP packet to be transmitted takes the value and the If the encoding header of the HTTP packet is the same, the encoding header of the recorded HTTP packet is kept unchanged; or if the encoding header of the HTTP packet to be transmitted is the value and the If the value of the encoding header of the HTTP packet is different, the value of the encoding header in the recorded HTTP packet is replaced with the value of the encoding header of the HTTP packet to be transmitted; or if the recording is performed. The HTTP packet has an encoding header that is not included in the HTTP packet to be transmitted, and the encoding header of the recorded HTTP packet is kept unchanged; or if the HTTP packet to be transmitted has the If the encoded HTTP packet does not have an encoding header, the HTTP header to be transmitted has an encoding header that the recorded HTTP packet does not have and its value; or if the HTTP packet to be transmitted Version number information and the recorded If the version number information of the HTTP packet is the same, the version number information of the HTTP packet is kept unchanged; or the version number information of the HTTP packet to be transmitted and the version number information of the recorded HTTP packet The version number information in the recorded HTTP packet is replaced with the version number information of the HTTP packet to be transmitted.
第四方面, 提供了一种 HTTP报文的解码装置, 该解码装置包括: 获取 模块, 用于获取接收的 HTTP报文中的编码头部位图的每个比特位的取值; 第一确定模块, 用于在该获取模块获取的该编码头部位图的第一比特位的取 值指示为该第一比特位相应的待解码的第一编码头部的取值与已记录的 HTTP报文中的相应编码头部的取值相同时, 将该已记录的 HTTP报文中的 与该第一比特位相应的编码头部及其取值, 分别确定为该第一编码头部以及 该第一编码头部的取值。  The fourth aspect provides a decoding apparatus for an HTTP packet, where the decoding apparatus includes: an obtaining module, configured to acquire a value of each bit of the encoded header part map in the received HTTP packet; The module, the value of the first bit of the coded part location map obtained by the acquiring module is a value of the first encoding header to be decoded corresponding to the first bit and the recorded HTTP packet When the values of the corresponding encoding headers in the text are the same, the encoding header corresponding to the first bit in the recorded HTTP packet and the value thereof are respectively determined as the first encoding header and the The value of the first encoding header.
结合第四方面, 在第四方面的第一种可能的实现方式中, 该解码装置还 包括: 第二确定模块, 用于在该获取模块获取的该编码头部位图的第二比特 位的取值指示为该第二比特位相应的待解码的第二编码头部的取值与已记 录的 HTTP报文中的相应编码头部的取值不同时,根据该接收的 HTTP报文 中的头部编码, 确定该头部编码指代的该第二编码头部。 With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the decoding apparatus further includes: a second determining module, configured to obtain, by the acquiring module, the second bit of the encoding header part map The value indication is the value of the second encoding header to be decoded corresponding to the second bit and the recorded value When the value of the corresponding encoding header in the recorded HTTP packet is different, the second encoding header indicated by the header encoding is determined according to the header encoding in the received HTTP packet.
结合第四方面的第一种可能的实现方式,在第四方面的第二种可能的实 现方式中, 该解码装置还包括: 第三确定模块, 用于根据该接收的 HTTP报 文中的第一压缩指示以及第一字节数,确定与该第一字节数相关联的第一相 同字节数, 其中该第一压缩指示用于表示该第二编码头部的取值被压缩; 第 四确定模块, 用于根据该第三确定模块确定的该第一相同字节数, 将该已记 节, 确定为该第二编码头部的待解码的取值。  With reference to the first possible implementation of the fourth aspect, in a second possible implementation manner of the fourth aspect, the decoding apparatus further includes: a third determining module, configured to be used according to the first part of the received HTTP packet a compression indication and a first number of bytes, determining a first identical number of bytes associated with the first number of bytes, wherein the first compression indication is used to indicate that the value of the second encoding header is compressed; And a determining module, configured to determine, according to the first identical number of bytes determined by the third determining module, the counted to be the value of the second encoding header to be decoded.
结合第四方面的第一种可能的实现方式,在第四方面的第三种可能的实 现方式中, 该解码装置还包括: 第五确定模块, 用于根据该接收的 HTTP报 文中的第二压缩指示以及次序信息,确定该已记录的 HTTP报文中与该次序 信息相应的第一 HTTP报文, 其中, 该第二压缩指示用于表示该第二编码头 部的取值与该第一 HTTP报文中的相应编码头部的取值相同;第六确定模块, 用于将该第五确定模块确定的该第一 HTTP报文中的相应编码头部的取值确 定为该第二编码头部的取值。  In conjunction with the first possible implementation of the fourth aspect, in a third possible implementation manner of the fourth aspect, the decoding apparatus further includes: a fifth determining module, configured to be used according to the first part of the received HTTP packet Determining, by the second compression indication, the first HTTP message corresponding to the order information in the recorded HTTP message, where the second compression indication is used to indicate the value of the second coding header and the first The value of the corresponding encoding header in the HTTP packet is the same; the sixth determining module is configured to determine the value of the corresponding encoding header in the first HTTP packet determined by the fifth determining module as the second The value of the encoding header.
结合第四方面, 在第四方面的第四种可能的实现方式中, 该解码装置还 包括: 第七确定模块, 用于根据该接收的 HTTP报文中的第三压缩指示以及 第二字节数, 确定与该第二字节数相关联的第二相同字节数, 其中该第三压 缩指示用于表示待解码的 URI被压缩; 第八确定模块,用于根据该第七确定 模块确定的该第二相同字节数,将该已记录的 HTTP报文的 URI中相应的连 续第二相同字节数的字节, 确定为该接收的 HTTP报文中待解码的 URI。  With reference to the fourth aspect, in a fourth possible implementation manner of the fourth aspect, the decoding apparatus further includes: a seventh determining module, configured to: according to the third compression indication and the second byte in the received HTTP packet And determining a second identical number of bytes associated with the second number of bytes, wherein the third compression indication is used to indicate that the URI to be decoded is compressed; and the eighth determining module is configured to determine, according to the seventh determining module The second identical number of bytes determines the corresponding consecutive second identical number of bytes in the URI of the recorded HTTP message as the URI to be decoded in the received HTTP message.
结合第四方面, 在第四方面的第五种可能的实现方式中, 该解码装置还 包括: 第九确定模块, 用于在确定该接收的 HTTP报文中没有 HTTP版本号 信息时,将该已记录的 HTTP报文中的版本号信息确定为该接收的 HTTP报 文的版本号信息。  With reference to the fourth aspect, in a fifth possible implementation manner of the fourth aspect, the decoding apparatus further includes: a ninth determining module, configured to: when it is determined that the received HTTP packet does not have the HTTP version number information, The version number information in the recorded HTTP packet is determined as the version number information of the received HTTP packet.
结合第四方面, 在第四方面的第六种可能的实现方式中, 该解码装置还 包括: 接收模块, 用于接收包括类型字段的协议数据单元 PDU包, 该类型 字段用于指示该 PDU包为经过头部编码和压缩的 HTTP ^艮文。  With reference to the fourth aspect, in a sixth possible implementation manner of the fourth aspect, the decoding apparatus further includes: a receiving module, configured to receive a protocol data unit PDU packet including a type field, where the type field is used to indicate the PDU packet HTTP headers that are header encoded and compressed.
结合第四方面或第四方面的第一种至第六种可能的实现方式中的任一 种可能的实现方式, 在第四方面的第七种可能的实现方式中, 该解码装置还 包括: 记录模块, 用于在首次传输 HTTP报文时, 记录首次传输的 HTTP报 文的编码头部取值、 URI和 HTTP版本号信息; 更新模块, 用于在非首次传 输 HTTP报文时, 根据该接收的 HTTP报文更新该已记录的 HTTP报文。 With reference to the fourth aspect or any one of the first to the sixth possible implementation manners of the fourth aspect, in a seventh possible implementation manner of the fourth aspect, the decoding device further The method includes: a recording module, configured to record an encoding header value, a URI, and an HTTP version number information of an HTTP packet transmitted for the first time when the HTTP packet is first transmitted; and an update module, when the HTTP packet is not transmitted for the first time, Updating the recorded HTTP message according to the received HTTP message.
结合第四方面的第七种可能的实现方式,在第四方面的第八种可能的实 现方式中, 该更新模块用于: 如果该接收的 HTTP报文的编码头部取值和该 已记录的 HTTP报文的编码头部取值相同, 则保持该已记录的 HTTP报文的 编码头部及其取值不变; 或如果该接收的 HTTP报文的编码头部取值和该已 记录的 HTTP报文的编码头部取值不同, 则将该已记录的 HTTP报文中的编 码头部取值替换为该接收的 HTTP报文的编码头部取值; 或如果该已记录的 HTTP报文具有该接收的 HTTP报文不具有的编码头部, 则保持该已记录的 HTTP报文的编码头部及其取值不变; 或如果该接收的 HTTP报文具有该已 记录的 HTTP报文不具有的编码头部, 则记录该接收的 HTTP报文具有但该 已记录的 HTTP报文不具有的编码头部及其取值; 或如果该接收的 HTTP报 文的版本号信息和该已记录的 HTTP报文的版本号信息相同, 则保持该已记 录的 HTTP报文的版本号信息不变; 或如果该接收的 HTTP报文的版本号信 息和该已记录的 HTTP报文的版本号信息不同, 则将该已记录的 HTTP报文 中的版本号信息替换为该接收的 HTTP报文的版本号信息。  In conjunction with the seventh possible implementation of the fourth aspect, in an eighth possible implementation manner of the fourth aspect, the updating module is configured to: if the encoded header of the received HTTP packet takes a value and the recorded The encoding header of the HTTP packet has the same value, and the encoding header of the recorded HTTP packet is kept unchanged; or if the encoding header of the received HTTP packet is the value and the recorded value If the encoding header of the HTTP packet is different, the value of the encoding header in the recorded HTTP packet is replaced with the encoding header value of the received HTTP packet; or if the recorded HTTP is recorded. The packet has an encoding header that is not included in the received HTTP packet, and the encoding header of the recorded HTTP packet is kept unchanged; or if the received HTTP packet has the recorded HTTP If the encoded header does not have a packet header, the received HTTP packet has an encoding header that does not have the recorded HTTP packet and its value; or if the received HTTP packet has the version number information and The version of the recorded HTTP message If the number information is the same, the version number information of the recorded HTTP message is kept unchanged; or if the version number information of the received HTTP message is different from the version number information of the recorded HTTP message, The version number information in the recorded HTTP packet is replaced with the version number information of the received HTTP packet.
第五方面, 提供了一种 HTTP报文的编码装置, 该编码装置包括: 处理 器、 存储器、 总线和发送器; 其中, 该处理器、 该存储器和该发送器通过该 总线相连, 该存储器用于存储指令, 该处理器通过该总线, 调用该存储器中 存储的该指令, 以用于确定编码头部位图的每个比特位的取值, 各个该比特 位的取值分别指示为该比特位相应的待传输的编码头部的取值与已记录的 HTTP报文中的相应编码头部的取值是否相同; 该处理器还用于根据该每个 比特位的取值, 生成包括该编码头部位图的待传输的 HTTP报文; 该处理器 还用于控制该发送器向接收方发送该待传输的 HTTP报文, 以便于该接收方 根据该编码头部位图和该已记录的 HTTP报文,确定该待传输的 HTTP报文 中编码头部取值与该已记录的 HTTP报文中的相应编码头部的取值相同的第 一编码头部以及该第一编码头部的取值。  A fifth aspect provides an apparatus for encoding an HTTP message, the encoding apparatus comprising: a processor, a memory, a bus, and a transmitter; wherein the processor, the memory, and the transmitter are connected by the bus, and the memory is used by the memory And storing, by the processor, the instruction stored in the memory, by the processor, for determining a value of each bit of the code header portion map, where the value of each bit is indicated as the bit The value of the corresponding encoding header to be transmitted is the same as the value of the corresponding encoding header in the recorded HTTP packet; the processor is further configured to generate, according to the value of each bit, the Encoding an HTTP message to be transmitted in the header part map; the processor is further configured to control the sender to send the HTTP message to be transmitted to the receiver, so that the receiver according to the code header part map and the Determining, by the recorded HTTP packet, the first encoding header of the value of the encoding header in the HTTP packet to be transmitted and the value of the corresponding encoding header in the recorded HTTP packet, and The value of the first encoding header.
第六方面, 提供了一种 HTTP报文的解码装置, 该解码装置包括: 处理 器、 存储器和总线; 其中, 该处理器和该存储器通过该总线相连, 该存储器 用于存储指令, 该处理器通过该总线, 调用该存储器中存储的该指令, 以用 于获取接收的 HTTP报文中的编码头部位图的每个比特位的取值; 该处理器 还用于在该编码头部位图的第一比特位的取值指示为该第一比特位相应的 待解码的第一编码头部的取值与已记录的 HTTP报文中的相应编码头部的取 值相同时,将该已记录的 HTTP报文中的与该第一比特位相应的编码头部及 其取值, 分别确定为该第一编码头部以及该第一编码头部的取值。 A sixth aspect provides a decoding apparatus for an HTTP message, the decoding apparatus comprising: a processor, a memory, and a bus; wherein the processor and the memory are connected by the bus, the memory is used to store an instruction, the processor Calling the instruction stored in the memory through the bus to use Obtaining a value of each bit of the coding header part map in the received HTTP packet; the processor is further configured to: use the value of the first bit of the coding header part map as the first bit When the value of the first encoding header to be decoded is the same as the value of the corresponding encoding header in the recorded HTTP packet, the first HTTP bit in the recorded HTTP packet is corresponding. The encoding header and its value are respectively determined as values of the first encoding header and the first encoding header.
基于上述技术方案, 本发明实施例的传输 HTTP报文的方法、 编码装置 和解码装置,通过编码头部位图的比特位的取值来指示为该比特位相应的待 传输的编码头部的取值, 与已记录的 HTTP报文中的相应编码头部的取值是 否相同,并且不传输取值相同的编码头部及其取值,从而能够减少连续 HTTP 报文中的相同字段占用的无线空口资源, 由此能够提高资源使用效率。 附图说明  Based on the foregoing technical solution, the method for transmitting an HTTP message, the encoding device, and the decoding device in the embodiment of the present invention indicate, by using the value of the bit of the encoding header portion map, the encoding header to be transmitted corresponding to the bit. The value is the same as the value of the corresponding encoding header in the recorded HTTP packet, and the encoding header with the same value and its value are not transmitted, thereby reducing the occupation of the same field in the continuous HTTP packet. Wireless air interface resources, thereby improving resource utilization efficiency. DRAWINGS
为了更清楚地说明本发明实施例的技术方案, 下面将对本发明实施例中 所需要使用的附图作筒单地介绍, 显而易见地, 下面所描述的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的 前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings to be used in the embodiments of the present invention will be briefly described below. Obviously, the drawings described below are only some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in view of the drawings.
图 1是根据本发明实施例的传输 HTTP报文的方法的示意性流程图。 图 2是根据本发明实施例的传输 HTTP报文的方法的另一示意性流程 图。  FIG. 1 is a schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention. FIG. 2 is another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
图 3是根据本发明实施例的传输 HTTP报文的方法的再一示意性流程 图。  FIG. 3 is still another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
图 4是根据本发明实施例的传输 HTTP报文的方法的再一示意性流程 图。  FIG. 4 is still another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
图 5是根据本发明实施例的传输 HTTP报文的方法的再一示意性流程 图。  FIG. 5 is still another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
图 6是根据本发明实施例的传输 HTTP报文的方法的再一示意性流程 图。  FIG. 6 is still another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
图 7是根据本发明实施例的传输 HTTP报文的方法的再一示意性流程 图。  FIG. 7 is still another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention.
图 8是根据本发明实施例的传输 HTTP报文的方法的示意性流程图。 图 9是根据本发明实施例的传输 HTTP报文的方法的另一示意性流程 图 10是根据本发明实施例的传输 HTTP报文的方法的再一示意性流程 图 11是根据本发明实施例的传输 HTTP报文的方法的再一示意性流程 图 12是根据本发明实施例的传输 HTTP报文的方法的再一示意性流程 图 13是根据本发明实施例的传输 HTTP报文的方法的再一示意性流程 图 14是根据本发明实施例的传输 HTTP报文的方法的再一示意性流程 图 15是根据本发明实施例的上报编码压缩能力的方法的示意性流程图。 图 16是根据本发明实施例的重定位的方法的示意性流程图。 FIG. 8 is a schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention. FIG. 9 is another schematic flowchart of a method for transmitting an HTTP packet according to an embodiment of the present invention; FIG. 10 is still another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention. FIG. 10 is still another schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention. Still another schematic flowchart 13 of a method for transmitting an HTTP message is a schematic flowchart of a method for transmitting an HTTP message according to an embodiment of the present invention. FIG. 14 is a method for transmitting an HTTP message according to an embodiment of the present invention. Still another schematic flowchart 15 is a schematic flowchart of a method for reporting coding compression capability according to an embodiment of the present invention. 16 is a schematic flow chart of a method of relocation according to an embodiment of the present invention.
图 17是根据本发明实施例的重定位的方法的另一示意性流程图。 FIG. 17 is another schematic flowchart of a method for relocation according to an embodiment of the present invention.
图 18是根据本发明实施例的重定位的方法的再一示意性流程图。 FIG. 18 is still another schematic flowchart of a method for relocation according to an embodiment of the present invention.
图 19是根据本发明实施例的编码装置的示意性框图。 Figure 19 is a schematic block diagram of an encoding device in accordance with an embodiment of the present invention.
图 20是根据本发明实施例的编码装置的另一示意性框图。 Figure 20 is another schematic block diagram of an encoding apparatus in accordance with an embodiment of the present invention.
图 21是根据本发明实施例的编码装置的再一示意性框图。 Figure 21 is still another schematic block diagram of an encoding apparatus according to an embodiment of the present invention.
图 22是根据本发明实施例的编码装置的再一示意性框图。 Figure 22 is still another schematic block diagram of an encoding apparatus in accordance with an embodiment of the present invention.
图 23是根据本发明实施例的编码装置的再一示意性框图。 Figure 23 is still another schematic block diagram of an encoding apparatus in accordance with an embodiment of the present invention.
图 24是根据本发明实施例的编码装置的再一示意性框图。 Figure 24 is still another schematic block diagram of an encoding apparatus according to an embodiment of the present invention.
图 25是根据本发明实施例的编码装置的再一示意性框图。 Figure 25 is still another schematic block diagram of an encoding apparatus according to an embodiment of the present invention.
图 26是根据本发明实施例的解码装置的示意性框图。 Figure 26 is a schematic block diagram of a decoding device in accordance with an embodiment of the present invention.
图 27是根据本发明实施例的解码装置的另一示意性框图。 Figure 27 is another schematic block diagram of a decoding device in accordance with an embodiment of the present invention.
图 28是根据本发明实施例的解码装置的再一示意性框图。 28 is still another schematic block diagram of a decoding apparatus according to an embodiment of the present invention.
图 29是根据本发明实施例的解码装置的再一示意性框图。 FIG. 29 is still another schematic block diagram of a decoding apparatus according to an embodiment of the present invention.
图 30是根据本发明实施例的解码装置的再一示意性框图。 Figure 30 is still another schematic block diagram of a decoding device in accordance with an embodiment of the present invention.
图 31是根据本发明实施例的解码装置的再一示意性框图。 Figure 31 is still another schematic block diagram of a decoding device in accordance with an embodiment of the present invention.
图 32是根据本发明实施例的解码装置的再一示意性框图。 Figure 32 is still another schematic block diagram of a decoding device in accordance with an embodiment of the present invention.
图 33是根据本发明另一实施例的编码装置的示意性框图。 Figure 33 is a schematic block diagram of an encoding apparatus according to another embodiment of the present invention.
图 34是根据本发明另一实施例的解码装置的示意性框图。 具体实施方式 FIG. 34 is a schematic block diagram of a decoding apparatus according to another embodiment of 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 a part of the embodiments of the present invention, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without making creative labor are within the scope of the present invention.
应理解, 本发明实施例的技术方案可以应用于各种通信系统, 例如: 全 球移动通讯(Global System of Mobile communication, 筒称为 "GSM" )系统、 码分多址(Code Division Multiple Access, 筒称为 "CDMA" ) 系统、 宽带码 分多址( Wideband Code Division Multiple Access , 筒称为 "WCDMA" )系统、 通用分组无线业务(General Packet Radio Service, 筒称为 "GPRS" )、 长期 演进( Long Term Evolution, 筒称为 "LTE" )系统、 LTE频分双工( Frequency Division Duplex,筒称为 "FDD" )系统、 LTE时分双工( Time Division Duplex, 筒称为 "TDD" )、 通用移动通信系统 ( Universal Mobile Telecommunication System, 筒称为 "UMTS" )或全球互联微波接入( Worldwide Interoperability for Microwave Access , 筒称为 " WiMAX" )通信系统等。  It should be understood that the technical solution of the embodiments of the present invention can be applied to various communication systems, for example: Global System of Mobile communication ("GSM") system, code division multiple access (Code Division Multiple Access) Called "CDMA") system, Wideband Code Division Multiple Access ("WCDMA") system, General Packet Radio Service ("General Packet Radio Service"), Long Term Evolution ( Long Term Evolution, called "LTE" system, LTE frequency division duplex (Frequency Division Duplex) system, LTE time division duplex (Time Division Duplex, "TDD"), general purpose A mobile communication system (Unicom Mobile Telecommunication System, referred to as "UMTS") or a Worldwide Interoperability for Microwave Access ("Wireless" called "WiMAX") communication system.
图 1示出了根据本发明实施例的传输 HTTP报文的方法 100的示意性流 程图, 该方法 100可以由编码装置执行, 该编码装置既可以为用户设备, 例 如 UE 等; 也可以为网络设备, 例如无线网络控制器 (Radio Network Controller, 筒称为 "RNC" )、 演进型基站( Evolved Node B, 筒称为 "eNB" ) 等。 如图 1所示, 该方法 100包括:  FIG. 1 is a schematic flowchart of a method 100 for transmitting an HTTP message according to an embodiment of the present invention. The method 100 may be performed by an encoding device, which may be a user equipment, such as a UE, or the like. The device, for example, a radio network controller (Radio Network Controller, referred to as "RNC"), an evolved base station (Evolved Node B, called "eNB"), and the like. As shown in FIG. 1, the method 100 includes:
S110, 确定编码头部位图的每个比特位的取值, 各个该比特位的取值分 别指示为该比特位相应的待传输的编码头部的取值与已记录的 HTTP 文中 的相应编码头部的取值是否相同;  S110. Determine a value of each bit of the coding part location map, where the value of each bit is respectively indicated by the value of the coding header to be transmitted corresponding to the bit and the corresponding coding in the recorded HTTP text. Whether the value of the head is the same;
S120, 根据该每个比特位的取值, 生成并传输包括该编码头部位图的待 传输的 HTTP报文, 以便于该待传输的 HTTP报文的接收方根据该编码头部 位图和该已记录的 HTTP报文,确定该待传输的 HTTP报文中编码头部取值 与该已记录的 HTTP报文中的相应编码头部的取值相同的第一编码头部以及 该第一编码头部的取值。  S120, generating, according to the value of each bit, an HTTP message to be transmitted that includes the code header part map, so that the receiver of the HTTP message to be transmitted is based on the code header part map and Determining, by the recorded HTTP packet, the first encoding header of the encoding header in the HTTP packet to be transmitted and the value of the corresponding encoding header in the recorded HTTP packet, and the first The value of the encoding header.
具体而言, 例如, 编码装置可以首先比较待传输的 HTTP报文与已记录 图的每个比特位的取值。 例如, 取值相同时将相应的比特位置为第一值, 取 值不同时将相应的比特位置为第二值, 由此各个该比特位的取值可以分别指 示为该比特位相应的待传输的编码头部的取值与已记录的 HTTP报文中的相 应编码头部的取值是否相同。其中编码头部位图的比特位与 HTTP报文中的 编码头部具有对应关系, 优选地, 每个比特位对应 HTTP报文中的一个编码 头部。 Specifically, for example, the encoding device may first compare the HTTP message to be transmitted with the recorded The value of each bit of the graph. For example, when the value is the same, the corresponding bit position is the first value, and when the value is different, the corresponding bit position is the second value, so that the value of each bit can be respectively indicated as the corresponding bit to be transmitted. The value of the encoding header is the same as the value of the corresponding encoding header in the recorded HTTP packet. The bit of the encoding header part map has a correspondence with the encoding header in the HTTP packet. Preferably, each bit corresponds to an encoding header in the HTTP packet.
当待传输的第一编码头部的取值与已记录的 HTTP报文中的相应编码头 部的取值相同时, 不传输该第一编码头部以及该第一编码头部的取值; 而当 待传输的第二编码头部的取值与已记录的 HTTP报文中的相应编码头部的取 值不同时, 需要传输该第二编码头部以及该第二编码头部的取值。 由此, 编 码装置可以根据该每个比特位的取值, 生成并传输包括该编码头部位图的待 传输的 ΗΤΤΡ ·¾文,从而便于该待传输的 HTTP 文的接收方根据该编码头 部位图和该已记录的 HTTP报文, 可以确定待传输的编码头部中取值与该已 记录的 HTTP报文中的相应编码头部的取值相同的第一编码头部以及该第一 编码头部的取值。  When the value of the first encoding header to be transmitted is the same as the value of the corresponding encoding header in the recorded HTTP packet, the first encoding header and the value of the first encoding header are not transmitted; When the value of the second encoding header to be transmitted is different from the value of the corresponding encoding header in the recorded HTTP packet, the second encoding header and the value of the second encoding header need to be transmitted. . Therefore, the encoding device may generate and transmit a file to be transmitted including the code header portion map according to the value of each bit, thereby facilitating the receiver of the HTTP message to be transmitted according to the code header. The part map and the recorded HTTP message may determine a first encoding header in which the value of the encoding header to be transmitted is the same as the value of the corresponding encoding header in the recorded HTTP packet, and the first The value of an encoding header.
例如, 如果待传输的编码头部 Host的取值与已记录的 HTTP报文中的 相应编码头部 Host的取值相同, 则编码装置可以将编码头部位图中与该编 码头部 Host相应的比特位置为 1 , 则该编码头部 Host与该编码头部 Host的 取值不再传输; HTTP报文的接收方可以根据编码头部位图中的比特位与编 码头部的对应关系, 确定与该比特位相应的编码头部为 Host; 另一方面, HTTP报文的接收方根据该比特位为 1 , 可以确定待传输的 HTTP报文中与 该比特位相应的编码头部 Host的取值与已记录的 HTTP报文中的编码头部 Host的取值完全相同,由此接收方可以将已记录的 HTTP报文中的编码头部 Host的取值作为此次传输的 HTTP报文中的该编码头部 Host的取值。  For example, if the value of the encoding header Host to be transmitted is the same as the value of the corresponding encoding header Host in the recorded HTTP packet, the encoding device may correspond to the encoding header Host in the encoding header portion map. If the bit position is 1, the value of the encoding header Host and the encoding header Host is no longer transmitted; the receiver of the HTTP packet may according to the correspondence between the bit position in the encoding header part and the encoding header. Determining that the encoding header corresponding to the bit is Host; on the other hand, the receiver of the HTTP packet can determine the encoding header Host corresponding to the bit in the HTTP packet to be transmitted according to the bit being 1. The value is the same as the value of the encoding header Host in the recorded HTTP packet. The receiver can use the value of the encoding header Host in the recorded HTTP packet as the HTTP packet to be transmitted. The value of the encoding header Host in .
又例如, 如果待传输的编码头部 Accept的取值与已记录的 HTTP报文 中的相应编码头部 Accept 的取值不同, 则可以将编码头部位图中与该编码 头部 Accept相应的比特位置于 0, 此时, 需要传输该编码头部 Accept与该 编码头部 Accept的取值。  For another example, if the value of the encoding header Accept to be transmitted is different from the value of the corresponding encoding header Accept in the recorded HTTP packet, the encoding header portion map may be corresponding to the encoding header Accept. The bit position is 0. At this time, the value of the encoding header Accept and the encoding header Accept needs to be transmitted.
因此, 本发明实施例的传输 HTTP报文的方法, 通过编码头部位图的比 特位的取值来指示为该比特位相应的待传输的编码头部的取值, 与已记录的 HTTP报文中的相应编码头部的取值是否相同, 并且不传输取值相同的编码 头部及其取值,从而能够减少连续 HTTP报文中的相同字段占用的无线空口 资源, 由此能够提高资源使用效率。 Therefore, the method for transmitting an HTTP message in the embodiment of the present invention indicates, by using the value of the bit of the encoding header part map, the value of the encoding header to be transmitted corresponding to the bit, and the recorded HTTP packet. Whether the values of the corresponding encoding headers in the text are the same, and the same encoding values are not transmitted. The header and its value can reduce the wireless air interface resources occupied by the same field in consecutive HTTP packets, thereby improving resource utilization efficiency.
应理解, 在本发明实施例中, 该比特位与编码头部也可以具有一对多的 关系, 例如, 一个比特位的取值可以表示与该比特位相应的待传输的多个编 码头部的取值与已记录的 HTTP报文中的相应多个编码头部的取值是否相 同; 该比特位与编码头部还可以具有多对一的关系, 例如, 多个比特位的取 值用于可以表示与该多个比特位相应的待传输的一个编码头部的取值与已 记录的 HTTP报文中的相应一个编码头部的取值是否相同, 本发明实施例并 不限于此。  It should be understood that, in the embodiment of the present invention, the bit may also have a one-to-many relationship with the encoding header. For example, the value of one bit may represent multiple encoding headers to be transmitted corresponding to the bit. The value is the same as the value of the corresponding multiple encoding headers in the recorded HTTP packet; the bit may have a many-to-one relationship with the encoding header, for example, the value of multiple bits is used. The value of an encoding header to be transmitted corresponding to the multiple bits is the same as the value of the corresponding encoding header in the recorded HTTP packet, and the embodiment of the present invention is not limited thereto.
还应理解, HTTP报文的发送方和接收方都可以预先配置有编码头部位 图的比特位与 HTTP报文中的编码头部之间具有的对应关系,但本发明实施 例并不限于此。  It should be understood that the sender and the receiver of the HTTP packet may be pre-configured with the correspondence between the bit of the encoding header part map and the encoding header in the HTTP packet, but the embodiment of the present invention is not limited thereto. this.
还应理解, 在本发明实施例中, 编码装置为 HTTP报文的发送方, 该 HTTP报文既可以是 HTTP请求报文, 也可以是 HTTP响应报文, 本发明实 施例并不限于此。 具体而言, 该编码装置可以为 HTTP报文的发送方中的分 组数据汇聚协议 ( Packet Data Convergence Protocol, 筒称为 "PDCP" )层, 也可以为发送方中新增的编码压缩层, 本发明实施例并不限于此。  It should be understood that, in the embodiment of the present invention, the encoding device is a sender of an HTTP packet, and the HTTP packet may be an HTTP request packet or an HTTP response packet, and the embodiment of the present invention is not limited thereto. Specifically, the encoding device may be a packet data convergence protocol ("Packet Data Convergence Protocol") in the sender of the HTTP message, or may be a new coding compression layer in the sender. Embodiments of the invention are not limited thereto.
还应理解, 在本发明实施例中, 对 HTTP Request/Response报文中的常 用头部进行编码, 进行编码的常用头部最多为 30个, 由此可以将这些头部 编码为 0 ~ 9, 11 - 12, 14 - 31 , 其中 10、 13不参与编码是因为避免与换行 符(Line Feed, LF, OxOA )和回车符( Carriage Return, CR, OxOD ) 混淆; 这些被编码的头部称为编码头部, 比如较常见的编码头部为: Accept, Host, Referer、 User- Agent、 Cookie等。  It should also be understood that, in the embodiment of the present invention, the common headers in the HTTP Request/Response message are encoded, and the common headers for encoding are at most 30, so that the headers can be encoded as 0-9. 11 - 12, 14 - 31 , where 10, 13 are not involved in coding because they are confused with line feeds (Line, LF, OxOA) and Carriage Return (CR, OxOD); these are encoded heads. For the encoding header, for example, the more common encoding headers are: Accept, Host, Referer, User-Agent, Cookie, etc.
在本发明实施例中, 编码头部位图可以用于定义头部位图, 例如可以设 置为共 32比特。 从编码头部位图的最低位开始, 每一位可以分别代表一个 前述编码头部,如果 HTTP Request报文的编码头部取值与之前记录的 HTTP Request报文的 Accept字段完全相同 ( Accept字段取值都是 "*/*\r\n" ), 则 编码头部位图中的相应比特可以置 1 , 否则置 0; 对于相应比特置 1的编码 头部, 其明文不再需要传输。 该编码头部位图可以放在 HTTP 报文的 Request-Line ( Request-Line是 IP头、 TCP头之后的第一行, 以回车符、 换 行符结束) 的前面, 也就是 HTTP数据的最前面。 在本发明实施例中, 对于待传输的编码头部中取值与该已记录的 HTTP 文中的相应编码头部的耳又值不同的编码头部, 可以完全明文传输, 也可以 进一步进行编码压缩, 以进一步提高资源的使用率, 下面将结合图 2至图 4 进行详细描述。 In the embodiment of the present invention, the code header map may be used to define a header map, for example, may be set to a total of 32 bits. Starting from the lowest bit of the code header map, each bit can represent one of the foregoing encoding headers. If the encoding header of the HTTP Request packet is the same as the Accept field of the previously recorded HTTP Request packet (Accept field) If the value is "*/*\r\n"), the corresponding bit in the encoding header part map can be set to 1, otherwise set to 0; for the encoding header whose corresponding bit is set to 1, the plaintext no longer needs to be transmitted. The encoding header part map can be placed in front of the Request-Line of the HTTP message (Request-Line is the IP header, the first line after the TCP header, ending with a carriage return, a newline character), that is, the HTTP data is the most front. In the embodiment of the present invention, the encoding header of the encoding header to be transmitted and the corresponding encoding header of the recorded HTTP text may be transmitted in plaintext, or may be further encoded and compressed. To further improve the utilization rate of resources, a detailed description will be made below with reference to FIGS. 2 to 4.
如图 2所示, 该方法 100还包括:  As shown in FIG. 2, the method 100 further includes:
S130,确定待传输的编码头部中取值与该已记录的 HTTP报文中的相应 编码头部的取值不同的第二编码头部, 以及该第二编码头部的取值;  S130. Determine a second encoding header whose value in the encoding header to be transmitted is different from a value of a corresponding encoding header in the recorded HTTP packet, and a value of the second encoding header.
S140, 确定该第二编码头部的头部编码, 该头部编码用于指代该第二编 码头部;  S140. Determine a header encoding of the second encoding header, where the header encoding is used to refer to the second encoding header.
其中, 该根据该每个比特位的取值, 生成并传输包括该编码头部位图的 待传输的 HTTP报文, 包括:  And generating, according to the value of each bit, the HTTP packet to be transmitted that includes the code header part map, including:
5121 , 根据该每个比特位的取值、 该第二编码头部的头部编码以及该第 二编码头部的取值, 生成并传输该待传输的 HTTP ^艮文。  S121: Generate and transmit the HTTP message to be transmitted according to the value of each bit, the header code of the second encoding header, and the value of the second encoding header.
具体而言, 在本发明实施例中, 对于第二编码头部连同其后的冒号 ":" 和空格 " ,,, 都可以用编码代替, 例如, 编码头部 User- Agent可以被编码为 Specifically, in the embodiment of the present invention, the second encoding header, together with the colon ":" and the space "," can be replaced by an encoding. For example, the encoding header User-Agent can be encoded as
29, 则一共 12个字节的 "User-Agent: "可以用一个字节 "OxlD"进行代替, 从而可以进一步提高资源的使用率。 29, a total of 12 bytes of "User-Agent:" can be replaced with a byte "OxlD", which can further improve the resource utilization rate.
在 S121中, 生成并传输的该待传输的 HTTP报文可以包括: 编码头部 位图和第二编码头部的头部编码; 该待传输的 HTTP报文还可以包括第二编 码头部的取值, 或该待传输的 HTTP报文还可以指示第二编码头部的取值, 本发明实施例并不限于此。即对于第二编码头部的取值,可以直接明文传输, 也可以逐字符比较本次待传输的编码头部的取值和已记录的编码头部的取 值, 将连续相同的字节进行编码压缩处理。 例如如图 3所示, 该方法 100还 包括:  In S121, the HTTP message to be transmitted that is generated and transmitted may include: an encoding header part map and a header encoding of the second encoding header; the HTTP message to be transmitted may further include a second encoding header. The value, or the HTTP packet to be transmitted, may also indicate the value of the second encoding header. The embodiment of the present invention is not limited thereto. That is, the value of the second encoding header may be directly transmitted in plaintext, or the value of the encoding header to be transmitted and the value of the recorded encoding header may be compared character by character, and consecutive consecutive bytes are performed. Encoding compression processing. For example, as shown in FIG. 3, the method 100 further includes:
S150, 确定第一压缩指示以及第一字节数, 该第一压缩指示用于表示该 第二编码头部的取值被压缩, 该第一字节数与第一相同字节数相关联, 该第 一相同字节数为待传输的该第二编码头部的取值与该已记录的 HTTP报文中 的相应编码头部的取值连续相同的字节数;  S150. Determine a first compression indication, where the value of the second compression header is compressed, and the first number of bytes is associated with the first identical number of bytes. The first identical number of bytes is the same number of bytes of the value of the second encoding header to be transmitted and the value of the corresponding encoding header in the recorded HTTP packet;
其中, 该根据该每个比特位的取值、 该第二编码头部的头部编码以及该 第二编码头部的取值, 生成并传输该待传输的 HTTP报文, 包括:  And generating, according to the value of each bit, the header code of the second encoding header, and the value of the second encoding header, the HTTP packet to be transmitted, including:
5122, 根据该每个比特位的取值、 该第二编码头部的头部编码、 该第一 压缩指示以及该第一字节数, 生成并传输该待传输的 HTTP报文。 5122, according to the value of each bit, the header code of the second coding header, the first Compressing the indication and the first number of bytes, generating and transmitting the HTTP message to be transmitted.
具体而言,待传输的第二编码头部的取值与该已记录的 HTTP报文中的 相应编码头部的取值连续相同的字节数在第一范围内时, 则可以用 "第一压 缩指示" 和 "第一字节数" 这两个字节表示连续相等的字节, 即用两个字节 压缩表示第一相同字节数个字节, 而待传输的第二编码头部的取值中其余的 字符仍可以用明文进行传输。  Specifically, when the value of the second encoding header to be transmitted and the value of the corresponding encoding header in the recorded HTTP packet are consecutively in the first range, the The two bytes of a compression indication "and the first byte number" represent consecutive equal bytes, that is, two bytes are compressed to represent the first identical number of bytes, and the second encoding header to be transmitted The remaining characters in the value of the part can still be transmitted in plain text.
即在 S122中, 生成并传输的该待传输的 HTTP报文可以包括: 编码头 部位图、 第二编码头部的头部编码、 第一压缩指示以及该第一字节数; 该待 传输的 HTTP报文还可以包括第二编码头部的取值中其余非连续相同的字 符,或该待传输的 HTTP ^艮文还可以通过其它方式指示第二编码头部的取值, 本发明实施例并不限于此。  That is, in S122, the HTTP message to be transmitted generated and transmitted may include: an encoding header part map, a header encoding of the second encoding header, a first compression indication, and the first byte number; the to-be-transmitted The HTTP message may further include the remaining non-contiguous characters in the value of the second encoding header, or the HTTP message to be transmitted may further indicate the value of the second encoding header by other means, which is implemented by the present invention. The example is not limited to this.
例如, 定义 OxFF为第一压缩指示, 第一字节数为第一相同字节数与 3 的差值, 假设待传输的编码头部及其取值为 "User-Agent: mozilla/4.0" , 已 记录的 HTTP 报文中的相应编码头部的取值及其取值为 "User-Agent: mozilla/3.0" , 则待传输的编码头部 User- Agent连同其后的冒号 ":" 和空格 " ,, 可以用一个字节 "OxlD" 进行代替; 待传输的编码头部 User-Agent的 取值中前 8个字符 "mozilla/"与已记录的 HTTP报文中的相应编码头部的取 值中相应的 8个字符完全相同, 则该 8个字符可以用 "OxFF 0x05" 代替, 待传输的取值中的后续 3个字符 "4.0" 则以明文或原文传输。  For example, the definition of OxFF is the first compression indication, and the first byte number is the difference between the first identical number of bytes and 3, assuming that the coding header to be transmitted and its value is "User-Agent: mozilla/4.0", The value of the corresponding encoding header in the recorded HTTP packet and its value is "User-Agent: mozilla/3.0", then the encoding header User-Agent to be transmitted is followed by the colon ":" and spaces. " , , can be replaced by a byte "OxlD"; the first 8 characters "mozilla /" in the value of the encoding header User-Agent to be transmitted and the corresponding encoding header in the recorded HTTP message If the corresponding 8 characters in the value are identical, the 8 characters can be replaced by "OxFF 0x05", and the subsequent 3 characters "4.0" in the value to be transmitted are transmitted in plain text or original text.
例如, 该第一范围为 3个字节以上且 258个字节以下, 如果对应的字节 没有连续 3个以上相同,则以原文传输;另一方面,如果对应的字节超过 258 个连续字节相同, 则前面 258个字节以 OxFF OxFF代替, 其后的对应字节可 以用相同的规则重新判断并处理。  For example, the first range is more than 3 bytes and less than 258 bytes. If the corresponding bytes are not consecutively more than 3 consecutive, the original byte is transmitted; on the other hand, if the corresponding byte exceeds 258 consecutive words If the sections are the same, the first 258 bytes are replaced by OxFF OxFF, and the corresponding bytes can be re-judged and processed by the same rules.
因此, 本发明实施例的传输 HTTP报文的方法, 不仅能够对完全相同的 编码头部及其取值进行编码压缩传输,对于不完全相同的取值也可以进一步 进行编码压缩传输,从而能够显著地减少连续 HTTP报文中的相同字段占用 的无线空口资源, 由此能够提高资源使用效率。  Therefore, the method for transmitting an HTTP message in the embodiment of the present invention can not only encode and compress the exact same encoding header and its value, but also perform encoding and compression transmission for not completely the same value, thereby being significant The wireless air interface resource occupied by the same field in the continuous HTTP packet is reduced, thereby improving resource utilization efficiency.
应理解, 在本发明实施例中, 第一字节数与第一相同字节数相关联, 即 第一字节数与第一相同字节数具有映射关系, 例如, 第一字节数为第一相同 字节数的函数, 第一字节数与第一相同字节数也可以相等, 本发明实施例并 不限于此。 应理解, 在本发明的各种实施例中, 上述各过程的序号的大小并不意味 着执行顺序的先后, 各过程的执行顺序应以其功能和内在逻辑确定, 而不应 对本发明实施例的实施过程构成任何限定。 It should be understood that, in the embodiment of the present invention, the first number of bytes is associated with the first identical number of bytes, that is, the first number of bytes has a mapping relationship with the first identical number of bytes, for example, the first number of bytes is The function of the first identical number of bytes, the first number of bytes and the first identical number of bytes may also be equal, and the embodiment of the present invention is not limited thereto. It should be understood that, in various embodiments of the present invention, the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention. The implementation process constitutes any limitation.
在本发明实施例中, 一方面, HTTP报文的发送方和接收方的记录中可 以仅保存每个编码头部最近的一个取值, 并仅判断编码头部的当前取值是否 和前一个收到的该编码头部的取值相同, 如果相同, 则对应的编码头部位图 可以置 1 , 该编码头部不再传输; 如果不同, 对应的编码头部位图可以置 0, 则逐字节比较该编码头部的当前取值和该编码头部的前一个取值, 以进行压 缩。  In the embodiment of the present invention, on the one hand, the sender and the receiver of the HTTP message may only store the most recent value of each coding header, and only determine whether the current value of the coding header is the same as the previous one. The received encoding headers have the same value. If they are the same, the corresponding encoding header portion map can be set to 1, and the encoding header is no longer transmitted. If different, the corresponding encoding header portion map can be set to 0. The current value of the encoding header and the previous value of the encoding header are compared byte by byte for compression.
另一方面, HTTP报文的发送方和接收方的记录中也可以保存每个编码 头部的多个取值, 并判断编码头部的当前取值是否和预定次序的 HTTP报文 中的相应编码头部的取值是否相同,特别是判断编码头部的当前取值是否和 最新传输的 HTTP报文中的相应编码头部的取值是否相同。 类似地, 如果相 同, 则对应的编码头部位图可以置 1 , 该编码头部不再传输; 如果不同, 对 应的编码头部位图可以置 0。  On the other hand, the sender of the HTTP message and the record of the receiver can also store multiple values of each coding header, and determine whether the current value of the coding header is corresponding to the HTTP message in the predetermined order. Whether the value of the encoding header is the same, in particular, whether the current value of the encoding header is the same as the value of the corresponding encoding header in the newly transmitted HTTP packet. Similarly, if they are the same, the corresponding code header map can be set to 1, and the code header is no longer transmitted; if different, the corresponding code header map can be set to 0.
在本发明实施例中, 当 HTTP报文的发送方和接收方的记录中保存每个 编码头部的多个取值时, 例如, 记录中保存每个编码头部最近的 M ( M为整 数, 比如 M取值为 5 )个取值, 其中第 M个是最远的一个, 第 1个是最近 的一个, 依次类推, 则编码装置可以首先判断编码头部的当前取值是否和前 一个收到的该编码头部的耳又值相同,如果相同, 则对应的编码头部位图置 1 , 该编码头部不再传输; 如果不同, 对应的编码头部位图置 0, 再依次和前面 M-1个取值比较, 如果找到相同的, 则在编码头部的编码后的字节指示和记 录中保存的哪一个取值相同, 比如, User- Agent头部取值和记录中第 3个相 同, 则以 OxlD 0x03代替 User- Agent这一行; 如果在前 M个记录中都找不 到相同的,编码装置也可以和记录中的第 1个进行逐字节比较,以进行压缩。  In the embodiment of the present invention, when multiple values of each encoding header are stored in the records of the sender and the receiver of the HTTP message, for example, the most recent M of each encoding header is stored in the record (M is an integer) For example, M takes a value of 5), where the Mth is the farthest one, the first one is the nearest one, and so on, the encoding device can first determine whether the current value of the encoding header is the same as the previous one. The received ears of the coding header have the same value. If they are the same, the corresponding coding head part map is set to 1, and the coding header is no longer transmitted; if different, the corresponding coding header part is set to 0, and then Compared with the previous M-1 values, if the same is found, the encoded byte indication in the encoding header is the same as the value stored in the record, for example, User-Agent header value and record. The third one is the same, the user-agent line is replaced by OxlD 0x03; if the same is not found in the first M records, the encoding device can also compare byte by byte with the first one in the record for compression. .
因此, 在本发明实施例中, 可选地, 如图 4所示, 该方法 100还包括: S160,确定第二压缩指示以及第一 HTTP报文在该已记录的 HTTP报文 中的次序信息, 其中, 该第二压缩指示用于表示该第二编码头部的取值与相 应于该次序信息的该第一 HTTP报文中的相应编码头部的取值相同;  Therefore, in the embodiment of the present invention, optionally, as shown in FIG. 4, the method 100 further includes: S160. Determine a second compression indication and sequence information of the first HTTP packet in the recorded HTTP packet. The second compression indication is used to indicate that the value of the second encoding header is the same as the value of the corresponding encoding header in the first HTTP packet corresponding to the order information;
其中, 该根据该每个比特位的取值、 该第二编码头部的头部编码以及该 第二编码头部的取值, 生成并传输该待传输的 HTTP报文, 包括: S123, 根据该每个比特位的取值、 该第二编码头部的头部编码、 该第二 压缩指示以及该次序信息, 生成并传输该待传输的 HTTP报文。 The generating and transmitting the HTTP message to be transmitted according to the value of the bit, the header code of the second coding header, and the value of the second coding header, including: S123. Generate and transmit the HTTP message to be transmitted according to the value of each bit, the header code of the second coding header, the second compression indication, and the sequence information.
具体地, 例如, 在编码头部位图的比特位的取值指示, 与该比特位相应 的待传输的编码头部的取值与已记录的最新的一个 HTTP报文中的相应编码 头部的取值不同时, 编码装置可以确定第二压缩指示以及第一 HTTP报文在 该已记录的 HTTP报文中的次序信息, 其中, 该第二压缩指示用于表示该第 二编码头部的取值与相应于该次序信息的该第一 HTTP报文中的相应编码头 部的取值相同, 从而编码装置可以根据该每个比特位的取值、 该第二编码头 部的头部编码、 该第二压缩指示以及该次序信息, 生成并传输该待传输的 HTTP报文。  Specifically, for example, the value of the bit in the coding header part indicates the value of the coding header to be transmitted corresponding to the bit and the corresponding coding header in the latest HTTP message recorded. When the value is different, the encoding device may determine the second compression indication and the order information of the first HTTP packet in the recorded HTTP packet, where the second compression indication is used to indicate the second encoding header. The value is the same as the value of the corresponding encoding header in the first HTTP packet corresponding to the order information, so that the encoding device can obtain the header of the second encoding header according to the value of each bit. And the second compression indication and the sequence information, generating and transmitting the HTTP message to be transmitted.
即在 S123中, 生成并传输的该待传输的 HTTP报文可以包括: 编码头 部位图、 第二编码头部的头部编码、 第二压缩指示以及该次序信息; 该待传 输的 HTTP报文还可以包括第二编码头部的取值, 或该待传输的 HTTP报文 还可以通过其它方式指示第二编码头部的取值, 本发明实施例并不限于此。  That is, in S123, the HTTP message to be transmitted generated and transmitted may include: an encoding header part map, a header encoding of the second encoding header, a second compression indication, and the order information; the HTTP packet to be transmitted. The text may also include the value of the second encoding header, or the HTTP packet to be transmitted may further indicate the value of the second encoding header by other means, and the embodiment of the present invention is not limited thereto.
应理解,本发明实施例仅以待传输的编码头部的取值与已记录的最新的 实施例并不限于此。 例如, 在编码头部位图的比特位的取值指示, 该比特位 相应的待传输的编码头部的取值与已记录的具有第一次序的一个 HTTP报文 中的相应编码头部的取值不同时,编码装置也可以确定第二压缩指示以及第 一 HTTP报文在该已记录的 HTTP报文中的次序信息, 该第一次序指示的 HTTP报文可以是已记录的 HTTP报文中的任意一个 HTTP报文。  It should be understood that the embodiment of the present invention is only limited to the value of the coding header to be transmitted and the latest embodiment recorded. For example, the value of the bit in the coding header part indicates that the value of the corresponding coding header to be transmitted is corresponding to the corresponding coding header in the recorded HTTP message having the first order. When the value is different, the encoding device may also determine the second compression indication and the order information of the first HTTP packet in the recorded HTTP packet, where the HTTP packet indicated by the first sequence may be the recorded HTTP. Any HTTP packet in the packet.
应理解, 在编码头部位图的比特位的取值指示, 该比特位相应的待传输 的编码头部的取值与已记录的最新的一个 HTTP报文中的相应编码头部的取 值相同时, 编码装置可以不再传输该编码头部及其取值。  It should be understood that the value of the bit in the coding header part indicates that the value of the coding header to be transmitted corresponding to the bit and the value of the corresponding coding header in the latest HTTP message recorded. When the same, the encoding device can no longer transmit the encoding header and its value.
因此, 本发明实施例的传输 HTTP报文的方法, 通过编码头部位图的比 特位的取值来指示为该比特位相应的待传输的编码头部的取值, 与已记录的 HTTP报文中的相应编码头部的取值是否相同, 并且不传输取值相同的编码 头部及其取值,从而能够减少连续 HTTP报文中的相同字段占用的无线空口 资源, 由此能够提高资源使用效率。  Therefore, the method for transmitting an HTTP message in the embodiment of the present invention indicates, by using the value of the bit of the encoding header part map, the value of the encoding header to be transmitted corresponding to the bit, and the recorded HTTP packet. Whether the value of the corresponding encoding header in the text is the same, and the encoding header with the same value and its value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resources. Use efficiency.
应理解, 在本发明实施例中, 编码装置也可以首先判断编码头部的当前 取值是否和预定次序的 HTTP报文中的相应编码头部的取值是否相同, 以确 定编码头部位图的每个比特位的取值, 本发明实施例并不限于此。 It should be understood that, in the embodiment of the present invention, the encoding apparatus may also first determine whether the current value of the encoding header is the same as the value of the corresponding encoding header in the HTTP message of the predetermined order, so as to be The value of each bit of the coded header portion map is not limited to this embodiment.
上文中结合图 1至图 4, 详细描述了编码头部及其取值的编码方法, 下 面将结合图 5至图 7, 描述 HTTP报文包括的 URI、 版本号信息等信息的编 码方法。  The coding method of the coding header and its value is described in detail above with reference to FIG. 1 to FIG. 4. The coding method of the URI, version number information and the like included in the HTTP message will be described below with reference to FIG. 5 to FIG.
如图 5所示, 根据本发明实施例的传输 HTTP报文的方法 100还包括: As shown in FIG. 5, the method 100 for transmitting an HTTP packet according to an embodiment of the present invention further includes:
S170, 确定第三压缩指示以及第二字节数, 该第三压缩指示用于表示待 传输的通用资源标识符 URI被压缩, 该第二字节数与第二相同字节数相关 联, 该第二相同字节数为待传输的 URI与该已记录的 HTTP报文中的 URI 连续相同的字节数; S170. Determine a third compression indication, where the third compression indication is used to indicate that the universal resource identifier URI to be transmitted is compressed, and the second number of bytes is associated with the second identical number of bytes. The second identical number of bytes is the number of consecutive consecutive URIs of the URI to be transmitted and the URI in the recorded HTTP message;
其中, 该根据该每个比特位的取值, 生成并传输包括该编码头部位图的 待传输的 HTTP报文, 包括:  And generating, according to the value of each bit, the HTTP packet to be transmitted that includes the code header part map, including:
S124, 根据该每个比特位的取值、 该第三压缩指示以及该第二字节数, 生成并传输该待传输的 HTTP ^艮文。  S124. Generate, and transmit, according to the value of each bit, the third compression indication, and the second number of bytes, the HTTP message to be transmitted.
具体而言, 与待传输的第二编码头部的取值的编码压缩方案类似, 对于 待传输的 URI, 当待传输的 URI与已记录的 HTTP报文中的相应 URI的取 值连续相同的字节数在第二范围内时, 则可以用 "第三压缩指示" 和 "第二 字节数"这两个字节表示连续相等的字节, 即用两个字节压缩表示第二相同 字节数个字节, 而待传输的 URI中其余的字符仍可以用明文进行传输。  Specifically, similar to the encoding compression scheme of the value of the second encoding header to be transmitted, for the URI to be transmitted, when the URI to be transmitted and the value of the corresponding URI in the recorded HTTP packet are consecutively the same When the number of bytes is in the second range, the two bytes of "third compression indication" and "second byte number" can be used to represent consecutive equal bytes, that is, two bytes are compressed to represent the second identical The bytes are bytes, and the remaining characters in the URI to be transmitted can still be transmitted in plaintext.
即在 S124中, 生成并传输的该待传输的 HTTP报文可以包括: 编码头 部位图、 第三压缩指示以及该第二字节数; 该待传输的 HTTP报文还可以包 括待传输的 URI中其余非连续相同的字符。应理解,该待传输的 HTTP报文 还可以包括第二编码头部的头部编码,还可以包括第一压缩指示以及该第一 字节数等, 该待传输的 HTTP报文也可以通过其它方式指示第二编码头部的 取值等, 本发明实施例并不限于此。 例如, 逐字符比较本次待传输的 URI 和记录的 URI, 如果对应的字节有至少连续 3个以上、 258个以下相同, 则 以 "压缩指示 OxFF" "N-3"两个字节表示连续相等的字节, 其中 N为连续相 同的字节数, URI 之前的空格参加压缩。 例如, 前次请求的 URI 为 " /client/qj wl5_MB_201107275457.gif , 其 后 请 求 的 URI 为 " /client/jnzg— MB— 201107142728.jpg",其中" /client/"有连续 9个字符相同, 则第二次请求的 URI的这 9个字符可以用 OxFF 0x06代替,而其后续字符中 不存在连续 3个以上相同的字符, 则以原文传输; 如果对应的字节没有连续 3个以上相同,则以原文传输;如果对应的字节有超过 258个连续字节相同, 则前面 258个字节以 OxFF OxFF代替, 其后的对应字节以相同的规则判断并 处理。 That is, in S124, the HTTP message to be transmitted that is generated and transmitted may include: an encoding header part map, a third compression indication, and the second byte number; the HTTP message to be transmitted may further include a to-be-transmitted The remaining non-contiguous characters in the URI. It should be understood that the HTTP packet to be transmitted may further include a header encoding of the second encoding header, and may further include a first compression indication and the first byte number, etc., and the HTTP packet to be transmitted may also pass other The mode indicates the value of the second coding header, etc., and the embodiment of the present invention is not limited thereto. For example, the URI to be transmitted and the URI of the record are compared character by character. If the corresponding byte has at least 3 consecutive or more consecutive 258 or less, the two bytes are represented by "compression indication OxFF""N-3". Consecutively equal bytes, where N is the number of consecutive identical bytes, and spaces before the URI participate in compression. For example, the URI of the previous request is " /client/qj wl5_MB_201107275457.gif , and the requested URI is " /client/jnzg— MB— 201107142728.jpg", where "/client/" has the same 9 consecutive characters, then The 9 characters of the URI of the second request may be replaced by OxFF 0x06, and there are no more than 3 consecutive identical characters in the subsequent characters, and the original characters are transmitted; if the corresponding bytes are not consecutive If three or more are the same, the original text is transmitted; if the corresponding byte has more than 258 consecutive bytes, the first 258 bytes are replaced by OxFF OxFF, and the corresponding bytes are judged and processed by the same rule.
应理解, 在本发明实施例中, "第一范围" 与 "第二范围" 可以相同, 也可以不同,本发明实施例并不限于此。还应理解,在本发明实施例中, "第 一压缩指示"、 "第二压缩指示" 和 "第三压缩指示" 可以相同, 例如各压缩 指示都为 OxFF, 各压缩指示也可以分别不同, 或部分相同, 本发明实施例 也并不限于此。  It should be understood that, in the embodiment of the present invention, the “first range” and the “second range” may be the same or different, and the embodiment of the present invention is not limited thereto. It should be understood that, in the embodiment of the present invention, the "first compression indication", the "second compression indication", and the "third compression indication" may be the same. For example, each compression indication is OxFF, and each compression indication may also be different. Or partially identical, the embodiment of the present invention is not limited thereto.
在本发明实施例中, 可选地, 如图 6所示, 该方法 100还包括:  In the embodiment of the present invention, optionally, as shown in FIG. 6, the method 100 further includes:
S180,确定待传输的 HTTP版本号信息与该已记录的 HTTP报文中的版 本号信息是否相同;  S180. Determine whether the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP message.
其中, 该根据该每个比特位的取值, 生成并传输包括该编码头部位图的 待传输的 HTTP报文, 包括:  And generating, according to the value of each bit, the HTTP packet to be transmitted that includes the code header part map, including:
5125,在该待传输的 HTTP版本号信息与该已记录的 HTTP报文中的版 本号信息相同时, 根据该每个比特位的取值, 生成并传输该待传输的 HTTP 报文, 该待传输的 HTTP报文包括该编码头部位图;  When the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP message, the HTTP message to be transmitted is generated and transmitted according to the value of each bit. The transmitted HTTP message includes the coding header part map;
5126,在该待传输的 HTTP版本号信息与该已记录的 HTTP报文中的版 本号信息不同时,根据该每个比特位的取值以及该待传输的 HTTP版本号信 息, 生成并传输该待传输的 HTTP报文, 该待传输的 HTTP报文包括该编码 头部位图和该待传输的 HTTP版本号信息。  5126, when the HTTP version number information to be transmitted is different from the version number information in the recorded HTTP message, generating and transmitting the value according to the value of each bit and the HTTP version number information to be transmitted. The HTTP message to be transmitted includes the code header part map and the HTTP version number information to be transmitted.
具体而言, 在本发明实施例中, 当待传输的 HTTP版本号信息与已记录 的 HTTP报文中的版本号信息相同时,可以不传输 HTTP版本号信息;反之, 当待传输的 HTTP版本号信息与已记录的 HTTP报文中的版本号信息不同 时, 需要传输 HTTP版本号信息。  Specifically, in the embodiment of the present invention, when the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP message, the HTTP version number information may not be transmitted; otherwise, when the HTTP version to be transmitted is When the number information is different from the version number information in the recorded HTTP message, the HTTP version number information needs to be transmitted.
即在 S125中, 生成并传输的该待传输的 HTTP 文可以包括编码头部 位图, 但可以不包括待传输的 HTTP版本号信息; 在 S126中, 生成并传输 的该待传输的 HTTP报文可以包括编码头部位图以及待传输的 HTTP版本号 信息;应理解,该待传输的 HTTP报文还可以包括第二编码头部的头部编码、 第一压缩指示、 第一字节数、 第三压缩指示或第三字节数等, 该待传输的 HTTP报文也可以通过其它方式指示第二编码头部的取值等, 本发明实施例 并不限于此。 因此, 本发明实施例的传输 HTTP报文的方法, 通过编码头部位图的比 特位的取值来指示为该比特位相应的待传输的编码头部的取值, 与已记录的 HTTP报文中的相应编码头部的取值是否相同, 并且不传输取值相同的编码 头部及其取值,从而能够减少连续 HTTP报文中的相同字段占用的无线空口 资源, 由此能够提高资源使用效率。 That is, in S125, the HTTP file to be transmitted generated and transmitted may include an encoding header part map, but may not include the HTTP version number information to be transmitted. In S126, the HTTP packet to be transmitted is generated and transmitted. The encoding header part map and the HTTP version number information to be transmitted may be included; it should be understood that the HTTP message to be transmitted may further include a header encoding of the second encoding header, a first compression indication, a first byte number, The third compression indication or the third byte number, etc., the HTTP message to be transmitted may also indicate the value of the second coding header, etc. by other means, and the embodiment of the present invention is not limited thereto. Therefore, the method for transmitting an HTTP message in the embodiment of the present invention indicates, by using the value of the bit of the encoding header part map, the value of the encoding header to be transmitted corresponding to the bit, and the recorded HTTP packet. Whether the value of the corresponding encoding header in the text is the same, and the encoding header with the same value and its value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resources. Use efficiency.
在本发明实施例中, 如图 7所示, 该根据该每个比特位的取值, 生成并 传输包括该编码头部位图的待传输的 HTTP报文, 包括:  In the embodiment of the present invention, as shown in FIG. 7, the HTTP message to be transmitted, including the code header part map, is generated and transmitted according to the value of each bit, and includes:
根据该每个比特位的取值, 生成并传输包括类型字段的协议数据单元 PDU包, 该类型字段用于指示该 PDU包为经过头部编码和压缩的 HTTP报 文。  And according to the value of each bit, a protocol data unit PDU packet including a type field is generated and transmitted, and the type field is used to indicate that the PDU packet is a header encoded and compressed HTTP message.
具体而言, 在分组数据汇聚协议 PDCP数据传输过程中, 发送端可以通 过在 PDCP包头部分添加指示信息, 来指示该数据包是经过了 HTTP头部编 码和压缩的 HTTP报文。 为此, 可以修改 PDCP协议 25.323和 36.323, 可以 新增加一个 PDU类型字段,例如如表 1所示,该类型字段用于指示当前 PDU 是经过 HTTP头部编码和压缩的 ^艮文。  Specifically, in the PDCP data transmission process of the packet data convergence protocol, the sender may indicate that the data packet is an HTTP message that has been encoded and compressed by the HTTP header by adding indication information in the header portion of the PDCP. To this end, the PDCP protocols 25.323 and 36.323 can be modified, and a new PDU type field can be added. For example, as shown in Table 1, this type field is used to indicate that the current PDU is encoded and compressed by the HTTP header.
表 1
Figure imgf000024_0001
其中, PDU类型字段可以取值为 "011"、 "100"、 "101" 等, 当 PDU类 型字段取值为 "011" 时, 可以表示数据经过了 HTTP头部编码和压缩; 当 PDU类型字段取值为 "100"时,可以表示为 PDCP数据 PDU且经过了 HTTP 头部编码和压缩; 当 PDU 类型字段取值为 "101" 时, 可以表示为 PDCP SeqNum PDU且经过了 HTTP头部编码和压缩。
Table 1
Figure imgf000024_0001
The PDU type field may take values of "011", "100", "101", etc. When the PDU type field has a value of "011", it may indicate that the data has been encoded and compressed by the HTTP header; When the value is "100", it can be expressed as a PDCP data PDU and is subjected to HTTP header encoding and compression. When the PDU type field is "101", it can be expressed as a PDCP SeqNum PDU and has been HTTP header encoded and compression.
应理解, PDU类型字段的上述取值及其含义仅为示例,本发明实施例并 不限于此。  It should be understood that the foregoing values of the PDU type field and their meanings are only examples, and the embodiment of the present invention is not limited thereto.
在本发明实施例中, 可选地, 如图 7所示, 该方法 100还包括:  In the embodiment of the present invention, optionally, as shown in FIG. 7, the method 100 further includes:
S190, 在首次传输 HTTP报文时, 记录首次传输的 HTTP报文的编码头 部取值、 URI和 HTTP版本号信息;  S190, when encoding the HTTP packet for the first time, recording the encoding header value, URI, and HTTP version number information of the first transmitted HTTP packet;
S195, 在非首次传输 HTTP报文时, 根据该待传输的 HTTP报文更新该 已记录的 HTTP ^艮文。 应理解,在本发明实施例中, UE从 RRCJDLE状态转为 RRC_Connected 状态之后的第一次传输 HTTP Request报文, 可以称为首次传输 HTTP报文; UE 在服务无线网络子系统 (Serving Radio Network Subsystem, 筒称为 "SRNS" ) 重定位完成, 收到开始 HTTP 头部编码和压缩 (START HTTP HEADER CODING AND COMPRESSION )信息之后的第一次传输 HTTP Request报文,也可以称为首次传输 HTTP报文。还应理解,首次传输的 HTTP Response报文也称为首次传输 HTTP报文, 本发明实施例并不限于此。 S195: Update the recorded HTTP message according to the HTTP message to be transmitted when the HTTP message is not transmitted for the first time. It should be understood that, in the embodiment of the present invention, the first transmission of the HTTP Request message after the UE transitions from the RRCJDLE state to the RRC_Connected state may be referred to as the first transmission of the HTTP message; the UE is in the serving radio network subsystem (Serving Radio Network Subsystem) , the cylinder is called "SRNS". The relocation is completed. The first HTTP HTTP transmission message is received after the start of the HTTP HTTP HEADER CODING AND COMPRESSION message. It can also be called the first transmission of the HTTP message. . It should be understood that the HTTP Response packet transmitted for the first time is also referred to as the first transmission of the HTTP packet, and the embodiment of the present invention is not limited thereto.
在本发明实施例中, 可选地, 该根据该待传输的 HTTP报文更新该已记 录的 HTTP 4艮文, 包括:  In the embodiment of the present invention, optionally, updating the recorded HTTP message according to the HTTP message to be transmitted includes:
如果该待传输的 HTTP报文的编码头部取值和该已记录的 HTTP报文的 编码头部取值相同,则保持该已记录的 HTTP报文的编码头部及其取值不变; 或  If the value of the encoding header of the HTTP packet to be transmitted is the same as the value of the encoding header of the recorded HTTP packet, the encoding header of the recorded HTTP packet and the value thereof are kept unchanged; Or
如果该待传输的 HTTP报文的编码头部取值和该已记录的 HTTP报文的 编码头部取值不同, 则将该已记录的 HTTP报文中的编码头部取值替换为该 待传输的 HTTP报文的编码头部取值; 或  If the value of the encoding header of the HTTP packet to be transmitted is different from the value of the encoding header of the HTTP packet, the value of the encoding header in the recorded HTTP packet is replaced with the value of the encoding header. The value of the encoding header of the transmitted HTTP packet; or
如果该已记录的 HTTP报文具有该待传输的 HTTP报文不具有的编码头 部, 则保持该已记录的 HTTP报文的编码头部及其取值不变; 或  If the recorded HTTP packet has an encoding header that is not included in the HTTP packet to be transmitted, the encoding header of the recorded HTTP packet is kept unchanged; or
如果该待传输的 HTTP报文具有该已记录的 HTTP报文不具有的编码头 部, 则记录该待传输的 HTTP报文具有但该已记录的 HTTP报文不具有的编 码头部及其取值; 或  If the HTTP packet to be transmitted has an encoding header that is not included in the recorded HTTP packet, the HTTP header to be transmitted has an encoding header that is not included in the recorded HTTP packet and is obtained. Value; or
如果该待传输的 HTTP报文的版本号信息和该已记录的 HTTP报文的版 本号信息相同, 则保持该已记录的 HTTP报文的版本号信息不变; 或  If the version number information of the HTTP packet to be transmitted is the same as the version number information of the recorded HTTP packet, the version number information of the recorded HTTP packet is kept unchanged; or
如果该待传输的 HTTP报文的版本号信息和该已记录的 HTTP报文的版 本号信息不同, 则将该已记录的 HTTP报文中的版本号信息替换为该待传输 的 HTTP报文的版本号信息。  If the version number information of the HTTP packet to be transmitted is different from the version number of the HTTP packet, the version number information of the recorded HTTP packet is replaced with the HTTP packet to be transmitted. Version number information.
应理解,编码装置可以根据上述规则中的一项或多项,对已记录的 HTTP 报文进行更新处理, 但本发明实施例并不限于此。  It should be understood that the encoding apparatus may perform the update processing on the recorded HTTP message according to one or more of the foregoing rules, but the embodiment of the present invention is not limited thereto.
还应理解, 在根据本发明的记录多个 HTTP ^艮文的方案中, 当已记录的 HTTP报文的数量小于预设值时, 记录待传输的 HTTP报文; 当已记录的 HTTP报文的数量等于预设值时, 根据该待传输的 HTTP报文更新该已记录 的 HTTP报文中最新的一个 HTTP报文, 并且可以根据上述规则中的一项或 多项, 对已记录的最新的一个 HTTP报文进行更新处理, 但本发明实施例并 不限于此。 It should also be understood that, in the scheme for recording a plurality of HTTP 艮 messages according to the present invention, when the number of recorded HTTP messages is less than a preset value, the HTTP message to be transmitted is recorded; when the recorded HTTP message is recorded When the number of the packets is equal to the preset value, the latest HTTP packet in the recorded HTTP packet is updated according to the HTTP packet to be transmitted, and may be according to one of the above rules or A plurality of updates are performed on the latest HTTP packet that has been recorded, but the embodiment of the present invention is not limited thereto.
采用现网数据进行测试,结果表明,采用根据本发明实施例的传输 HTTP 报文方法, 上行压缩掉的数据占 HTTP Request报文的 67%, 占全部上行数 据的 17%;如果记录多个 HTTP报文,则上行压缩掉的数据占 HTTP Request 4艮文的 75%, 占全部上行数据的 19%。  The test is performed on the live network data. The result shows that the method of transmitting HTTP packets according to the embodiment of the present invention compresses the uplink data by 67% of the HTTP Request message and accounts for 17% of the total uplink data. For the message, the data compressed by the upstream accounted for 75% of the HTTP Request 4, accounting for 19% of the total uplink data.
应理解, 在本发明的各种实施例中, 上述各过程的序号的大小并不意味 着执行顺序的先后, 各过程的执行顺序应以其功能和内在逻辑确定, 而不应 对本发明实施例的实施过程构成任何限定。  It should be understood that, in various embodiments of the present invention, the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention. The implementation process constitutes any limitation.
因此, 本发明实施例的传输 HTTP报文的方法, 通过编码头部位图的比 特位的取值来指示为该比特位相应的待传输的编码头部的取值, 与已记录的 HTTP报文中的相应编码头部的取值是否相同, 并且不传输取值相同的编码 头部及其取值,从而能够减少连续 HTTP报文中的相同字段占用的无线空口 资源, 由此能够提高资源使用效率。  Therefore, the method for transmitting an HTTP message in the embodiment of the present invention indicates, by using the value of the bit of the encoding header part map, the value of the encoding header to be transmitted corresponding to the bit, and the recorded HTTP packet. Whether the value of the corresponding encoding header in the text is the same, and the encoding header with the same value and its value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resources. Use efficiency.
上文中结合图 1至图 7, 从编码装置的角度详细描述了根据本发明实施 例的传输 HTTP报文的方法, 下面将结合图 8至图 14,从解码装置的角度描 述根据本发明实施例的传输 HTTP报文的方法。  1 to 7, a method for transmitting an HTTP message according to an embodiment of the present invention is described in detail from the perspective of an encoding apparatus. Hereinafter, an embodiment according to the present invention will be described from the perspective of a decoding apparatus with reference to FIG. 8 to FIG. The method of transmitting HTTP messages.
图 8示出了根据本发明实施例的传输 HTTP报文的方法 200的示意性流 程图, 该方法 200可以由解码装置执行, 该编码装置既可以为用户设备, 例 如 UE等; 也可以为网络设备, 例如 RNC、 eNB等。 如图 8所示, 该方法 200包括:  FIG. 8 is a schematic flowchart of a method 200 for transmitting an HTTP message, which may be performed by a decoding device, which may be a user equipment, such as a UE, etc., or a network, according to an embodiment of the present invention. Equipment, such as RNC, eNB, etc. As shown in FIG. 8, the method 200 includes:
S210, 获取接收的 HTTP报文中的编码头部位图的每个比特位的取值; S220,在该编码头部位图的第一比特位的取值指示为该第一比特位相应 的待解码的第一编码头部的取值与已记录的 HTTP报文中的相应编码头部的 取值相同时,将该已记录的 HTTP报文中的与该第一比特位相应的编码头部 及其取值, 分别确定为该第一编码头部以及该第一编码头部的取值。  S210: Obtain a value of each bit of the coding header part map in the received HTTP packet. S220. The value of the first bit in the coding header part indication is indicated by the first bit. When the value of the first encoding header to be decoded is the same as the value of the corresponding encoding header in the recorded HTTP packet, the encoding header corresponding to the first bit in the recorded HTTP packet is used. The part and its value are respectively determined as values of the first coding header and the first coding header.
具体而言, 解码装置可以根据接收的 HTTP报文, 获取接收的 HTTP报 文中的编码头部位图的每个比特位的取值, 其中, 各个该比特位的取值分别 指示为该比特位相应的待解码的编码头部的取值与已记录的 HTTP报文中的 相应编码头部的取值是否相同, 例如, 比特位为第一值时, 可以表示待解码 的编码头部的取值与已记录的 HTTP报文中的相应编码头部的取值相同;反 之, 比特位为第二值时, 可以表示取值不同。 其中, 编码头部位图的比特位 与 HTTP报文中的编码头部具有对应关系, 优选地, 每个比特位对应 HTTP 4艮文中的一个编码头部。 Specifically, the decoding apparatus may obtain, according to the received HTTP packet, a value of each bit of the encoded header part map in the received HTTP packet, where the value of each bit is indicated as the bit respectively. The value of the corresponding encoding header to be decoded is the same as the value of the corresponding encoding header in the recorded HTTP packet. For example, when the bit is the first value, it may represent the encoding header to be decoded. The value is the same as the value of the corresponding encoding header in the recorded HTTP packet; When the bit is the second value, it can indicate that the value is different. The bit of the coding header part map has a correspondence relationship with the coding header in the HTTP message. Preferably, each bit corresponds to one coding header in the HTTP message.
由此,在该编码头部位图的第一比特位的取值指示为该第一比特位相应 的待解码的第一编码头部的取值与已记录的 HTTP报文中的相应编码头部的 取值相同时, 可以将该已记录的 HTTP报文中的与该第一比特位相应的编码 头部及其取值, 分别确定为该第一编码头部以及该第一编码头部的取值。  Therefore, the value of the first bit in the coding header portion is indicated as the value of the first coding header to be decoded corresponding to the first bit and the corresponding coding header in the recorded HTTP message. When the value of the part is the same, the encoding header corresponding to the first bit in the recorded HTTP packet and the value thereof may be determined as the first encoding header and the first encoding header, respectively. The value.
例如, HTTP 文的接收方根据编码头部位图的比特位为 1 , 可以确定 接收的 HTTP报文中与该比特位相应的编码头部 Host及取值与已记录的 HTTP报文中的编码头部 Host及取值完全相同,由此接收方可以将已记录的 HTTP报文中的编码头部 Host及其取值作为此次接收的 HTTP报文中的相应 编码头部及其取值。  For example, the receiver of the HTTP text can determine the encoding header Host and the value corresponding to the bit in the received HTTP packet according to the bit position of the encoding header part map, and the encoding in the HTTP packet. The host and the value of the header are the same, so that the receiver can use the encoding header Host and its value in the recorded HTTP packet as the corresponding encoding header and its value in the HTTP packet received this time.
因此, 本发明实施例的传输 HTTP报文的方法, 通过根据编码头部位图 的比特位的取值来确定该比特位相应的待解码的编码头部的取值, 与已记录 的 HTTP报文中的相应编码头部的取值是否相同,从而能够根据编码头部位 图确定接收的 HTTP报文中的编码头部及其取值, 由此能够减少连续 HTTP 报文中的相同字段占用的无线空口资源, 并能够提高资源使用效率。  Therefore, the method for transmitting an HTTP packet in the embodiment of the present invention determines the value of the encoding header to be decoded corresponding to the bit according to the value of the bit of the encoding header portion map, and the recorded HTTP packet. Whether the values of the corresponding coding headers in the text are the same, so that the coding header and its value in the received HTTP message can be determined according to the coding header part map, thereby reducing the occupation of the same field in the continuous HTTP message. Wireless air interface resources and can improve resource utilization efficiency.
应理解, 在本发明实施例中, 该比特位与编码头部也可以具有一对多的 关系, 例如, 一个比特位的取值可以表示与该比特位相应的待传输的多个编 码头部的取值与已记录的 HTTP报文中的相应多个编码头部的取值是否相 同; 该比特位与编码头部还可以具有多对一的关系, 例如, 多个比特位的取 值用于可以表示与该多个比特位相应的待传输的一个编码头部的取值与已 记录的 HTTP报文中的相应一个编码头部的取值是否相同, 本发明实施例并 不限于此。  It should be understood that, in the embodiment of the present invention, the bit may also have a one-to-many relationship with the encoding header. For example, the value of one bit may represent multiple encoding headers to be transmitted corresponding to the bit. The value is the same as the value of the corresponding multiple encoding headers in the recorded HTTP packet; the bit may have a many-to-one relationship with the encoding header, for example, the value of multiple bits is used. The value of an encoding header to be transmitted corresponding to the multiple bits is the same as the value of the corresponding encoding header in the recorded HTTP packet, and the embodiment of the present invention is not limited thereto.
还应理解, 在本发明实施例中, 解码装置为 HTTP报文的接收方, 该 It should also be understood that, in the embodiment of the present invention, the decoding device is a receiver of an HTTP message,
HTTP报文既可以是 HTTP请求报文, 也可以是 HTTP响应报文, 本发明实 施例并不限于此。 具体而言, 该解码装置可以为 HTTP报文的接收方中的分 组数据汇聚协议 ( Packet Data Convergence Protocol, 筒称为 "PDCP" )层, 也可以为接收方中新增的编码压缩层, 本发明实施例并不限于此。 The HTTP packet can be either an HTTP request message or an HTTP response message. The embodiment of the present invention is not limited thereto. Specifically, the decoding device may be a packet data convergence protocol ("Packet Data Convergence Protocol") in the receiver of the HTTP message, or may be a new coding compression layer in the receiver. Embodiments of the invention are not limited thereto.
在本发明实施例中, 可选地, 如图 9所示, 该方法 200还包括:  In the embodiment of the present invention, optionally, as shown in FIG. 9, the method 200 further includes:
S230,在该编码头部位图的第二比特位的取值指示为该第二比特位相应 的待解码的第二编码头部的取值与已记录的 HTTP报文中的相应编码头部的 取值不同时, 根据该接收的 HTTP报文中的头部编码, 确定该头部编码指代 的该第二编码头部。 S230. The value of the second bit in the coding part location map is indicated as corresponding to the second bit. When the value of the second encoding header to be decoded is different from the value of the corresponding encoding header in the recorded HTTP packet, the header encoding finger is determined according to the header encoding in the received HTTP packet. The second encoding header of the generation.
例如, 在本发明实施例中, 对于第二编码头部连同其后的冒号 ":"和空 格 " ,,, 都可以用编码代替, 例如, 编码头部 User-Agent可以被编码为 29, 则一共 12个字节的 "User-Agent: " 可以用一个字节 "OxlD" 进行代替。 因 此, 解码装置可根据该字节 "OxlD" , 将该字节确定为编码头部 User-Agent, 以及其后的冒号 ":" 和空格 " ,,。  For example, in the embodiment of the present invention, for the second encoding header together with the colon ":" and the space ",", the encoding may be replaced by, for example, the encoding header User-Agent may be encoded as 29, A total of 12 bytes of "User-Agent:" can be replaced with one byte "OxlD". Therefore, the decoding device can determine the byte as the encoding header User-Agent according to the byte "OxlD", and Subsequent colons ":" and spaces ",,.
应理解, 第二编码头部也可以明文传输, 此时不需要解码就可以获取传 输的信息。  It should be understood that the second encoding header can also be transmitted in plaintext, in which case the transmitted information can be obtained without decoding.
在本发明实施例中, 对于第二编码头部的取值, 可以直接明文传输, 也 可以逐字符比较本次待传输的编码头部的取值和记录的编码头部的取值,将 连续相同的字节进行编码压缩处理。 此时, 例如如图 10所示, 该解码的方 法 200还包括:  In the embodiment of the present invention, the value of the second encoding header may be directly transmitted in plaintext, or the value of the encoding header to be transmitted and the value of the encoded encoding header to be transmitted may be compared character by character. The same byte is encoded and compressed. At this time, for example, as shown in FIG. 10, the decoding method 200 further includes:
S240, 根据该接收的 HTTP报文中的第一压缩指示以及第一字节数, 确 定与该第一字节数相关联的第一相同字节数, 其中该第一压缩指示用于表示 该第二编码头部的取值被压缩;  S240. Determine, according to the first compression indication and the first number of bytes in the received HTTP packet, a first identical number of bytes associated with the first number of bytes, where the first compression indication is used to indicate the The value of the second encoding header is compressed;
S250, 根据该第一相同字节数, 将该已记录的 HTTP报文中的相应编码 头部的取值中相应的连续第一相同字节数的字节,确定为该第二编码头部的 待解码的取值。  S250. Determine, according to the first identical number of bytes, a byte of the corresponding consecutive first identical number of bytes in the value of the corresponding encoding header in the recorded HTTP packet as the second encoding header. The value to be decoded.
例如, 解码装置可以读取编码头部位图, 对于为 1 的比特, 取对应的 HTTP头部记录的值; 解码装置可以读取 HTTP报文正文的第一行, 也就是 Request-Line, 如果遇到 OxFF字符, 读取其后面字节的值 N, 然后在记录的 URI中对应的位置取 N+3字节;如果第一行中没有 HTTP版本号信息,取记 录的 HTTP版本号信息。 例如, 解码装置读取 HTTP报文的每一行的第一个 字节, 如果该字节为 HTTP header的编码, 由此字符恢复出 header及其后的 冒号 ":" 和空格 " ", 例如, User-Agent被编码为 29, 第一个字节如果为 "OxlD", 则恢复为 "User-Agent: "; 对后续字节, 如果遇到 OxFF字符, 读 取其后一字节的值 N, 然后在记录的编码头部取值对应的位置取 N+3字节, 否则取接收到的原文; 如果该字节不是 HTTP header的编码, 则该行直接取 原文, 不需要解压缩。 在本发明实施例中, 可选地, 如图 11所示, 该方法 200还包括: S260, 根据该接收的 HTTP报文中的第二压缩指示以及次序信息, 确定 该已记录的 HTTP报文中与该次序信息相应的第一 HTTP报文, 其中, 该第 二压缩指示用于表示该第二编码头部的取值与该第一 HTTP报文中的相应编 码头部的取值相同; For example, the decoding device can read the code header portion map, and take the value of the corresponding HTTP header record for the bit of 1; the decoding device can read the first line of the HTTP message body, that is, Request-Line, if When the OxFF character is encountered, the value N of the following byte is read, and then N+3 bytes are taken in the corresponding position in the recorded URI; if there is no HTTP version number information in the first line, the recorded HTTP version number information is taken. For example, the decoding device reads the first byte of each line of the HTTP message. If the byte is the encoding of the HTTP header, the character recovers the header and the colon ":" and the space "", for example, User-Agent is encoded as 29, the first byte is "User-Agent:" if it is "OxlD"; For subsequent bytes, if OxFF character is encountered, the value of the next byte is read N Then, take N+3 bytes at the position corresponding to the value of the recorded encoding header, otherwise take the received original text; if the byte is not the encoding of the HTTP header, the line directly takes the original text, and does not need to be decompressed. In the embodiment of the present invention, optionally, as shown in FIG. 11, the method 200 further includes: S260, determining, according to the second compression indication and the sequence information in the received HTTP packet, the recorded HTTP packet. a first HTTP packet corresponding to the sequence information, where the second compression indication is used to indicate that the value of the second encoding header is the same as the value of the corresponding encoding header in the first HTTP packet;
S270,将该第一 HTTP报文中的相应编码头部的取值确定为该第二编码 头部的取值。  S270. Determine a value of the corresponding encoding header in the first HTTP packet as a value of the second encoding header.
在本发明实施例中, 可选地, 如图 12所示, 该方法 200还包括: S280, 根据该接收的 HTTP报文中的第三压缩指示以及第二字节数, 确 定与该第二字节数相关联的第二相同字节数, 其中该第三压缩指示用于表示 待解码的 URI被压缩;  In the embodiment of the present invention, optionally, as shown in FIG. 12, the method 200 further includes: S280, determining, according to the third compression indication and the second byte number in the received HTTP packet, the second a second identical number of bytes associated with the number of bytes, wherein the third compressed indication is used to indicate that the URI to be decoded is compressed;
S290,根据该第二相同字节数,将该已记录的 HTTP报文的 URI中相应 的连续第二相同字节数的字节,确定为该接收的 HTTP报文中待解码的 URI。  S290. Determine, according to the second identical number of bytes, a corresponding consecutive second identical number of bytes in the URI of the recorded HTTP message as the URI to be decoded in the received HTTP message.
因此, 本发明实施例的传输 HTTP报文的方法, 通过根据编码头部位图 的比特位的取值来确定该比特位相应的待解码的编码头部的取值, 与已记录 的 HTTP报文中的相应编码头部的取值是否相同,从而能够根据编码头部位 图确定接收的 HTTP报文中的编码头部及其取值, 由此能够减少连续 HTTP 报文中的相同字段占用的无线空口资源, 并能够提高资源使用效率。  Therefore, the method for transmitting an HTTP packet in the embodiment of the present invention determines the value of the encoding header to be decoded corresponding to the bit according to the value of the bit of the encoding header portion map, and the recorded HTTP packet. Whether the values of the corresponding coding headers in the text are the same, so that the coding header and its value in the received HTTP message can be determined according to the coding header part map, thereby reducing the occupation of the same field in the continuous HTTP message. Wireless air interface resources and can improve resource utilization efficiency.
在本发明实施例中, 当解码装置接收的 HTTP报文中没有 HTTP版本号 信息时,表示接收的 HTTP版本号信息与已记录的 HTTP报文中的版本号信 息相同, 由此可以将该已记录的 HTTP报文中的版本号信息确定为该接收的 HTTP报文的版本号信息; 反之, 当接收的 HTTP报文中存在 HTTP版本号 信息时,表示接收的 HTTP报文的 HTTP版本号信息与已记录的 HTTP报文 中的版本号信息不同, 此时, 接收的 HTTP报文中的版本号信息即为此次传 输的 HTTP报文的版本号信息。  In the embodiment of the present invention, when there is no HTTP version number information in the HTTP packet received by the decoding device, it indicates that the received HTTP version number information is the same as the version number information in the recorded HTTP packet, thereby The version number information of the received HTTP packet is determined as the version number information of the received HTTP packet. Conversely, when the HTTP version number information exists in the received HTTP packet, the HTTP version number information of the received HTTP packet is displayed. The version number information of the received HTTP packet is the version number information of the HTTP packet transmitted.
因此, 如图 13所示, 该方法 200还包括:  Therefore, as shown in FIG. 13, the method 200 further includes:
S300, 在确定该接收的 HTTP报文中没有 HTTP版本号信息时, 将该已 记录的 HTTP报文中的版本号信息确定为该接收的 HTTP报文的版本号信 在本发明实施例中, 接收端可以根据 PDCP头部的 PDU类型字段, 判 断该 PDCP PDU是否经过 HTTP头部编码压缩,该类型字段可以用于指示该 PDU包是否为经过头部编码压缩的 HTTP ^艮文。对于经过 HTTP头部编码压 缩 ( coding and compression ) 的包, 进行解码或解压缩。 S300, when determining that the received HTTP packet does not have the HTTP version number information, determining the version number information in the recorded HTTP packet as the version number of the received HTTP packet, in the embodiment of the present invention, The receiving end may determine, according to the PDU type field of the PDCP header, whether the PDCP PDU is compressed by HTTP header encoding, and the type field may be used to indicate the Whether the PDU packet is HTTP ^ encoded with header encoding compression. For packets that are encoded and compressed by HTTP, they are decoded or decompressed.
应理解, 在本发明实施例中, 通过对 HTTP报文进行编码, 可以实现对 HTTP 文进行压缩;类似地,通过对 HTTP 文进行解码,可以实现对 HTTP 报文进行解压缩, 但本发明实施例并不限于此。  It should be understood that, in the embodiment of the present invention, the HTTP message is compressed by encoding the HTTP message; similarly, the HTTP message is decompressed by decoding the HTTP file, but the present invention is implemented. The example is not limited to this.
具体而言, 在本发明实施例中, 如图 13所示, 该方法 200还包括: Specifically, in the embodiment of the present invention, as shown in FIG. 13, the method 200 further includes:
S310, 接收包括类型字段的协议数据单元 PDU包, 该类型字段用于指 示该 PDU包为经过头部编码和压缩的 HTTP ^艮文。 S310. Receive a protocol data unit PDU packet including a type field, where the type field is used to indicate that the PDU packet is a header encoded and compressed HTTP.
应理解,从编码装置的角度描述的编码方法与从解码装置的角度描述的 解码方法相应, 为了筒洁, 在此不再赘述。  It should be understood that the encoding method described from the perspective of the encoding device corresponds to the decoding method described from the perspective of the decoding device, and is not described herein again.
在本发明实施例中, 如图 14所示, 该方法 200还包括:  In the embodiment of the present invention, as shown in FIG. 14, the method 200 further includes:
S320, 在首次传输 HTTP报文时, 记录首次传输的 HTTP报文的编码头 部取值、 URI和 HTTP版本号信息;  S320, when encoding the HTTP packet for the first time, recording the encoding header value, URI, and HTTP version number information of the first transmitted HTTP packet;
S330, 在非首次传输 HTTP报文时, 根据该接收的 HTTP报文更新该已 记录的 HTTP报文。  S330: Update the recorded HTTP packet according to the received HTTP packet when the HTTP packet is not transmitted for the first time.
其中,可选地,该根据该接收的 HTTP报文更新该已记录的 HTTP报文, 包括:  Optionally, the updating the recorded HTTP packet according to the received HTTP packet includes:
如果该接收的 HTTP报文的编码头部取值和该已记录的 HTTP报文的编 码头部取值相同, 则保持该已记录的 HTTP报文的编码头部及其取值不变; 或  If the value of the encoding header of the received HTTP packet is the same as the value of the encoding header of the recorded HTTP packet, the encoding header of the recorded HTTP packet is kept unchanged; or
如果该接收的 HTTP报文的编码头部取值和该已记录的 HTTP报文的编 码头部取值不同, 则将该已记录的 HTTP报文中的编码头部取值替换为该接 收的 HTTP报文的编码头部取值; 或  If the value of the encoding header of the received HTTP packet is different from the value of the encoding header of the recorded HTTP packet, the value of the encoding header in the recorded HTTP packet is replaced by the received value. The encoding header of the HTTP packet takes the value; or
如果该已记录的 HTTP报文具有该接收的 HTTP报文不具有的编码头 部, 则保持该已记录的 HTTP报文的编码头部及其取值不变; 或  If the recorded HTTP packet has an encoding header that the received HTTP packet does not have, the encoding header of the recorded HTTP packet is kept unchanged; or
如果该接收的 HTTP报文具有该已记录的 HTTP报文不具有的编码头 部, 则记录该接收的 HTTP报文具有但该已记录的 HTTP报文不具有的编码 头部及其取值; 或  If the received HTTP packet has an encoding header that is not included in the recorded HTTP packet, record the received HTTP packet with an encoding header that the recorded HTTP packet does not have and its value; Or
如果该接收的 HTTP报文的版本号信息和该已记录的 HTTP报文的版本 号信息相同, 则保持该已记录的 HTTP报文的版本号信息不变; 或  If the version number information of the received HTTP packet is the same as the version number information of the recorded HTTP packet, the version number information of the recorded HTTP packet is kept unchanged; or
如果该接收的 HTTP报文的版本号信息和该已记录的 HTTP报文的版本 号信息不同, 则将该已记录的 HTTP报文中的版本号信息替换为该接收的 HTTP报文的版本号信息。 If the version number of the received HTTP packet and the version of the recorded HTTP packet If the number information is different, the version number information in the recorded HTTP packet is replaced with the version number information of the received HTTP packet.
应理解,在本发明实施例中, UE从 RRCJDLE状态转为 RRC_Connected 状态之后的第一次传输 HTTP Request报文, 可以称为首次传输 HTTP报文; UE 在服务无线网络子系统 ( Serving Radio Network Subsystem, 筒称为 "SRNS" ) 重定位完成, 收到开始 HTTP 头部编码和压缩 (START HTTP HEADER CODING AND COMPRESSION )信息之后的第一次传输 HTTP Request报文,也可以称为首次传输 HTTP报文。还应理解,首次传输的 HTTP Response报文也称为首次传输 HTTP报文, 本发明实施例并不限于此。  It should be understood that, in the embodiment of the present invention, the first transmission of the HTTP Request message after the UE transitions from the RRC JDLE state to the RRC_Connected state may be referred to as the first transmission of the HTTP message; the UE is in the serving radio network subsystem (Serving Radio Network Subsystem) , the cylinder is called "SRNS". The relocation is completed. The first HTTP HTTP transmission message is received after the start of the HTTP HTTP HEADER CODING AND COMPRESSION message. It can also be called the first transmission of the HTTP message. . It should be understood that the HTTP response packet transmitted for the first time is also referred to as the first transmission of the HTTP packet, and the embodiment of the present invention is not limited thereto.
在本发明实施例中, 当接收方不能正确解码和解压缩收到的数据时, 接 收方可以构造一个 PDCP PDU, 向发送方请求传输所记录的 URI、 HTTP版 本号、 编码头部取值等信息; 发送方收到此请求 PDU后, 可以向接收方发 送所记录的 URI、 HTTP版本号、 编码头部取值等信息。 如果接收方判断, 由于传输这些信息导致整体效率比不采用 HTTP头部编码压缩还要低时,可 暂停进行头部编码压缩。  In the embodiment of the present invention, when the receiver cannot correctly decode and decompress the received data, the receiver may construct a PDCP PDU, and request the sender to transmit the recorded URI, the HTTP version number, the encoding header value, and the like. After receiving the request PDU, the sender may send the recorded URI, HTTP version number, encoding header value and other information to the receiver. If the receiver determines that the overall efficiency is lower than if the HTTP header encoding is not used, the header encoding compression may be suspended.
应理解,从编码装置的角度描述的编码方法与从解码装置的角度描述的 解码方法相应, 为了筒洁, 在此不再赘述。  It should be understood that the encoding method described from the perspective of the encoding device corresponds to the decoding method described from the perspective of the decoding device, and is not described herein again.
还应理解, 在本发明的各种实施例中, 上述各过程的序号的大小并不意 味着执行顺序的先后, 各过程的执行顺序应以其功能和内在逻辑确定, 而不 应对本发明实施例的实施过程构成任何限定。  It should also be understood that, in various embodiments of the present invention, the size of the sequence numbers of the above processes does not imply a sequence of execution orders, and the order of execution of the processes should be determined by its function and internal logic, and should not be implemented by the present invention. The implementation of the examples constitutes any limitation.
因此, 本发明实施例的传输 HTTP报文的方法, 通过根据编码头部位图 的比特位的取值来确定该比特位相应的待解码的编码头部的取值, 与已记录 的 HTTP报文中的相应编码头部的取值是否相同,从而能够根据编码头部位 图确定接收的 HTTP报文中的编码头部及其取值, 由此能够减少连续 HTTP 报文中的相同字段占用的无线空口资源, 并能够提高资源使用效率。  Therefore, the method for transmitting an HTTP packet in the embodiment of the present invention determines the value of the encoding header to be decoded corresponding to the bit according to the value of the bit of the encoding header portion map, and the recorded HTTP packet. Whether the values of the corresponding coding headers in the text are the same, so that the coding header and its value in the received HTTP message can be determined according to the coding header part map, thereby reducing the occupation of the same field in the continuous HTTP message. Wireless air interface resources and can improve resource utilization efficiency.
在本发明实施例中, 为了实现 HTTP头部编码和压缩功能, 需要涉及控 制面的 UE能力上报和网络配置开启该功能的流程。  In the embodiment of the present invention, in order to implement the HTTP header encoding and compression function, a process involving the UE capability reporting of the control plane and the network configuration to enable the function is required.
例如, 如图 15所示, 在 S410中, UE向网络设备上报是否支持 HTTP 头哪编码和压缩能力 ( HTTP header coding and compression capability report ), 该网络设备例如为 RNC, 或该网络设备为 eNB, 本发明实施例并不限于此; 在 S420中, 如果网络设备也支持 HTTP头部编码和压缩功能, 则网络 设备可以配置用户设备, 以启动 HTTP头部编码和压缩功能(Enable HTTP header coding and compression algorithm ); For example, as shown in FIG. 15, in S410, the UE reports to the network device whether the HTTP header coding and compression capability report is supported, and the network device is, for example, an RNC, or the network device is an eNB. The embodiment of the present invention is not limited thereto; in S420, if the network device also supports the HTTP header encoding and compression function, the network The device can configure the user equipment to enable the HTTP header coding and compression algorithm (Enable HTTP header coding and compression algorithm);
在 S430中, UE 可以向网络设备回复响应消息 (Enable HTTP header coding and compression algorithm Response ), 以报告 HTTP头哪编码和压缩 功能的启动结果。  In S430, the UE may reply to the network device (Enable HTTP header coding and compression algorithm Response) to report the encoding result of the HTTP header and the startup result of the compression function.
在本发明实施例中, 普通的 RNC内的切换不涉及流程修改, 对于 RNC 间切换, 但不伴随 SRNS重定位, 且源 ( Source ) RNC支持 HTTP头部编 码和压缩, 目标( Target ) RNC不支持 HTTP头部编码和压缩的场景下, 源 RNC判决要进行 RNC间切换, 且不伴随 SRNS重定位, 并通过后台配置查 询到目标 RNC不支持 HTTP头部编码和压缩, 则源 RNC可以向 UE发送停 止 HTTP 头部编码和压缩 ( STOP HTTP HEADER CODING AND COMPRESSION )消息, 通知 UE停止使用 HTTP头部编码和压缩功能; 之 后, 源 RNC、 目标 RNC和 UE共同执行切换流程。  In the embodiment of the present invention, the handover in the normal RNC does not involve process modification, for inter-RNC handover, but not with SRNS relocation, and the source RNC supports HTTP header coding and compression, and the target RNC does not. In the scenario of supporting HTTP header encoding and compression, the source RNC decides to perform inter-RNC handover without SRNS relocation, and through the background configuration query to the target RNC does not support HTTP header encoding and compression, the source RNC may go to the UE. The STOP HTTP HEADER CODING AND COMPRESSION message is sent to inform the UE to stop using the HTTP header encoding and compression function; after that, the source RNC, the target RNC, and the UE jointly perform the handover procedure.
在本发明实施例中, 在 SRNS重定位过程中, 网络侧的 PDCP实体从源 RNC转移到了目标 RNC, 此时可以分为三种情况: 1 )源 RNC和目标 RNC 均支持 HTTP头部编码和压缩功能; 2 ) 源 RNC支持 HTTP 头部编码和压 缩功能, 目标 RNC不支持 HTTP 头部编码和压缩功能; 3 ) 源 RNC不支持 HTTP头部编码和压缩功能, 目标 RNC支持 HTTP头部编码和压缩功能。  In the embodiment of the present invention, in the SRNS relocation process, the PDCP entity on the network side is transferred from the source RNC to the target RNC, and can be divided into three cases: 1) Both the source RNC and the target RNC support HTTP header coding and Compression function; 2) The source RNC supports HTTP header encoding and compression, the target RNC does not support HTTP header encoding and compression; 3) The source RNC does not support HTTP header encoding and compression, and the target RNC supports HTTP header encoding and compression. Compression function.
1 ) 源 RNC和目标 RNC均支持 HTTP头部编码和压缩功能( HTTP header coding and compression ), 在此场景下, SRNS重定位的流程如图 16 所示。  1) Both the source RNC and the target RNC support HTTP header coding and compression. In this scenario, the SRNS relocation process is shown in Figure 16.
在 S510 中, 源 RNC 向核心网 CN发送重定位要求(RELOCATION REQUIRED )消息,该重定位要求消息的信息元素 IE "Source RNC To Target RNC Transparent Container" 中可以新增已启动 HTTP 头部编码压缩的 IE "HTTP header coding and compression on-going" , 以及记录的之前编码头哪 取值信息的 IE "HTTP header coding and compression context"。  In S510, the source RNC sends a relocation request (RELOCATION REQUIRED) message to the core network CN, and the information element IE "Source RNC To Target RNC Transparent Container" of the relocation request message may be added with the HTTP header encoding compression enabled. IE "HTTP header coding and compression on-going", and the IE "HTTP header coding and compression context" of the previous encoding header.
在 S520中, CN向目标 RNC发送重定位请求( RELOCATION REQUEST ) 消息, 该重定位请求消息中可以包括重定位要求 ( RELOCATION REQUIRED )消息中的 IE"Source RNC To Target RNC Transparent Container"。  In S520, the CN sends a relocation request (RELOCATION REQUEST) message to the target RNC, where the relocation request message may include an IE "Source RNC To Target RNC Transparent Container" in the RELOCATION REQUIRED message.
在 S530 中, 目标 RNC 向 CN发送重定位请求应答(RELOCATION In S530, the target RNC sends a relocation request response (RELOCATION) to the CN.
REQUEST ACKNOWLEDGE ) 消息, 该重定位请求应答消息的 IE "Target RNC To Source RNC Transparent Container" 中可以新增 IE "Target RNC support HTTP header coding and compression"。 REQUEST ACKNOWLEDGE ) message, the IE "Target" of the relocation request reply message IE "Target RNC support HTTP header coding and compression" can be added to RNC To Source RNC Transparent Container".
在 S540中, CN向源 RNC发送重定位命令( RELOCATION COMMAND ) 消息, 该重定位命令消息中可以包括重定位请求应答 ( RELOCATION REQUEST ACKNOWLEDGE ) 消息中的 IE "Target RNC To Source RNC Transparent Container"。  In S540, the CN sends a relocation command (RELOCATION COMMAND) message to the source RNC, where the relocation command message may include an IE "Target RNC To Source RNC Transparent Container" in the RELOCATION REQUEST ACKNOWLEDGE message.
由此, 源 RNC可以获知目标 RNC也支持 HTTP头部编码和压缩功能, 从而相关网元可以执行重定位流程。  Therefore, the source RNC can know that the target RNC also supports the HTTP header encoding and compression function, so that the related network element can perform the relocation process.
2 ) 源 RNC支持 HTTP头部编码和压缩功能,目标 RNC不支持 HTTP 头部编码和压缩功能, 在此场景下, SRNS重定位的流程如图 17所示。  2) The source RNC supports the HTTP header encoding and compression function. The target RNC does not support the HTTP header encoding and compression function. In this scenario, the SRNS relocation process is shown in Figure 17.
在 S610中, 源 RNC向 CN发重定位要求( RELOCATION REQUIRED ) 消息, 该重定位要求消息的 IE "Source RNC To Target RNC Transparent Container"中可以新增已启动 HTTP头部编码压缩的 IE "HTTP header coding and compression on-going" , 以及记录的之前编码头部取值信息的 IE "HTTP header coding and compression context"。  In S610, the source RNC sends a relocation request (RELOCATION REQUIRED) message to the CN, and the IE "Source RNC To Target RNC Transparent Container" of the relocation request message may add an IE "HTTP header" that has started HTTP header encoding compression. Coding and compression on-going" , and the IE "HTTP header coding and compression context" of the previously encoded header value information.
在 S620中, CN向目标 RNC发送重定位请求( RELOCATION REQUEST ) 消息, 其中可以包括重定位要求( RELOCATION REQUIRED ) 消息中的 IE "Source RNC To Target RNC Transparent Container"。  In S620, the CN sends a Relocation Request (RELOCATION REQUEST) message to the target RNC, which may include an IE "Source RNC To Target RNC Transparent Container" in the RELOCATION REQUIRED message.
在 S630 中, 目标 RNC 向 CN发送重定位请求应答(RELOCATION REQUEST ACKNOWLEDGE )消息, 在该重定位请求应答消息的 IE "Target RNC To Source RNC Transparent Container"中,可以新增 IE "Target RNC NOT support HTTP header coding and compression" ,或者可以在 IE "Target RNC To Source RNC Transparent Container" 中不包括 IE "Target RNC support HTTP header coding and compression"。  In S630, the target RNC sends a RELOCATION REQUEST ACKNOWLEDGE message to the CN. In the IE "Target RNC To Source RNC Transparent Container" of the relocation request response message, an IE "Target RNC NOT support HTTP" may be added. Header coding and compression" , or IE "Target RNC support HTTP header coding and compression" may not be included in IE "Target RNC To Source RNC Transparent Container".
在 S640中, CN向源 RNC发送重定位命令( RELOCATION COMMAND ) 消息, 其中可以包括重定位请求应答 ( RELOCATION REQUEST ACKNOWLEDGE ) 消息中的 IE "Target RNC To Source RNC Transparent Container"。  In S640, the CN sends a relocation command (RELOCATION COMMAND) message to the source RNC, which may include an IE "Target RNC To Source RNC Transparent Container" in the RELOCATION REQUEST ACKNOWLEDGE message.
在 S650中,源 RNC向 UE发送停止 HTTP头部编码和压缩功能( STOP HTTP HEADER CODING AND COMPRESSION ) 消息, 通知 UE停止使用 HTTP头部编码和压缩功能。 由此, 各相关网元执行重定位流程。 In S650, the source RNC sends a Stop ACK HTTP HEADER CODING AND COMPRESSION message to the UE, informing the UE to stop using the HTTP header encoding and compression function. Thereby, each related network element performs a relocation process.
对于上述流程,也可以对现有消息不做任何修改, 而是可以通过源 RNC 查询后台配置, 获得目标 RNC是否支持该功能的信息, 然后源 RNC接收到 CN 的重定位命令 ( RELOCATION COMMAND ) 消息后, 可以直接向 UE 发送停止 HTTP头部编码和压缩功能( STOP HTTP HEADER CODING AND COMPRESSION ) 消息, 通知 UE停止使用 HTTP头部编码和压缩功能。  For the above process, the existing message can be modified without any modification. Instead, the source RNC can query the background configuration to obtain information about whether the target RNC supports the function, and then the source RNC receives the CN relocation command (RELOCATION COMMAND) message. After that, the UE can directly send a message to the UE to stop the HTTP header encoding and compression (STOP HTTP HEADER CODING AND COMPRESSION), and notify the UE to stop using the HTTP header encoding and compression function.
3 )源 RNC不支持 HTTP头部编码和压缩功能,目标 RNC支持 HTTP头 部编码和压缩功能, 在此场景下, SRNS重定位的流程如图 18所示。  3) The source RNC does not support HTTP header encoding and compression. The target RNC supports HTTP header encoding and compression. In this scenario, the SRNS relocation process is shown in Figure 18.
在 S710中,源 RNC向 CN发送重定位要求( RELOCATION REQUIRED ) 消息, 该重定位要求消息的 IE "Source RNC To Target RNC Transparent Container " 中的 IE "UE radio access Capability" 的 IE "PDCP capability" 中 , 可以新增 IE "HTTP header coding and compression capability"。  In S710, the source RNC sends a relocation request (RELOCATION REQUIRED) message to the CN, where the IE "Source radio access Capability" in the IE "Source RNC To Target RNC Transparent Container" of the relocation request message is in the IE "PDCP capability" , you can add IE "HTTP header coding and compression capability".
在 S720中, CN向目标 RNC发送重定位请求( RELOCATION REQUEST ) 消息, 其中可以包括重定位要求( RELOCATION REQUIRED ) 消息中的 IE "Source RNC To Target RNC Transparent Container"。  In S720, the CN sends a Relocation Request (RELOCATION REQUEST) message to the target RNC, which may include an IE "Source RNC To Target RNC Transparent Container" in the RELOCATION REQUIRED message.
在 S730 中, 目标 RNC 向 CN发送重定位请求应答(RELOCATION REQUEST ACKNOWLEDGE )消息,其中可以包括 IE "Target RNC To Source RNC Transparent Container"。  In S730, the target RNC sends a RELOCATION REQUEST ACKNOWLEDGE message to the CN, which may include the IE "Target RNC To Source RNC Transparent Container".
在 S740 中, CN 向目标 RNC 发送重定位命令 ( RELOCATION COMMAND ) 消息, 其中可以包括重定位请求应答 ( RELOCATION REQUEST ACKNOWLEDGE ) 消息中的 IE "Target RNC To Source RNC Transparent Container"。  In S740, the CN sends a Relocation Command (RELOCATION COMMAND) message to the target RNC, which may include the IE "Target RNC To Source RNC Transparent Container" in the RELOCATION REQUEST ACKNOWLEDGE message.
在 S750中, 在相关网元执行重定位流程后, 由于网络设备和 UE均支 持 HTTP头部编码和压缩功能, 目标 RNC向 UE发送启动 HTTP头部编码 和压缩功能( START HTTP HEADER CODING AND COMPRESSION )消息, 通知 UE开始使用 HTTP 头部编码和压缩功能。  In S750, after the re-location process is performed by the relevant network element, since both the network device and the UE support the HTTP header encoding and compression function, the target RNC sends a start HTTP header encoding and compression function (START HTTP HEADER CODING AND COMPRESSION) to the UE. The message informs the UE to start using HTTP header encoding and compression.
对于上述流程, 也可以对现有消息不做任何修改, 例如, 重定位流程完 成后, 新的 RNC向 UE发送能力查询消息, UE回复自己的能力, 携带是否 支持 HTTP头部编码和压缩功能的信息, 若 UE支持该功能, 则新的 RNC 向 UE 发送启动 HTTP 头部编码和压缩功能 (START HTTP HEADER CODING AND COMPRESSION ) 消息, 通知 UE开始使用 HTTP头部编码 和压缩功能。 For the above process, the existing message can be modified. For example, after the relocation process is completed, the new RNC sends a capability query message to the UE, and the UE replies to its own capability, and carries whether to support HTTP header coding and compression. Information, if the UE supports the function, the new RNC sends a START HTTP HEADER CODING AND COMPRESSION message to the UE, informing the UE to start using the HTTP header encoding. And compression.
应理解, 当用户设备和网络设备记录多个 HTTP报文时, 网络配置启动 HTTP 头部编码和压缩功能的消息 ( Enable HTTP header coding and compression algorithm ),和重定位后目标 RNC向 UE发送的启动 HTTP 头部 编码和压缩功能( START HTTP HEADER CODING AND COMPRESSION ) 消息中可以携带配置参数 M, M代表记录中保存的编码头部取值的个数。  It should be understood that when the user equipment and the network device record multiple HTTP messages, the network configuration initiates an HTTP header coding and compression algorithm, and the target RNC sends the UE to the UE. The HTTP HTTP header encoding and compression function (START HTTP HEADER CODING AND COMPRESSION ) message can carry the configuration parameter M, and M represents the number of values of the encoding header stored in the record.
因此, 本发明实施例的传输 HTTP报文的方法, 通过编码头部位图的比 特位的取值来指示为该比特位相应的待传输的编码头部的取值, 与已记录的 HTTP报文中的相应编码头部的取值是否相同, 并且不传输取值相同的编码 头部, 从而能够减少连续 HTTP报文中的相同字段占用的无线空口资源, 由 此能够提高资源使用效率。  Therefore, the method for transmitting an HTTP message in the embodiment of the present invention indicates, by using the value of the bit of the encoding header part map, the value of the encoding header to be transmitted corresponding to the bit, and the recorded HTTP packet. The value of the corresponding encoding header in the text is the same, and the encoding headers with the same value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resource utilization efficiency.
上文中结合图 1 至图 18, 详细描述了根据本发明实施例的传输 HTTP 报文的方法,下面将结合图 19至图 34,详细描述根据本发明实施例的 HTTP 报文的编码装置和解码装置。  The method for transmitting an HTTP message according to an embodiment of the present invention is described in detail above with reference to FIG. 1 to FIG. 18. The encoding device and decoding of an HTTP message according to an embodiment of the present invention will be described in detail below with reference to FIG. 19 to FIG. Device.
图 19示出了根据本发明实施例的编码装置 800的示意性框图。 如图 19 所示, 该编码装置 800包括:  Fig. 19 shows a schematic block diagram of an encoding device 800 in accordance with an embodiment of the present invention. As shown in Fig. 19, the encoding device 800 includes:
第一确定模块 810, 用于确定编码头部位图的每个比特位的取值, 各个 该比特位的取值分别指示为该比特位相应的待传输的编码头部的取值与已 记录的 HTTP报文中的相应编码头部的取值是否相同;  The first determining module 810 is configured to determine a value of each bit of the coding header part map, where the value of each bit is respectively indicated as the value of the coding head to be transmitted corresponding to the bit and the recorded value Whether the value of the corresponding encoding header in the HTTP packet is the same;
传输模块 820, 用于根据该第一确定模块 810确定的该每个比特位的取 值, 生成并传输包括该编码头部位图的待传输的 HTTP报文, 以便于该待传 输的 HTTP报文的接收方根据该编码头部位图和该已记录的 HTTP报文,确 定该待传输的 HTTP报文中编码头部取值与该已记录的 HTTP报文中的相应 编码头部的取值相同的第一编码头部以及该第一编码头部的取值。  The transmitting module 820 is configured to generate, according to the value of each bit determined by the first determining module 810, an HTTP packet to be transmitted that includes the encoding header part map, to facilitate the HTTP packet to be transmitted. The receiving end of the text determines the value of the encoding header in the HTTP packet to be transmitted and the corresponding encoding header in the recorded HTTP packet according to the encoding header part map and the recorded HTTP packet. The first encoding header having the same value and the value of the first encoding header.
因此, 本发明实施例的 HTTP报文的编码装置, 通过编码头部位图的比 特位的取值来指示为该比特位相应的待传输的编码头部的取值, 与已记录的 HTTP报文中的相应编码头部的取值是否相同, 并且不传输取值相同的编码 头部, 从而能够减少连续 HTTP报文中的相同字段占用的无线空口资源, 由 此能够提高资源使用效率。  Therefore, the encoding apparatus of the HTTP packet in the embodiment of the present invention indicates the value of the encoding header to be transmitted corresponding to the bit by using the value of the bit of the encoding header part map, and the recorded HTTP packet. The value of the corresponding encoding header in the text is the same, and the encoding headers with the same value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resource utilization efficiency.
在本发明实施例中, 可选地, 如图 20所示, 该编码装置 800还包括: 第二确定模块 830, 用于确定待传输的编码头部中取值与该已记录的 HTTP报文中的相应编码头部的取值不同的第二编码头部, 以及该第二编码 头部的取值; In the embodiment of the present invention, optionally, as shown in FIG. 20, the encoding apparatus 800 further includes: a second determining module 830, configured to determine a value in the encoding header to be transmitted and the recorded value a second encoding header having a different value of the corresponding encoding header in the HTTP packet, and a value of the second encoding header;
第三确定模块 840, 用于确定该第二确定模块 830确定的该第二编码头 部的头部编码, 该头部编码用于指代该第二编码头部;  a third determining module 840, configured to determine a header encoding of the second encoding header determined by the second determining module 830, where the header encoding is used to refer to the second encoding header;
其中, 该传输模块 820用于: 根据该第一确定模块 810确定的该每个比 特位的取值、该第三确定模块 840确定的该第二编码头部的头部编码以及该 第二确定模块 830确定的该第二编码头部的取值, 生成并传输该待传输的 HTTP报文。  The transmission module 820 is configured to: determine, according to the value of the bit determined by the first determining module 810, a header code of the second encoding header determined by the third determining module 840, and the second determining The value of the second encoding header determined by the module 830 is generated and transmitted, and the HTTP packet to be transmitted is generated and transmitted.
在本发明实施例中, 可选地, 如图 21所示, 该编码装置 800还包括: 第四确定模块 850, 用于确定第一压缩指示以及第一字节数, 该第一压 缩指示用于表示该第二编码头部的取值被压缩, 该第一字节数与第一相同字 节数相关联, 该第一相同字节数为待传输的该第二编码头部的取值与该已记 其中, 该传输模块 820用于: 根据该第一确定模块 810确定的该每个比 特位的取值、 该第三确定模块 840确定的该第二编码头部的头部编码、 该第 四确定模块 850确定的该第一压缩指示以及该第一字节数, 生成并传输该待 传输的 HTTP报文。  In the embodiment of the present invention, optionally, as shown in FIG. 21, the encoding apparatus 800 further includes: a fourth determining module 850, configured to determine a first compression indication and a first number of bytes, where the first compression indication is used The value indicating the second encoding header is compressed, and the first byte number is associated with the first identical number of bytes, where the first identical number of bytes is the value of the second encoding header to be transmitted. And the transmission module 820 is configured to: determine, according to the value of the each bit determined by the first determining module 810, the header code of the second encoding header determined by the third determining module 840, The first compression indicator determined by the fourth determining module 850 and the first number of bytes generate and transmit the HTTP message to be transmitted.
在本发明实施例中, 可选地, 如图 22所示, 该编码装置 800还包括: 第五确定模块 860, 用于确定第二压缩指示以及第一 HTTP报文在该已 记录的 HTTP报文中的次序信息, 其中, 该第二压缩指示用于表示该第二编 码头部的取值与相应于该次序信息的该第一 HTTP报文中的相应编码头部的 取值相同;  In the embodiment of the present invention, optionally, as shown in FIG. 22, the encoding apparatus 800 further includes: a fifth determining module 860, configured to determine a second compression indication, and the first HTTP packet is in the recorded HTTP report. The order information in the text, where the second compression indication is used to indicate that the value of the second encoding header is the same as the value of the corresponding encoding header in the first HTTP packet corresponding to the order information;
其中, 该传输模块 820用于: 根据该第一确定模块 810确定的该每个比 特位的取值、 该第三确定模块 840确定的该第二编码头部的头部编码、 该第 五确定模块 860确定的该第二压缩指示以及该次序信息, 生成并传输该待传 输的 HTTP报文。  The transmission module 820 is configured to: determine, according to the value of the bit determined by the first determining module 810, a header code of the second encoding header determined by the third determining module 840, and the fifth determining The second compression indication determined by the module 860 and the sequence information generate and transmit the HTTP message to be transmitted.
在本发明实施例中, 可选地, 如图 23所示, 该编码装置 800还包括: 第六确定模块 870, 用于确定第三压缩指示以及第二字节数, 该第三压 缩指示用于表示待传输的通用资源标识符 URI被压缩,该第二字节数与第二 相同字节数相关联, 该第二相同字节数为待传输的 URI与该已记录的 HTTP 报文中的 URI连续相同的字节数; 其中, 该传输模块 820用于: 根据该第一确定模块 810确定的该每个比 特位的取值、该第六确定模块 870确定的该第三压缩指示以及该第二字节数, 生成并传输该待传输的 HTTP ^艮文。 In the embodiment of the present invention, optionally, as shown in FIG. 23, the encoding apparatus 800 further includes: a sixth determining module 870, configured to determine a third compression indication and a second number of bytes, where the third compression indication is used The universal resource identifier URI indicating that the second Byte is to be transmitted is associated with the second identical number of bytes, the second identical number of bytes being the URI to be transmitted and the recorded HTTP message. The URIs are consecutively the same number of bytes; The transmission module 820 is configured to: generate, according to the value of the each bit determined by the first determining module 810, the third compression indication determined by the sixth determining module 870, and the second number of bytes. Transmit the HTTP ^ message to be transmitted.
在本发明实施例中, 可选地, 如图 24所示, 该编码装置 800还包括: 第七确定模块 880, 用于确定待传输的 HTTP版本号信息与该已记录的 In the embodiment of the present invention, optionally, as shown in FIG. 24, the encoding apparatus 800 further includes: a seventh determining module 880, configured to determine the HTTP version number information to be transmitted and the recorded
HTTP报文中的版本号信息是否相同; Whether the version number information in the HTTP packet is the same;
其中, 该传输模块 820用于:  The transmission module 820 is configured to:
在该第七确定模块 880确定该待传输的 HTTP版本号信息与该已记录的 HTTP报文中的版本号信息相同时, 根据该每个比特位的取值, 生成并传输 该待传输的 HTTP报文, 该待传输的 HTTP报文包括该编码头部位图;  When the seventh determining module 880 determines that the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP message, the HTTP to be transmitted is generated and transmitted according to the value of each bit. a packet, the HTTP message to be transmitted includes the code header portion map;
在该第七确定模块 880确定该待传输的 HTTP版本号信息与该已记录的 HTTP报文中的版本号信息不同时, 根据该每个比特位的取值以及该待传输 的 HTTP版本号信息,生成并传输该待传输的 HTTP报文,该待传输的 HTTP 报文包括该编码头部位图和该待传输的 HTTP版本号信息。  When the seventh determining module 880 determines that the HTTP version number information to be transmitted is different from the version number information in the recorded HTTP message, the value of each bit and the HTTP version number to be transmitted are determined according to the value of the bit number. The HTTP message to be transmitted is generated and transmitted, and the HTTP message to be transmitted includes the code header part map and the HTTP version number information to be transmitted.
在本发明实施例中, 可选地, 该传输模块 820用于:  In the embodiment of the present invention, optionally, the transmission module 820 is configured to:
根据该每个比特位的取值, 生成并传输包括类型字段的协议数据单元 PDU包, 该类型字段用于指示该 PDU包为经过头部编码和压缩的 HTTP报 文。  And according to the value of each bit, a protocol data unit PDU packet including a type field is generated and transmitted, and the type field is used to indicate that the PDU packet is a header encoded and compressed HTTP message.
在本发明实施例中, 可选地, 如图 25所示, 该编码装置 800还包括: 记录模块 890, 用于在首次传输 HTTP报文时, 记录首次传输的 HTTP In the embodiment of the present invention, optionally, as shown in FIG. 25, the encoding apparatus 800 further includes: a recording module 890, configured to record the HTTP transmitted for the first time when transmitting the HTTP packet for the first time.
4艮文的编码头部取值、 URI和 HTTP版本号信息; 4 encoding the encoding header value, URI and HTTP version number information;
更新模块 895,用于在非首次传输 HTTP报文时,根据该待传输的 HTTP 报文更新该已记录的 HTTP报文。  The update module 895 is configured to update the recorded HTTP message according to the HTTP message to be transmitted when the HTTP message is not transmitted for the first time.
在本发明实施例中, 可选地, 该更新模块 895用于:  In the embodiment of the present invention, the update module 895 is optionally used to:
如果该待传输的 HTTP报文的编码头部取值和该已记录的 HTTP报文的 编码头部取值相同,则保持该已记录的 HTTP报文的编码头部及其取值不变; 或  If the value of the encoding header of the HTTP packet to be transmitted is the same as the value of the encoding header of the recorded HTTP packet, the encoding header of the recorded HTTP packet and the value thereof are kept unchanged; Or
如果该待传输的 HTTP报文的编码头部取值和该已记录的 HTTP报文的 编码头部取值不同, 则将该已记录的 HTTP报文中的编码头部取值替换为该 待传输的 HTTP报文的编码头部取值; 或  If the value of the encoding header of the HTTP packet to be transmitted is different from the value of the encoding header of the HTTP packet, the value of the encoding header in the recorded HTTP packet is replaced with the value of the encoding header. The value of the encoding header of the transmitted HTTP packet; or
如果该已记录的 HTTP报文具有该待传输的 HTTP报文不具有的编码头 部, 则保持该已记录的 HTTP报文的编码头部及其取值不变; 或 如果该待传输的 HTTP报文具有该已记录的 HTTP报文不具有的编码头 部, 则记录该待传输的 HTTP报文具有但该已记录的 HTTP报文不具有的编 码头部及其取值; 或 If the recorded HTTP packet has an encoding header that the HTTP packet to be transmitted does not have And maintaining the encoding header of the recorded HTTP packet and its value unchanged; or if the HTTP packet to be transmitted has an encoding header that the recorded HTTP packet does not have, The transmitted HTTP packet has an encoding header that the recorded HTTP packet does not have and its value; or
如果该待传输的 HTTP报文的版本号信息和该已记录的 HTTP报文的版 本号信息相同, 则保持该已记录的 HTTP报文的版本号信息不变; 或  If the version number information of the HTTP packet to be transmitted is the same as the version number information of the recorded HTTP packet, the version number information of the recorded HTTP packet is kept unchanged; or
如果该待传输的 HTTP报文的版本号信息和该已记录的 HTTP报文的版 本号信息不同, 则将该已记录的 HTTP报文中的版本号信息替换为该待传输 的 HTTP报文的版本号信息。  If the version number information of the HTTP packet to be transmitted is different from the version number of the HTTP packet, the version number information of the recorded HTTP packet is replaced with the HTTP packet to be transmitted. Version number information.
应理解,根据本发明实施例的 HTTP报文的编码装置 800可对应于本发 明实施例中的传输 HTTP报文的方法的发送方, 并且编码装置 800中的各个 模块的上述和其它操作和 /或功能分别为了实现图 1至图 18中的各个方法的 相应流程, 为了筒洁, 在此不再赘述。  It should be understood that the encoding apparatus 800 of the HTTP message according to the embodiment of the present invention may correspond to the sender of the method for transmitting the HTTP message in the embodiment of the present invention, and the above and other operations of the respective modules in the encoding apparatus 800 and/or For the purpose of implementing the corresponding processes of the respective methods in FIG. 1 to FIG. 18, the functions are not described herein.
因此, 本发明实施例的 HTTP报文的编码装置, 通过编码头部位图的比 特位的取值来指示为该比特位相应的待传输的编码头部的取值, 与已记录的 HTTP报文中的相应编码头部的取值是否相同, 并且不传输取值相同的编码 头部, 从而能够减少连续 HTTP报文中的相同字段占用的无线空口资源, 由 此能够提高资源使用效率。  Therefore, the encoding apparatus of the HTTP packet in the embodiment of the present invention indicates the value of the encoding header to be transmitted corresponding to the bit by using the value of the bit of the encoding header part map, and the recorded HTTP packet. The value of the corresponding encoding header in the text is the same, and the encoding headers with the same value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resource utilization efficiency.
如图 26所示, 本发明实施例还提供了一种解码装置, 该解码装置 900 包括:  As shown in FIG. 26, an embodiment of the present invention further provides a decoding apparatus, where the decoding apparatus 900 includes:
获耳 5Uf莫块 910, 用于获取接收的 HTTP报文中的编码头部位图的每个比 特位的取值;  The earphone 5Uf block 910 is configured to obtain the value of each bit position of the coded header part map in the received HTTP message;
第一确定模块 920, 用于在该获取模块 910获取的该编码头部位图的第 一比特位的取值指示为该第一比特位相应的待解码的第一编码头部的取值 与已记录的 HTTP 报文中的相应编码头部的取值相同时, 将该已记录的 HTTP报文中的与该第一比特位相应的编码头部及其取值, 分别确定为该第 一编码头部以及该第一编码头部的取值。  The first determining module 920 is configured to: the value of the first bit of the coded part location map obtained by the acquiring module 910 is the value of the first encoding header to be decoded corresponding to the first bit When the value of the corresponding encoding header in the recorded HTTP packet is the same, the encoding header corresponding to the first bit in the recorded HTTP packet and the value thereof are respectively determined as the first The encoding header and the value of the first encoding header.
因此, 本发明实施例的 HTTP报文的解码装置, 通过根据编码头部位图 的比特位的取值来确定该比特位相应的待解码的编码头部的取值, 与已记录 的 HTTP报文中的相应编码头部的取值是否相同,从而能够根据编码头部位 图确定接收的 HTTP报文中的编码头部及其取值, 由此能够减少连续 HTTP 报文中的相同字段占用的无线空口资源, 并能够提高资源使用效率。 Therefore, the decoding apparatus of the HTTP packet in the embodiment of the present invention determines the value of the encoding header to be decoded corresponding to the bit according to the value of the bit of the encoding header part map, and the recorded HTTP packet. Whether the values of the corresponding coding headers in the text are the same, so that the coding header and its value in the received HTTP message can be determined according to the coding header part map, thereby reducing continuous HTTP. The wireless air interface resources occupied by the same field in the packet can improve the resource usage efficiency.
在本发明实施例中, 可选地, 如图 27所示, 该解码装置 900还包括: 第二确定模块 930, 用于在该获取模块 910获取的该编码头部位图的第 二比特位的取值指示为该第二比特位相应的待解码的第二编码头部的取值 与已记录的 HTTP 报文中的相应编码头部的取值不同时, 根据该接收的 In the embodiment of the present invention, optionally, as shown in FIG. 27, the decoding apparatus 900 further includes: a second determining module 930, configured to acquire, by the acquiring module 910, the second bit of the encoding header part map If the value of the second encoding header corresponding to the second bit is different from the value of the corresponding encoding header in the recorded HTTP packet, according to the received
HTTP报文中的头部编码, 确定该头部编码指代的该第二编码头部。 The header encoding in the HTTP message determines the second encoding header that the header encoding refers to.
在本发明实施例中, 可选地, 如图 28所示, 该解码装置 900还包括: 第三确定模块 940, 用于根据该接收的 HTTP报文中的第一压缩指示以 及第一字节数, 确定与该第一字节数相关联的第一相同字节数, 其中该第一 压缩指示用于表示该第二编码头部的取值被压缩;  In the embodiment of the present invention, optionally, as shown in FIG. 28, the decoding apparatus 900 further includes: a third determining module 940, configured to: according to the first compression indication and the first byte in the received HTTP packet And determining a first identical number of bytes associated with the first number of bytes, wherein the first compression indication is used to indicate that the value of the second encoding header is compressed;
第四确定模块 950, 用于根据该第三确定模块 940确定的该第一相同字 节数,将该已记录的 HTTP报文中的相应编码头部的取值中相应的连续第一 相同字节数的字节, 确定为该第二编码头部的待解码的取值。  a fourth determining module 950, configured to determine, according to the first identical number of bytes determined by the third determining module 940, a corresponding consecutive first identical word in the value of the corresponding encoding header in the recorded HTTP packet The byte of the number of sections is determined as the value to be decoded of the second encoding header.
在本发明实施例中, 可选地, 如图 29所示, 该解码装置 900还包括: 第五确定模块 960, 用于根据该接收的 HTTP报文中的第二压缩指示以 及次序信息, 确定该已记录的 HTTP报文中与该次序信息相应的第一 HTTP 报文,其中,该第二压缩指示用于表示该第二编码头部的取值与该第一 HTTP 报文中的相应编码头部的取值相同;  In the embodiment of the present invention, optionally, as shown in FIG. 29, the decoding apparatus 900 further includes: a fifth determining module 960, configured to determine, according to the second compression indication and the sequence information in the received HTTP packet, a first HTTP packet corresponding to the sequence information in the recorded HTTP packet, where the second compression indication is used to indicate the value of the second encoding header and the corresponding encoding in the first HTTP packet. The value of the head is the same;
第六确定模块 970, 用于将该第五确定模块 960确定的该第一 HTTP报 文中的相应编码头部的取值确定为该第二编码头部的取值。  The sixth determining module 970 is configured to determine, by the fifth determining module 960, a value of a corresponding encoding header in the first HTTP packet as a value of the second encoding header.
在本发明实施例中, 可选地, 如图 30所示, 该解码装置 900还包括: 第七确定模块 980, 用于根据该接收的 HTTP报文中的第三压缩指示以 及第二字节数, 确定与该第二字节数相关联的第二相同字节数, 其中该第三 压缩指示用于表示待解码的 URI被压缩;  In the embodiment of the present invention, optionally, as shown in FIG. 30, the decoding apparatus 900 further includes: a seventh determining module 980, configured to: according to the third compressed indication and the second byte in the received HTTP packet a second identical number of bytes associated with the second number of bytes, wherein the third compressed indication is used to indicate that the URI to be decoded is compressed;
第八确定模块 990, 用于根据该第七确定模块 980确定的该第二相同字 节数 ,将该已记录的 HTTP报文的 URI中相应的连续第二相同字节数的字节, 确定为该接收的 HTTP报文中待解码的 URI。  The eighth determining module 990 is configured to determine, according to the second identical number of bytes determined by the seventh determining module 980, a corresponding consecutive second identical number of bytes in the URI of the recorded HTTP message. The URI to be decoded in the received HTTP message.
在本发明实施例中, 可选地, 如图 31所示, 该解码装置 900还包括: 第九确定模块 991 , 用于在确定该接收的 HTTP报文中没有 HTTP版本 号信息时, 将该已记录的 HTTP报文中的版本号信息确定为该接收的 HTTP 报文的版本号信息。 在本发明实施例中, 可选地, 如图 31所示, 该解码装置 900还包括: 接收模块 992,用于接收包括类型字段的协议数据单元 PDU包,该类型 字段用于指示该 PDU包为经过头部编码和压缩的 HTTP ^艮文。 In the embodiment of the present invention, optionally, as shown in FIG. 31, the decoding apparatus 900 further includes: a ninth determining module 991, configured to: when it is determined that the received HTTP packet does not have the HTTP version number information, The version number information in the recorded HTTP packet is determined as the version number information of the received HTTP packet. In the embodiment of the present invention, optionally, as shown in FIG. 31, the decoding apparatus 900 further includes: a receiving module 992, configured to receive a protocol data unit PDU packet including a type field, where the type field is used to indicate the PDU packet HTTP headers that are header encoded and compressed.
在本发明实施例中, 可选地, 如图 32所示, 该解码装置 900还包括: 记录模块 993 , 用于在首次传输 HTTP报文时, 记录首次传输的 HTTP In the embodiment of the present invention, optionally, as shown in FIG. 32, the decoding apparatus 900 further includes: a recording module 993, configured to record the HTTP transmitted for the first time when transmitting the HTTP packet for the first time.
4艮文的编码头部取值、 URI和 HTTP版本号信息; 4 encoding the encoding header value, URI and HTTP version number information;
更新模块 994, 用于在非首次传输 HTTP报文时, 根据该接收的 HTTP 报文更新该已记录的 HTTP报文。  The update module 994 is configured to update the recorded HTTP message according to the received HTTP message when the HTTP message is not transmitted for the first time.
在本发明实施例中, 可选地, 该更新模块 994用于:  In the embodiment of the present invention, optionally, the update module 994 is configured to:
如果该接收的 HTTP报文的编码头部取值和该已记录的 HTTP报文的编 码头部取值相同, 则保持该已记录的 HTTP报文的编码头部及其取值不变; 或  If the value of the encoding header of the received HTTP packet is the same as the value of the encoding header of the recorded HTTP packet, the encoding header of the recorded HTTP packet is kept unchanged; or
如果该接收的 HTTP报文的编码头部取值和该已记录的 HTTP报文的编 码头部取值不同, 则将该已记录的 HTTP报文中的编码头部取值替换为该接 收的 HTTP报文的编码头部取值; 或  If the value of the encoding header of the received HTTP packet is different from the value of the encoding header of the recorded HTTP packet, the value of the encoding header in the recorded HTTP packet is replaced by the received value. The encoding header of the HTTP packet takes the value; or
如果该已记录的 HTTP报文具有该接收的 HTTP报文不具有的编码头 部, 则保持该已记录的 HTTP报文的编码头部及其取值不变; 或  If the recorded HTTP packet has an encoding header that the received HTTP packet does not have, the encoding header of the recorded HTTP packet is kept unchanged; or
如果该接收的 HTTP报文具有该已记录的 HTTP报文不具有的编码头 部, 则记录该接收的 HTTP报文具有但该已记录的 HTTP报文不具有的编码 头部及其取值; 或  If the received HTTP packet has an encoding header that is not included in the recorded HTTP packet, record the received HTTP packet with an encoding header that the recorded HTTP packet does not have and its value; Or
如果该接收的 HTTP报文的版本号信息和该已记录的 HTTP报文的版本 号信息相同, 则保持该已记录的 HTTP报文的版本号信息不变; 或  If the version number information of the received HTTP packet is the same as the version number information of the recorded HTTP packet, the version number information of the recorded HTTP packet is kept unchanged; or
如果该接收的 HTTP报文的版本号信息和该已记录的 HTTP报文的版本 号信息不同, 则将该已记录的 HTTP报文中的版本号信息替换为该接收的 HTTP报文的版本号信息。  And if the version number information of the received HTTP packet is different from the version number information of the recorded HTTP packet, the version number information in the recorded HTTP packet is replaced with the version number of the received HTTP packet. information.
应理解,根据本发明实施例的 HTTP报文的解码装置 900可对应于本发 明实施例中的传输 HTTP报文的方法的接收方, 并且解码装置 900中的各个 模块的上述和其它操作和 /或功能分别为了实现图 1至图 18中的各个方法的 相应流程, 为了筒洁, 在此不再赘述。  It should be understood that the decoding apparatus 900 of the HTTP message according to the embodiment of the present invention may correspond to the receiver of the method for transmitting the HTTP message in the embodiment of the present invention, and the above and other operations of the respective modules in the decoding apparatus 900 and/or For the purpose of implementing the corresponding processes of the respective methods in FIG. 1 to FIG. 18, the functions are not described herein.
因此, 本发明实施例的 HTTP报文的解码装置, 通过根据编码头部位图 的比特位的取值来确定该比特位相应的待解码的编码头部的取值, 与已记录 的 HTTP报文中的相应编码头部的取值是否相同,从而能够根据编码头部位 图确定接收的 HTTP报文中的编码头部及其取值, 由此能够减少连续 HTTP 报文中的相同字段占用的无线空口资源, 并能够提高资源使用效率。 Therefore, the decoding apparatus of the HTTP packet according to the embodiment of the present invention determines the value of the encoding header to be decoded corresponding to the bit according to the value of the bit of the encoding header part map, and the recorded value Whether the value of the corresponding encoding header in the HTTP packet is the same, so that the encoding header and its value in the received HTTP packet can be determined according to the encoding header part map, thereby reducing the number of consecutive HTTP packets. The wireless air interface resources occupied by the same field can improve the efficiency of resource usage.
在本发明实施例中,如图 33所示,本发明还提供了一种编码装置 1000, 该编码装置 1000包括处理器 1100、 存储器 1200、 总线系统 1300和发送器 1400。 其中, 处理器 1100、 存储器 1200和发送器 1400通过总线系统 1300 相连, 该存储器 1200用于存储指令, 该处理器 1100通过该总线系统 1300, 调用该存储器 1200中存储的该指令, 用于: 确定编码头部位图的每个比特 位的取值,各个该比特位的取值分别指示为该比特位相应的待传输的编码头 部的取值与已记录的 HTTP报文中的相应编码头部的取值是否相同; 该处理 器 1100还用于: 根据该每个比特位的取值, 生成包括该编码头部位图的待 传输的 HTTP报文; 该处理器 1100还用于控制该发送器 1400向接收方发送 该待传输的 HTTP ^艮文, 以便于该接收方根据该编码头部位图和该已记录的 HTTP报文,确定该待传输的 HTTP报文中编码头部取值与该已记录的 HTTP 报文中的相应编码头部的取值相同的第一编码头部以及该第一编码头部的 取值。  In the embodiment of the present invention, as shown in FIG. 33, the present invention further provides an encoding apparatus 1000, which includes a processor 1100, a memory 1200, a bus system 1300, and a transmitter 1400. The processor 1100, the memory 1200, and the transmitter 1400 are connected by a bus system 1300. The memory 1200 is used to store instructions. The processor 1100 calls the instruction stored in the memory 1200 through the bus system 1300, and is used to: determine The value of each bit of the coding header part map, and the value of each bit is respectively indicated as the value of the coding header to be transmitted corresponding to the bit and the corresponding coding header in the recorded HTTP message. The processor 1100 is further configured to: generate, according to the value of each bit, an HTTP message to be transmitted that includes the coded part location map; the processor 1100 is further configured to control the The sender 1400 sends the HTTP message to be transmitted to the receiver, so that the receiver determines, according to the code header part map and the recorded HTTP message, the code header in the HTTP message to be transmitted. The first encoding header having the same value as the corresponding encoding header in the recorded HTTP packet and the value of the first encoding header.
因此, 本发明实施例的 HTTP报文的编码装置, 通过编码头部位图的比 特位的取值来指示为该比特位相应的待传输的编码头部的取值, 与已记录的 HTTP报文中的相应编码头部的取值是否相同, 并且不传输取值相同的编码 头部, 从而能够减少连续 HTTP报文中的相同字段占用的无线空口资源, 由 此能够提高资源使用效率。  Therefore, the encoding apparatus of the HTTP packet in the embodiment of the present invention indicates the value of the encoding header to be transmitted corresponding to the bit by using the value of the bit of the encoding header part map, and the recorded HTTP packet. The value of the corresponding encoding header in the text is the same, and the encoding headers with the same value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resource utilization efficiency.
应理解,在本发明实施例中,该处理器 1100可以是中央处理单元( Central Processing Unit, 筒称为 "CPU" ), 该处理器 1100还可以是其他通用处理器、 数字信号处理器(DSP )、专用集成电路(ASIC )、现成可编程门阵列(FPGA ) 或者其他可编程逻辑器件、 分立门或者晶体管逻辑器件、 分立硬件组件等。 通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。  It should be understood that, in the embodiment of the present invention, the processor 1100 may be a central processing unit (a central processing unit (CPU), and the processor 1100 may also be another general-purpose processor, a digital signal processor (DSP). ), application specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and the like. The general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
该存储器 1200 可以包括只读存储器和随机存取存储器, 并向处理器 1100提供指令和数据。 存储器 1200的一部分还可以包括非易失性随机存取 存储器。 例如, 存储器 1200还可以存储设备类型的信息。  The memory 1200 can include read only memory and random access memory and provides instructions and data to the processor 1100. A portion of the memory 1200 can also include a non-volatile random access memory. For example, the memory 1200 can also store information of the device type.
该总线系统 1300除包括数据总线之外, 还可以包括电源总线、 控制总 线和状态信号总线等。 但是为了清楚说明起见, 在图中将各种总线都标为总 线系统 1300。 The bus system 1300 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. However, for the sake of clarity, the various buses are marked as total in the figure. Line system 1300.
在实现过程中, 上述方法的各步骤可以通过处理器 1100 中的硬件的集 成逻辑电路或者软件形式的指令完成。 结合本发明实施例所公开的方法的步 骤可以直接体现为硬件处理器执行完成, 或者用处理器中的硬件及软件模块 组合执行完成。 软件模块可以位于随机存储器, 闪存、 只读存储器, 可编程 只读存储器或者电可擦写可编程存储器、 寄存器等本领域成熟的存储介质 中。 该存储介质位于存储器 1200, 处理器 1100读取存储器 1200中的信息, 结合其硬件完成上述方法的步骤。 为避免重复, 这里不再详细描述。  In the implementation process, each step of the above method may be completed by an integrated logic circuit of the hardware in the processor 1100 or an instruction in the form of software. The steps of the method disclosed in the embodiments of the present invention may be directly implemented as hardware processor execution completion, or may be performed by a combination of hardware and software modules in the processor. The software modules can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like. The storage medium is located in the memory 1200. The processor 1100 reads the information in the memory 1200 and completes the steps of the above method in combination with hardware. To avoid repetition, it will not be described in detail here.
可选地, 作为一个实施例, 该处理器 1100用于: 确定待传输的编码头 头部, 以及该第二编码头部的取值; 确定该第二编码头部的头部编码, 该头 部编码用于指代该第二编码头部; 其中, 该根据该每个比特位的取值, 生成 并传输包括该编码头部位图的待传输的 HTTP报文, 包括: 根据该每个比特 位的取值、 该第二编码头部的头部编码以及该第二编码头部的取值, 生成并 传输该待传输的 HTTP报文。  Optionally, as an embodiment, the processor 1100 is configured to: determine an encoding header header to be transmitted, and a value of the second encoding header; determine a header encoding of the second encoding header, the header The part code is used to refer to the second encoding header; wherein, according to the value of each bit, the HTTP message to be transmitted including the encoding header part map is generated and transmitted, including: according to each The value of the bit, the header of the second encoding header, and the value of the second encoding header generate and transmit the HTTP message to be transmitted.
可选地, 作为一个实施例, 该处理器 1100用于: 确定第一压缩指示以 及第一字节数, 该第一压缩指示用于表示该第二编码头部的取值被压缩, 该 第一字节数与第一相同字节数相关联, 该第一相同字节数为待传输的该第二 的字节数; 其中, 该根据该每个比特位的取值、 该第二编码头部的头部编码 以及该第二编码头部的取值, 生成并传输该待传输的 HTTP报文, 包括: 根 据该每个比特位的取值、 该第二编码头部的头部编码、 该第一压缩指示以及 该第一字节数, 生成并传输该待传输的 HTTP报文。  Optionally, as an embodiment, the processor 1100 is configured to: determine a first compression indication and a first number of bytes, where the first compression indication is used to indicate that the value of the second encoding header is compressed, the first One byte number is associated with the first identical number of bytes, the first identical number of bytes being the second number of bytes to be transmitted; wherein, according to the value of each bit, the second code The header code of the header and the value of the second encoding header, generating and transmitting the HTTP message to be transmitted, including: according to the value of each bit, the header encoding of the second encoding header And the first compression indication and the first number of bytes, generating and transmitting the HTTP message to be transmitted.
可选地, 作为一个实施例, 该处理器 1100用于: 确定第二压缩指示以 及第一 HTTP报文在该已记录的 HTTP报文中的次序信息, 其中, 该第二压 缩指示用于表示该第二编码头部的取值与相应于该次序信息的该第一 HTTP 报文中的相应编码头部的取值相同; 其中, 该根据该每个比特位的取值、 该 第二编码头部的头部编码以及该第二编码头部的取值, 生成并传输该待传输 的 HTTP报文, 包括: 根据该每个比特位的取值、 该第二编码头部的头部编 码、 该第二压缩指示以及该次序信息, 生成并传输该待传输的 HTTP报文。  Optionally, as an embodiment, the processor 1100 is configured to: determine a second compression indication, and order information of the first HTTP packet in the recorded HTTP packet, where the second compression indication is used to indicate The value of the second encoding header is the same as the value of the corresponding encoding header in the first HTTP packet corresponding to the order information; where the value is determined according to the bit, the second encoding The header code of the header and the value of the second encoding header, generating and transmitting the HTTP message to be transmitted, including: according to the value of each bit, the header encoding of the second encoding header And the second compression indication and the sequence information, generating and transmitting the HTTP message to be transmitted.
可选地, 作为一个实施例, 该处理器 1100用于: 确定第三压缩指示以 及第二字节数,该第三压缩指示用于表示待传输的通用资源标识符 URI被压 缩, 该第二字节数与第二相同字节数相关联, 该第二相同字节数为待传输的 每个比特位的取值,生成并传输包括该编码头部位图的待传输的 HTTP报文, 包括: 根据该每个比特位的取值、 该第三压缩指示以及该第二字节数, 生成 并传输该待传输的 HTTP报文。 Optionally, as an embodiment, the processor 1100 is configured to: determine a third compression indication to And a second number of bytes, the third compressed indication is used to indicate that the universal resource identifier URI to be transmitted is compressed, and the second number of bytes is associated with the second identical number of bytes, and the second identical number of bytes is The value of each bit to be transmitted, and the HTTP message to be transmitted including the code header part map is generated and transmitted, including: according to the value of each bit, the third compression indication, and the second The number of bytes, the HTTP message to be transmitted is generated and transmitted.
可选地, 作为一个实施例, 该处理器 1100用于: 确定待传输的 HTTP 版本号信息与该已记录的 HTTP报文中的版本号信息是否相同; 其中, 该根 据该每个比特位的取值, 生成并传输包括该编码头部位图的待传输的 HTTP 报文, 包括: 在该待传输的 HTTP版本号信息与该已记录的 HTTP报文中的 版本号信息相同时,根据该每个比特位的取值,生成并传输该待传输的 HTTP 报文, 该待传输的 HTTP报文包括该编码头部位图; 在该待传输的 HTTP版 本号信息与该已记录的 HTTP报文中的版本号信息不同时,根据该每个比特 位的取值以及该待传输的 HTTP版本号信息, 生成并传输该待传输的 HTTP 报文, 该待传输的 HTTP报文包括该编码头部位图和该待传输的 HTTP版本 号信息。  Optionally, as an embodiment, the processor 1100 is configured to: determine whether the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP packet; wherein, according to the each bit The value of the HTTP packet to be transmitted, including the encoding part header map, is generated and transmitted, and includes: when the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP packet, according to the The value of each bit is generated and transmitted, and the HTTP message to be transmitted includes the code header part map; the HTTP version number information to be transmitted and the recorded HTTP message When the version number information in the text is different, the HTTP packet to be transmitted is generated and transmitted according to the value of the bit and the HTTP version number to be transmitted, and the HTTP packet to be transmitted includes the encoding header. The part map and the HTTP version number information to be transmitted.
可选地, 作为一个实施例, 该处理器 1100根据该每个比特位的取值, 生成并传输包括该编码头部位图的待传输的 HTTP报文, 包括: 根据该每个 比特位的取值, 生成并传输包括类型字段的协议数据单元 PDU包, 该类型 字段用于指示该 PDU包为经过头部编码和压缩的 HTTP ^艮文。  Optionally, as an embodiment, the processor 1100, according to the value of each bit, generates and transmits an HTTP message to be transmitted that includes the coded part location map, including: according to each bit bit The value is generated, and a protocol data unit PDU packet including a type field is used, and the type field is used to indicate that the PDU packet is a header encoded and compressed HTTP.
可选地, 作为一个实施例, 该存储器 1200用于: 在首次传输 HTTP报 文时, 记录首次传输的 HTTP 文的编码头部取值、 URI和 HTTP版本号信 息; 在非首次传输 HTTP报文时, 根据该待传输的 HTTP报文更新该已记录 的 HTTP报文。  Optionally, as an embodiment, the memory 1200 is configured to: when encoding the HTTP packet for the first time, record the encoding header value, the URI, and the HTTP version number information of the first transmitted HTTP text; and not transmit the HTTP packet for the first time. And updating the recorded HTTP packet according to the HTTP packet to be transmitted.
可选地, 作为一个实施例, 该存储器 1200根据该待传输的 HTTP报文 更新该已记录的 HTTP报文, 包括:  Optionally, as an embodiment, the memory 1200 updates the recorded HTTP packet according to the HTTP packet to be transmitted, including:
如果该待传输的 HTTP报文的编码头部取值和该已记录的 HTTP报文的 编码头部取值相同,则保持该已记录的 HTTP报文的编码头部及其取值不变; 或  If the value of the encoding header of the HTTP packet to be transmitted is the same as the value of the encoding header of the recorded HTTP packet, the encoding header of the recorded HTTP packet and the value thereof are kept unchanged; Or
如果该待传输的 HTTP报文的编码头部取值和该已记录的 HTTP报文的 编码头部取值不同, 则将该已记录的 HTTP报文中的编码头部取值替换为该 待传输的 HTTP报文的编码头部取值; 或 If the value of the encoding header of the HTTP packet to be transmitted is different from the value of the encoding header of the recorded HTTP packet, the value of the encoding header in the recorded HTTP packet is replaced by the value. The value of the encoding header of the HTTP packet to be transmitted; or
如果该已记录的 HTTP报文具有该待传输的 HTTP报文不具有的编码头 部, 则保持该已记录的 HTTP报文的编码头部及其取值不变; 或  If the recorded HTTP packet has an encoding header that is not included in the HTTP packet to be transmitted, the encoding header of the recorded HTTP packet is kept unchanged; or
如果该待传输的 HTTP报文具有该已记录的 HTTP报文不具有的编码头 部, 则记录该待传输的 HTTP报文具有但该已记录的 HTTP报文不具有的编 码头部及其取值; 或  If the HTTP packet to be transmitted has an encoding header that is not included in the recorded HTTP packet, the HTTP header to be transmitted has an encoding header that is not included in the recorded HTTP packet and is obtained. Value; or
如果该待传输的 HTTP报文的版本号信息和该已记录的 HTTP报文的版 本号信息相同, 则保持该已记录的 HTTP报文的版本号信息不变; 或  If the version number information of the HTTP packet to be transmitted is the same as the version number information of the recorded HTTP packet, the version number information of the recorded HTTP packet is kept unchanged; or
如果该待传输的 HTTP报文的版本号信息和该已记录的 HTTP报文的版 本号信息不同, 则将该已记录的 HTTP报文中的版本号信息替换为该待传输 的 HTTP报文的版本号信息。  If the version number information of the HTTP packet to be transmitted is different from the version number of the HTTP packet, the version number information of the recorded HTTP packet is replaced with the HTTP packet to be transmitted. Version number information.
应理解, 根据本发明实施例的 HTTP报文的编码装置 1000可对应于本 发明实施例中的传输 HTTP报文的方法的发送方以及编码装置 800, 并且编 码装置 1000中的各个模块的上述和其它操作和 /或功能分别为了实现图 1至 图 18中的各个方法的相应流程, 为了筒洁, 在此不再赘述。  It should be understood that the encoding apparatus 1000 of the HTTP message according to the embodiment of the present invention may correspond to the sender of the method for transmitting the HTTP message and the encoding apparatus 800 in the embodiment of the present invention, and the above-mentioned sum of each module in the encoding apparatus 1000 For the purpose of implementing the corresponding processes of the respective methods in FIG. 1 to FIG. 18, other operations and/or functions are not described herein.
因此, 本发明实施例的 HTTP报文的编码装置, 通过编码头部位图的比 特位的取值来指示为该比特位相应的待传输的编码头部的取值, 与已记录的 HTTP报文中的相应编码头部的取值是否相同, 并且不传输取值相同的编码 头部, 从而能够减少连续 HTTP报文中的相同字段占用的无线空口资源, 由 此能够提高资源使用效率。  Therefore, the encoding apparatus of the HTTP packet in the embodiment of the present invention indicates the value of the encoding header to be transmitted corresponding to the bit by using the value of the bit of the encoding header part map, and the recorded HTTP packet. The value of the corresponding encoding header in the text is the same, and the encoding headers with the same value are not transmitted, so that the wireless air interface resources occupied by the same field in the continuous HTTP packet can be reduced, thereby improving resource utilization efficiency.
如图 34所示, 本发明还提供了一种解码装置 2000, 该解码装置 2000 包括处理器 2100、 存储器 2200和总线系统 2300。 其中, 处理器 2100和存 储器 2200通过总线系统 2300相连, 该存储器 2200用于存储指令, 该处理 器 2100通过该总线系统 2300,调用该存储器 2200中存储的该指令,以用于: 获取接收的 HTTP报文中的编码头部位图的每个比特位的取值; 在该编码头 部位图的第一比特位的取值指示为该第一比特位相应的待解码的第一编码 头部的取值与已记录的 HTTP报文中的相应编码头部的取值相同时,将该已 记录的 HTTP报文中的与该第一比特位相应的编码头部及其取值, 分别确定 为该第一编码头部以及该第一编码头部的取值。  As shown in FIG. 34, the present invention also provides a decoding apparatus 2000, which includes a processor 2100, a memory 2200, and a bus system 2300. The processor 2100 and the memory 2200 are connected by a bus system 2300 for storing instructions. The processor 2100 calls the instruction stored in the memory 2200 through the bus system 2300 to: obtain the received HTTP. The value of each bit of the coded header part map in the message; the value of the first bit of the code header part map is indicated by the first bit of the first bit to be decoded corresponding to the first bit When the value is the same as the value of the corresponding encoding header in the recorded HTTP packet, the encoding header corresponding to the first bit in the recorded HTTP packet and its value are respectively determined. The value of the first encoding header and the first encoding header.
因此, 本发明实施例的 HTTP报文的解码装置, 通过根据编码头部位图 的比特位的取值来确定该比特位相应的待解码的编码头部的取值, 与已记录 的 HTTP报文中的相应编码头部的取值是否相同,从而能够根据编码头部位 图确定接收的 HTTP报文中的编码头部及其取值, 由此能够减少连续 HTTP 报文中的相同字段占用的无线空口资源, 并能够提高资源使用效率。 Therefore, the decoding apparatus of the HTTP packet according to the embodiment of the present invention determines the value of the encoding header to be decoded corresponding to the bit according to the value of the bit of the encoding header part map, and the recorded value Whether the value of the corresponding encoding header in the HTTP packet is the same, so that the encoding header and its value in the received HTTP packet can be determined according to the encoding header part map, thereby reducing the number of consecutive HTTP packets. The wireless air interface resources occupied by the same field can improve the efficiency of resource usage.
应理解,在本发明实施例中,该处理器 2100可以是中央处理单元( Central Processing Unit, 筒称为 "CPU" ), 该处理器 2100还可以是其他通用处理器、 数字信号处理器(DSP )、专用集成电路(ASIC )、现成可编程门阵列(FPGA ) 或者其他可编程逻辑器件、 分立门或者晶体管逻辑器件、 分立硬件组件等。 通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。  It should be understood that, in the embodiment of the present invention, the processor 2100 may be a central processing unit (a central processing unit (CPU), and the processor 2100 may also be another general-purpose processor, a digital signal processor (DSP). ), application specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and the like. The general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
该存储器 2200 可以包括只读存储器和随机存取存储器, 并向处理器 2100提供指令和数据。 存储器 2200的一部分还可以包括非易失性随机存取 存储器。 例如, 存储器 2200还可以存储设备类型的信息。  The memory 2200 can include read only memory and random access memory and provides instructions and data to the processor 2100. A portion of the memory 2200 can also include a non-volatile random access memory. For example, the memory 2200 can also store information of the device type.
该总线系统 2300除包括数据总线之外, 还可以包括电源总线、 控制总 线和状态信号总线等。 但是为了清楚说明起见, 在图中将各种总线都标为总 线系统 2300。  The bus system 2300 can include, in addition to the data bus, a power bus, a control bus, and a status signal bus. However, for clarity of description, various buses are labeled as bus system 2300 in the figure.
在实现过程中, 上述方法的各步骤可以通过处理器 2100 中的硬件的集 成逻辑电路或者软件形式的指令完成。 结合本发明实施例所公开的方法的步 骤可以直接体现为硬件处理器执行完成, 或者用处理器中的硬件及软件模块 组合执行完成。 软件模块可以位于随机存储器, 闪存、 只读存储器, 可编程 只读存储器或者电可擦写可编程存储器、 寄存器等本领域成熟的存储介质 中。 该存储介质位于存储器 2200, 处理器 2100读取存储器 2200中的信息, 结合其硬件完成上述方法的步骤。 为避免重复, 这里不再详细描述。  In the implementation process, each step of the foregoing method may be completed by an integrated logic circuit of the hardware in the processor 2100 or an instruction in the form of software. The steps of the method disclosed in the embodiments of the present invention may be directly implemented as hardware processor execution completion, or may be performed by a combination of hardware and software modules in the processor. The software modules can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like. The storage medium is located in the memory 2200, and the processor 2100 reads the information in the memory 2200 and completes the steps of the above method in combination with the hardware. To avoid repetition, it will not be described in detail here.
可选地, 作为一个实施例, 该处理器 2100用于: 在该编码头部位图的 第二比特位的取值指示为该第二比特位相应的待解码的第二编码头部的取 值与已记录的 HTTP报文中的相应编码头部的取值不同时, 根据该接收的 HTTP报文中的头部编码, 确定该头部编码指代的该第二编码头部。  Optionally, as an embodiment, the processor 2100 is configured to:: the value of the second bit in the coding part location map indicates that the second coding bit to be decoded is corresponding to the second bit When the value is different from the value of the corresponding encoding header in the recorded HTTP packet, the second encoding header indicated by the header encoding is determined according to the header encoding in the received HTTP packet.
可选地, 作为一个实施例, 该处理器 2100用于: 根据该接收的 HTTP 报文中的第一压缩指示以及第一字节数,确定与该第一字节数相关联的第一 相同字节数, 其中该第一压缩指示用于表示该第二编码头部的取值被压缩; 根据该第一相同字节数,将该已记录的 HTTP报文中的相应编码头部的取值 中相应的连续第一相同字节数的字节,确定为该第二编码头部的待解码的取 值。 可选地, 作为一个实施例, 该处理器 2100用于: 根据该接收的 HTTP 报文中的第二压缩指示以及次序信息,确定该已记录的 HTTP报文中与该次 序信息相应的第一 HTTP报文, 其中, 该第二压缩指示用于表示该第二编码 头部的取值与该第一 HTTP报文中的相应编码头部的取值相同; 将该第一 HTTP报文中的相应编码头部的取值确定为该第二编码头部的取值。 Optionally, as an embodiment, the processor 2100 is configured to: determine, according to the first compression indication in the received HTTP packet and the first number of bytes, a first identity associated with the first number of bytes a number of bytes, wherein the first compression indication is used to indicate that the value of the second encoding header is compressed; according to the first identical number of bytes, the corresponding encoding header in the recorded HTTP packet is taken The corresponding consecutive first identical number of bytes in the value is determined as the value of the second encoding header to be decoded. Optionally, as an embodiment, the processor 2100 is configured to: determine, according to the second compression indication and the sequence information in the received HTTP packet, the first corresponding to the sequence information in the recorded HTTP packet An HTTP packet, where the second compression indication is used to indicate that the value of the second encoding header is the same as the value of the corresponding encoding header in the first HTTP packet; The value of the corresponding encoding header is determined as the value of the second encoding header.
可选地, 作为一个实施例, 该处理器 2100用于: 根据该接收的 HTTP 报文中的第三压缩指示以及第二字节数,确定与该第二字节数相关联的第二 相同字节数,其中该第三压缩指示用于表示待解码的 URI被压缩;根据该第 二相同字节数,将该已记录的 HTTP报文的 URI中相应的连续第二相同字节 数的字节, 确定为该接收的 HTTP报文中待解码的 URI。  Optionally, as an embodiment, the processor 2100 is configured to: determine, according to the third compression indication in the received HTTP packet and the second byte number, a second identity associated with the second byte number a number of bytes, wherein the third compression indication is used to indicate that the URI to be decoded is compressed; according to the second identical number of bytes, the corresponding consecutive second identical number of bytes in the URI of the recorded HTTP message Byte, determined as the URI to be decoded in the received HTTP message.
可选地, 作为一个实施例, 该处理器 2100用于: 在确定该接收的 HTTP 报文中没有 HTTP版本号信息时,将该已记录的 HTTP报文中的版本号信息 确定为该接收的 HTTP报文的版本号信息。  Optionally, as an embodiment, the processor 2100 is configured to: when it is determined that the received HTTP packet does not have the HTTP version number information, determine the version number information in the recorded HTTP packet as the received Version number information of the HTTP packet.
可选地, 作为一个实施例, 该解码装置 2000还包括接收器 2400, 该接 收器 2400用于: 接收包括类型字段的协议数据单元 PDU包, 该类型字段用 于指示该 PDU包为经过头部编码和压缩的 HTTP ^艮文。  Optionally, as an embodiment, the decoding apparatus 2000 further includes a receiver 2400, configured to: receive a protocol data unit PDU packet including a type field, where the type field is used to indicate that the PDU packet is a header. Encoded and compressed HTTP ^ text.
可选地, 作为一个实施例, 该存储器 2200用于: 在首次传输 HTTP报 文时, 记录首次传输的 HTTP 文的编码头部取值、 URI和 HTTP版本号信 息; 在非首次传输 HTTP报文时, 根据该接收的 HTTP报文更新该已记录的 HTTP报文。  Optionally, as an embodiment, the memory 2200 is configured to: when encoding the HTTP packet for the first time, record the encoding header value, the URI, and the HTTP version number information of the first transmitted HTTP text; and not transmit the HTTP packet for the first time. And updating the recorded HTTP packet according to the received HTTP packet.
可选地, 作为一个实施例, 该存储器 2200根据该接收的 HTTP报文更 新该已记录的 HTTP报文, 包括:  Optionally, as an embodiment, the memory 2200 updates the recorded HTTP packet according to the received HTTP packet, including:
如果该接收的 HTTP报文的编码头部取值和该已记录的 HTTP报文的编 码头部取值相同, 则保持该已记录的 HTTP报文的编码头部及其取值不变; 或  If the value of the encoding header of the received HTTP packet is the same as the value of the encoding header of the recorded HTTP packet, the encoding header of the recorded HTTP packet is kept unchanged; or
如果该接收的 HTTP报文的编码头部取值和该已记录的 HTTP报文的编 码头部取值不同, 则将该已记录的 HTTP报文中的编码头部取值替换为该接 收的 HTTP报文的编码头部取值; 或  If the value of the encoding header of the received HTTP packet is different from the value of the encoding header of the recorded HTTP packet, the value of the encoding header in the recorded HTTP packet is replaced by the received value. The encoding header of the HTTP packet takes the value; or
如果该已记录的 HTTP报文具有该接收的 HTTP报文不具有的编码头 部, 则保持该已记录的 HTTP报文的编码头部及其取值不变; 或  If the recorded HTTP packet has an encoding header that the received HTTP packet does not have, the encoding header of the recorded HTTP packet is kept unchanged; or
如果该接收的 HTTP报文具有该已记录的 HTTP报文不具有的编码头 部, 则记录该接收的 HTTP报文具有但该已记录的 HTTP报文不具有的编码 头部及其取值; 或 If the received HTTP packet has an encoding header that the recorded HTTP packet does not have And recording the encoded header of the received HTTP message but having the recorded HTTP packet and the value thereof; or
如果该接收的 HTTP报文的版本号信息和该已记录的 HTTP报文的版本 号信息相同, 则保持该已记录的 HTTP报文的版本号信息不变; 或  If the version number information of the received HTTP packet is the same as the version number information of the recorded HTTP packet, the version number information of the recorded HTTP packet is kept unchanged; or
如果该接收的 HTTP报文的版本号信息和该已记录的 HTTP报文的版本 号信息不同, 则将该已记录的 HTTP报文中的版本号信息替换为该接收的 HTTP报文的版本号信息。  And if the version number information of the received HTTP packet is different from the version number information of the recorded HTTP packet, the version number information in the recorded HTTP packet is replaced with the version number of the received HTTP packet. information.
应理解, 根据本发明实施例的 HTTP报文的解码装置 2000可对应于本 发明实施例中的传输 HTTP报文的方法的接收方和解码装置 900, 并且解码 装置 2000中的各个模块的上述和其它操作和 /或功能分别为了实现图 1至图 18中的各个方法的相应流程, 为了筒洁, 在此不再赘述。  It should be understood that the decoding apparatus 2000 of the HTTP message according to the embodiment of the present invention may correspond to the receiver and the decoding apparatus 900 of the method for transmitting an HTTP message in the embodiment of the present invention, and the above-mentioned sum of each module in the decoding apparatus 2000 For the purpose of implementing the corresponding processes of the respective methods in FIG. 1 to FIG. 18, other operations and/or functions are not described herein.
因此, 本发明实施例的 HTTP报文的解码装置, 通过根据编码头部位图 的比特位的取值来确定该比特位相应的待解码的编码头部的取值, 与已记录 的 HTTP报文中的相应编码头部的取值是否相同,从而能够根据编码头部位 图确定接收的 HTTP报文中的编码头部及其取值, 由此能够减少连续 HTTP 报文中的相同字段占用的无线空口资源, 并能够提高资源使用效率。  Therefore, the decoding apparatus of the HTTP packet in the embodiment of the present invention determines the value of the encoding header to be decoded corresponding to the bit according to the value of the bit of the encoding header part map, and the recorded HTTP packet. Whether the values of the corresponding coding headers in the text are the same, so that the coding header and its value in the received HTTP message can be determined according to the coding header part map, thereby reducing the occupation of the same field in the continuous HTTP message. Wireless air interface resources and can improve resource utilization efficiency.
另外, 本文中术语 "系统" 和 "网络" 在本文中常被可互换使用。 本文 中术语 "和 /或,,, 仅仅是一种描述关联对象的关联关系, 表示可以存在三种 关系, 例如, A和 /或 B, 可以表示: 单独存在 A, 同时存在 A和 B, 单独存 在 B这三种情况。另外,本文中字符 " ,—般表示前后关联对象是一种 "或" 的关系。  In addition, the terms "system" and "network" are often used interchangeably herein. The term "and/or," in this context is merely an association that describes an associated object, indicating that there can be three relationships, for example, A and / or B, which can mean: A exists separately, and both A and B exist, alone There are three cases of B. In addition, the character "," in this paper, indicates that the contextual object is an "or" relationship.
应理解, 在本发明实施例中, "与 A相应的 B"表示 B与 A相关联, 根 据 A可以确定 B。 但还应理解, 根据 A确定 B并不意味着仅仅根据 A确定 B, 还可以根据 A和 /或其它信息确定^  It should be understood that in the embodiment of the present invention, "B corresponding to A" means that B is associated with A, and B can be determined based on A. However, it should be understood that determining B according to A does not mean that B is determined only on the basis of A, but also based on A and/or other information.
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 计算机软件或者二者的结合来实 现, 为了清楚地说明硬件和软件的可互换性, 在上述说明中已经按照功能一 般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执 行, 取决于技术方案的特定应用和设计约束条件。 专业技术人员可以对每个 特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超 出本发明的范围。 所属领域的技术人员可以清楚地了解到, 为了描述的方便和筒洁, 上述 描述的系统、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对 应过程, 在此不再赘述。 Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software or a combination of both, in order to clearly illustrate hardware and software. Interchangeability, the composition and steps of the various examples have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention. A person skilled in the art can clearly understand that, for the convenience of the description and the cleaning process, the specific working processes of the system, the device and the unit described above can refer to the corresponding processes in the foregoing method embodiments, and details are not described herein again.
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和 方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示 意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个 系统, 或一些特征可以忽略, 或不执行。 另外, 所显示或讨论的相互之间的 耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或 通信连接, 也可以是电的, 机械的或其它的形式连接。 为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或 者全部单元来实现本发明实施例方案的目的。  In the several embodiments provided herein, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. 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. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection. The components displayed for the unit may or may not be physical units, ie may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元 中, 也可以是各个单元单独物理存在, 也可以是两个或两个以上单元集成在 一个单元中。 上述集成的单元既可以采用硬件的形式实现, 也可以采用软件 功能单元的形式实现。  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 contributes in essence or 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 removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. .
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到各种等效的修改或替换, 这些修改或替换都应涵盖在本发明的保护范围 之内。 因此, 本发明的保护范围应以权利要求的保护范围为准。  The above is only the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any equivalent person can be easily conceived within the technical scope of the present invention. Modifications or substitutions are intended to be included within the scope of the invention. Therefore, the scope of the invention should be determined by the scope of the claims.

Claims

权利要求 Rights request
1、 一种传输 HTTP报文的方法, 其特征在于, 包括: 1. A method of transmitting HTTP messages, characterized by including:
确定编码头部位图的每个比特位的取值,各个所述比特位的取值分别指 示为所述比特位相应的待传输的编码头部的取值与已记录的 HTTP报文中的 相应编码头部的取值是否相同; Determine the value of each bit of the encoding header bitmap. The value of each bit is respectively indicated by the value of the encoding header to be transmitted corresponding to the bit and the value in the recorded HTTP message. Whether the values of the corresponding encoding headers are the same;
根据所述每个比特位的取值, 生成并传输包括所述编码头部位图的待传 输的 ΗΤΤΡ ·¾文, 以便于所述待传输的 HTTP报文的接收方根据所述编码头 部位图和所述已记录的 HTTP报文,确定所述待传输的 HTTP报文中编码头 部取值与所述已记录的 HTTP报文中的相应编码头部的取值相同的第一编码 头部以及所述第一编码头部的取值。 According to the value of each bit, the HTTP message to be transmitted including the encoding header bitmap is generated and transmitted, so that the recipient of the HTTP message to be transmitted can receive the HTTP message according to the encoding header bitmap. bitmap and the recorded HTTP message, determine the first code whose encoding header value in the HTTP message to be transmitted is the same as the value of the corresponding encoding header in the recorded HTTP message header and the value of the first encoding header.
2、 根据权利要求 1所述的方法, 其特征在于, 所述方法还包括: 确定待传输的编码头部中取值与所述已记录的 HTTP报文中的相应编码 头部的取值不同的第二编码头部, 以及所述第二编码头部的取值; 2. The method according to claim 1, characterized in that, the method further includes: determining that the value in the encoding header to be transmitted is different from the value of the corresponding encoding header in the recorded HTTP message. The second encoding header, and the value of the second encoding header;
确定所述第二编码头部的头部编码, 所述头部编码用于指代所述第二编 码头部; Determine the header code of the second coded header, the header code being used to refer to the second coded header;
其中, 所述根据所述每个比特位的取值, 生成并传输包括所述编码头部 位图的待传输的 HTTP报文, 包括: Wherein, generating and transmitting an HTTP message to be transmitted including the encoded header bitmap according to the value of each bit includes:
根据所述每个比特位的取值、所述第二编码头部的头部编码以及所述第 二编码头部的取值, 生成并传输所述待传输的 HTTP ^艮文。 The HTTP text to be transmitted is generated and transmitted according to the value of each bit, the header encoding of the second encoding header, and the value of the second encoding header.
3、 根据权利要求 2所述的方法, 其特征在于, 所述方法还包括: 确定第一压缩指示以及第一字节数, 所述第一压缩指示用于表示所述第 二编码头部的取值被压缩, 所述第一字节数与第一相同字节数相关联, 所述 第一相同字节数为待传输的所述第二编码头部的取值与所述已记录的 HTTP 报文中的相应编码头部的取值连续相同的字节数; 3. The method according to claim 2, characterized in that, the method further includes: determining a first compression indication and a first number of bytes, the first compression indication being used to represent the second encoding header The value is compressed, the first number of bytes is associated with the first number of identical bytes, and the first number of identical bytes is the value of the second encoding header to be transmitted and the recorded The value of the corresponding encoding header in the HTTP message is the same number of consecutive bytes;
其中, 所述根据所述每个比特位的取值、 所述第二编码头部的头部编码 以及所述第二编码头部的取值,生成并传输所述待传输的 HTTP报文,包括: 根据所述每个比特位的取值、 所述第二编码头部的头部编码、 所述第一 压缩指示以及所述第一字节数, 生成并传输所述待传输的 HTTP报文。 Wherein, the HTTP message to be transmitted is generated and transmitted according to the value of each bit, the header encoding of the second encoding header and the value of the second encoding header, The method includes: generating and transmitting the HTTP packet to be transmitted according to the value of each bit, the header encoding of the second encoding header, the first compression indication and the first number of bytes. arts.
4、 根据权利要求 2所述的方法, 其特征在于, 所述方法还包括: 确定第二压缩指示以及第一 HTTP报文在所述已记录的 HTTP报文中的 次序信息, 其中, 所述第二压缩指示用于表示所述第二编码头部的取值与相 应于所述次序信息的所述第一 HTTP报文中的相应编码头部的取值相同; 其中, 所述根据所述每个比特位的取值、 所述第二编码头部的头部编码 以及所述第二编码头部的取值,生成并传输所述待传输的 HTTP报文,包括: 根据所述每个比特位的取值、 所述第二编码头部的头部编码、 所述第二 压缩指示以及所述次序信息, 生成并传输所述待传输的 HTTP报文。 4. The method according to claim 2, characterized in that, the method further includes: determining the second compression indication and the order information of the first HTTP message in the recorded HTTP message, wherein, The second compression indication is used to represent the value and phase of the second encoding header. The value of the corresponding encoding header in the first HTTP message corresponding to the sequence information is the same; wherein, according to the value of each bit, the header of the second encoding header encoding and the value of the second encoding header, generating and transmitting the HTTP message to be transmitted, including: according to the value of each bit, the header encoding of the second encoding header, The second compression indication and the sequence information are used to generate and transmit the HTTP message to be transmitted.
5、 根据权利要求 1所述的方法, 其特征在于, 所述方法还包括: 确定第三压缩指示以及第二字节数, 所述第三压缩指示用于表示待传输 的通用资源标识符 URI被压缩, 所述第二字节数与第二相同字节数相关联, 所述第二相同字节数为待传输的 URI与所述已记录的 HTTP报文中的 URI 连续相同的字节数; 5. The method according to claim 1, characterized in that, the method further comprises: determining a third compression indication and a second number of bytes, the third compression indication being used to represent a universal resource identifier URI to be transmitted Compressed, the second number of bytes is associated with the second number of identical bytes, and the second number of identical bytes is the URI to be transmitted and the URI in the recorded HTTP message that are continuously the same bytes number;
其中, 所述根据所述每个比特位的取值, 生成并传输包括所述编码头部 位图的待传输的 HTTP报文, 包括: Wherein, generating and transmitting an HTTP message to be transmitted including the encoded header bitmap according to the value of each bit includes:
根据所述每个比特位的取值、 所述第三压缩指示以及所述第二字节数, 生成并传输所述待传输的 HTTP报文。 The HTTP message to be transmitted is generated and transmitted according to the value of each bit, the third compression indication and the second number of bytes.
6、 根据权利要求 1所述的方法, 其特征在于, 所述方法还包括: 确定待传输的 HTTP版本号信息与所述已记录的 HTTP报文中的版本号 信息是否相同; 6. The method according to claim 1, wherein the method further includes: determining whether the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP message;
其中, 所述根据所述每个比特位的取值, 生成并传输包括所述编码头部 位图的待传输的 HTTP报文, 包括: Wherein, generating and transmitting an HTTP message to be transmitted including the encoded header bitmap according to the value of each bit includes:
在所述待传输的 HTTP版本号信息与所述已记录的 HTTP报文中的版本 号信息相同时,根据所述每个比特位的取值,生成并传输所述待传输的 HTTP 报文, 所述待传输的 HTTP报文包括所述编码头部位图; When the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP message, the HTTP message to be transmitted is generated and transmitted according to the value of each bit, The HTTP message to be transmitted includes the encoding header bitmap;
在所述待传输的 HTTP版本号信息与所述已记录的 HTTP报文中的版本 号信息不同时,根据所述每个比特位的取值以及所述待传输的 HTTP版本号 信息, 生成并传输所述待传输的 HTTP报文, 所述待传输的 HTTP报文包括 所述编码头部位图和所述待传输的 HTTP版本号信息。 When the HTTP version number information to be transmitted is different from the version number information in the recorded HTTP message, according to the value of each bit and the HTTP version number information to be transmitted, a Transmit the HTTP message to be transmitted, where the HTTP message to be transmitted includes the encoding header bitmap and the HTTP version number information to be transmitted.
7、 根据权利要求 1所述的方法, 其特征在于, 所述根据所述每个比特 位的取值,生成并传输包括所述编码头部位图的待传输的 ΗΤΤΡ ·¾文,包括: 根据所述每个比特位的取值, 生成并传输包括类型字段的协议数据单元 PDU包,所述类型字段用于指示所述 PDU包为经过头部编码和压缩的 HTTP 报文。 7. The method according to claim 1, characterized in that, generating and transmitting the HTTP text to be transmitted including the encoding header bitmap according to the value of each bit, includes: According to the value of each bit, a protocol data unit PDU packet including a type field is generated and transmitted, where the type field is used to indicate that the PDU packet is a header-encoded and compressed HTTP message.
8、 根据权利要求 1至 7中任一项所述的方法, 其特征在于, 所述方法 还包括: 8. The method according to any one of claims 1 to 7, characterized in that the method further includes:
在首次传输 HTTP报文时,记录首次传输的 HTTP报文的编码头部取值、 URI和 HTTP版本号信息; When the HTTP message is transmitted for the first time, the encoding header value, URI and HTTP version number information of the HTTP message transmitted for the first time are recorded;
在非首次传输 HTTP报文时,根据所述待传输的 HTTP报文更新所述已 记录的 HTTP ^艮文。 When the HTTP message is not transmitted for the first time, the recorded HTTP message is updated according to the HTTP message to be transmitted.
9、 根据权利要求 8所述的方法, 其特征在于, 所述根据所述待传输的 HTTP报文更新所述已记录的 HTTP报文, 包括: 9. The method according to claim 8, characterized in that, updating the recorded HTTP message according to the HTTP message to be transmitted includes:
如果所述待传输的 HTTP报文的编码头部取值和所述已记录的 HTTP报 文的编码头部取值相同, 则保持所述已记录的 HTTP报文的编码头部及其取 值不变; 或 If the encoding header value of the HTTP message to be transmitted is the same as the encoding header value of the recorded HTTP message, then the encoding header and the value of the recorded HTTP message are retained. unchanged; or
如果所述待传输的 HTTP报文的编码头部取值和所述已记录的 HTTP报 文的编码头部取值不同, 则将所述已记录的 HTTP报文中的编码头部取值替 换为所述待传输的 HTTP报文的编码头部取值; 或 If the encoding header value of the HTTP message to be transmitted is different from the encoding header value of the recorded HTTP message, replace the encoding header value in the recorded HTTP message. Value for the encoding header of the HTTP message to be transmitted; or
如果所述已记录的 HTTP报文具有所述待传输的 HTTP报文不具有的编 码头部, 则保持所述已记录的 HTTP报文的编码头部及其取值不变; 或 If the recorded HTTP message has an encoding header that the HTTP message to be transmitted does not have, then keep the encoding header of the recorded HTTP message and its value unchanged; or
如果所述待传输的 HTTP报文具有所述已记录的 HTTP报文不具有的编 码头部, 则记录所述待传输的 HTTP报文具有但所述已记录的 HTTP报文不 具有的编码头部及其取值; 或 If the HTTP message to be transmitted has an encoding header that the recorded HTTP message does not have, record the encoding header that the HTTP message to be transmitted has but the recorded HTTP message does not have. part and its value; or
如果所述待传输的 HTTP报文的版本号信息和所述已记录的 HTTP报文 的版本号信息相同, 则保持所述已记录的 HTTP报文的版本号信息不变; 或 如果所述待传输的 HTTP报文的版本号信息和所述已记录的 HTTP报文 的版本号信息不同, 则将所述已记录的 HTTP报文中的版本号信息替换为所 述待传输的 HTTP报文的版本号信息。 If the version number information of the HTTP message to be transmitted is the same as the version number information of the recorded HTTP message, then keep the version number information of the recorded HTTP message unchanged; or if the version number information to be transmitted is the same. If the version number information of the transmitted HTTP message is different from the version number information of the recorded HTTP message, replace the version number information in the recorded HTTP message with the version number information of the HTTP message to be transmitted. Version number information.
10、 一种传输 HTTP报文的方法, 其特征在于, 包括: 10. A method of transmitting HTTP messages, characterized by including:
获取接收的 HTTP报文中的编码头部位图的每个比特位的取值; 在所述编码头部位图的第一比特位的取值指示为所述第一比特位相应 的待解码的第一编码头部的取值与已记录的 HTTP报文中的相应编码头部的 取值相同时,将所述已记录的 HTTP · ^艮文中的与所述第一比特位相应的编码 头部及其取值, 分别确定为所述第一编码头部以及所述第一编码头部的取 值。 Obtain the value of each bit of the encoding header bitmap in the received HTTP message; the value of the first bit of the encoding header bitmap indicates the corresponding first bit to be decoded When the value of the first encoding header is the same as the value of the corresponding encoding header in the recorded HTTP message, the encoding corresponding to the first bit in the recorded HTTP message is The header and its value are respectively determined as the first encoding header and the value of the first encoding header.
11、 根据权利要求 10所述的方法, 其特征在于, 所述方法还包括: 在所述编码头部位图的第二比特位的取值指示为所述第二比特位相应 的待解码的第二编码头部的取值与已记录的 HTTP报文中的相应编码头部的 取值不同时, 根据所述接收的 HTTP报文中的头部编码, 确定所述头部编码 指代的所述第二编码头部。 11. The method according to claim 10, characterized in that, the method further comprises: indicating that the value of the second bit in the encoding header bitmap is the corresponding to-be-decoded bit of the second bit. When the value of the second encoding header is different from the value of the corresponding encoding header in the recorded HTTP message, determine what the header encoding refers to based on the header encoding in the received HTTP message. The second encoding header.
12、 根据权利要求 11所述的方法, 其特征在于, 所述方法还包括: 根据所述接收的 HTTP报文中的第一压缩指示以及第一字节数,确定与 所述第一字节数相关联的第一相同字节数, 其中所述第一压缩指示用于表示 所述第二编码头部的取值被压缩; 12. The method according to claim 11, characterized in that, the method further includes: determining, according to the first compression indication and the first byte number in the received HTTP message, the number of the first byte. The first identical number of bytes associated with the number, wherein the first compression indication is used to indicate that the value of the second encoding header is compressed;
根据所述第一相同字节数,将所述已记录的 HTTP报文中的相应编码头 部的取值中相应的连续第一相同字节数的字节,确定为所述第二编码头部的 待解码的取值。 According to the first same number of bytes, the corresponding first consecutive number of bytes of the same number of bytes among the values of the corresponding encoding headers in the recorded HTTP message is determined as the second encoding header. The value to be decoded.
13、 根据权利要求 11所述的方法, 其特征在于, 所述方法还包括: 根据所述接收的 HTTP报文中的第二压缩指示以及次序信息,确定所述 已记录的 HTTP报文中与所述次序信息相应的第一 HTTP报文, 其中, 所述 第二压缩指示用于表示所述第二编码头部的取值与所述第一 HTTP报文中的 相应编码头部的取值相同; 13. The method according to claim 11, characterized in that, the method further includes: determining, according to the second compression indication and sequence information in the received HTTP message, that the recorded HTTP message corresponds to The first HTTP message corresponding to the sequence information, wherein the second compression indication is used to represent the value of the second encoding header and the value of the corresponding encoding header in the first HTTP message. same;
将所述第一 HTTP报文中的相应编码头部的取值确定为所述第二编码头 部的取值。 The value of the corresponding encoding header in the first HTTP message is determined as the value of the second encoding header.
14、 根据权利要求 10所述的方法, 其特征在于, 所述方法还包括: 根据所述接收的 HTTP报文中的第三压缩指示以及第二字节数,确定与 所述第二字节数相关联的第二相同字节数, 其中所述第三压缩指示用于表示 待解码的 URI被压缩; 14. The method according to claim 10, characterized in that, the method further includes: determining, according to the third compression indication and the second number of bytes in the received HTTP message, the number of the second byte. A second identical number of bytes associated with the number, wherein the third compression indication is used to indicate that the URI to be decoded is compressed;
根据所述第二相同字节数,将所述已记录的 HTTP报文的 URI中相应的 连续第二相同字节数的字节,确定为所述接收的 HTTP报文中待解码的 URI。 According to the second identical number of bytes, the corresponding second consecutive identical number of bytes in the URI of the recorded HTTP message is determined as the URI to be decoded in the received HTTP message.
15、 根据权利要求 10所述的方法, 其特征在于, 所述方法还包括: 在确定所述接收的 HTTP报文中没有 HTTP版本号信息时,将所述已记 录的 HTTP报文中的版本号信息确定为所述接收的 HTTP报文的版本号信 15. The method according to claim 10, characterized in that, the method further includes: when it is determined that there is no HTTP version number information in the received HTTP message, converting the version number in the recorded HTTP message to The number information is determined as the version number information of the received HTTP message.
16、 根据权利要求 10所述的方法, 其特征在于, 所述方法还包括: 接收包括类型字段的协议数据单元 PDU 包, 所述类型字段用于指示所 述 PDU包为经过头部编码和压缩的 HTTP ^艮文。 16. The method according to claim 10, characterized in that, the method further comprises: receiving a protocol data unit PDU packet including a type field, the type field is used to indicate the The PDU packet is a header-encoded and compressed HTTP text.
17、 根据权利要求 10至 16中任一项所述的方法, 其特征在于, 所述方 法还包括: 17. The method according to any one of claims 10 to 16, characterized in that the method further includes:
在首次传输 HTTP报文时,记录首次传输的 HTTP报文的编码头部取值、 URI和 HTTP版本号信息; When the HTTP message is transmitted for the first time, the encoding header value, URI and HTTP version number information of the HTTP message transmitted for the first time are recorded;
在非首次传输 HTTP报文时,根据所述接收的 HTTP报文更新所述已记 录的 HTTP报文。 When the HTTP message is not transmitted for the first time, the recorded HTTP message is updated according to the received HTTP message.
18、 根据权利要求 17所述的方法, 其特征在于, 所述根据所述接收的 HTTP报文更新所述已记录的 HTTP报文, 包括: 18. The method according to claim 17, characterized in that, updating the recorded HTTP message according to the received HTTP message includes:
如果所述接收的 HTTP报文的编码头部取值和所述已记录的 HTTP报文 的编码头部取值相同, 则保持所述已记录的 HTTP报文的编码头部及其取值 不变; 或 If the encoded header value of the received HTTP message is the same as the encoded header value of the recorded HTTP message, then the encoded header value of the recorded HTTP message and its value are kept unchanged. change; or
如果所述接收的 HTTP报文的编码头部取值和所述已记录的 HTTP报文 的编码头部取值不同, 则将所述已记录的 HTTP报文中的编码头部取值替换 为所述接收的 HTTP报文的编码头部取值; 或 If the encoding header value of the received HTTP message is different from the encoding header value of the recorded HTTP message, then replace the encoding header value in the recorded HTTP message with The value of the encoding header of the received HTTP message; or
如果所述已记录的 HTTP报文具有所述接收的 HTTP报文不具有的编码 头部, 则保持所述已记录的 HTTP报文的编码头部及其取值不变; 或 If the recorded HTTP message has an encoding header that the received HTTP message does not have, then keep the encoding header of the recorded HTTP message and its value unchanged; or
如果所述接收的 HTTP报文具有所述已记录的 HTTP报文不具有的编码 头部, 则记录所述接收的 HTTP报文具有但所述已记录的 HTTP报文不具有 的编码头部及其取值; 或 If the received HTTP message has an encoding header that the recorded HTTP message does not have, record the encoding header that the received HTTP message has but the recorded HTTP message does not have and its value; or
如果所述接收的 HTTP报文的版本号信息和所述已记录的 HTTP报文的 版本号信息相同, 则保持所述已记录的 HTTP报文的版本号信息不变; 或 如果所述接收的 HTTP报文的版本号信息和所述已记录的 HTTP报文的 版本号信息不同, 则将所述已记录的 HTTP报文中的版本号信息替换为所述 接收的 HTTP报文的版本号信息。 If the version number information of the received HTTP message is the same as the version number information of the recorded HTTP message, then keep the version number information of the recorded HTTP message unchanged; or if the received If the version number information of the HTTP message is different from the version number information of the recorded HTTP message, the version number information in the recorded HTTP message is replaced with the version number information of the received HTTP message. .
19、 一种 HTTP报文的编码装置, 其特征在于, 包括: 19. An HTTP message encoding device, characterized by including:
第一确定模块, 用于确定编码头部位图的每个比特位的取值, 各个所述 比特位的取值分别指示为所述比特位相应的待传输的编码头部的取值与已 记录的 HTTP报文中的相应编码头部的取值是否相同; The first determination module is used to determine the value of each bit of the encoding header bit map. The value of each bit is respectively indicated by the value of the encoding header to be transmitted corresponding to the bit and the value that has been transmitted. Whether the values of the corresponding encoding headers in the recorded HTTP messages are the same;
传输模块, 用于根据所述第一确定模块确定的所述每个比特位的取值, 生成并传输包括所述编码头部位图的待传输的 ΗΤΤΡ ·¾文, 以便于所述待传 输的 HTTP报文的接收方根据所述编码头部位图和所述已记录的 HTTP报 文,确定所述待传输的 HTTP报文中编码头部取值与所述已记录的 HTTP报 文中的相应编码头部的取值相同的第一编码头部以及所述第一编码头部的 取值。 A transmission module, configured to generate and transmit the HTTP text to be transmitted including the encoding header bitmap according to the value of each bit determined by the first determination module, so as to facilitate the transmission The receiver of the transmitted HTTP message determines the value of the encoding header in the HTTP message to be transmitted and the recorded HTTP message based on the encoding header bit map and the recorded HTTP message. The first encoding header whose value is the same as the corresponding encoding header in and the value of the first encoding header.
20、 根据权利要求 19所述的编码装置, 其特征在于, 所述编码装置还 包括: 20. The encoding device according to claim 19, characterized in that the encoding device further includes:
第二确定模块, 用于确定待传输的编码头部中取值与所述已记录的 HTTP报文中的相应编码头部的取值不同的第二编码头部, 以及所述第二编 码头部的取值; The second determination module is used to determine the second encoding header whose value in the encoding header to be transmitted is different from the value of the corresponding encoding header in the recorded HTTP message, and the second encoding header. The value of the part;
第三确定模块,用于确定所述第二确定模块确定的所述第二编码头部的 头部编码, 所述头部编码用于指代所述第二编码头部; A third determination module, configured to determine the header code of the second coded header determined by the second determination module, where the header code is used to refer to the second coded header;
其中, 所述传输模块用于: 根据所述第一确定模块确定的所述每个比特 位的取值、所述第三确定模块确定的所述第二编码头部的头部编码以及所述 第二确定模块确定的所述第二编码头部的取值, 生成并传输所述待传输的 HTTP报文。 Wherein, the transmission module is configured to: based on the value of each bit determined by the first determination module, the header coding of the second coding header determined by the third determination module and the The second determination module determines the value of the second encoding header, generates and transmits the HTTP message to be transmitted.
21、 根据权利要求 20所述的编码装置, 其特征在于, 所述编码装置还 包括: 21. The encoding device according to claim 20, characterized in that the encoding device further includes:
第四确定模块, 用于确定第一压缩指示以及第一字节数, 所述第一压缩 指示用于表示所述第二编码头部的取值被压缩, 所述第一字节数与第一相同 字节数相关联, 所述第一相同字节数为待传输的所述第二编码头部的取值与 所述已记录的 HTTP报文中的相应编码头部的取值连续相同的字节数; 其中, 所述传输模块用于: 根据所述第一确定模块确定的所述每个比特 位的取值、 所述第三确定模块确定的所述第二编码头部的头部编码、 所述第 四确定模块确定的所述第一压缩指示以及所述第一字节数, 生成并传输所述 待传输的 HTTP报文。 The fourth determination module is used to determine the first compression indication and the first number of bytes. The first compression indication is used to indicate that the value of the second encoding header is compressed. The first number of bytes and the first number of bytes are A same number of bytes is associated, and the first same number of bytes means that the value of the second encoding header to be transmitted is continuously the same as the value of the corresponding encoding header in the recorded HTTP message. The number of bytes; wherein, the transmission module is configured to: based on the value of each bit determined by the first determination module, the header of the second encoding header determined by the third determination module Using the partial encoding, the first compression indication determined by the fourth determination module, and the first number of bytes, the HTTP message to be transmitted is generated and transmitted.
22、 根据权利要求 20所述的编码装置, 其特征在于, 所述编码装置还 包括: 22. The encoding device according to claim 20, characterized in that the encoding device further includes:
第五确定模块,用于确定第二压缩指示以及第一 HTTP报文在所述已记 录的 HTTP报文中的次序信息, 其中, 所述第二压缩指示用于表示所述第二 编码头部的取值与相应于所述次序信息的所述第一 HTTP 文中的相应编码 头部的取值相同; 其中, 所述传输模块用于: 根据所述第一确定模块确定的所述每个比特 位的取值、 所述第三确定模块确定的所述第二编码头部的头部编码、 所述第 五确定模块确定的所述第二压缩指示以及所述次序信息, 生成并传输所述待 传输的 HTTP报文。 The fifth determination module is used to determine the second compression indication and the order information of the first HTTP message in the recorded HTTP message, wherein the second compression indication is used to represent the second encoding header. The value of is the same as the value of the corresponding encoding header in the first HTTP text corresponding to the order information; Wherein, the transmission module is configured to: based on the value of each bit determined by the first determination module, the header encoding of the second encoding header determined by the third determination module, the The second compression indication and the order information determined by the fifth determination module generate and transmit the HTTP message to be transmitted.
23、 根据权利要求 19所述的编码装置, 其特征在于, 所述编码装置还 包括: 23. The encoding device according to claim 19, characterized in that the encoding device further includes:
第六确定模块, 用于确定第三压缩指示以及第二字节数, 所述第三压缩 指示用于表示待传输的通用资源标识符 URI被压缩,所述第二字节数与第二 相同字节数相关联, 所述第二相同字节数为待传输的 URI 与所述已记录的 HTTP报文中的 URI连续相同的字节数; The sixth determination module is used to determine a third compression indication and a second number of bytes. The third compression indication is used to indicate that the universal resource identifier URI to be transmitted is compressed. The second number of bytes is the same as the second number of bytes. The number of bytes is related, and the second number of identical bytes is the number of bytes that the URI to be transmitted is continuously the same as the URI in the recorded HTTP message;
其中, 所述传输模块用于: 根据所述第一确定模块确定的所述每个比特 位的取值、 所述第六确定模块确定的所述第三压缩指示以及所述第二字节 数, 生成并传输所述待传输的 HTTP报文。 Wherein, the transmission module is configured to: based on the value of each bit determined by the first determination module, the third compression indication and the second number of bytes determined by the sixth determination module , generate and transmit the HTTP message to be transmitted.
24、 根据权利要求 19所述的编码装置, 其特征在于, 所述编码装置还 包括: 24. The encoding device according to claim 19, characterized in that the encoding device further includes:
第七确定模块, 用于确定待传输的 HTTP 版本号信息与所述已记录的 HTTP报文中的版本号信息是否相同; The seventh determination module is used to determine whether the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP message;
其中, 所述传输模块用于: Among them, the transmission module is used for:
在所述第七确定模块确定所述待传输的 HTTP版本号信息与所述已记录 的 HTTP报文中的版本号信息相同时, 根据所述每个比特位的取值, 生成并 传输所述待传输的 HTTP报文, 所述待传输的 HTTP报文包括所述编码头部 位图; When the seventh determination module determines that the HTTP version number information to be transmitted is the same as the version number information in the recorded HTTP message, based on the value of each bit, generate and transmit the The HTTP message to be transmitted, the HTTP message to be transmitted includes the encoding header bitmap;
在所述第七确定模块确定所述待传输的 HTTP版本号信息与所述已记录 的 HTTP报文中的版本号信息不同时,根据所述每个比特位的取值以及所述 待传输的 HTTP版本号信息, 生成并传输所述待传输的 HTTP报文, 所述待 传输的 HTTP报文包括所述编码头部位图和所述待传输的 HTTP版本号信 When the seventh determination module determines that the HTTP version number information to be transmitted is different from the version number information in the recorded HTTP message, according to the value of each bit and the HTTP version number information to be transmitted, HTTP version number information, generate and transmit the HTTP message to be transmitted, the HTTP message to be transmitted includes the encoding header bitmap and the HTTP version number information to be transmitted
25、 根据权利要求 19所述的编码装置, 其特征在于, 所述传输模块用 于: 25. The encoding device according to claim 19, characterized in that the transmission module is used for:
根据所述每个比特位的取值, 生成并传输包括类型字段的协议数据单元 According to the value of each bit, a protocol data unit including a type field is generated and transmitted
PDU包,所述类型字段用于指示所述 PDU包为经过头部编码和压缩的 HTTP 报文。 PDU packet, the type field is used to indicate that the PDU packet is header-encoded and compressed HTTP message.
26、 根据权利要求 19至 25中任一项所述的编码装置, 其特征在于, 所 述编码装置还包括: 26. The encoding device according to any one of claims 19 to 25, characterized in that the encoding device further includes:
记录模块, 用于在首次传输 HTTP报文时, 记录首次传输的 HTTP报文 的编码头部取值、 URI和 HTTP版本号信息; The recording module is used to record the encoding header value, URI and HTTP version number information of the HTTP message transmitted for the first time when the HTTP message is transmitted for the first time;
更新模块, 用于在非首次传输 HTTP报文时, 根据所述待传输的 HTTP 文更新所述已记录的 HTTP 4艮文。 The update module is configured to update the recorded HTTP message according to the HTTP message to be transmitted when the HTTP message is not transmitted for the first time.
27、 根据权利要求 26所述的编码装置, 其特征在于, 所述更新模块用 于: 27. The encoding device according to claim 26, characterized in that the update module is used for:
如果所述待传输的 HTTP报文的编码头部取值和所述已记录的 HTTP报 文的编码头部取值相同, 则保持所述已记录的 HTTP报文的编码头部及其取 值不变; 或 If the encoding header value of the HTTP message to be transmitted is the same as the encoding header value of the recorded HTTP message, then the encoding header and the value of the recorded HTTP message are retained. unchanged; or
如果所述待传输的 HTTP报文的编码头部取值和所述已记录的 HTTP报 文的编码头部取值不同, 则将所述已记录的 HTTP报文中的编码头部取值替 换为所述待传输的 HTTP报文的编码头部取值; 或 If the encoding header value of the HTTP message to be transmitted is different from the encoding header value of the recorded HTTP message, replace the encoding header value in the recorded HTTP message. Value for the encoding header of the HTTP message to be transmitted; or
如果所述已记录的 HTTP报文具有所述待传输的 HTTP报文不具有的编 码头部, 则保持所述已记录的 HTTP报文的编码头部及其取值不变; 或 If the recorded HTTP message has an encoding header that the HTTP message to be transmitted does not have, then keep the encoding header of the recorded HTTP message and its value unchanged; or
如果所述待传输的 HTTP报文具有所述已记录的 HTTP报文不具有的编 码头部, 则记录所述待传输的 HTTP报文具有但所述已记录的 HTTP报文不 具有的编码头部及其取值; 或 If the HTTP message to be transmitted has an encoding header that the recorded HTTP message does not have, record the encoding header that the HTTP message to be transmitted has but the recorded HTTP message does not have. part and its value; or
如果所述待传输的 HTTP报文的版本号信息和所述已记录的 HTTP报文 的版本号信息相同, 则保持所述已记录的 HTTP报文的版本号信息不变; 或 如果所述待传输的 HTTP报文的版本号信息和所述已记录的 HTTP报文 的版本号信息不同, 则将所述已记录的 HTTP报文中的版本号信息替换为所 述待传输的 HTTP报文的版本号信息。 If the version number information of the HTTP message to be transmitted is the same as the version number information of the recorded HTTP message, then keep the version number information of the recorded HTTP message unchanged; or if the version number information to be transmitted is the same. If the version number information of the transmitted HTTP message is different from the version number information of the recorded HTTP message, replace the version number information in the recorded HTTP message with the version number information of the HTTP message to be transmitted. Version number information.
28、 一种 HTTP报文的解码装置, 其特征在于, 包括: 28. A decoding device for HTTP messages, characterized by including:
获耳 ^莫块, 用于获取接收的 HTTP报文中的编码头部位图的每个比特位 的取值; Obtain block, used to obtain the value of each bit of the encoding header bitmap in the received HTTP message;
第一确定模块,用于在所述获取模块获取的所述编码头部位图的第一比 特位的取值指示为所述第一比特位相应的待解码的第一编码头部的取值与 已记录的 HTTP 报文中的相应编码头部的取值相同时, 将所述已记录的 HTTP报文中的与所述第一比特位相应的编码头部及其取值, 分别确定为所 述第一编码头部以及所述第一编码头部的取值。 The first determination module is configured to indicate that the value of the first bit of the encoding header bitmap obtained by the acquisition module is the value of the first encoding header to be decoded corresponding to the first bit. When the value of the corresponding encoding header in the recorded HTTP message is the same, the recorded The encoding header corresponding to the first bit in the HTTP message and its value are respectively determined as the first encoding header and the value of the first encoding header.
29、 根据权利要求 28所述的解码装置, 其特征在于, 所述解码装置还 包括: 29. The decoding device according to claim 28, characterized in that the decoding device further includes:
第二确定模块,用于在所述获取模块获取的所述编码头部位图的第二比 特位的取值指示为所述第二比特位相应的待解码的第二编码头部的取值与 已记录的 HTTP 报文中的相应编码头部的取值不同时, 根据所述接收的 HTTP 文中的头部编码, 确定所述头部编码指代的所述第二编码头部。 The second determination module is configured to indicate that the value of the second bit of the encoding header bit map obtained by the acquisition module is the value of the second encoding header to be decoded corresponding to the second bit. When the value of the corresponding encoding header in the recorded HTTP message is different, the second encoding header that the header encoding refers to is determined based on the header encoding in the received HTTP message.
30、 根据权利要求 29所述的解码装置, 其特征在于, 所述解码装置还 包括: 30. The decoding device according to claim 29, characterized in that, the decoding device further includes:
第三确定模块,用于根据所述接收的 HTTP报文中的第一压缩指示以及 第一字节数, 确定与所述第一字节数相关联的第一相同字节数, 其中所述第 一压缩指示用于表示所述第二编码头部的取值被压缩; A third determining module, configured to determine a first identical number of bytes associated with the first number of bytes based on the first compression indication and the first number of bytes in the received HTTP message, wherein the The first compression indication is used to indicate that the value of the second encoding header is compressed;
第四确定模块, 用于根据所述第三确定模块确定的所述第一相同字节 数,将所述已记录的 HTTP报文中的相应编码头部的取值中相应的连续第一 相同字节数的字节, 确定为所述第二编码头部的待解码的取值。 The fourth determination module is configured to determine, according to the first number of identical bytes determined by the third determination module, the corresponding first consecutive identical value among the values of the corresponding encoding header in the recorded HTTP message. The number of bytes is determined as the value to be decoded of the second encoding header.
31、 根据权利要求 29所述的解码装置, 其特征在于, 所述解码装置还 包括: 31. The decoding device according to claim 29, characterized in that the decoding device further includes:
第五确定模块,用于根据所述接收的 HTTP报文中的第二压缩指示以及 次序信息, 确定所述已记录的 HTTP 报文中与所述次序信息相应的第一 HTTP报文, 其中, 所述第二压缩指示用于表示所述第二编码头部的取值与 所述第一 HTTP报文中的相应编码头部的取值相同; The fifth determination module is configured to determine the first HTTP message corresponding to the sequence information in the recorded HTTP message according to the second compression indication and the sequence information in the received HTTP message, wherein, The second compression indication is used to indicate that the value of the second encoding header is the same as the value of the corresponding encoding header in the first HTTP message;
第六确定模块,用于将所述第五确定模块确定的所述第一 HTTP报文中 的相应编码头部的取值确定为所述第二编码头部的取值。 A sixth determination module, configured to determine the value of the corresponding encoding header in the first HTTP message determined by the fifth determination module as the value of the second encoding header.
32、 根据权利要求 28所述的解码装置, 其特征在于, 所述解码装置还 包括: 32. The decoding device according to claim 28, characterized in that the decoding device further includes:
第七确定模块,用于根据所述接收的 HTTP报文中的第三压缩指示以及 第二字节数, 确定与所述第二字节数相关联的第二相同字节数, 其中所述第 三压缩指示用于表示待解码的 URI被压缩; A seventh determination module, configured to determine a second identical number of bytes associated with the second number of bytes based on the third compression indication and the second number of bytes in the received HTTP message, wherein the The third compression indication is used to indicate that the URI to be decoded is compressed;
第八确定模块, 用于根据所述第七确定模块确定的所述第二相同字节 数,将所述已记录的 HTTP报文的 URI中相应的连续第二相同字节数的字节, 确定为所述接收的 HTTP报文中待解码的 URI。 The eighth determination module is configured to, according to the second identical number of bytes determined by the seventh determination module, obtain the corresponding second consecutive identical number of bytes in the URI of the recorded HTTP message, Determined to be the URI to be decoded in the received HTTP message.
33、 根据权利要求 28所述的解码装置, 其特征在于, 所述解码装置还 包括: 33. The decoding device according to claim 28, characterized in that the decoding device further includes:
第九确定模块,用于在确定所述接收的 HTTP报文中没有 HTTP版本号 信息时, 将所述已记录的 HTTP 报文中的版本号信息确定为所述接收的 HTTP报文的版本号信息。 A ninth determination module, configured to determine the version number information in the recorded HTTP message as the version number of the received HTTP message when it is determined that there is no HTTP version number information in the received HTTP message. information.
34、 根据权利要求 28所述的解码装置, 其特征在于, 所述解码装置还 包括: 34. The decoding device according to claim 28, characterized in that the decoding device further includes:
接收模块, 用于接收包括类型字段的协议数据单元 PDU 包, 所述类型 字段用于指示所述 PDU包为经过头部编码和压缩的 HTTP ^艮文。 A receiving module, configured to receive a protocol data unit PDU packet including a type field, where the type field is used to indicate that the PDU packet is a header-encoded and compressed HTTP text.
35、 根据权利要求 28至 34中任一项所述的解码装置, 其特征在于, 所 述解码装置还包括: 35. The decoding device according to any one of claims 28 to 34, characterized in that the decoding device further includes:
记录模块, 用于在首次传输 HTTP报文时, 记录首次传输的 HTTP报文 的编码头部取值、 URI和 HTTP版本号信息; The recording module is used to record the encoding header value, URI and HTTP version number information of the HTTP message transmitted for the first time when the HTTP message is transmitted for the first time;
更新模块, 用于在非首次传输 HTTP报文时, 根据所述接收的 HTTP报 文更新所述已记录的 HTTP ^艮文。 The update module is configured to update the recorded HTTP message according to the received HTTP message when the HTTP message is not transmitted for the first time.
36、 根据权利要求 35所述的解码装置, 其特征在于, 所述更新模块用 于: 36. The decoding device according to claim 35, characterized in that the update module is used for:
如果所述接收的 HTTP报文的编码头部取值和所述已记录的 HTTP报文 的编码头部取值相同, 则保持所述已记录的 HTTP报文的编码头部及其取值 不变; 或 If the encoded header value of the received HTTP message is the same as the encoded header value of the recorded HTTP message, then the encoded header value of the recorded HTTP message and its value are kept unchanged. change; or
如果所述接收的 HTTP报文的编码头部取值和所述已记录的 HTTP报文 的编码头部取值不同, 则将所述已记录的 HTTP报文中的编码头部取值替换 为所述接收的 HTTP报文的编码头部取值; 或 If the encoding header value of the received HTTP message is different from the encoding header value of the recorded HTTP message, then replace the encoding header value in the recorded HTTP message with The value of the encoding header of the received HTTP message; or
如果所述已记录的 HTTP报文具有所述接收的 HTTP报文不具有的编码 头部, 则保持所述已记录的 HTTP报文的编码头部及其取值不变; 或 If the recorded HTTP message has an encoding header that the received HTTP message does not have, then keep the encoding header of the recorded HTTP message and its value unchanged; or
如果所述接收的 HTTP报文具有所述已记录的 HTTP报文不具有的编码 头部, 则记录所述接收的 HTTP报文具有但所述已记录的 HTTP报文不具有 的编码头部及其取值; 或 If the received HTTP message has an encoding header that the recorded HTTP message does not have, record the encoding header that the received HTTP message has but the recorded HTTP message does not have and its value; or
如果所述接收的 HTTP报文的版本号信息和所述已记录的 HTTP报文的 版本号信息相同, 则保持所述已记录的 HTTP报文的版本号信息不变; 或 如果所述接收的 HTTP报文的版本号信息和所述已记录的 HTTP报文的 版本号信息不同, 则将所述已记录的 HTTP报文中的版本号信息替换为所述 接收的 HTTP报文的版本号信息。 If the version number information of the received HTTP message is the same as the version number information of the recorded HTTP message, then keep the version number information of the recorded HTTP message unchanged; or If the version number information of the received HTTP message is different from the version number information of the recorded HTTP message, replace the version number information in the recorded HTTP message with the received HTTP message. The version number information of the document.
37、 一种 HTTP报文的编码装置, 其特征在于, 包括: 处理器、存储器、 总线和发送器; 37. An HTTP message encoding device, characterized by including: a processor, a memory, a bus and a transmitter;
其中, 所述处理器、 所述存储器和所述发送器通过所述总线相连, 所述 存储器用于存储指令, 所述处理器通过所述总线, 调用所述存储器中存储的 所述指令, 以用于确定编码头部位图的每个比特位的取值, 各个所述比特位 的取值分别指示为所述比特位相应的待传输的编码头部的取值与已记录的 HTTP报文中的相应编码头部的取值是否相同; Wherein, the processor, the memory and the transmitter are connected through the bus, the memory is used to store instructions, and the processor calls the instructions stored in the memory through the bus, so as to Used to determine the value of each bit of the encoding header bitmap. The value of each bit is respectively indicated by the value of the encoding header to be transmitted corresponding to the bit and the recorded HTTP message. Whether the values of the corresponding encoding headers in are the same;
所述处理器还用于根据所述每个比特位的取值, 生成包括所述编码头部 位图的待传输的 HTTP报文; The processor is also configured to generate an HTTP message to be transmitted including the encoded header bitmap according to the value of each bit;
所述处理器还用于控制所述发送器向接收方发送所述待传输的 HTTP报 文, 以便于所述接收方根据所述编码头部位图和所述已记录的 HTTP报文, 确定所述待传输的 HTTP报文中编码头部取值与所述已记录的 HTTP报文中 的相应编码头部的取值相同的第一编码头部以及所述第一编码头部的取值。 The processor is also configured to control the sender to send the HTTP message to be transmitted to the receiver, so that the receiver determines based on the encoding header bit map and the recorded HTTP message. The first encoding header whose value in the HTTP message to be transmitted is the same as the value of the corresponding encoding header in the recorded HTTP message and the value of the first encoding header .
38、 一种 HTTP报文的解码装置, 其特征在于, 包括: 处理器、 存储器 和总线; 38. An HTTP message decoding device, characterized by including: a processor, a memory and a bus;
其中, 所述处理器和所述存储器通过所述总线相连, 所述存储器用于存 储指令, 所述处理器通过所述总线, 调用所述存储器中存储的所述指令, 以 用于获取接收的 HTTP报文中的编码头部位图的每个比特位的取值; Wherein, the processor and the memory are connected through the bus, the memory is used to store instructions, and the processor calls the instructions stored in the memory through the bus to obtain the received The value of each bit of the encoding header bitmap in the HTTP message;
所述处理器还用于在所述编码头部位图的第一比特位的取值指示为所 述第一比特位相应的待解码的第一编码头部的取值与已记录的 HTTP报文中 的相应编码头部的取值相同时,将所述已记录的 HTTP ^艮文中的与所述第一 比特位相应的编码头部及其取值,分别确定为所述第一编码头部以及所述第 一编码头部的取值。 The processor is further configured to indicate that the value of the first bit of the encoding header bitmap is the value of the first encoding header to be decoded corresponding to the first bit and the recorded HTTP packet. When the values of the corresponding coding headers in the text are the same, the coding header corresponding to the first bit in the recorded HTTP text and its value are respectively determined to be the first coding header. part and the value of the first encoding header.
PCT/CN2013/070595 2013-01-17 2013-01-17 Method for transmitting http packet, encoding device, and decoding device WO2014110754A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201380000201.5A CN104081747B (en) 2013-01-17 2013-01-17 Transmit method, the encoding apparatus and decoding apparatus of HTTP message
PCT/CN2013/070595 WO2014110754A1 (en) 2013-01-17 2013-01-17 Method for transmitting http packet, encoding device, and decoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/070595 WO2014110754A1 (en) 2013-01-17 2013-01-17 Method for transmitting http packet, encoding device, and decoding device

Publications (1)

Publication Number Publication Date
WO2014110754A1 true WO2014110754A1 (en) 2014-07-24

Family

ID=51208941

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/070595 WO2014110754A1 (en) 2013-01-17 2013-01-17 Method for transmitting http packet, encoding device, and decoding device

Country Status (2)

Country Link
CN (1) CN104081747B (en)
WO (1) WO2014110754A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017198183A1 (en) * 2016-05-18 2017-11-23 中国移动通信有限公司研究院 Uplink data transmission method and system, user equipment, base station and storage medium
WO2022073162A1 (en) * 2020-10-08 2022-04-14 Qualcomm Incorporated Compression and segmenting for communicating parameters of a neural network configuration

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112385305A (en) * 2018-09-28 2021-02-19 Oppo广东移动通信有限公司 Communication method, terminal equipment and network equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119385A (en) * 2007-08-10 2008-02-06 深圳市深信服电子科技有限公司 Method for enhancing HTTP network velocity using WebPush
CN102307151A (en) * 2011-10-10 2012-01-04 上海西默通信技术有限公司 HTTP (hyper text transport protocol)-based network packet reduction method
CN102833327A (en) * 2012-08-16 2012-12-19 瑞斯康达科技发展股份有限公司 Method and device for recognizing type of client based on HTTP (hypertext transport protocol)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7370100B1 (en) * 2003-12-10 2008-05-06 Foundry Networks, Inc. Method and apparatus for load balancing based on packet header content
US7512159B2 (en) * 2004-09-01 2009-03-31 Delphi Technologies, Inc Method for variable performance in communication systems
CN102143527B (en) * 2010-02-03 2013-09-11 华为技术有限公司 Compression method and device for nested protocol packet header
CN101800750B (en) * 2010-03-03 2012-04-18 华为技术有限公司 Method, device and system for data transmission

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119385A (en) * 2007-08-10 2008-02-06 深圳市深信服电子科技有限公司 Method for enhancing HTTP network velocity using WebPush
CN102307151A (en) * 2011-10-10 2012-01-04 上海西默通信技术有限公司 HTTP (hyper text transport protocol)-based network packet reduction method
CN102833327A (en) * 2012-08-16 2012-12-19 瑞斯康达科技发展股份有限公司 Method and device for recognizing type of client based on HTTP (hypertext transport protocol)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017198183A1 (en) * 2016-05-18 2017-11-23 中国移动通信有限公司研究院 Uplink data transmission method and system, user equipment, base station and storage medium
CN107404735A (en) * 2016-05-18 2017-11-28 中国移动通信有限公司研究院 A kind of uplink data transmission method and system, user equipment and base station
WO2022073162A1 (en) * 2020-10-08 2022-04-14 Qualcomm Incorporated Compression and segmenting for communicating parameters of a neural network configuration

Also Published As

Publication number Publication date
CN104081747A (en) 2014-10-01
CN104081747B (en) 2017-05-31

Similar Documents

Publication Publication Date Title
US10104578B2 (en) Data transmission method and device
KR101645109B1 (en) Small data techniques and configurations in a wireless communication network
JP5904347B2 (en) Data communication method, apparatus, and system
CN108667559B (en) Communication method and device
JP2014045499A (en) Data transmission method and data transmission device
JP7327831B2 (en) Communication method and device
CN112134649B (en) Method for transmitting data and transmitting terminal equipment
WO2016019552A1 (en) Data transmission method, device and system
WO2018227814A1 (en) Data indicating method, device and communication system
WO2013091510A1 (en) Data frame transmission method and device
CN110463239B (en) Data transmission method, terminal equipment and network equipment
WO2018081989A1 (en) Uplink control information transmission method, terminal device, and network device
WO2014110754A1 (en) Method for transmitting http packet, encoding device, and decoding device
EP3292678B1 (en) System, terminal, server, and method for data transmission
TW201806326A (en) Method for transmitting data and apparatus
EP3550761B1 (en) Data transmission method and device, and information transmission method and device
JP6478191B2 (en) Message transmission method, mobile broadband device and host
WO2020177642A1 (en) Ethernet message transmission method, apparatus, and system
CN112673660A (en) Method for identifying terminal capability in wireless communication system
WO2016145616A1 (en) Method, device, and system for information transmission
CN106534056B (en) Communication device and communication method
US11483737B2 (en) RRC message transmission method and device
WO2017143538A1 (en) Voice data transmission method and apparatus
WO2019214625A1 (en) Ue capability information reporting, obtaining, and processing methods and corresponding apparatuses
CN115669019A (en) Method and apparatus for signaling network coding capabilities

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

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

Country of ref document: EP

Kind code of ref document: A1