CN103532962B - Communication request message conversion method and device and data communication system - Google Patents

Communication request message conversion method and device and data communication system Download PDF

Info

Publication number
CN103532962B
CN103532962B CN201310495277.1A CN201310495277A CN103532962B CN 103532962 B CN103532962 B CN 103532962B CN 201310495277 A CN201310495277 A CN 201310495277A CN 103532962 B CN103532962 B CN 103532962B
Authority
CN
China
Prior art keywords
request message
function code
message conversion
business datum
file
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
CN201310495277.1A
Other languages
Chinese (zh)
Other versions
CN103532962A (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.)
SHENZHEN KNET SCIENCE & TECHNOLOGY Co Ltd
State Grid Corp of China SGCC
State Grid Jiangsu Electric Power Co Ltd
Nanjing Power Supply Co of Jiangsu Electric Power Co
Original Assignee
SHENZHEN KNET SCIENCE & TECHNOLOGY Co Ltd
State Grid Corp of China SGCC
State Grid Jiangsu Electric Power Co Ltd
Nanjing Power Supply Co of Jiangsu Electric Power Co
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 SHENZHEN KNET SCIENCE & TECHNOLOGY Co Ltd, State Grid Corp of China SGCC, State Grid Jiangsu Electric Power Co Ltd, Nanjing Power Supply Co of Jiangsu Electric Power Co filed Critical SHENZHEN KNET SCIENCE & TECHNOLOGY Co Ltd
Priority to CN201310495277.1A priority Critical patent/CN103532962B/en
Publication of CN103532962A publication Critical patent/CN103532962A/en
Application granted granted Critical
Publication of CN103532962B publication Critical patent/CN103532962B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephonic Communication Services (AREA)
  • Information Transfer Between Computers (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a communication request message conversion method, a communication request message conversion device and a data communication system. A mobile terminal calls a unified website address through an HTTP (hyper text transport protocol) request, and the complexity of program logic of the mobile terminal is reduced; only the unified website address needs to be subjected to request receiving, check and conversion in the running process, and the complexity of program of the communication request message conversion device is improved; meanwhile, the communication request message conversion device is independent from the program logic of a terminal and a master station, the coupling of software is reduced, and the maintainability is improved. A master station system can receive a TCP (transmission control protocol) request, distribute and call different functional modules in a centralized manner according to functional codes, and the monitoring on logs and information in the executing process of the software is facilitated; the upgrading and maintenance of the program of the mobile terminal, the program of the communication request message conversion device and the program of the master station are carried out independently, and the maintainability and extendibility of the mobile application system are improved radically.

Description

The method and apparatus and data communication system of communication request message conversion
Technical field
The present invention relates to communication data transfer field, more particularly to a kind of method and apparatus of communication request message conversion And data communication system.
Background technology
In the system information platform of the industries such as electric power, bank, the mobile terminal of mobile application system typically do not allow with Main station system carries out direction communication, would generally be with a communication request message conversion equipment between mobile terminal and main station system Server come make requests on reception, verification and forward.Communication between terminal and communication request message conversion equipment is typically Based on HTTP(Hypertext transport protocol, HTTP)Agreement, and communication request message is changed Communication between device and main station system is essentially TCP(Transmission Control Protocol, transmission control protocol) Agreement.Limited by conditions above, it is desirable to reach the purpose that mobile terminal is communicated with main station system, it is necessary to by mobile terminal HTTP request be converted to TCP request.
Generally, it is by the method that the HTTP request of mobile terminal is converted to TCP requests:For each movement eventually The HTTP request at end adds one section of specific logical program in communication request message conversion equipment program, first passes through this section of logic journey Sequence is by after all data receivers of mobile terminal request, then these data are converted to into TCP requests are sent to system of main website System.But with HTTP request URL of mobile terminal(Uniform Resource Locator, web page address)The increasing of number Long, the shortcoming of this mode is just displayed:
Need that one section of specific logical is added in communication request message conversion equipment program for each URL, it is on the one hand logical Letter request message conversion equipment program code increasingly expands, and programmed logic is increasingly complicated, needs to spend personage at double, material resources to go Safeguard;On the other hand it is when main station system and program of mobile terminal change, in addition it is also necessary to correspondingly adjust communication request Message conversion device code, which increases software coupling, is unfavorable for the maintenance and extension of software system.
The content of the invention
Based on this, it is necessary to cause logical relation complicated for existing method, the coupling of software is higher between system, The problem of troublesome maintenance, there is provided a kind of logical relation is simple, can effectively reduce the communication of software coupling and easy maintenance The method and apparatus and data communication system of request message conversion.
A kind of method of communication request message conversion, including step:
Receive mobile terminal and function code and business datum are called into the HTTP request to be formed by same web page address;
If the function code in the HTTP request is not belonging to blank code, obtain described in the HTTP request Function code and the business datum;
The function code and the business datum are encapsulated as into the file of predetermined format, are sent out in the form of TCP requests Deliver to main station system.
A kind of communication request message conversion equipment, including request reception unit, data extracting unit and encapsulation transmitting element;
The request reception unit is used to receive mobile terminal by function code and business datum by same webpage ground Call the HTTP request to be formed in location
When the function code that the data extracting unit is used in the HTTP request is not belonging to blank code, obtain The function code and the business datum in the HTTP request;
The encapsulation transmitting element is used to that the function code and the business datum to be encapsulated as the text of predetermined format Part, is sent to main station system in the form of TCP requests.
A kind of data communication system, including mobile terminal, described communication request message conversion equipment and main station system;
The mobile terminal is used to for function code and business datum to call the HTTP to be formed by same web page address Request is sent to the communication request message conversion equipment;
The communication request message conversion equipment delivers to main station system for HTTP request to be converted to into TCP request Concurrencies;
The main station system is used to receive the TCP requests of communication request message conversion equipment, after data are extracted in verification The file of predetermined format is obtained, the file of the predetermined format is parsed, function code and business datum is obtained.
The method and apparatus and data communication system of above-mentioned communication request message conversion, receives mobile terminal by function generation Code and business datum call the HTTP request to be formed by same web page address, the function generation in the HTTP request When code is not belonging to blank code, the function code and the business datum in the HTTP request is obtained;By the function Code and the business datum are encapsulated as the file of predetermined format, are sent to main station system in the form of TCP requests.It is mobile whole Unified web page address is called in end by HTTP request, reduces the complexity of program of mobile terminal logic;In running Only need to make requests on unified web page address reception, verification and conversion, improve answering for communication request message conversion equipment program Miscellaneous degree;Meanwhile, communication request message conversion equipment is independent of terminal and main website programmed logic, reduces the coupling of software, carries High maintainability.Main station system can receive TCP request signals and according to function code unifying to distribute and call different Functional module, is conducive to daily record and the monitoring of information in software implementation procedure;Program of mobile terminal, communication request message conversion Program of device and the upgrading of main website program are independent of each other with maintenance, fundamentally improve the maintainability of mobile application system with Extensibility.
Description of the drawings
Fig. 1 is the method flow diagram of the one of embodiment of method of communication request message conversion;
Fig. 2 is the device connection figure of the one of embodiment of device of communication request message conversion;
Fig. 3 is the module connection figure of one of embodiment of data communication system.
Specific embodiment
As shown in figure 1, a kind of method of communication request message conversion, including step:
Step S110, receives mobile terminal and function code and business datum is called into what is formed by same web page address HTTP request;In the present embodiment, the HTTP request can be that request message from client to server end includes, message In first trip, the identifier of requesting method, resource to resource and the agreement that uses etc..Mobile client can pass through same Web page address forms link passage to function code and business datum, and system can receive and identify mobile terminal by function generation Code and business datum call the HTTP request to be formed by same web page address.
Step S120, if the function code in the HTTP request is not belonging to blank code, obtaining the HTTP please The function code and the business datum in asking;In the present embodiment, can first to described in the HTTP request Function code is verified, if the function code in the HTTP request is not belonging to blank code, obtaining the HTTP please The function code and the business datum in asking, if the function code in the HTTP request belongs to blank code When, then function code described in the mobile terminal is fed back to for blank code.
Step S130, by the function code and the business datum file of predetermined format is encapsulated as, with TCP requests Form send to main station system.In the present embodiment, system can extract the function code and the industry that obtain Business data are encapsulated as the file of predetermined format, and the file of the predetermined format can be XML format file, or HTML lattice File of formula etc..Further sent to main station system in the form of TCP requests, complete HTTP request and change to TCP requests, it is complete Exchange with the communication data of the main station system into mobile terminal.
The method of above-mentioned communication request message conversion, is passed through function code and business datum by receiving mobile terminal Same web page address calls the HTTP request to be formed, when the function code in the HTTP request is not belonging to blank code, Obtain the function code and the business datum in the HTTP request;By the function code and the business number According to the file for being encapsulated as predetermined format, sent to main station system in the form of TCP requests.Mobile terminal is called by HTTP request Unified web page address, reduces the complexity of program of mobile terminal logic;Only need in running to unified webpage ground Location makes requests on reception, verification and conversion, improves the complexity of communication request message conversion equipment program;Meanwhile, communication request Message conversion device is independent of terminal and main website programmed logic, reduces the coupling of software, improves maintainability.System of main website System can receive TCP request signals and according to function code unifying to distribute and call different functional modules, be conducive to software Daily record and the monitoring of information in implementation procedure;Program of mobile terminal, communication request message conversion equipment program and main website journey Sequence upgrading is independent of each other with maintenance, fundamentally improves the maintainable and extensibility of mobile application system.
Wherein in one embodiment, the method that described communication request message is changed is described in the HTTP request Function code and the business datum exist with " key-value " to form.In the present embodiment, the function code and described Business datum can be in the form of the corresponding data value of function key correspondence, and user can enter one by selecting corresponding function key Step selects corresponding data value, is easy to the selection of data value and calls.
Wherein in one embodiment, the method for described communication request message conversion, the file of the predetermined format is XML format file.In the present embodiment, from actual running efficiency of system, the preferably file of the predetermined format is biography Defeated more smoothly XML format file.
As shown in Fig. 2 wherein in one embodiment, a kind of communication request message conversion equipment, including request reception list Unit 110, data extracting unit 120 and encapsulation transmitting element 130;
The request reception unit 110 is used to receive mobile terminal by function code and business datum by same webpage The HTTP request that call by location is formed
When the function code that the data extracting unit 120 is used in the HTTP request is not belonging to blank code, Obtain the function code and the business datum in the HTTP request;
The encapsulation transmitting element 130 is used to for the function code and the business datum to be encapsulated as predetermined format File, is sent to main station system in the form of TCP requests.
The device of above-mentioned communication request message conversion, receives mobile terminal by function code and business datum by same Web page address calls the HTTP request to be formed, and when the function code in the HTTP request is not belonging to blank code, obtains The function code and the business datum in the HTTP request;The function code and the business datum are sealed The file for predetermined format is filled, is sent to main station system in the form of TCP requests.Mobile terminal calls unification by HTTP request Web page address, reduce the complexity of program of mobile terminal logic;Only need to enter unified web page address in running Row request is received, verified and conversion, improves the complexity of communication request message conversion equipment program;Meanwhile, communication request message Conversion equipment is independent of terminal and main website programmed logic, reduces the coupling of software, improves maintainability.Main station system can To receive TCP request signals and according to function code unifying to distribute and call different functional modules, software is conducive to perform During daily record and the monitoring of information;Program of mobile terminal, communication request message conversion equipment program and main website program liter Level is independent of each other with maintenance, fundamentally improves the maintainable and extensibility of mobile application system.
Wherein in one embodiment, described communication request message conversion equipment, the work(in the HTTP request Energy code and the business datum exist with " key-value " to form.
Wherein in one embodiment, described communication request message conversion equipment, the file of the predetermined format is XML Formatted file.
Because described communication request message conversion equipment other parts technical characteristic is same as mentioned above, here is refused Repeat.
As shown in figure 3, wherein in one embodiment, a kind of data communication system, including it is mobile terminal 210, described Communication request message conversion equipment 220 and main station system 230;
The mobile terminal 210 is used to for function code and business datum to call what is formed by same web page address HTTP request is sent to the communication request message conversion equipment;
The communication request message conversion equipment 220 delivers to system of main website for HTTP request to be converted to into TCP request Concurrencies System;
The main station system 230 is used to receive the TCP requests of communication request message conversion equipment, and through verification data are extracted The file of predetermined format is obtained afterwards, the file of the predetermined format is parsed, and obtains function code and business datum.
In the present embodiment, the HTTP for being sended over the mobile terminal by the communication request message conversion equipment Request is converted to the TCP requests that can be recognized by the main station system, and the main station system is obtained after data are extracted in verification The file of predetermined format, parses the file of the predetermined format, obtains function code and business datum.Complete data whole from movement Hold the communications of main station system.
Above-mentioned data communication system, by the mobile terminal by function code and business datum by same webpage ground The HTTP request to be formed is called to send to the communication request message conversion equipment in location;The communication request message conversion equipment will HTTP request is converted to TCP request Concurrencies and delivers to main station system;The main station system receives communication request message conversion equipment TCP is asked, and the file of predetermined format is obtained after data are extracted in verification, parses the file of the predetermined format, obtains function Code and business datum.Mobile terminal calls unified web page address by HTTP request, reduces program of mobile terminal logic Complexity;Only need to make requests on unified web page address reception, verification and conversion in running, improve communication request The complexity of message conversion device program;Meanwhile, communication request message conversion equipment is independent of terminal and main website programmed logic, drop The low coupling of software, improves maintainability.Main station system can receive TCP request signals and according to function code uniting One distributes and calls different functional modules, is conducive to daily record and the monitoring of information in software implementation procedure;Mobile terminal journey Sequence, communication request message conversion equipment program and main website program upgrading are independent of each other with maintenance, fundamentally improve movement The maintainable and extensibility of application system.
Wherein in one embodiment, described data communication system, the file of the predetermined format is XML format text Part.
Embodiment described above only expresses the several embodiments of the present invention, and its description is more concrete and detailed, but and Therefore the restriction to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that for one of ordinary skill in the art For, without departing from the inventive concept of the premise, some deformations and improvement can also be made, these belong to the guarantor of the present invention Shield scope.Therefore, the protection domain of patent of the present invention should be defined by claims.

Claims (3)

1. a kind of method that communication request message is changed, it is characterised in that including step:
Receive different mobile terminal and function code and business datum are called into the HTTP request to be formed by same web page address;
If the function code in the HTTP request is not belonging to blank code, the function in the HTTP request is obtained Code and the business datum;
The function code and the business datum are encapsulated as into the file of predetermined format, with TCP request in the form of send to Main station system;
The function code and the business datum in the HTTP request exists with " key-value " to form;
The file of the predetermined format is the file of XML format file or html format.
2. a kind of communication request message conversion equipment, it is characterised in that including request reception unit, data extracting unit and encapsulation Transmitting element;
The request reception unit is used to receive any mobile terminal by different function code and business datum by same Web page address calls the HTTP request to be formed;
When the function code that the data extracting unit is used in the HTTP request is not belonging to blank code, obtain described The function code and the business datum in HTTP request;
The encapsulation transmitting element is used to that the function code and the business datum to be encapsulated as the file of predetermined format, with The form of TCP requests is sent to main station system;
The function code and the business datum in the HTTP request exists with " key-value " to form;
The file of the predetermined format is the file of XML format file or html format.
3. a kind of data communication system, it is characterised in that please including the communication described in multiple mobile terminals, the claims 2 Ask message conversion device and main station system;
The mobile terminal is used to for different function code and business datum to call what is formed by same web page address HTTP request is sent to the communication request message conversion equipment;
The communication request message conversion equipment delivers to main station system for HTTP request to be converted to into TCP request Concurrencies;
The main station system is used to receive the TCP requests of communication request message conversion equipment, obtains after data are extracted in verification The file of predetermined format, parses the file of the predetermined format, obtains function code and business datum, and according to function code come It is unified to distribute and call different functional modules.
CN201310495277.1A 2013-10-21 2013-10-21 Communication request message conversion method and device and data communication system Active CN103532962B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310495277.1A CN103532962B (en) 2013-10-21 2013-10-21 Communication request message conversion method and device and data communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310495277.1A CN103532962B (en) 2013-10-21 2013-10-21 Communication request message conversion method and device and data communication system

Publications (2)

Publication Number Publication Date
CN103532962A CN103532962A (en) 2014-01-22
CN103532962B true CN103532962B (en) 2017-05-03

Family

ID=49934641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310495277.1A Active CN103532962B (en) 2013-10-21 2013-10-21 Communication request message conversion method and device and data communication system

Country Status (1)

Country Link
CN (1) CN103532962B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1249646A (en) * 1998-09-14 2000-04-05 安维尔德普兰尼特公司 Method and structure for interaction of mutual bidirectional communication apparatus and networks
CN102202092A (en) * 2011-04-28 2011-09-28 李波 Television bank public service platform

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110153663A1 (en) * 2009-12-21 2011-06-23 At&T Intellectual Property I, L.P. Recommendation engine using implicit feedback observations

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1249646A (en) * 1998-09-14 2000-04-05 安维尔德普兰尼特公司 Method and structure for interaction of mutual bidirectional communication apparatus and networks
CN102202092A (en) * 2011-04-28 2011-09-28 李波 Television bank public service platform

Also Published As

Publication number Publication date
CN103532962A (en) 2014-01-22

Similar Documents

Publication Publication Date Title
CN102082992B (en) Mobile office system and implementation method thereof
CN103491135B (en) Device and method for conducting self-matching on data formats
CN103220292B (en) Cross-safe-area data transmission and system
CN105978860B (en) A kind of implementation method of electric system software interface adapter
CN107179697A (en) A kind of intelligent home equipment control method, apparatus and system
CN103023708B (en) The method of testing of communication protocol interface and system
CN111294235B (en) Data processing method, device, gateway and readable storage medium
CN103997539B (en) Radar running status collection dissemination system and its method based on web services
CN101217512B (en) A client-end state maintenance method, system, client-end and application server
CN105429858A (en) Real-time message transmission method among multiple robots
CN105897652A (en) Standard protocol based heterogeneous terminal dynamic access method
CN109889454A (en) A kind of the message driving means and method of micro services framework
CN103309877A (en) Method and device for cross-domain communication and full-duplex communication
EP2429150A1 (en) Apparatus, web service component and method based on web service
CN103179133A (en) Communication method between client side and server based on entity class
CN105450731A (en) Method and apparatus for realizing communication between web layer and native layer
CN108206864B (en) Vehicle information synchronization real-time query system and information synchronization method based on WeChat
CN102333022B (en) Method for interacting cross-safety protection region information in power communication network and protection system
KR101349201B1 (en) Apparatus for interoperability between Web-browser and Local-resources in the Mobile Device and method thereof
CN103532962B (en) Communication request message conversion method and device and data communication system
CN103533001A (en) Communication method and communication system based on HTTP multi-proxy, and intermediate proxy server
CN110912766A (en) Communication network multi-plane data consistency checking method
US9992767B2 (en) Data transmission method and device
CN102480475B (en) Web service safety access control method, apparatus and system thereof
CN103346961A (en) Method and system for data packaging exchanging

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant