CN105933335A - Method for implementing network protocol encapsulation - Google Patents

Method for implementing network protocol encapsulation Download PDF

Info

Publication number
CN105933335A
CN105933335A CN201610451677.6A CN201610451677A CN105933335A CN 105933335 A CN105933335 A CN 105933335A CN 201610451677 A CN201610451677 A CN 201610451677A CN 105933335 A CN105933335 A CN 105933335A
Authority
CN
China
Prior art keywords
client
json
message
http
content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610451677.6A
Other languages
Chinese (zh)
Inventor
李永强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Zhuo Yi Electronic Technology Co., Ltd.
Original Assignee
Shanghai Zhuo Cloud Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Zhuo Cloud Intelligent Technology Co Ltd filed Critical Shanghai Zhuo Cloud Intelligent Technology Co Ltd
Priority to CN201610451677.6A priority Critical patent/CN105933335A/en
Publication of CN105933335A publication Critical patent/CN105933335A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

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

Abstract

The invention provides a method for implementing network protocol encapsulation. By a http (Hyper Text Transfer Protocol), data is encapsulated into a json (JavaScript Object Notation) format. A JSON comprises message IDs (Identity) and message types (picture, audio, file and the like) so as to enable a client to carry out parsing. Contents of all the messages are encapsulated into one standard json format, and then the client or a server receives contents requested by the HTTP to parse the corresponding contents. Uniformity of all communication messages of the client and the server side is achieved. Development is more standard.

Description

A kind of implementation method of procotol encapsulation
Technical field
The present invention relates to field of computer technology, particularly relate to the implementation method of a kind of procotol encapsulation.
Background technology
Http protocol (HyperText Transfer Protocol, HTML (Hypertext Markup Language)) is for passing from www server Defeated hypertext is to the host-host protocol of local browser.It can make browser more efficient, makes network transmission reduce.It is not only protected Card computer transmits hypertext document the most rapidly, also determines which part in transferring documents, and which partial content is first Display (if text is prior to figure) etc..
HTTP is the application layer communication protocol between client browser or other program and Web server.At Internet On Web server on deposit is all hypertext information, client computer needs the super literary composition to be accessed by http protocol transmission This information.HTTP comprises order and transmission information, cannot be only used for web access, it is also possible to for other the Internet/intranet Communication between application system, thus realize the integrated of types of applications resource hypermedia access JSON (JavaScript Object Notation) is the data interchange format of a kind of lightweight.It is based on ECMAScript one Subset.JSON uses the text formatting being totally independent of language, but also using the custom (bag being similar to C language family Include C, C++, C#, Java, JavaScript, Perl, Python etc.).These characteristics make JSON become the friendship of preferable data Change language.It is prone to people read and write, is also easy to machine simultaneously and resolves and generate (being generally used for promoting network transmission speed).
Summary of the invention
In view of this, the invention provides the implementation method of a kind of procotol encapsulation, by http agreement, then data It is packaged into inside json form .JSON and comprises message id, type of message (picture, audio frequency, file etc.), in order to client Resolve.The content of all message is all packaged into the json form of a standard, and then client or server receive HTTP The content of request carries out resolving corresponding content.Realize the uniformity of all client-server end communication informations.Develop more standard.
The technical solution adopted in the present invention is: the implementation method of a kind of procotol encapsulation, it is characterised in that described method Comprise the following steps:
Json form is encapsulated data into by http agreement;Message id, type of message is comprised inside described JSON form;
Client or server receive HTTP request content;
Client or server resolve the message content being packaged into JSON form.
Further, described type of message includes picture, audio frequency or file.
The invention has the beneficial effects as follows: the present invention passes through http agreement, then data is packaged into inside json form .JSON Comprise message id, type of message (picture, audio frequency, file etc.), in order to client resolves.The content of all message All being packaged into the json form of a standard, then client or server receive the content of HTTP request and carry out resolving corresponding Content.Realize the uniformity of all client-server end communication informations.Develop more standard.
Detailed description of the invention
The implementation method of a kind of procotol encapsulation that the present invention provides, said method comprising the steps of:
Json form is encapsulated data into by http agreement;Message id, type of message is comprised inside described JSON form;
Client or server receive HTTP request content;
Client or server resolve the message content being packaged into JSON form.
Specifically, described encapsulation step includes:
First: JSON head, needs the server info connected, and some authentication information;
Second, JSON content: the real content needing transmission;
3rd: JSON head and content are formed a big JSON.
As the another improvement of technical scheme, described type of message includes picture, audio frequency or file.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, can be by Computer program instructs relevant hardware and completes, and described program can be stored in a computer read/write memory medium, should Program is upon execution, it may include such as the flow process of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic disc, light Dish, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc..
The above is the preferred embodiment of the present invention, it is noted that for those skilled in the art, Under the premise without departing from the principles of the invention, it is also possible to make some improvements and modifications, these improvements and modifications are also considered as the present invention Protection domain.

Claims (2)

1. the implementation method of a procotol encapsulation, it is characterised in that said method comprising the steps of:
Json form is encapsulated data into by http agreement;Message id, type of message is comprised inside described JSON form;
Client or server receive HTTP request content;
Client or server resolve the message content being packaged into JSON form.
A kind of procotol the most as claimed in claim 1 encapsulation implementation method, it is characterised in that described type of message include picture, Audio frequency or file.
CN201610451677.6A 2016-06-21 2016-06-21 Method for implementing network protocol encapsulation Pending CN105933335A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610451677.6A CN105933335A (en) 2016-06-21 2016-06-21 Method for implementing network protocol encapsulation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610451677.6A CN105933335A (en) 2016-06-21 2016-06-21 Method for implementing network protocol encapsulation

Publications (1)

Publication Number Publication Date
CN105933335A true CN105933335A (en) 2016-09-07

Family

ID=56830587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610451677.6A Pending CN105933335A (en) 2016-06-21 2016-06-21 Method for implementing network protocol encapsulation

Country Status (1)

Country Link
CN (1) CN105933335A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110135222A (en) * 2018-02-08 2019-08-16 上海荟宸信息科技有限公司 A method of realizing the transmission of wisdom commercial circle face characteristic information acquisition terminal data
CN107317865B (en) * 2017-06-30 2019-11-05 中国科学院信息工程研究所 A kind of general off-line data cut-in method and system
CN113037848A (en) * 2021-03-18 2021-06-25 上海哔哩哔哩科技有限公司 File uploading method and system
CN113347151A (en) * 2021-04-28 2021-09-03 厦门海迈科技股份有限公司 Data interaction method based on socket shared memory
CN114040018A (en) * 2021-10-11 2022-02-11 许昌许继软件技术有限公司 Data receiving and transmitting method and device based on JSON data format

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107317865B (en) * 2017-06-30 2019-11-05 中国科学院信息工程研究所 A kind of general off-line data cut-in method and system
CN110135222A (en) * 2018-02-08 2019-08-16 上海荟宸信息科技有限公司 A method of realizing the transmission of wisdom commercial circle face characteristic information acquisition terminal data
CN113037848A (en) * 2021-03-18 2021-06-25 上海哔哩哔哩科技有限公司 File uploading method and system
CN113037848B (en) * 2021-03-18 2024-03-15 上海哔哩哔哩科技有限公司 File uploading method and system
CN113347151A (en) * 2021-04-28 2021-09-03 厦门海迈科技股份有限公司 Data interaction method based on socket shared memory
CN114040018A (en) * 2021-10-11 2022-02-11 许昌许继软件技术有限公司 Data receiving and transmitting method and device based on JSON data format

Similar Documents

Publication Publication Date Title
CN105933335A (en) Method for implementing network protocol encapsulation
CN103942225B (en) A kind of resource transfer method, client and the system of mixed type applications client
US9697188B2 (en) Method to enable cross-origin resource sharing from a webpage inside a private network
CN104396263B (en) For the method and system of the real-time multiplexing transformation of streaming content
US8589484B2 (en) Method for optimizing a web content proxy server and devices thereof
US9684628B2 (en) Mechanism for inserting trustworthy parameters into AJAX via server-side proxy
CN108337528A (en) A kind of method and apparatus of preview video
CN104714965B (en) Static resource De-weight method, static resource management method and device
JP6854046B2 (en) Data backfill method, terminal, and system
CN105915945A (en) Content distribution method used for CDN platform and scheduling proxy server thereof
CN102111685A (en) Acceleration method, equipment and system for network video loading
CN104735062B (en) A kind of network user register method and server
RU2602244C1 (en) Inheritance of uniform resource identifier (uri) parameters
CN103338236B (en) A kind of concurrent data acquisition methods and system
CN103888540B (en) Login information synchronization method, synchronized network servers and synchronizing network servers
CN105812323A (en) Method and device for accessing data by crossing network domains
CN108124007A (en) The method and apparatus of message data real-time Transmission
WO2011119445A2 (en) Content distribution using embeddable widgets
JP6666441B2 (en) IP address obtaining method and apparatus
US20130204935A1 (en) Dynamic sharing of a webservice
CN105787750A (en) Information pushing method and information pushing device
CN105677688B (en) Page data loading method and system
CN101615184A (en) A kind of method and device of discerning types of related web page resources
CN102984179A (en) Cloud-computing operating system oriented method for cross-domain access to Web services
CN106134156B (en) The signal of the forensic mark of adaptive stream media is sent and the method and apparatus of processing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20170728

Address after: 200233 room 84, building 700, No. 307-1, Xuhui District, Shanghai, Yishan Road

Applicant after: Shanghai Zhuo Yi Electronic Technology Co., Ltd.

Address before: 200233 Guiping Road, Xuhui District, No. 391, building 20, floor 3,

Applicant before: Shanghai Zhuo cloud Intelligent Technology Co. Ltd.

WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160907