CN103973812A - Service interface providing method and system based on uniform resource locator in HTTP - Google Patents

Service interface providing method and system based on uniform resource locator in HTTP Download PDF

Info

Publication number
CN103973812A
CN103973812A CN201410221676.3A CN201410221676A CN103973812A CN 103973812 A CN103973812 A CN 103973812A CN 201410221676 A CN201410221676 A CN 201410221676A CN 103973812 A CN103973812 A CN 103973812A
Authority
CN
China
Prior art keywords
url
uniform resource
resource locator
http request
http
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
CN201410221676.3A
Other languages
Chinese (zh)
Other versions
CN103973812B (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.)
Shijiazhuang Guanyuan Technology Co ltd
Original Assignee
Shanghai Feixun Data Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201410221676.3A priority Critical patent/CN103973812B/en
Publication of CN103973812A publication Critical patent/CN103973812A/en
Application granted granted Critical
Publication of CN103973812B publication Critical patent/CN103973812B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a service interface providing method based on a uniform resource locator in the HTTP. The method comprises the steps that firstly, an HTTP request with a uniform resource locator format is generated and sent, and the HTTP request with the uniform resource locator format is analyzed; secondly, the command format of the HTTP request with the uniform resource locator format is examined, and whether the command format of the HTTP request with the uniform resource locator format is legal or not is judged; if yes, a response that the format is legal is replied, and the HTTP request with the uniform resource locator format is executed, and if not, the response that the format is illegal is replied; finally, the execution state of the HTTP request with the uniform resource locator format is detected and fed back. According to the service interface providing method and system based on the uniform resource locator in the HTTP, a small number of interfaces are provided, a media player server which is not frequently used provides a service interface through the URL format of the HTTP, the mode of cross-operating system platforms, cross-languages, out-of-processes and cross-file systems is achieved, interface content can be expressed only through the content of the URL, and the method and system have high practicability.

Description

Service interface supplying method and system based on URL(uniform resource locator) in http protocol
Technical field
Computer network communication technology of the present invention field, relates to a kind of service interface supplying method and system, particularly relates to a kind of service interface supplying method and system based on URL(uniform resource locator) in http protocol.
Background technology
Along with developing rapidly of computer communication network, many desktop computers have been endowed the high-performance equipment of large display screen, fast network connection, large memories and powerful processors conventionally.HTML (Hypertext Markup Language) (http protocol) is for exchange message between the client on service processes and subscriber equipment on network, it is a kind of platform independence, language independent, file system is irrelevant, the agreement of striding course, nearly all platform, various language have ripe HTTP client and server end.
And the software of realizing is on computers to have a lot of modules, between module and module, to intercom mutually, could form an organic software, a system is made up of a lot of assemblies, between assembly and assembly, will intercom mutually, could form an organic system
Module or assembly will be communicated by letter with the external world, and just need to provide can be to the interface of external reference, and module provides the interface shape kind of extraneous access very many.
For example, module compiles is become dynamically or static library, the interface providing for the external world can write in header file derives;
For example, module is made to the card format of certain framework, plug-in unit provides module by the form of registering interface as the external world registers in framework, and other modules obtain by enquiry module and module interface the service that module provides.
Module provides service to the external world, generally to realize by external interface, a module is used rational interface, the requirement that will need to meet according to module is determined, one provides the module interface of the network data flow broadcasting service that meets Real-time Transport Protocol few, function is simple, invoked frequency is low and use in being limited among a small circle, and this module can not be by different processes, different file, different language, the module accesses of different platform, therefore, in technology, provide a kind of service interface that mechanism is provided with regard to lacking for the module of similar RTP network data flow now.
Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of service interface supplying method and system based on URL(uniform resource locator) in http protocol, provide the module interface of the network data flow broadcasting service that meets Real-time Transport Protocol few for solving prior art, function is simple, invoked frequency is low and use in being limited among a small circle, and this module can not be by different processes, different file, different language, the problem of the module accesses of different platform.
For achieving the above object and other relevant objects, one aspect of the present invention provides a kind of service interface supplying method based on URL(uniform resource locator) in http protocol, be applied in the communication network of client and server end composition, comprise: send the HTTP request with URL(uniform resource locator) form to network by designated port, the described HTTP request with URL(uniform resource locator) form refers to the request head of http protocol, the HTTP request of URL(uniform resource locator) form can be expressed request task performed in service processes, and required parameter is provided; Parsing has the HTTP request of URL(uniform resource locator) form, and whether the command format that checks the HTTP request with URL(uniform resource locator) form is legal to judge it, if so, reply the legal response of form, carry out the HTTP request with URL(uniform resource locator) form; If not, reply the illegal response of form; Detect and feed back the executing state of the HTTP request with URL(uniform resource locator) form; The executing state wherein, with the HTTP request of URL(uniform resource locator) form comprises that this HTTP request does not bring into operation, this HTTP asks in the middle of operation and this HTTP request finishes to move.
Preferably, the step that sends the HTTP request with URL(uniform resource locator) form by designated port to network also comprises the HTTP request with URL(uniform resource locator) form that generates; The HTTP request that generation has URL(uniform resource locator) form is to fill according to starting to send network data flow, end transmission network data flow or requester network data flow state demand the URL(uniform resource locator) part that HTTP asks, wherein, described URL(uniform resource locator) part comprises HTTP method, order line and parameter; Wherein HTTP method is GET method; Order line form is [client ip address]: [client port]/client service process.
Preferably, the HTTP request that parsing has URL(uniform resource locator) form is beginning taking described GET method tail of string as order line, the ending taking question mark in described parameter as order line, parses client ip address, client port and client service process that described HTTP asks.
Preferably, have described in judgement the command format of HTTP request of URL(uniform resource locator) form whether legal according to being whether to exist according to described request parameter, and parameter value be sky.
Preferably, the HTTP request that has URL(uniform resource locator) form by designated port to network transmission comprises: by specifying the first port to send and start to send the HTTP request that meets RTP network data flow and have URL(uniform resource locator) form to network; And meet RTP network data flow and there is the HTTP request of URL(uniform resource locator) form or send by specifying the 3rd port to send inquiry to network the HTTP request that meets RTP network data stream mode and there is URL(uniform resource locator) form by specifying the second port to send to finish to send to network.
Preferably, by specifying the first port to send and start to send the HTTP request that meets the network data flow of RTP and there is URL(uniform resource locator) form to network; Wherein, start to send the whether needs circulation transmission of encoding and decoding that come source file, destination address that network data flow sends, target port that network data flow sends, network data current load that required parameter that the HTTP that meets the network data flow of RTP and have a URL(uniform resource locator) form ask to provide comprises network data flow and network data flow; Parsing starts to send the HTTP request that meets the network data flow of RTP and have URL(uniform resource locator) form; Inspection starts to send the command format that meets the network data flow of RTP and have the HTTP request of URL(uniform resource locator) form; Judgement start to send meet the network data flow of RTP and there is the command format of HTTP request of URL(uniform resource locator) form whether legal, if, reply the legal response of form, execution starts to send the HTTP request that meets the network data flow of RTP and have URL(uniform resource locator) form, and obtains the general unique identifier of mark that this HTTP request is carried out; If not, reply the illegal response of form; Detect and feed back and start to send the executing state that meets the network data flow of RTP and there is the HTTP request of URL(uniform resource locator) form.
Preferably, by specifying the second port to send and finish to send the HTTP request that meets RTP network data flow and there is URL(uniform resource locator) form to network; Wherein, finishing to send required parameter that the HTTP that meets RTP network data flow and have a URL(uniform resource locator) form ask to provide comprises from meeting the network data flow of RTP and have the general unique identifier obtaining the process that the HTTP of URL(uniform resource locator) form asks by specifying the first port to send to start to send to network; Resolve and finish to send the HTTP request that meets RTP network data flow and there is URL(uniform resource locator) form; Check and finish to send the command format that meets the network data flow of RTP and there is the HTTP request of URL(uniform resource locator) form; Judge to finish to send whether legally to meet RTP network data flow and there is the command format of HTTP request of URL(uniform resource locator) form, if so, reply the legal response of form, carry out this HTTP request, and detect the executing state of this HTTP request; If not, reply the illegal response of form; Detect and feed back and finish to send the executing state that meets RTP network data flow and there is the HTTP request of URL(uniform resource locator) form.
Preferably, send by specifying the 3rd port to send inquiry to network the HTTP request that meets RTP network data stream mode and there is URL(uniform resource locator) form; Wherein, inquiry required parameter that the HTTP that meets RTP network data stream mode and have a URL(uniform resource locator) form ask to provide is provided comprises from meeting the network data flow of RTP and have the general unique identifier obtaining the process that the HTTP of URL(uniform resource locator) form asks by specifying the first port to send to start to send to network; Resolve inquiry and send the HTTP request that meets RTP network data stream mode and there is URL(uniform resource locator) form; Check that inquiry sends the command format that meets RTP network data stream mode and have the HTTP request of URL(uniform resource locator) form; Whether meet RTP network data stream mode and have the command format of HTTP request of URL(uniform resource locator) form legal, if so, reply the legal response of form if judging that inquiry sends, carry out this HTTP request; If not, reply the illegal response of form; Detect also feedback query and send the executing state that meets RTP network data stream mode and there is the HTTP request of URL(uniform resource locator) form.
The present invention also provides a kind of service interface based on URL(uniform resource locator) in http protocol that system is provided on the other hand, comprise: client, for generating the HTTP request with URL(uniform resource locator) form, send the HTTP request with URL(uniform resource locator) form; And for detection of thering is the executing state of the HTTP request of URL(uniform resource locator) form with feedback; Server end, for receiving the HTTP request with URL(uniform resource locator) form, resolve the HTTP request with URL(uniform resource locator) form; Inspection has the command format of the HTTP request of URL(uniform resource locator) form; Whether the command format that judges the HTTP request with URL(uniform resource locator) form is legal, if, reply the legal response of form, carry out the HTTP request with URL(uniform resource locator) form, and obtain the executing state of the HTTP request with URL(uniform resource locator) form from described client; If not, reply the illegal response of form; Described server end has designated port; Wherein, described in there is URL(uniform resource locator) form HTTP request refer to the request head of http protocol, the HTTP request of URL(uniform resource locator) form can be expressed request task performed in service processes, and required parameter is provided; The executing state of the described HTTP request with URL(uniform resource locator) form comprises that this HTTP request does not bring into operation, this HTTP asks in the middle of operation and this HTTP request finishes to move.
Preferably, described designated port comprises the first port, the second port and the 3rd port, wherein, described client is sent and starts to send the HTTP request that meets RTP network data flow and have URL(uniform resource locator) form to network by described the first port; Described client sends to finish to send to network by described the second port and meets RTP network data flow and have the HTTP request of URL(uniform resource locator) form or described client sends inquiry by described the 3rd port to network and sends the HTTP request that meets RTP network data stream mode and have URL(uniform resource locator) form.
As mentioned above, service interface supplying method and the system based on URL(uniform resource locator) in http protocol of the present invention, has following beneficial effect:
1, the present invention has utilized http protocol operating system independent, and any operating system can realize HTTP client and http server; Utilized the language independent of http protocol, HTTP client and http server can be realized in any language; Http protocol is network, so can conduct interviews between different processes.Similar provides a small amount of interface, and the media play service not being frequently used is used http protocol URL form that service interface is provided, and has realized spanning operation system platform, and across language, striding course, across file system, by realizing or quote complicated framework.
2, the present invention utilizes http protocol transmission not need transferring content, only needs the content of URL just can express interface content, and this service interface across language has very large practicality.
Brief description of the drawings
Fig. 1 is shown as the service interface supplying method flow chart based on URL(uniform resource locator) in http protocol of the present invention.
Fig. 2 is shown as of the present invention by specifying the first port to send and start to send the flow chart that meets the network data flow of RTP and have the HTTP request of URL(uniform resource locator) form to network.
Fig. 3 is shown as of the present invention by specifying the second port to send and finish to send the flow chart that meets the network data flow of RTP and have the HTTP request of URL(uniform resource locator) form to network.
Fig. 4 is shown as the present invention and sends by specifying the 3rd port to send inquiry to network the flow chart that meets RTP network data stream mode and have the HTTP request of URL(uniform resource locator) form.
Fig. 5 is shown as and the present invention is based on the service interface of URL(uniform resource locator) in http protocol the principle assumption diagram of system is provided.
Element numbers explanation
1 service interface based on URL(uniform resource locator) in http protocol provides system
11 clients
12 server ends
121 first ports
122 second ports
123 the 3rd ports
S1~S7 step
Embodiment
Below, by specific instantiation explanation embodiments of the present invention, those skilled in the art can understand other advantages of the present invention and effect easily by the disclosed content of this specification.The present invention can also be implemented or be applied by other different embodiment, and the every details in this specification also can be based on different viewpoints and application, carries out various modifications or change not deviating under spirit of the present invention.It should be noted that, in the situation that not conflicting, the feature in following examples and embodiment can combine mutually.
It should be noted that, the diagram providing in following examples only illustrates basic conception of the present invention in a schematic way, satisfy and only show with assembly relevant in the present invention in graphic but not component count, shape and size drafting while implementing according to reality, when its actual enforcement, kenel, quantity and the ratio of each assembly can be a kind of random change, and its assembly layout kenel also may be more complicated.
Embodiment mono-
The present embodiment provides a kind of service interface supplying method based on URL(uniform resource locator) in http protocol, be applied in the communication network of client and server end composition, refer to Fig. 1, be shown as the service interface supplying method flow chart based on URL(uniform resource locator) in http protocol, the described service interface supplying method based on URL(uniform resource locator) in http protocol comprises:
Step S1, described client sends the HTTP request with URL(uniform resource locator) form to network by designated port; The described HTTP request with URL(uniform resource locator) form refers to the request head of http protocol, and the HTTP request of URL(uniform resource locator) form can be expressed request task performed in service processes, and required parameter is provided.In step S1, also comprise the HTTP request with URL(uniform resource locator) form that generates; The HTTP request that generation has URL(uniform resource locator) form is to fill according to starting to send network data flow, end transmission network data flow or requester network data flow state demand the URL(uniform resource locator) part that HTTP asks, wherein, described URL(uniform resource locator) part comprises HTTP method, order line and parameter; Wherein HTTP method is GET method; Order line form is [client ip address]: [client port]/client service process.
Step S2, described server end is resolved the HTTP request with URL(uniform resource locator) form.The HTTP request that parsing has URL(uniform resource locator) form is beginning taking described GET method tail of string as order line, the ending taking question mark in described parameter as order line, parses client ip address, client port and client service process that described HTTP asks.Argument section be from? number start, character string HTTP/1.1 beginning is for ending, taking & as line of demarcation, each parameter represents with parameter item=parameter value respectively, therefore, starts to send data flow, finish to send data flow, query service status is all to represent with the form of parameter.
Step S3, described server end inspection has the command format of the HTTP request of URL(uniform resource locator) form;
Step S4, whether the command format that the HTTP that described server end judgement has URL(uniform resource locator) form asks is legal, if so, performs step S5; If not, execution step S7, replys the illegal response of form, then finishes process.Wherein, have described in judgement the command format of HTTP request of URL(uniform resource locator) form whether legal according to being whether to exist according to described request parameter, and parameter value be sky.
Step S5, described server end is replied the legal response of form to described client, and carries out the HTTP request with URL(uniform resource locator) form.
Step S6, described client detects and feeds back the extremely described server end of executing state of the HTTP request with URL(uniform resource locator) form.The executing state wherein, with the HTTP request of URL(uniform resource locator) form comprises that this HTTP request does not bring into operation, this HTTP asks in the middle of operation and this HTTP request finishes to move.
In abovementioned steps S1, described client sends the HTTP request with URL(uniform resource locator) form by the designated port on server end to network and comprises by the first port and send and start to send the HTTP request that meets RTP network data flow and have URL(uniform resource locator) form to network; And meet RTP network data flow and there is the HTTP request of URL(uniform resource locator) form or send by specifying the 3rd port to send inquiry to network the HTTP request that meets RTP network data stream mode and there is URL(uniform resource locator) form by specifying the second port to send to finish to send to network.
Refer to 2, be shown as by specifying the first port to send and start to send the process that meets the network data flow of RTP and there is the HTTP request of URL(uniform resource locator) form to network, wherein, start to send that required parameter that the HTTP that meets the network data flow of RTP and have a URL(uniform resource locator) form asks to provide comprises network data flow carrys out source file (file), the destination address (destip) that network data flow sends, the target port (desport) that network data flow sends, the encoding and decoding (codec) of network data current load, and whether network data flow needs circulation to send (loop).Start to send meet the network data flow of RTP and have URL(uniform resource locator) form HTTP request be designated start.This process specifically comprises:
Step S1 ', by specifying the first port to send and start to send the HTTP request that meets the network data flow of RTP and have URL(uniform resource locator) form to network; Step S1 ' also comprises that generation starts to send the HTTP request that meets the network data flow of RTP and have URL(uniform resource locator) form, according to the URL(uniform resource locator) part that starts the demand filling HTTP request that sends network data flow, wherein, described URL(uniform resource locator) part comprises HTTP method, order line and parameter; Value.
Step S2 ', resolves and starts to send the HTTP request that meets the network data flow of RTP and have URL(uniform resource locator) form.It is beginning taking described GET method tail of string as order line that parsing starts to send the HTTP request that meets the network data flow of RTP and have a URL(uniform resource locator) form, the ending taking question mark in described parameter as order line, parses client ip address, client port and client service process that described HTTP asks.Argument section be from? number start, character string HTTP/1.1 beginning is ending, and taking & as line of demarcation, each parameter represents with parameter item=parameter value respectively.
Step S3 ', checks and starts to send the command format that meets the network data flow of RTP and have the HTTP request of URL(uniform resource locator) form;
Step S4 ', judges that whether the command format of this HTTP request is legal, if so, performs step S5 '; If not, perform step S7 ', reply the illegal response of form, end process.
Step S5 ', replys the legal response of form, carries out and starts to send the HTTP request that meets the network data flow of RTP and have URL(uniform resource locator) form, and obtain the general unique identifier of mark (UUID) that this HTTP request is carried out; Wherein, have described in judgement the command format of HTTP request of URL(uniform resource locator) form whether legal according to being whether to exist according to described request parameter, and parameter value be sky.With HTTP: // [MediaPlayIP]: [MediaPlayPort]/MediaPlay? cmd=start & file=busytone.wav & loop=1 & codec=g711a & destip=192.168.1.1 & destport=4000 is example, judge and in required parameter, whether have cmd=start and file, codec, destip, whether these four parameters of destport exist, and value is not empty, if cmd=start and file, codec, destip, these four parameters of destport all exist, and value is not empty, legal.
In the present embodiment, server end can the multiple tasks of concurrent execution, in order to identify the uniqueness of task, in the process that starts to send network data flow, can use UUID, this UUID is that the server program IP address, the port that use client-access, time three parameters of receiving request generate, and the algorithm of generation is UUID=client ip address character string+client port character string+receive time character string of request.
Step S6 ', detect and feed back and start to send the executing state that meets the network data flow of RTP and there is the HTTP request of URL(uniform resource locator) form, this executing state comprises that this HTTP request does not bring into operation, this HTTP request in the middle of operation and this HTTP request finish operation.
By specifying the first port to send and start to send the HTTP that meets the network data flow of RTP and there is URL(uniform resource locator) form and ask taking table 1 as example to network:
Table 1: send and start to send the HTTP request embodiment that meets the network data flow of RTP and there is URL(uniform resource locator) form
Refer to 3, be shown as by specifying the second port to send and finish to send the process that meets the network data flow of RTP and there is the HTTP request of URL(uniform resource locator) form to network, wherein, finishing to send required parameter that the HTTP that meets the network data flow of RTP and have a URL(uniform resource locator) form ask to provide comprises from meeting the network data flow of RTP and have the general unique identifier obtaining the process that the HTTP of URL(uniform resource locator) form asks by specifying the first port to send to start to send to network.Finish to send meet the network data flow of RTP and have URL(uniform resource locator) form HTTP request be designated stop.This process specifically comprises:
S1 ", by specifying the second port to send and finish to send the HTTP request that meets the network data flow of RTP and there is URL(uniform resource locator) form to network; Also comprising in this step generating and finish the HTTP request that transmission meets the network data flow of RTP and has URL(uniform resource locator) form, is to fill according to finishing to send network data flow demand the URL(uniform resource locator) part that HTTP asks,
S2 ", resolve and finish to send the HTTP request that meets the network data flow of RTP and there is URL(uniform resource locator) form;
S3 ", check and finish to send the command format that meets the network data flow of RTP and there is the HTTP request of URL(uniform resource locator) form;
S4 ", judge to finish to send whether legally to meet the network data flow of RTP and there is the command format of HTTP request of URL(uniform resource locator) form, if so, perform step S5 "; If not, perform step S7 ".
S5 ", reply the legal response of form, carry out this HTTP request.Wherein, finish to send that the executing state that meets the network data flow of RTP and have a HTTP request of URL(uniform resource locator) form comprises that this HTTP request does not bring into operation, this HTTP request in the middle of operation and this HTTP request finish operation.Meet the network data flow of RTP and there is the command format of HTTP request of URL(uniform resource locator) form HTTP when whether legal judging to finish to send: // [MediaPlayIP]: [MediaPlayPort]/MediaPlay? cmd=stop & uuid=2003 is example, judge in parameter and whether have cmd=stop and UUID to exist, and value is not empty.If cmd=stop, and UUID exist, and the value of UUID be sky, be legal.
S6 "; detect and feed back and finish to send the executing state that meets the network data flow of RTP and have the HTTP request of URL(uniform resource locator) form, this executing state comprises that this HTTP request does not bring into operation, this HTTP asks in the middle of operation and this HTTP request finishes to move.
S7 ", reply the illegal response of form, end process.
By specifying the second port to send and finish to send the HTTP that meets the network data flow of RTP and there is URL(uniform resource locator) form and ask taking table 2 as example to network:
Table 2: send and finish to send the HTTP request embodiment that meets the network data flow of RTP and there is URL(uniform resource locator) form
Refer to 4, be shown as by specifying the 3rd port to send inquiry to network and send the process that meets RTP network data stream mode and there is the HTTP request of URL(uniform resource locator) form, wherein, inquiry required parameter that the HTTP that meets RTP network data stream mode and have a URL(uniform resource locator) form ask to provide is provided comprises from meeting the network data flow of RTP and have the general unique identifier obtaining the process that the HTTP of URL(uniform resource locator) form asks by specifying the first port to send to start to send to network.Inquiry send meet RTP network data stream mode and have URL(uniform resource locator) form HTTP request be designated query.Described inquiry sends and meets RTP network data stream mode and comprise that inquiry sends and meet RTP network data flow.This process specifically comprises:
S1 " ', send by specifying the 3rd port to send inquiry to network the HTTP request that meets RTP network data stream mode and there is URL(uniform resource locator) form; Also comprise that in this step generated query sends the HTTP request that meets RTP network data stream mode and have URL(uniform resource locator) form, generated query sends the HTTP request that meets RTP network data stream mode and have URL(uniform resource locator) form, to send network data flow demand according to inquiry to fill the URL(uniform resource locator) part that HTTP asks, S2 " ', resolve inquiry and send the HTTP request that meets RTP network data stream mode and there is URL(uniform resource locator) form.
S3 " ', check that inquiry sends the command format that meets RTP network data stream mode and have the HTTP request of URL(uniform resource locator) form;
S4 " ', judge that inquiry sends and whether legally meet RTP network data stream mode and there is the command format of HTTP request of URL(uniform resource locator) form, if so, perform step S5 " '; If not, perform step S7 " '.Wherein, meet RTP network data stream mode and there is the command format of HTTP request of URL(uniform resource locator) form when whether legal judging that inquiry sends.
With HTTP: // [MediaPlayIP]: [MediaPlayPort]/MediaPlay? whether cmd=Query & uuid=2003 is example, judge in parameter and have cmd=query and UUID to exist, and value is not empty.If cmd=stop, and UUID exist, and the value of UUID be sky, be legal.
S5 " ', reply the legal response of form, carry out this HTTP request.
S6 " ', detect also feedback query and send the executing state that meets RTP network data stream mode and there is the HTTP request of URL(uniform resource locator) form.Wherein, inquiry send that the executing state that meets RTP network data stream mode and have a HTTP request of URL(uniform resource locator) form comprises that this HTTP request does not bring into operation, this HTTP request in the middle of operation and this HTTP request finish operation.
S7 " ', reply the illegal response of form, end process.
By specify the 3rd port to network send inquiry send meet RTP network data stream mode and have URL(uniform resource locator) form HTTP request taking table 3 as example:
Table 3: send inquiry and send the HTTP request embodiment that meets RTP network data stream mode and there is URL(uniform resource locator) form
The present embodiment also provides a kind of service interface based on URL(uniform resource locator) in http protocol that system is provided, refer to Fig. 5, the service interface being shown as based on URL(uniform resource locator) in http protocol provides system principle structure chart, and described service interface provides system 1 to comprise client 11 and server end 12.
Client 11 is for generating the HTTP request with URL(uniform resource locator) form, send the HTTP request with URL(uniform resource locator) form; And for detection of thering is the executing state of the HTTP request of URL(uniform resource locator) form with feedback.The HTTP wherein, with URL(uniform resource locator) form asks to comprise and starts to send the HTTP request that meets RTP network data flow and have URL(uniform resource locator) form; Finish to send the HTTP request that meets RTP network data flow and there is URL(uniform resource locator) form, or inquiry sends the HTTP request that meets RTP network data stream mode and have URL(uniform resource locator) form.Wherein, described in there is URL(uniform resource locator) form HTTP request refer to the request head of http protocol, the HTTP request of URL(uniform resource locator) form can be expressed request task performed in service processes, and required parameter is provided.
Server end 12 is for receiving the HTTP request with URL(uniform resource locator) form, resolve the HTTP request with URL(uniform resource locator) form; Inspection has the command format of the HTTP request of URL(uniform resource locator) form; Judge that whether it is legal, if so, reply the legal response of form to described client 11, carry out the HTTP request with URL(uniform resource locator) form, and obtain the executing state of the HTTP request with URL(uniform resource locator) form from described client 11; If not, reply the illegal response of form.
Described server end 12 has designated port.Described designated port comprises the first port 121, the second port one 22 and the 3rd port one 23, wherein, described client 11 is sent and starts to send the HTTP request that meets RTP network data flow and have URL(uniform resource locator) form to network by described the first port 121; Described client 11 is sent and finishes to send the HTTP request that meets RTP network data flow and have URL(uniform resource locator) form to network by described the second port one 22, or described client sends the HTTP request that meets RTP network data stream mode and have URL(uniform resource locator) form that sends of inquiring about to described the 3rd port one 23 to network.The executing state of the described HTTP request with URL(uniform resource locator) form comprises that this HTTP request does not bring into operation, this HTTP asks in the middle of operation and this HTTP request finishes to move.
Service interface supplying method and system based on URL(uniform resource locator) in http protocol of the present invention utilized http protocol operating system independent, and any operating system can realize HTTP client and http server; Utilized the language independent of http protocol, HTTP client and http server can be realized in any language; Http protocol is network, so can conduct interviews between different processes.Similar provides a small amount of interface, and the media play service not being frequently used is used http protocol URL form that service interface is provided, and has realized spanning operation system platform, and across language, striding course, across file system, by realizing or quote complicated framework.And HTTP transmission does not need transferring content, only needs the content of URL just can express interface content, and this service interface across language has very large practicality.
So the present invention has effectively overcome various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all can, under spirit of the present invention and category, modify or change above-described embodiment.Therefore, such as in affiliated technical field, have and conventionally know that the knowledgeable, not departing from all equivalence modifications that complete under disclosed spirit and technological thought or changing, must be contained by claim of the present invention.

Claims (10)

1. the service interface supplying method based on URL(uniform resource locator) in http protocol, is applied in the communication network of client and server end composition, it is characterized in that, comprising:
Send the HTTP request with URL(uniform resource locator) form to network by designated port, the described HTTP request with URL(uniform resource locator) form refers to the request head of http protocol, the HTTP request of URL(uniform resource locator) form can be expressed request task performed in service processes, and required parameter is provided;
Parsing has the HTTP request of URL(uniform resource locator) form, and whether the command format that checks the HTTP request with URL(uniform resource locator) form is legal to judge it, if so, reply the legal response of form, carry out the HTTP request with URL(uniform resource locator) form; If not, reply the illegal response of form;
Detect and feed back the executing state of the HTTP request with URL(uniform resource locator) form; The executing state wherein, with the HTTP request of URL(uniform resource locator) form comprises that this HTTP request does not bring into operation, this HTTP asks in the middle of operation and this HTTP request finishes to move.
2. the service interface supplying method based on URL(uniform resource locator) in http protocol according to claim 1, is characterized in that: the step that sends the HTTP request with URL(uniform resource locator) form to network by designated port also comprises the HTTP request with URL(uniform resource locator) form that generates; The HTTP request that generation has URL(uniform resource locator) form is to fill according to starting to send network data flow, end transmission network data flow or requester network data flow state demand the URL(uniform resource locator) part that HTTP asks, wherein, described URL(uniform resource locator) part comprises HTTP method, order line and parameter; Wherein HTTP method is GET method; Order line form is [client ip address]: [client port]/client service process.
3. the service interface supplying method based on URL(uniform resource locator) in http protocol according to claim 2, it is characterized in that: the HTTP request that parsing has URL(uniform resource locator) form is beginning taking described GET method tail of string as order line, the ending taking question mark in described parameter as order line, parses client ip address, client port and client service process that described HTTP asks.
4. the service interface supplying method based on URL(uniform resource locator) in http protocol according to claim 1, it is characterized in that: described in judgement, have the command format of HTTP request of URL(uniform resource locator) form whether legal according to being whether to exist according to described request parameter, and parameter value be sky.
5. the service interface supplying method based on URL(uniform resource locator) in http protocol according to claim 1, is characterized in that: the HTTP request that has URL(uniform resource locator) form to network transmission by designated port comprises:
By specifying the first port to send and start to send the HTTP request that meets RTP network data flow and there is URL(uniform resource locator) form to network; And
Meet RTP network data flow and there is the HTTP request of URL(uniform resource locator) form or send by specifying the 3rd port to send inquiry to network the HTTP request that meets RTP network data stream mode and there is URL(uniform resource locator) form by specifying the second port to send to finish to send to network.
6. the service interface supplying method based on URL(uniform resource locator) in http protocol according to claim 5, is characterized in that:
By specifying the first port to send and start to send the HTTP request that meets the network data flow of RTP and there is URL(uniform resource locator) form to network; Wherein, start to send the whether needs circulation transmission of encoding and decoding that come source file, destination address that network data flow sends, target port that network data flow sends, network data current load that required parameter that the HTTP that meets the network data flow of RTP and have a URL(uniform resource locator) form ask to provide comprises network data flow and network data flow;
Parsing starts to send the HTTP request that meets the network data flow of RTP and have URL(uniform resource locator) form;
Inspection starts to send the command format that meets the network data flow of RTP and have the HTTP request of URL(uniform resource locator) form;
Judgement start to send meet the network data flow of RTP and there is the command format of HTTP request of URL(uniform resource locator) form whether legal, if, reply the legal response of form, execution starts to send the HTTP request that meets the network data flow of RTP and have URL(uniform resource locator) form, and obtains the general unique identifier of mark that this HTTP request is carried out; If not, reply the illegal response of form;
Detect and feed back and start to send the executing state that meets the network data flow of RTP and there is the HTTP request of URL(uniform resource locator) form.
7. the service interface supplying method based on URL(uniform resource locator) in http protocol according to claim 6, is characterized in that: by specifying the second port to send and finish to send the HTTP request that meets RTP network data flow and have URL(uniform resource locator) form to network; Wherein, finishing to send required parameter that the HTTP that meets RTP network data flow and have a URL(uniform resource locator) form ask to provide comprises from meeting the network data flow of RTP and have the general unique identifier obtaining the process that the HTTP of URL(uniform resource locator) form asks by specifying the first port to send to start to send to network;
Resolve and finish to send the HTTP request that meets RTP network data flow and there is URL(uniform resource locator) form;
Check and finish to send the command format that meets the network data flow of RTP and there is the HTTP request of URL(uniform resource locator) form;
Judge to finish to send whether legally to meet RTP network data flow and there is the command format of HTTP request of URL(uniform resource locator) form, if so, reply the legal response of form, carry out this HTTP request, and detect the executing state of this HTTP request; If not, reply the illegal response of form;
Detect and feed back and finish to send the executing state that meets RTP network data flow and there is the HTTP request of URL(uniform resource locator) form.
8. the service interface supplying method based on URL(uniform resource locator) in http protocol according to claim 7, is characterized in that: send by specifying the 3rd port to send inquiry to network the HTTP request that meets RTP network data stream mode and have URL(uniform resource locator) form; Wherein, inquiry required parameter that the HTTP that meets RTP network data stream mode and have a URL(uniform resource locator) form ask to provide is provided comprises from meeting the network data flow of RTP and have the general unique identifier obtaining the process that the HTTP of URL(uniform resource locator) form asks by specifying the first port to send to start to send to network;
Resolve inquiry and send the HTTP request that meets RTP network data stream mode and there is URL(uniform resource locator) form;
Check that inquiry sends the command format that meets RTP network data stream mode and have the HTTP request of URL(uniform resource locator) form;
Whether meet RTP network data stream mode and have the command format of HTTP request of URL(uniform resource locator) form legal, if so, reply the legal response of form if judging that inquiry sends, carry out this HTTP request; If not, reply the illegal response of form;
Detect also feedback query and send the executing state that meets RTP network data stream mode and there is the HTTP request of URL(uniform resource locator) form.
9. the service interface based on URL(uniform resource locator) in http protocol provides a system, it is characterized in that, comprising:
Client, for generating the HTTP request with URL(uniform resource locator) form, send the HTTP request with URL(uniform resource locator) form; And for detection of thering is the executing state of the HTTP request of URL(uniform resource locator) form with feedback;
Server end, for receiving the HTTP request with URL(uniform resource locator) form, resolve the HTTP request with URL(uniform resource locator) form; Inspection has the command format of the HTTP request of URL(uniform resource locator) form; Whether the command format that judges the HTTP request with URL(uniform resource locator) form is legal, if, reply the legal response of form, carry out the HTTP request with URL(uniform resource locator) form, and obtain the executing state of the HTTP request with URL(uniform resource locator) form from described client; If not, reply the illegal response of form; Described server end has designated port;
Wherein, described in there is URL(uniform resource locator) form HTTP request refer to the request head of http protocol, the HTTP request of URL(uniform resource locator) form can be expressed request task performed in service processes, and required parameter is provided; The executing state of the described HTTP request with URL(uniform resource locator) form comprises that this HTTP request does not bring into operation, this HTTP asks in the middle of operation and this HTTP request finishes to move.
10. the service interface based on URL(uniform resource locator) in http protocol according to claim 9 provides system, it is characterized in that: described designated port comprises the first port, the second port and the 3rd port, wherein, described client is sent and starts to send the HTTP request that meets RTP network data flow and have URL(uniform resource locator) form to network by described the first port; Described client sends to finish to send to network by described the second port and meets RTP network data flow and have the HTTP request of URL(uniform resource locator) form or described client sends inquiry by described the 3rd port to network and sends the HTTP request that meets RTP network data stream mode and have URL(uniform resource locator) form.
CN201410221676.3A 2014-05-23 2014-05-23 Service interface providing method and system based on uniform resource locator in http protocol Active CN103973812B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410221676.3A CN103973812B (en) 2014-05-23 2014-05-23 Service interface providing method and system based on uniform resource locator in http protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410221676.3A CN103973812B (en) 2014-05-23 2014-05-23 Service interface providing method and system based on uniform resource locator in http protocol

Publications (2)

Publication Number Publication Date
CN103973812A true CN103973812A (en) 2014-08-06
CN103973812B CN103973812B (en) 2018-05-25

Family

ID=51242845

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410221676.3A Active CN103973812B (en) 2014-05-23 2014-05-23 Service interface providing method and system based on uniform resource locator in http protocol

Country Status (1)

Country Link
CN (1) CN103973812B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106685943A (en) * 2016-12-21 2017-05-17 上海斐讯数据通信技术有限公司 Control method and system for exposure of SOA service interface of server and server
CN106681734A (en) * 2016-12-30 2017-05-17 广州华多网络科技有限公司 Response method and device for function interface call
WO2017181801A1 (en) * 2016-04-20 2017-10-26 上海斐讯数据通信技术有限公司 Hypertext transfer protocol request identification system and method
CN107332891A (en) * 2017-06-22 2017-11-07 李辛 Method, server and the client of HTTP request processing
CN110032458A (en) * 2019-04-12 2019-07-19 重庆天蓬网络有限公司 A kind of across language unity calling system of PHP
CN110288356A (en) * 2019-05-31 2019-09-27 威富通科技有限公司 Method, apparatus, electronic equipment, storage medium and the system of payment transaction processing
CN114902200A (en) * 2019-12-16 2022-08-12 兄弟工业株式会社 Program, program group, and information processing apparatus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060023744A1 (en) * 2004-07-28 2006-02-02 Chen Jin R Network address-port translation apparatus and method for IP fragment packets
CN102004770A (en) * 2010-11-16 2011-04-06 杭州迪普科技有限公司 Webpage auditing method and device
CN102857572A (en) * 2012-09-14 2013-01-02 北京星网锐捷网络技术有限公司 Method and device for processing HTTP (hyper text transport protocol) access request and gateway equipment
CN103475931A (en) * 2013-08-23 2013-12-25 四川长虹电器股份有限公司 Method for playing network media at digital television terminal
CN103516785A (en) * 2013-08-19 2014-01-15 上海艾泰网络信息有限公司 Web page proxy system and communication method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060023744A1 (en) * 2004-07-28 2006-02-02 Chen Jin R Network address-port translation apparatus and method for IP fragment packets
CN102004770A (en) * 2010-11-16 2011-04-06 杭州迪普科技有限公司 Webpage auditing method and device
CN102857572A (en) * 2012-09-14 2013-01-02 北京星网锐捷网络技术有限公司 Method and device for processing HTTP (hyper text transport protocol) access request and gateway equipment
CN103516785A (en) * 2013-08-19 2014-01-15 上海艾泰网络信息有限公司 Web page proxy system and communication method thereof
CN103475931A (en) * 2013-08-23 2013-12-25 四川长虹电器股份有限公司 Method for playing network media at digital television terminal

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017181801A1 (en) * 2016-04-20 2017-10-26 上海斐讯数据通信技术有限公司 Hypertext transfer protocol request identification system and method
CN106685943A (en) * 2016-12-21 2017-05-17 上海斐讯数据通信技术有限公司 Control method and system for exposure of SOA service interface of server and server
CN106681734A (en) * 2016-12-30 2017-05-17 广州华多网络科技有限公司 Response method and device for function interface call
CN107332891A (en) * 2017-06-22 2017-11-07 李辛 Method, server and the client of HTTP request processing
CN107332891B (en) * 2017-06-22 2020-06-02 李辛 HTTP request processing method, server and client
CN110032458A (en) * 2019-04-12 2019-07-19 重庆天蓬网络有限公司 A kind of across language unity calling system of PHP
CN110032458B (en) * 2019-04-12 2020-07-10 重庆天蓬网络有限公司 PHP cross-language unified calling system
CN110288356A (en) * 2019-05-31 2019-09-27 威富通科技有限公司 Method, apparatus, electronic equipment, storage medium and the system of payment transaction processing
CN114902200A (en) * 2019-12-16 2022-08-12 兄弟工业株式会社 Program, program group, and information processing apparatus

Also Published As

Publication number Publication date
CN103973812B (en) 2018-05-25

Similar Documents

Publication Publication Date Title
CN103973812A (en) Service interface providing method and system based on uniform resource locator in HTTP
US11500946B2 (en) Apparatus for providing browsing capability between remote/virtual windows and from remote/virtual windows to conventional hypertext documents
US9369406B2 (en) Resource server providing a rapidly changing resource
CN108574604B (en) Test method and device
US20080313545A1 (en) Systems and methods for providing desktop or application remoting to a web browser
US8843938B2 (en) Methods, systems, and computer program products for asynchronous resumption of a dataflow
CN105162646B (en) A kind of multi-protocol interface test system and method
TWI672027B (en) Data processing method, device and system in webpage
US7657591B2 (en) Dispatching client requests to appropriate server-side methods
US8701129B2 (en) Web API server program, web API publication method
US20150370546A1 (en) Method and apparatus for generating data distribution service application
CN111026634A (en) Interface automation test system, method, device and storage medium
CN105068801A (en) Method and system for modifying json date format
US10924527B2 (en) Dynamic workflow-based composite web service system and method
CN107294911B (en) Data packet monitoring method and device, remote procedure call system and equipment
CN107105004B (en) Cross-platform service calling method and device
US9692806B2 (en) Route a service
CN104821939B (en) It is a kind of to be used to implement computer and the method and apparatus of mobile equipment room asynchronous communication
CN116776030A (en) Gray release method, device, computer equipment and storage medium
US20100042633A1 (en) Messaging tracking system and method
CN109710604A (en) Data processing method, device, system, computer readable storage medium
CN114115897A (en) Method for dynamically generating project local executable file based on nodejs script
CN113946614A (en) iOS (Internet operating System) static library-based network data transmission method, device and system
Rudorfer et al. Industrial image processing applications as orchestration of web services
CN105306478A (en) System and method for normalization of HTTP (Hyper Text Transport Protocol) protocol data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201112

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Guangfulin road 4855 Lane 20, No. 90

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211125

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230509

Address after: No. 19 Yuanboyuan Street, Zhengding District, China (Hebei) Pilot Free Trade Zone, Shijiazhuang City, Hebei Province 050899 Hebei Publishing Media Creative Center 101

Patentee after: Shijiazhuang Guanyuan Technology Co.,Ltd.

Address before: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee before: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

TR01 Transfer of patent right