CN107094178B - A kind of Internet data transmission method, apparatus and server terminal - Google Patents

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

Info

Publication number
CN107094178B
CN107094178B CN201710330388.5A CN201710330388A CN107094178B CN 107094178 B CN107094178 B CN 107094178B CN 201710330388 A CN201710330388 A CN 201710330388A CN 107094178 B CN107094178 B CN 107094178B
Authority
CN
China
Prior art keywords
value
data
request
key
message
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.)
Active
Application number
CN201710330388.5A
Other languages
Chinese (zh)
Other versions
CN107094178A (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, apparatus and server terminal, method includes: the request message for receiving client and sending, and the request data in the request message only includes value value;The request data in request message is extracted, the value value in request data is associated with by corresponding key value according to data structure configuration file, restores one-to-one request key-value data;Corresponding logical operation process is carried out according to request key-value data, generates response key-value data;It is written in the response data of response message according to data structure configuration file by the value value in key-value data is responded, and response message is sent in client;The server terminal and client are each equipped with identical data structure configuration file.The present invention solves the problems, such as that communication Times style product is big.

Description

A kind of Internet data transmission method, apparatus and server terminal
Technical field
The present invention relates to Internet data transmission process fields.
Background technique
With the development of internet and universal, people's lives and network are closely bound up, and wherein http agreement is to use It is one be most widely used on current internet in the transport protocol from www server transport hypertext to local browser Kind network protocol.
Http is the application layer communication protocol between client browser or other programs and Web server.? What is stored on Web server on Internet is all hypertext information, and client computer needs to transmit to be visited by http agreement The hypertext information asked.Http include order and transmission information, cannot be only used for web access, can be used for other internets/ Communication between Intranet application system, to realize the integrated of types of applications resource hypermedia access.
Application system is divided into more modules by different business functions by Enterprise SOA (SOA) system, this A little modules by defining good interface between these services and contract connects, pass through between interface http protocol massages or Person's https protocol massages interact, more and more interactive interfacings, 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 format is essentially identical to the body that the numerical value of key-value format, the especially text of xml format more increase message Product.
Summary of the invention
For overcome the deficiencies in the prior art, one of the objects of the present invention is to provide a kind of Internet data transmission sides Method solves the problems, such as that communication Times style product is big.
For overcome the deficiencies in the prior art, the second object of the present invention is to provide a kind of Internet data transmission dress It sets, solves the problems, such as that communication Times style product is big.
For overcome the deficiencies in the prior art, the third object of the present invention is to provide a kind of server terminal, solves Communicate the big problem of Times style product.
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 is applied to server terminal, comprising the following steps:
The request message that client is sent is received, the request data in the request message only includes value value;
The request data in request message is extracted, is closed the value value in request data according to data structure configuration file Join corresponding key value, restores one-to-one request key-value data;
Corresponding logical operation process is carried out according to request key-value data, generates response key-value data;
The response of the write-in response message of the value value in key-value data will be responded according to data structure configuration file In data, and response message is sent in client;
Wherein, the value value in the request message will request key- according to data structure configuration file by client In the request data of value value write request message in value data, the server terminal and client are each equipped with phase Same data structure configuration file.
Preferably, value value different in the request data and response data is carried out by separator or regular length Segmentation.
It preferably, include the definition of key value and the response message of request message in the data structure configuration file The definition of key value.
Preferably, the type of the request message and response message is http protocol type or https protocol type.
To achieve the above object two, the technical solution adopted in the present invention is as follows:
A kind of Internet data transmission device is applied to server terminal, comprises the following modules:
Receiving module, for receiving the request message of client transmission, the request data in 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 In value value be associated with corresponding key value, restore one-to-one request key-value data;
Computing module generates response key- for carrying out corresponding logical operation process according to request key-value data Value data;
Respond module is rung for will respond the value value in key-value data according to data structure configuration file and be written It answers in the response data of message, and response message is sent in client;
Wherein, the value value in the request message will request key- according to data structure configuration file by client In the request data of value value write request message in value data, the server terminal and client are each equipped with phase Same data structure configuration file.
Preferably, value value different in the request data and response data is carried out by separator or regular length Segmentation.
It preferably, include the definition of key value and the response message of request message in the data structure configuration file The definition of key value.
Preferably, the type of the request message and response message is http protocol type or https protocol type.
To achieve the above object three, the technical solution adopted in the present invention is as follows:
A kind of server terminal, comprising:
Memory, for storing program instruction;
Processor, for running described program instruction, to execute following steps:
The request message that client is sent is received, the request data in the request message only includes value value;
The request data in request message is extracted, is closed the value value in request data according to data structure configuration file Join corresponding key value, restores one-to-one request key-value data;
Corresponding logical operation process is carried out according to request key-value data, generates response key-value data;
The response of the write-in response message of the value value in key-value data will be responded according to data structure configuration file In data, and response message is sent in client;
Wherein, the value value in the request message will request key- according to data structure configuration file by client In the request data of value value write request message in value data, the server terminal and client are each equipped with phase Same data structure configuration file.
Preferably, value value different in the request data and response data is carried out by separator or regular length Segmentation.
It preferably, include the definition of key value and the response message of request message in the data structure configuration file The definition of key value.
Preferably, the type of the request message and response message is http protocol type or https protocol type.
Compared with prior art, the beneficial effects of the present invention are:
By having configured data structure configuration file in server end and client, only need to be written when generating message Value value defines in data structure configuration file in corresponding key value relationship.The body of message can be greatly reduced when communication Product reduces the flow of communication, improves efficiency of transmission.
Detailed description of the invention
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.
Specific embodiment
In the following, being described further in conjunction with attached drawing and specific embodiment to the present invention:
Embodiment one:
It is applied to server terminal the present embodiment provides a kind of Internet data transmission method with reference to Fig. 1, including following Step:
S1, the request message that client is sent is received, the request data in the request message only includes value value;
S2, request data in request message is extracted, according to data structure configuration file by the value value in request data It is associated with corresponding key value, restores one-to-one request key-value data;
S3, corresponding logical operation process is carried out according to request key-value data, generates response key-value data;
S4, the sound that the write-in response message of the value value in key-value data will be responded according to data structure configuration file It answers in data, and response message is sent in client;
Wherein, the value value in request message will request key-value number according to data structure configuration file by client In the request data of value value write request message in, server terminal and client are each equipped with identical data knot Structure configuration file.
Preferably, value value different in request data and response data is split by separator or regular length. The key value definition of the definition of key value and response message in data structure configuration file including request message.Request message and The type of response message is http protocol type or https protocol type.
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:
Receiving module, for receiving the request message of client transmission, the request data in 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 In value value be associated with corresponding key value, restore one-to-one request key-value data;
Computing module generates response key- for carrying out corresponding logical operation process according to request key-value data Value data;
Respond module is rung for will respond the value value in key-value data according to data structure configuration file and be written It answers in the response data of message, and response message is sent in client;
Wherein, the value value in the request message will request key- according to data structure configuration file by client In the request data of value value write request message in value data, the server terminal and client are each equipped with phase Same data structure configuration file.
Preferably, value value different in the request data and response data is carried out by separator or regular length Segmentation.
It preferably, include the definition of key value and the response message of request message in the data structure configuration file The definition of key value.
Preferably, the type of the request message and response message is http protocol type or https protocol type.
Embodiment three:
With reference to Fig. 3, a kind of server terminal is present embodiments provided, comprising:
Memory, for storing program instruction;
Processor, for running described program instruction, to execute following steps:
The request message that client is sent is received, the request data in the request message only includes value value;
The request data in request message is extracted, is closed the value value in request data according to data structure configuration file Join corresponding key value, restores one-to-one request key-value data;
Corresponding logical operation process is carried out according to request key-value data, generates response key-value data;
The response of the write-in response message of the value value in key-value data will be responded according to data structure configuration file In data, and response message is sent in client;
Wherein, the value value in the request message will request key- according to data structure configuration file by client In the request data of value value write request message in value data, the server terminal and client are each equipped with phase Same data structure configuration file.
Preferably, value value different in the request data and response data is carried out by separator or regular length Segmentation.
It preferably, include the definition of key value and the response message of request message in the data structure configuration file The definition of key value.
Preferably, the type of the request message and response message is http protocol type or https protocol type.
The present invention is specifically described below by conjunction with specific example.
Http/https protocol section is substantially now using xml, json, and form-data form is submitted, composition After http/https message, the format of message is as follows:
1) xml data format:
Request row: request 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 format:
Request row: request row information
Request header: request header information
Null:
Request data:
{"key1":"value1",
"key2":"value2"
}
3) form-data data format:
Request row: request row information
Request header: request header information
Null:
Request data:
Key1=value1&key2=value2
Above-mentioned three kinds of transmission modes all have key value and value value, and wherein xml message format has more request datas Information.
Data transmission method provided by the invention only needs to transmit value value, the data format of request message can be as Under:
Request row: request 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
Key value is defined in data structure configuration file in server end and client, being specifically defined format 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, will be in request data according to data structure configuration file after extracting the request data in request message Value value be associated with corresponding key value, one-to-one request key-value data can be restored:
Key1=value1;
Key2=value2;
Client is after receiving response message also according to data structure configuration file by the value value in response data It is associated with corresponding key value, reduction response key-value data:
Key3=value3;
The present invention has the advantages that by having configured data structure configuration file in server end and client, in life At only needing that value value is written when message, defined in data structure configuration file in corresponding key value relationship.When communication The volume that message can be greatly reduced reduces the flow of communication, improves efficiency of transmission.
It will be apparent to those skilled in the art that can make various other according to the above description of the technical scheme and ideas Corresponding change and deformation, and all these changes and deformation all should belong to the protection scope of the claims in the present invention Within.

Claims (10)

1. a kind of Internet data transmission method, which is characterized in that be applied to server terminal, comprising the following steps:
The request message that client is sent is received, the request data in the request message only includes value value;
Extract request message in request data, according to data structure configuration file by request data value value association pair The key value answered restores one-to-one request key-value data;
Corresponding logical operation process is carried out according to request key-value data, generates response key-value data;
The response data of the write-in response message of the value value in key-value data will be responded according to data structure configuration file In, and response message is sent in client;
Wherein, the value value in the request message will request key-value number according to data structure configuration file by client In the request data of value value write request message 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, which is characterized in that the request data and response data Middle different value value is split by separator or regular length.
3. Internet data transmission method according to claim 1, which is characterized in that in the data structure configuration file The key value definition of the definition of key value and response message including request message.
4. Internet data transmission method according to claim 1, which is characterized in that the request message and response message Type be http protocol type or https protocol type.
5. a kind of Internet data transmission device, which is characterized in that be applied to server terminal, comprise the following modules:
Receiving module, for receiving the request message of client transmission, the request data in the request message only includes value Value;
Recovery module will be in request data according to data structure configuration file for extracting the request data in request message Value value is associated with corresponding key value, restores one-to-one request key-value data;
Computing module generates response key- for carrying out corresponding logical operation process according to request key-value data Value data;
Respond module, for the write-in response report of the value value in key-value data will to be responded according to data structure configuration file In the response data of text, and response message is sent in client;
Wherein, the value value in the request message will request key-value number according to data structure configuration file by client In the request data of value value write request message 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, which is characterized in that the request data and response data Middle different value value is split by separator or regular length.
7. a kind of server terminal characterized by comprising
Memory, for storing program instruction;
Processor, for running described program instruction, to execute following steps:
The request message that client is sent is received, the request data in the request message only includes value value;
Extract request message in request data, according to data structure configuration file by request data value value association pair The key value answered restores one-to-one request key-value data;
Corresponding logical operation process is carried out according to request key-value data, generates response key-value data;
The response data of the write-in response message of the value value in key-value data will be responded according to data structure configuration file In, and response message is sent in client;
Wherein, the value value in the request message will request key-value number according to data structure configuration file by client In the request data of value value write request message in, the server terminal and client are each equipped with identical number According to structure configuration file.
8. server terminal according to claim 7, which is characterized in that different in the request data and response data Value value is split by separator or regular length.
9. server terminal according to claim 7, which is characterized in that include request in the data structure configuration file The key value of message defines and the definition of the key value of response message.
10. server terminal according to claim 7, which is characterized in that the type of the request message and response message For http protocol type or https protocol type.
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 CN107094178A (en) 2017-08-25
CN107094178B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109274758B (en) * 2018-10-17 2021-05-18 北京龙之心科技有限公司 Request message processing method and computing device

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

Also Published As

Publication number Publication date
CN107094178A (en) 2017-08-25

Similar Documents

Publication Publication Date Title
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
CN102664909A (en) Re-establishing push notification channels via user identifiers
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
CN101179435B (en) Method of active push network management event and network management system
CN107203541A (en) Page loading method and its page loading device
CN106713391B (en) Session information sharing method and sharing system
CN105868231A (en) Cache data updating method and device
CN103297291A (en) Method and system for monitoring website real-time statuses
CN101188625A (en) A method and system for realizing information content subscription
Venkatesan et al. Performance analysis of mobile agent failure recovery in e-service applications
CN107438084A (en) Multi-client data synchronization method and apparatus
CN104135536A (en) Data interaction method of Web management system based on Json data protocols
CN106779803A (en) A kind of method that financial institution&#39;s flowing water is matched with carrier data
CN106559498A (en) Air control data collection platform and its collection method
CN104717131A (en) Information interaction method and server
CN107094178B (en) A kind of Internet data transmission method, apparatus and server terminal
US10225358B2 (en) Page push method, device, server and system
CN101751297A (en) Information system to which a large number of clients can log in and method for large number of clients to log in to same
CN110795084A (en) Method, device and equipment for generating interface description file and readable storage medium
CN102609864B (en) A kind of advertisement delivery method, device, server and system
CN103561113B (en) The generation method and device of Web Service interface
CN116974948A (en) Service system testing method, system, equipment and medium
CN106295309A (en) The management method of a kind of announcement information and equipment

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
PP01 Preservation of patent right

Effective date of registration: 20210922

Granted publication date: 20190618