CN107094178A - A kind of Internet data transmission method, device and server terminal - Google Patents

A kind of Internet data transmission method, device and server terminal Download PDF

Info

Publication number
CN107094178A
CN107094178A CN201710330388.5A CN201710330388A CN107094178A CN 107094178 A CN107094178 A CN 107094178A CN 201710330388 A CN201710330388 A CN 201710330388A CN 107094178 A CN107094178 A CN 107094178A
Authority
CN
China
Prior art keywords
data
request
value
key
values
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.)
Granted
Application number
CN201710330388.5A
Other languages
Chinese (zh)
Other versions
CN107094178B (en
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.)
Guangdong Wangjin Holdings Co Ltd
Original Assignee
Guangdong Wangjin Holdings 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 Guangdong Wangjin Holdings Co Ltd filed Critical Guangdong Wangjin Holdings Co Ltd
Priority to CN201710330388.5A priority Critical patent/CN107094178B/en
Publication of CN107094178A publication Critical patent/CN107094178A/en
Application granted granted Critical
Publication of CN107094178B publication Critical patent/CN107094178B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data
    • 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management

Landscapes

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

Abstract

The invention discloses a kind of Internet data transmission method, device and server terminal, method includes:The request data received in the request message that client is sent, the request message only includes value values;The request data in request message is extracted, the value values in request data are associated by corresponding key values, the one-to-one request key value data of reduction according to data structure configuration file;Corresponding logical operation process, generation response key value data are carried out according to request key value data;The value values responded in key value data are write in the response data of response message according to data structure configuration file, and response message is sent into client;The server terminal and client are each equipped with identical data structure configuration file.The present invention solves the problem of communication Times style product is big.

Description

A kind of Internet data transmission method, device and server terminal
Technical field
The present invention relates to Internet data transmission process field.
Background technology
With the development and popularization of internet, the life of people and network are closely bound up, and wherein http agreements are to use It is one be most widely used on current internet in from www server transports hypertext to the host-host protocol of local browser Plant procotol.
Http is the application layer communication protocol between client browser or other programs and Web server. What is deposited on Web server on Internet is all hypertext information, and client computer needs to be visited by the transmission of http agreements The hypertext information asked.Http comprising order and transmission information, cannot be only used for web access, can be used for other internets/ Communication between Intranet application system, so that it is integrated to realize that types of applications resource hypermedia is accessed.
Enterprise SOA (SOA) system, more modules are divided into by application system by different business functions, this A little modules interface good by being defined between these services and contract are connected, between interface by http protocol massages or Person's https protocol massages are interacted, increasing interactive interfacing, necessarily increase the communication traffic between service.At present The text formatting communicated based on http protocol massages and https protocol massages uses json, form list, xml mostly, and this The text of form is essentially identical to the numerical value of key-value forms, the especially text of xml forms and more increases the body of message Product.
The content of the invention
In order to overcome the deficiencies in the prior art, an object of the present invention is to provide a kind of Internet data transmission side Method, solves the problem of communication Times style product is big.
In order to overcome the deficiencies in the prior art, the second object of the present invention is to provide a kind of Internet data transmission dress Put, solve the problem of communication Times style product is big.
In order to overcome the deficiencies in the prior art, the third object of the present invention is to provide a kind of server terminal, solved Communicate the problem of Times style product is big.
One of to achieve the above object, the technical solution adopted in the present invention is as follows:
A kind of Internet data transmission method, applied to server terminal, comprises the following steps:
The request data received in the request message that client is sent, the request message only includes value values;
The request data in request message is extracted, the value values in request data are closed according to data structure configuration file Join corresponding key values, the one-to-one request key-value data of reduction;
Corresponding logical operation process, generation response key-value data are carried out according to request key-value data;
The value values responded in key-value data are write to the response of response message according to data structure configuration file In data, and response message is sent into client;
Wherein, the value values in the request message will ask key- by client according to data structure configuration file In the request data of value value write request messages in value data, the server terminal and client are each equipped with phase Same data structure configuration file.
It is preferred that, different value values are carried out by separator or regular length in the request data and response data Segmentation.
It is preferred that, the key values that the data structure configuration file includes request message are defined, and response message Key values are defined.
It is preferred that, the type of the request message and response message is http protocol types or https protocol types.
To achieve the above object two, the technical solution adopted in the present invention is as follows:
A kind of Internet data transmission device, applied to server terminal, including with lower module:
Request data in receiving module, the request message for receiving client transmission, the request message is only included Value values;
Recovery module, for extracting the request data in request message, according to data structure configuration file by request data In value values associate corresponding key values, key-value data are asked in reduction correspondingly;
Computing module, for carrying out corresponding logical operation process, generation response key- according to request key-value data Value data;
Respond module, rings for being write the value values responded in key-value data according to data structure configuration file In the response data for answering message, and response message is sent into client;
Wherein, the value values in the request message will ask key- by client according to data structure configuration file In the request data of value value write request messages in value data, the server terminal and client are each equipped with phase Same data structure configuration file.
It is preferred that, different value values are carried out by separator or regular length in the request data and response data Segmentation.
It is preferred that, the key values that the data structure configuration file includes request message are defined, and response message Key values are defined.
It is preferred that, the type of the request message and response message is http protocol types or https protocol types.
To achieve the above object three, the technical solution adopted in the present invention is as follows:
A kind of server terminal, including:
Memory, for storage program instruction;
Processor, for running described program instruction, to perform following steps:
The request data received in the request message that client is sent, the request message only includes value values;
The request data in request message is extracted, the value values in request data are closed according to data structure configuration file Join corresponding key values, the one-to-one request key-value data of reduction;
Corresponding logical operation process, generation response key-value data are carried out according to request key-value data;
The value values responded in key-value data are write to the response of response message according to data structure configuration file In data, and response message is sent into client;
Wherein, the value values in the request message will ask key- by client according to data structure configuration file In the request data of value value write request messages in value data, the server terminal and client are each equipped with phase Same data structure configuration file.
It is preferred that, different value values are carried out by separator or regular length in the request data and response data Segmentation.
It is preferred that, the key values that the data structure configuration file includes request message are defined, and response message Key values are defined.
It is preferred that, the type of the request message and response message is http protocol types or https protocol types.
Compared with prior art, the beneficial effects of the present invention are:
By having configured data structure configuration file in server end and client, write-in is only needed to when generating message Value values, it is in corresponding key values relation defined in data structure configuration file.The body of message can be greatly reduced during communication Product, reduces the flow of communication, improves efficiency of transmission.
Brief description of the drawings
Fig. 1 is the flow chart of Internet data transmission method in the embodiment of the present invention one;
Fig. 2 is the structure chart of Internet data transmission device in the embodiment of the present invention two;
Fig. 3 is the structure chart of server terminal in the embodiment of the present invention three.
Embodiment
Below, with reference to accompanying drawing and embodiment, the present invention is described further:
Embodiment one:
With reference to Fig. 1, the present embodiment provides a kind of Internet data transmission method, applied to server terminal, including following Step:
S1, the request data received in the request message that client is sent, the request message only include value values;
S2, the request data extracted in request message, according to data structure configuration file by the value values in request data Associate corresponding key values, the one-to-one request key-value data of reduction;
S3, corresponding logical operation process, generation response key-value data are carried out according to request key-value data;
S4, according to data structure configuration file by respond key-value data in value values write-in response message sound Answer in data, and response message is sent into client;
Wherein, the value values in request message will ask key-value numbers by client according to data structure configuration file In the request data of value value write request messages in, server terminal and client are each equipped with identical data knot Structure configuration file.
It is preferred that, different value values are split by separator or regular length in request data and response data. Data structure configuration file includes the key values definition of request message, and the key values of response message are defined.Request message and The type of response message is http protocol types or https protocol types.
Embodiment two:
With reference to Fig. 2, a kind of Internet data transmission device is present embodiments provided, applied to server terminal, including with Lower module:
Request data in receiving module, the request message for receiving client transmission, the request message is only included Value values;
Recovery module, for extracting the request data in request message, according to data structure configuration file by request data In value values associate corresponding key values, key-value data are asked in reduction correspondingly;
Computing module, for carrying out corresponding logical operation process, generation response key- according to request key-value data Value data;
Respond module, rings for being write the value values responded in key-value data according to data structure configuration file In the response data for answering message, and response message is sent into client;
Wherein, the value values in the request message will ask key- by client according to data structure configuration file In the request data of value value write request messages in value data, the server terminal and client are each equipped with phase Same data structure configuration file.
It is preferred that, different value values are carried out by separator or regular length in the request data and response data Segmentation.
It is preferred that, the key values that the data structure configuration file includes request message are defined, and response message Key values are defined.
It is preferred that, the type of the request message and response message is http protocol types or https protocol types.
Embodiment three:
With reference to Fig. 3, a kind of server terminal is present embodiments provided, including:
Memory, for storage program instruction;
Processor, for running described program instruction, to perform following steps:
The request data received in the request message that client is sent, the request message only includes value values;
The request data in request message is extracted, the value values in request data are closed according to data structure configuration file Join corresponding key values, the one-to-one request key-value data of reduction;
Corresponding logical operation process, generation response key-value data are carried out according to request key-value data;
The value values responded in key-value data are write to the response of response message according to data structure configuration file In data, and response message is sent into client;
Wherein, the value values in the request message will ask key- by client according to data structure configuration file In the request data of value value write request messages in value data, the server terminal and client are each equipped with phase Same data structure configuration file.
It is preferred that, different value values are carried out by separator or regular length in the request data and response data Segmentation.
It is preferred that, the key values that the data structure configuration file includes request message are defined, and response message Key values are defined.
It is preferred that, the type of the request message and response message is http protocol types or https protocol types.
The present invention is specifically described below by with reference to specific example.
Http/https protocol sections are substantially now uses xml, json, and form-data forms are submitted, composition After http/https messages, the form of message is as follows:
1) xml data formats:
Request row:Ask row information
Request header:Request header information
Null:
Request data:
<Xml version=" 1.0 " encoding=" UTF-8 ">
<key1>value1</key1>
<key2>value2</key2>
2) Json data formats:
Request row:Ask row information
Request header:Request header information
Null:
Request data:
{"key1":"value1",
"key2":"value2"
}
3) form-data data formats:
Request row:Ask row information
Request header:Request header information
Null:
Request data:
Key1=value1&key2=value2
Above-mentioned three kinds of transmission means all carry key values and value values, and wherein xml message formats have more request datas Information.
The data transmission method that the present invention is provided only needs to transmit value values, the data format of request message can be as Under:
Request row:Ask row information
Request header:Request header information
Null:
Request data:
value1&value2
The data format of returned packet can be as follows:
Statusline:
Message header:
Response data:value3
Good key values defined in data structure configuration file in server end and client, being specifically defined form can be with It is as follows:
The data structure of request message:
String key1;
Int key2;
The data structure of response message:
String key3;
Server end is after the request data in extracting request message, according to data structure configuration file by request data Value values associate corresponding key values, just reducible one-to-one request key-value data:
Key1=value1;
Key2=value2;
Client after receiving response message also according to data structure configuration file by the value values in response data Associate corresponding key values, reduction response key-value data:
Key3=value3;
The advantage of the invention is that:By having configured data structure configuration file in server end and client, in life Only need to write value values during into message, it is in corresponding key values relation defined in data structure configuration file.During communication The volume of message can be greatly reduced, the flow of communication is reduced, efficiency of transmission is improved.
It will be apparent to those skilled in the art that technical scheme that can be as described above and design, make other various It is corresponding to change and deformation, and all these change and deformation should all belong to the protection domain of the claims in the present invention Within.

Claims (10)

1. a kind of Internet data transmission method, it is characterised in that applied to server terminal, comprise the following steps:
The request data received in the request message that client is sent, the request message only includes value values;
Extract request message in request data, according to data structure configuration file by request data value values associate pair The key values answered, the one-to-one request key-value data of reduction;
Corresponding logical operation process, generation response key-value data are carried out according to request key-value data;
The value values responded in key-value data are write to the response data of response message according to data structure configuration file In, and response message is sent into client;
Wherein, the value values in the request message will ask key-value numbers by client according to data structure configuration file In the request data of value value write request messages in, the server terminal and client are each equipped with identical number According to structure configuration file.
2. Internet data transmission method according to claim 1, it is characterised in that the request data and response data Middle different value values are split by separator or regular length.
3. Internet data transmission method according to claim 1, it is characterised in that in the data structure configuration file Key values definition including request message, and the key values of response message are defined.
4. Internet data transmission method according to claim 1, it is characterised in that the request message and response message Type be http protocol types or https protocol types.
5. a kind of Internet data transmission device, it is characterised in that applied to server terminal, including with lower module:
Request data in receiving module, the request message for receiving client transmission, the request message only includes value Value;
Recovery module, for extracting the request data in request message, according to data structure configuration file by request data Value values associate corresponding key values, the one-to-one request key-value data of reduction;
Computing module, for carrying out corresponding logical operation process, generation response key- according to request key-value data Value data;
Respond module, for the value values write-in response report that will be responded according to data structure configuration file in key-value data In the response data of text, and response message is sent into client;
Wherein, the value values in the request message will ask key-value numbers by client according to data structure configuration file In the request data of value value write request messages in, the server terminal and client are each equipped with identical number According to structure configuration file.
6. Internet data transmission device according to claim 5, it is characterised in that the request data and response data Middle different value values are split by separator or regular length.
7. a kind of server terminal, it is characterised in that including:
Memory, for storage program instruction;
Processor, for running described program instruction, to perform following steps:
The request data received in the request message that client is sent, the request message only includes value values;
Extract request message in request data, according to data structure configuration file by request data value values associate pair The key values answered, the one-to-one request key-value data of reduction;
Corresponding logical operation process, generation response key-value data are carried out according to request key-value data;
The value values responded in key-value data are write to the response data of response message according to data structure configuration file In, and response message is sent into client;
Wherein, the value values in the request message will ask key-value numbers by client according to data structure configuration file In the request data of value value write request messages in, the server terminal and client are each equipped with identical number According to structure configuration file.
8. server terminal according to claim 7, it is characterised in that different in the request data and response data Value values are split by separator or regular length.
9. server terminal according to claim 7, it is characterised in that the data structure configuration file includes request The key values definition of message, and the key values of response message are defined.
10. server terminal according to claim 7, it is characterised in that the type of the request message and response message For http protocol types or https protocol types.
CN201710330388.5A 2017-05-11 2017-05-11 A kind of Internet data transmission method, apparatus and server terminal Active CN107094178B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710330388.5A CN107094178B (en) 2017-05-11 2017-05-11 A kind of Internet data transmission method, apparatus and server terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710330388.5A CN107094178B (en) 2017-05-11 2017-05-11 A kind of Internet data transmission method, apparatus and server terminal

Publications (2)

Publication Number Publication Date
CN107094178A true CN107094178A (en) 2017-08-25
CN107094178B CN107094178B (en) 2019-06-18

Family

ID=59638184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710330388.5A Active CN107094178B (en) 2017-05-11 2017-05-11 A kind of Internet data transmission method, apparatus and server terminal

Country Status (1)

Country Link
CN (1) CN107094178B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109274758A (en) * 2018-10-17 2019-01-25 北京潘达互娱科技有限公司 A kind of processing method and calculating equipment of request message

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7216172B2 (en) * 2001-09-25 2007-05-08 Webex Communications, Inc. Systems and methods for establishing quasi-persistent HTTP connections
CN102571892A (en) * 2010-12-30 2012-07-11 腾讯科技(深圳)有限公司 Browser-based data communication method, client and browser-based data interaction system
CN103491089A (en) * 2013-09-22 2014-01-01 北京锐安科技有限公司 Transcoding method and system of data recovery based on HTTP
CN103929449A (en) * 2013-01-14 2014-07-16 华为终端有限公司 Data transmission method, web server and terminal
CN104050249A (en) * 2011-12-31 2014-09-17 北京奇虎科技有限公司 Distributed query engine system and method and metadata server
CN104317926A (en) * 2014-10-31 2015-01-28 北京思特奇信息技术股份有限公司 Persistent data storage method, persistent data query method, persistent data storage device and persistent data query system
CN104994122A (en) * 2015-05-12 2015-10-21 深圳市微阳信息技术有限公司 Business communication method and system based on JSON data protocol
CN106528844A (en) * 2016-11-24 2017-03-22 腾讯科技(深圳)有限公司 Data request method and apparatus, and data storage system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7216172B2 (en) * 2001-09-25 2007-05-08 Webex Communications, Inc. Systems and methods for establishing quasi-persistent HTTP connections
CN102571892A (en) * 2010-12-30 2012-07-11 腾讯科技(深圳)有限公司 Browser-based data communication method, client and browser-based data interaction system
CN104050249A (en) * 2011-12-31 2014-09-17 北京奇虎科技有限公司 Distributed query engine system and method and metadata server
CN103929449A (en) * 2013-01-14 2014-07-16 华为终端有限公司 Data transmission method, web server and terminal
CN103491089A (en) * 2013-09-22 2014-01-01 北京锐安科技有限公司 Transcoding method and system of data recovery based on HTTP
CN104317926A (en) * 2014-10-31 2015-01-28 北京思特奇信息技术股份有限公司 Persistent data storage method, persistent data query method, persistent data storage device and persistent data query system
CN104994122A (en) * 2015-05-12 2015-10-21 深圳市微阳信息技术有限公司 Business communication method and system based on JSON data protocol
CN106528844A (en) * 2016-11-24 2017-03-22 腾讯科技(深圳)有限公司 Data request method and apparatus, and data storage system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109274758A (en) * 2018-10-17 2019-01-25 北京潘达互娱科技有限公司 A kind of processing method and calculating equipment of request message
CN109274758B (en) * 2018-10-17 2021-05-18 北京龙之心科技有限公司 Request message processing method and computing device

Also Published As

Publication number Publication date
CN107094178B (en) 2019-06-18

Similar Documents

Publication Publication Date Title
US20200036834A1 (en) Intermediary device for data message network routing and enhancement in a contact center environment
CN102655481B (en) A kind of instant messaging chat content inspection method based on webpage and system
CN105528728A (en) Mall e-commerce service platform based on cloud computing and method thereof
CN102790776B (en) Heartbeat connection normalizing processing method, terminal, server and communication system
CN108124007A (en) The method and apparatus of message data real-time Transmission
CN108337236A (en) A kind of gRPC call methods and device based on Protobuf and HTTP/1.1
CN103179133B (en) Based on the client of entity class and the method for server communication
CN103001860A (en) Achieving system for converged communication Web instant messages
CN103902616B (en) Method, device and system for pushing webpage application messages
CN106453324A (en) Method for preventing interruption of web call
CN104378399A (en) Data push method, platform server, client terminal and system
CN106656919B (en) A kind of session analytic method and system based on Telnet agreement
CN104135536A (en) Data interaction method of Web management system based on Json data protocols
CN107438084A (en) Multi-client data synchronization method and apparatus
CN104615765A (en) Data processing method and data processing device for browsing internet records of mobile subscribers
CN114866528A (en) Data communication method based on MQTT and Websocket
CN106559498A (en) Air control data collection platform and its collection method
CN112181678A (en) Service data processing method, device and system, storage medium and electronic device
CN107370628A (en) Based on the log processing method and system buried a little
US10225358B2 (en) Page push method, device, server and system
CN102831179B (en) web page processing method and device
CN103595744B (en) The method and client of information management
CN107094178A (en) A kind of Internet data transmission method, device and server terminal
CN102609864B (en) A kind of advertisement delivery method, device, server and system
CN105391615B (en) Instant messaging method, device and system based on business requirements

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PP01 Preservation of patent right

Effective date of registration: 20210922

Granted publication date: 20190618

PP01 Preservation of patent right