CN103532962A - 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
CN103532962A
CN103532962A CN201310495277.1A CN201310495277A CN103532962A CN 103532962 A CN103532962 A CN 103532962A CN 201310495277 A CN201310495277 A CN 201310495277A CN 103532962 A CN103532962 A CN 103532962A
Authority
CN
China
Prior art keywords
request message
message conversion
function code
communication request
business datum
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
CN201310495277.1A
Other languages
Chinese (zh)
Other versions
CN103532962B (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

Images

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

Method and apparatus and the data communication system of communication request message conversion
Technical field
The present invention relates to communication data transmission field, particularly relate to a kind of method and apparatus and data communication system of communication request message conversion.
Background technology
In the system information platform of the industries such as electric power, bank; the mobile terminal of mobile application system does not generally allow to carry out direct communication with main station system, reception, verification and the forwarding that between mobile terminal and main station system, conventionally can ask with a communication request message conversion equipment server.Communicating by letter normally based on HTTP(hypertext transport protocol between terminal and communication request message conversion equipment, HTTP) agreement, and communicating by letter between communication request message conversion equipment and main station system is TCP(Transmission Control Protocol substantially, transmission control protocol) agreement.Be subject to the restriction of above condition, want to reach the object that mobile terminal and main station system communicate, the HTTP request of mobile terminal must be converted to TCP request.
Generally, the method that the HTTP request of mobile terminal is converted to TCP request is: the HTTP request for each mobile terminal adds one section of specific logical program in communication request message conversion equipment program, first by this section of logical program by after all data receivers from mobile terminal request, then these data be converted to TCP request send to main station system.But along with the growth of HTTP request URL (Uniform Resource Locator, the web page address) number of mobile terminal, the shortcoming of this mode just displays:
Need in communication request message conversion equipment program, add for each URL one section of specific logical, communication request message conversion equipment program code expands day by day on the one hand, and programmed logic is day by day complicated, needs cost personage, material resources at double to go to safeguard; Be on the other hand when main station system and program of mobile terminal change, also need correspondingly to adjust communication request message conversion equipment code, increased like this software coupling, be unfavorable for maintenance and the expansion of software systems.
Summary of the invention
Based on this, be necessary to cause logical relation complicated for existing method, between system, the coupling of software is higher, the problem of troublesome maintenance, provides a kind of logical relation method and apparatus and data communication system that communication request message simple, that can effectively reduce software coupling and easy maintenance is changed.
A method for communication request message conversion, comprises step:
The HTTP that mobile terminal receive calls formation by function code and business datum by same web page address asks;
When if the described function code in described HTTP request does not belong to blank code, obtain described function code and described business datum in described HTTP request;
Described function code and described business datum are encapsulated as to the file of predetermined format, with the form of TCP request, are sent to main station system.
A conversion equipment, comprises request reception unit, data extracting unit and encapsulation transmitting element;
The HTTP that described request receiving element calls formation by function code and business datum by same web page address for mobile terminal receive asks
When described data extracting unit does not belong to blank code for the described function code in described HTTP request, obtain described function code and described business datum in described HTTP request;
Described encapsulation transmitting element is for described function code and described business datum being encapsulated as to the file of predetermined format, with the form of TCP request, is sent to main station system.
, comprise mobile terminal, described communication request message conversion equipment and main station system;
Described mobile terminal is sent to described communication request message conversion equipment for the HTTP request that function code and business datum are called to formation by same web page address;
Described communication request message conversion equipment is delivered to main station system for HTTP request is converted to TCP request Concurrency;
Described main station system, for the TCP request of received communication request message conversion equipment, obtains the file of predetermined format after data are extracted in verification, resolves the file of described predetermined format, obtains function code and business datum.
Method and apparatus and the data communication system of above-mentioned communication request message conversion, the HTTP that mobile terminal receive calls formation by function code and business datum by same web page address asks, when the described function code in described HTTP request does not belong to blank code, obtain described function code and described business datum in described HTTP request; Described function code and described business datum are encapsulated as to the file of predetermined format, with the form of TCP request, are sent to main station system.Mobile terminal, by the unified web page address of HTTP request call, has reduced the complexity of program of mobile terminal logic; In running, only need unified web page address to carry out request receiving, verification and conversion, improve the complexity of communication request message conversion equipment program; Meanwhile, communication request message conversion equipment does not rely on terminal and main website programmed logic, has reduced the coupling of software, has improved maintainability.Main station system can receive TCP request signal and unifies distribution and call different functional modules according to function code, is conducive to the monitoring of daily record in software execute process and information; Program of mobile terminal, communication request message conversion equipment program and main website program upgrade and maintenance are independent of each other, and have fundamentally improved maintainability and the extensibility of mobile application system.
Accompanying drawing explanation
Fig. 1 is the method flow diagram of one of them embodiment of method of communication request message conversion;
Fig. 2 is the device connection layout of one of them embodiment of device of communication request message conversion;
Fig. 3 is the module connection layout of one of them embodiment of data communication system.
Embodiment
As shown in Figure 1, a kind of method of communication request message conversion, comprises step:
Step S110, the HTTP that mobile terminal receive calls formation by function code and business datum by same web page address asks; In the present embodiment, described HTTP request can be that the request message from client to server end comprises, in message first trip, to agreement of the identifier of the requesting method of resource, resource and use etc.Mobile client can form link passage to function code and business datum by same web page address, and system can receive and identify the HTTP that mobile terminal calls formation by function code and business datum by same web page address and ask.
Step S120, if when the described function code in described HTTP request does not belong to blank code, obtains described function code and described business datum in described HTTP request; In the present embodiment, can first to the described function code in described HTTP request, carry out verification, when if the described function code in described HTTP request does not belong to blank code, obtain described function code and described business datum in described HTTP request, when if the described function code in described HTTP request belongs to blank code, feeding back to function code described in described mobile terminal is blank code.
Step S130, is encapsulated as described function code and described business datum the file of predetermined format, with the form of TCP request, is sent to main station system.In the present embodiment, the described function code that system can obtain extraction and described business datum are encapsulated as the file of predetermined format, and the file of described predetermined format can be XML formatted file, can be also files of html format etc.Further the form with TCP request is sent to main station system, completes HTTP and asks TCP request conversion, and the communication data that completes mobile terminal and described main station system exchanges.
The method of above-mentioned communication request message conversion, the HTTP that function code and business datum is called to formation by same web page address by mobile terminal receive asks, when the described function code in described HTTP request does not belong to blank code, obtain described function code and described business datum in described HTTP request; Described function code and described business datum are encapsulated as to the file of predetermined format, with the form of TCP request, are sent to main station system.Mobile terminal, by the unified web page address of HTTP request call, has reduced the complexity of program of mobile terminal logic; In running, only need unified web page address to carry out request receiving, verification and conversion, improve the complexity of communication request message conversion equipment program; Meanwhile, communication request message conversion equipment does not rely on terminal and main website programmed logic, has reduced the coupling of software, has improved maintainability.Main station system can receive TCP request signal and unifies distribution and call different functional modules according to function code, is conducive to the monitoring of daily record in software execute process and information; Program of mobile terminal, communication request message conversion equipment program and main website program upgrade and maintenance are independent of each other, and have fundamentally improved maintainability and the extensibility of mobile application system.
Therein in an embodiment, the method for described communication request message conversion, described function code and described business datum in described HTTP request exist form with " key-value ".In the present embodiment, described function code and described business datum can exist with the form of the corresponding corresponding data value of function key, and user can, by selecting corresponding function key further to select corresponding data value, be convenient to choosing and calling of data value.
Therein in an embodiment, the method for described communication request message conversion, the file of described predetermined format is XML formatted file.In the present embodiment, from actual running efficiency of system, the file of preferred described predetermined format is for transmitting XML formatted file more smoothly.
As shown in Figure 2, in an embodiment, a kind of communication request message conversion equipment, comprises request reception unit 110, data extracting unit 120 and encapsulation transmitting element 130 therein;
The HTTP that described request receiving element 110 calls formation by function code and business datum by same web page address for mobile terminal receive asks
When described data extracting unit 120 does not belong to blank code for the described function code in described HTTP request, obtain described function code and described business datum in described HTTP request;
Described encapsulation transmitting element 130 is for described function code and described business datum being encapsulated as to the file of predetermined format, with the form of TCP request, is sent to main station system.
The device of above-mentioned communication request message conversion, the HTTP that mobile terminal receive calls formation by function code and business datum by same web page address asks, when the described function code in described HTTP request does not belong to blank code, obtain described function code and described business datum in described HTTP request; Described function code and described business datum are encapsulated as to the file of predetermined format, with the form of TCP request, are sent to main station system.Mobile terminal, by the unified web page address of HTTP request call, has reduced the complexity of program of mobile terminal logic; In running, only need unified web page address to carry out request receiving, verification and conversion, improve the complexity of communication request message conversion equipment program; Meanwhile, communication request message conversion equipment does not rely on terminal and main website programmed logic, has reduced the coupling of software, has improved maintainability.Main station system can receive TCP request signal and unifies distribution and call different functional modules according to function code, is conducive to the monitoring of daily record in software execute process and information; Program of mobile terminal, communication request message conversion equipment program and main website program upgrade and maintenance are independent of each other, and have fundamentally improved maintainability and the extensibility of mobile application system.
Therein in an embodiment, described communication request message conversion equipment, described function code and described business datum in described HTTP request exist form with " key-value ".
Therein in an embodiment, described communication request message conversion equipment, the file of described predetermined format is XML formatted file.
Because other part technical characterictics of described communication request message conversion equipment are identical with said method, do not repeat them here.
As shown in Figure 3, therein in an embodiment, a kind of data communication system, comprises mobile terminal 210, described communication request message conversion equipment 220 and main station system 230;
Described mobile terminal 210 is sent to described communication request message conversion equipment for the HTTP request that function code and business datum are called to formation by same web page address;
Described communication request message conversion equipment 220 is delivered to main station system for HTTP request is converted to TCP request Concurrency;
Described main station system 230, for the TCP request of received communication request message conversion equipment, obtains the file of predetermined format after data are extracted in verification, resolves the file of described predetermined format, obtains function code and business datum.
In the present embodiment, the HTTP request described mobile terminal being sended over by described communication request message conversion equipment is converted to the TCP that can be identified by described main station system asks, described main station system obtains the file of predetermined format after data are extracted in verification, resolve the file of described predetermined format, obtain function code and business datum.Complete the communications of data from mobile terminal to main station system.
Above-mentioned data communication system, the HTTP request of function code and business datum being called to formation by same web page address by described mobile terminal is sent to described communication request message conversion equipment; Described communication request message conversion equipment is converted to TCP request Concurrency by HTTP request and delivers to main station system; The TCP of described main station system received communication request message conversion equipment asks, and obtains the file of predetermined format after data are extracted in verification, resolves the file of described predetermined format, obtains function code and business datum.Mobile terminal, by the unified web page address of HTTP request call, has reduced the complexity of program of mobile terminal logic; In running, only need unified web page address to carry out request receiving, verification and conversion, improve the complexity of communication request message conversion equipment program; Meanwhile, communication request message conversion equipment does not rely on terminal and main website programmed logic, has reduced the coupling of software, has improved maintainability.Main station system can receive TCP request signal and unifies distribution and call different functional modules according to function code, is conducive to the monitoring of daily record in software execute process and information; Program of mobile terminal, communication request message conversion equipment program and main website program upgrade and maintenance are independent of each other, and have fundamentally improved maintainability and the extensibility of mobile application system.
Therein in an embodiment, described data communication system, the file of described predetermined format is XML formatted file.
The above embodiment has only expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.

Claims (8)

1. a method for communication request message conversion, is characterized in that, comprises step:
The HTTP that mobile terminal receive calls formation by function code and business datum by same web page address asks;
When if the described function code in described HTTP request does not belong to blank code, obtain described function code and described business datum in described HTTP request;
Described function code and described business datum are encapsulated as to the file of predetermined format, with the form of TCP request, are sent to main station system.
2. the method for communication request message conversion according to claim 1, is characterized in that, described function code and described business datum in described HTTP request exist form with " key-value ".
3. the method for communication request message conversion according to claim 1, is characterized in that, the file of described predetermined format is XML formatted file.
4. a communication request message conversion equipment, is characterized in that, comprises request reception unit, data extracting unit and encapsulation transmitting element;
The HTTP that described request receiving element calls formation by function code and business datum by same web page address for mobile terminal receive asks
When described data extracting unit does not belong to blank code for the described function code in described HTTP request, obtain described function code and described business datum in described HTTP request;
Described encapsulation transmitting element is for described function code and described business datum being encapsulated as to the file of predetermined format, with the form of TCP request, is sent to main station system.
5. communication request message conversion equipment according to claim 4, is characterized in that, described function code and described business datum in described HTTP request exist form with " key-value ".
6. according to the communication request message conversion equipment described in claim 4 or 5, it is characterized in that, the file of described predetermined format is XML formatted file.
7. a data communication system, is characterized in that, comprises communication request message conversion equipment and main station system described in mobile terminal, the claims 4-6 any one;
Described mobile terminal is sent to described communication request message conversion equipment for the HTTP request that function code and business datum are called to formation by same web page address;
Described communication request message conversion equipment is delivered to main station system for HTTP request is converted to TCP request Concurrency;
Described main station system, for the TCP request of received communication request message conversion equipment, obtains the file of predetermined format after data are extracted in verification, resolves the file of described predetermined format, obtains function code and business datum.
8. data communication system according to claim 7, is characterized in that, the file of described predetermined format is XML formatted file.
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 true CN103532962A (en) 2014-01-22
CN103532962B 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 (3)

* 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
US20110153663A1 (en) * 2009-12-21 2011-06-23 At&T Intellectual Property I, L.P. Recommendation engine using implicit feedback observations
CN102202092A (en) * 2011-04-28 2011-09-28 李波 Television bank public service platform

Patent Citations (3)

* 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
US20110153663A1 (en) * 2009-12-21 2011-06-23 At&T Intellectual Property I, L.P. Recommendation engine using implicit feedback observations
CN102202092A (en) * 2011-04-28 2011-09-28 李波 Television bank public service platform

Also Published As

Publication number Publication date
CN103532962B (en) 2017-05-03

Similar Documents

Publication Publication Date Title
CN103220292B (en) Cross-safe-area data transmission and system
CN111343020A (en) Unified management method and device for multi-protocol Internet of things equipment
CN103117960A (en) System and method of broadband user speeding up access bandwidth in self-service mode
CN102710593B (en) Method, device and system for publishing message in graph mashup
CN105978860B (en) A kind of implementation method of electric system software interface adapter
CN104899325A (en) APP (application) acquired data collection method, terminal, server and system
CN105183452A (en) Spring AOP based remote protocol service middleware for monitoring power distribution device
CN103491135A (en) Device and method for conducting self-matching on data formats
CN103701640A (en) Method and system of using intelligent management terminal to update ODN (optical distribution network) equipment
CN111294235B (en) Data processing method, device, gateway and readable storage medium
CN101471953A (en) Information transmission method, system and device
CN103996276A (en) Remote transmission system and method for data of power plant
CN103997539A (en) Radar operation state collecting and distributing system and method based on web service
CN105450731A (en) Method and apparatus for realizing communication between web layer and native layer
CN108924228B (en) Industrial internet optimization system based on edge calculation
CN105553871A (en) Method and system for remotely managing equipment parameters
CN107368334B (en) Business plug-in interaction system and method
CN109348434A (en) A kind of sending method of scene information, sending device and terminal device
CN105681167A (en) Children smartwatch and wechat client talkback method
CN105656649A (en) Service opening method and device for terminal equipment
CN103036911B (en) Business data processing system and business data processing method
CN106302432A (en) A kind of communicator based on car networking and control method
CN103023765A (en) Message processing method and message processing device based on scripting language
CN105407133A (en) Method and system for mobile application automation release
CN103532962A (en) Communication request message conversion method and device and data communication system

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