CN103973812B - Service interface providing method and system based on uniform resource locator in http protocol - Google Patents

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

Info

Publication number
CN103973812B
CN103973812B CN201410221676.3A CN201410221676A CN103973812B CN 103973812 B CN103973812 B CN 103973812B CN 201410221676 A CN201410221676 A CN 201410221676A CN 103973812 B CN103973812 B CN 103973812B
Authority
CN
China
Prior art keywords
resource locator
http request
uniform resource
http
network data
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
CN201410221676.3A
Other languages
Chinese (zh)
Other versions
CN103973812A (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

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

Abstract

The present invention provides a kind of service interface providing method based on uniform resource locator in http protocol, including:First, generate and send the HTTP request with uniform resource locator form;HTTP request of the parsing with uniform resource locator form;Secondly, the command format of the HTTP request with uniform resource locator form is checked;Judge whether the command format of the HTTP request with uniform resource locator form is legal, if so, replying the legal response of form, perform the HTTP request with uniform resource locator form;If it is not, then reply the illegal response of form;Finally, detect and feed back the execution state of the HTTP request with uniform resource locator form.The present invention not only provides a small amount of interface, and the media playback service not being frequently used provides service interface using http protocol URL format, realizes spanning operation system platform, across language, striding course, across file system, and only need the content of URL that can express portal contents, there is very big practicability.

Description

Service interface providing method and system based on uniform resource locator in http protocol
Technical field
Computer network communication technology field of the present invention is related to a kind of service interface providing method and system, particularly relates to And a kind of service interface providing method and system based on uniform resource locator in http protocol.
Background technology
With the rapid development of computer communication network, many desktop computers have been typically assigned big display screen, quick The high-performance equipment of network connection, large memories and powerful processors.Hypertext transfer protocol (http protocol) is used in network On service processes and the client on user equipment between exchange information, be that a kind of platform is unrelated, language is unrelated, file system It unites unrelated, the agreement of striding course, nearly all platform, various language have ripe HTTP client and servers end.
And the software realized on computers is that have many modules, to be in communication with each other between module and module, could be formed One organic software, a system are made of many components, to be in communication with each other between component and component, and could form one has The system of machine
Module or component wants communication with the outside world just to need to provide and can be accessed to the interface of outside access, the module offer external world Interface form species is very more.
For example, module is compiled into dynamic or static library, it can write in header file and export for the extraneous interface provided;
For example, module to be made to the card format of certain frame, plug-in unit is provided module as the external world by the form registered Interface be registered in frame, other modules by enquiry module and module interface come obtain module provide service.
Module outwardly provides service, is realized generally by external interface, and a module, using rational interface Depending on the requirement met according to module needs, a module interface that the network data stream broadcasting service for meeting Real-time Transport Protocol is provided Few, function is simple, and called frequency is low and is limited in a small range use, and the module can not be different by different processes Therefore file system, different language, the module accesses of different platform, now just lack and are directed to similar RTP network datas in the art The module of stream provides a kind of service interface and provides mechanism.
The content of the invention
In view of the foregoing deficiencies of prior art, it is an object of the invention to provide one kind based on unified in http protocol The service interface providing method and system of Resource Locator, for solving to provide the network number for meeting Real-time Transport Protocol in the prior art Module interface according to stream broadcasting service is few, and function is simple, and called frequency is low and is limited in a small range use, and the module It can not be by different processes, the problem of different file, different language, the module accesses of different platform.
In order to achieve the above objects and other related objects, one aspect of the present invention provides a kind of based on unified money in http protocol The service interface providing method of source finger URL, applied to client and server end composition communication network in, including:Pass through finger Fixed end mouthful sends the HTTP request with uniform resource locator form to network, described with uniform resource locator form HTTP request refers to the request header of http protocol, and the HTTP request of uniform resource locator form can be expressed in service processes Performed request task, provides required parameter;HTTP request of the parsing with uniform resource locator form, and check have The command format of the HTTP request of uniform resource locator form is to judge whether it is legal, if so, the legal response of form is replied, Perform the HTTP request with uniform resource locator form;If it is not, then reply the illegal response of form;Detecting and feeding back has The execution state of the HTTP request of uniform resource locator form;Wherein, the HTTP with uniform resource locator form The execution state of request does not bring into operation including the HTTP request, the HTTP request is among operation and the HTTP request terminates Operation.
Preferably, the step of sending the HTTP request with uniform resource locator form to network by designated port is gone back Including generating the HTTP request with uniform resource locator form;HTTP request of the generation with uniform resource locator form It is according to starting to send network data flow, terminate to send network data flow or inquiry network data flow status requirements filling HTTP The uniform resource locator part of request, wherein, the uniform resource locator part includes HTTP method, order line and ginseng Number;Wherein HTTP method is GET methods;Order row format is [client ip address]:[client port]/client service into Journey.
Preferably, HTTP request of the parsing with uniform resource locator form is with the GET methods tail of string For order line start, using question mark in the parameter as order line endings, client ip address, the visitor of the HTTP request are parsed Family end port and client service process.
Preferably, judge the HTTP request with uniform resource locator form command format it is whether legal according to According to being whether there is according to the required parameter, and parameter value is not sky.
Preferably, sending the HTTP request with uniform resource locator form to network by designated port includes:It is logical It crosses specified first port and sends to start to send to network and meet real-time transport protocol network data flow and with unified resource positioning Accord with the HTTP request of form;And meet real-time transport protocol network data by the way that second port is specified to send to terminate to send to network It flows and has the HTTP request of uniform resource locator form or met by the way that third port is specified to send inquiry transmission to network Real-time transport protocol network data stream mode and the HTTP request with uniform resource locator form.
Preferably, start to send the network data flow for meeting real-time transport protocol by the way that first port is specified to send to network And the HTTP request with uniform resource locator form;Wherein, start to send the network data flow for meeting real-time transport protocol And the required parameter of the HTTP request offer with uniform resource locator form includes source files, the network of network data flow Target port, the encoding and decoding of network data current load and the network number that the destination address of data flow transmission, network data flow are sent Whether need to cycle through according to stream;Parsing starts to send the network data flow for meeting real-time transport protocol and determine with unified resource The HTTP request of position symbol form;It checks and starts to send the network data flow for meeting real-time transport protocol and be positioned with unified resource Accord with the command format of the HTTP request of form;Judge to start to send the network data flow for meeting real-time transport protocol and have unified Whether the command format of the HTTP request of Resource Locator form is legal, if so, replying the legal response of form, execution starts to send Meet the network data flow of real-time transport protocol and the HTTP request with uniform resource locator form, and obtain the HTTP and ask Seek the mark Universally Unique Identifier of execution;If it is not, then reply the illegal response of form;It detects and feeds back to start to send and meet reality When transport protocol network data flow and with uniform resource locator form HTTP request execution state.
Preferably, by specify second port to network send terminate send meet real-time transport protocol network data flow and HTTP request with uniform resource locator form;Wherein, terminate to send to meet real-time transport protocol network data flow and tool The required parameter that the HTTP request for having uniform resource locator form provides is included from by the way that first port is specified to be sent to network Start the process for sending the network data flow for meeting real-time transport protocol and the HTTP request with uniform resource locator form The Universally Unique Identifier of middle acquisition;Parsing, which terminates to send, to be met real-time transport protocol network data flow and determines with unified resource The HTTP request of position symbol form;It checks and terminates to send the network data flow for meeting real-time transport protocol and be positioned with unified resource Accord with the command format of the HTTP request of form;Judge to terminate to send to meet real-time transport protocol network data flow and with unified money Whether the command format of the HTTP request of source finger URL form is legal, if so, replying the legal response of form, performing the HTTP please It asks, and detects the execution state of the HTTP request;If it is not, then reply the illegal response of form;It detects and feeds back end and send symbol Close the execution state of real-time transport protocol network data flow and the HTTP request with uniform resource locator form.
Preferably, real-time transport protocol network data flow shape is met by the way that third port is specified to send inquiry to network and send State and the HTTP request with uniform resource locator form;Wherein, inquiry, which is sent, meets real-time transport protocol network data flow State and with uniform resource locator form HTTP request provide required parameter include from by specify first port to Network transmission starts to send the network data flow for meeting real-time transport protocol and has the HTTP of uniform resource locator form please The Universally Unique Identifier obtained during asking;Parsing inquiry, which is sent, meets real-time transport protocol network data stream mode and tool There is the HTTP request of uniform resource locator form;It checks that inquiry is sent and meets real-time transport protocol network data stream mode and tool There is the command format of the HTTP request of uniform resource locator form;Judge that inquiry is sent and meet real-time transport protocol network data Stream mode and with uniform resource locator form HTTP request command format it is whether legal, if so, reply form it is legal Response, performs the HTTP request;If it is not, then reply the illegal response of form;It detects and feedback query transmission meets real-time Transmission Protocol network data flow state and with uniform resource locator form HTTP request execution state.
Another aspect of the present invention also provides a kind of service interface based on uniform resource locator in http protocol and provides system System, including:Client, for generating the HTTP request with uniform resource locator form, sending has unified resource positioning Accord with the HTTP request of form;And the execution state for detecting and feeding back the HTTP request with uniform resource locator form; Server end, for receiving the HTTP request with uniform resource locator form, parsing has uniform resource locator form HTTP request;Check the command format of the HTTP request with uniform resource locator form;Judge to determine with unified resource Whether the command format of the HTTP request of position symbol form is legal, if so, replying the legal response of form, performs and determines with unified resource Position accords with the HTTP request of form, and the execution shape of the HTTP request with uniform resource locator form is obtained from the client State;If it is not, then reply the illegal response of form;The server end has designated port;Wherein, it is described to determine with unified resource The HTTP request of position symbol form refers to the request header of http protocol, and the HTTP request of uniform resource locator form can be expressed Performed request task, provides required parameter in service processes;The HTTP request with uniform resource locator form Execution state do not bring into operation including the HTTP request, the HTTP request is among operation and the HTTP request terminates to run.
Preferably, the designated port includes first port, second port and third port, wherein, the client is led to It crosses the first port and sends to start to send to network and meet real-time transport protocol network data flow and with unified resource positioning Accord with the HTTP request of form;The client sends to terminate to send to network by the second port meets real-time transport protocol Network data flow and HTTP request with uniform resource locator form or the client are by the third port to net Network, which sends inquiry and sends, to be met real-time transport protocol network data stream mode and has the HTTP of uniform resource locator form please It asks.
As described above, the service interface providing method based on uniform resource locator in http protocol of the present invention and being System, has the advantages that:
1st, present invention utilizes http protocol operating system independence, any operating system can realize HTTP clients And HTTP server;The language independence of http protocol is make use of, any language can realize HTTP clients and HTTP clothes Business device;Http protocol is network-based, so can access between different processes.It is similar that a small amount of interface is only provided, no The media playback service being frequently used provides service interface using http protocol URL format, that is, realizes cross operating system and put down Platform, across language, striding course, across file system, by not having to realize or quoting complicated frame.
2nd, transferring content is not required using http protocol transmission in the present invention, it is only necessary to which the content of URL can express interface Content, this service interface across language have very big practicability.
Description of the drawings
Fig. 1 is shown as the service interface providing method flow based on uniform resource locator in http protocol of the present invention Figure.
Fig. 2 be shown as the present invention by specify first port to network transmission start send meet real-time transport protocol Network data flow and with uniform resource locator form HTTP request flow chart.
Fig. 3 is shown as being sent by specified second port to network transmission end for the present invention and meets real-time transport protocol Network data flow and with uniform resource locator form HTTP request flow chart.
Fig. 4 is shown as the present invention and meets real-time transport protocol network by the way that third port is specified to send inquiry to network and send Data flow state and with uniform resource locator form HTTP request flow chart.
Fig. 5 be shown as the present invention is based in http protocol uniform resource locator service interface provide system principle knot Composition.
Component label instructions
1 is positioned based on unified resource in http protocol
The service interface of symbol provides system
11 clients
12 server ends
121 first ports
122 second ports
123 third ports
S1~S7 steps
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through in addition different specific realities The mode of applying is embodied or practiced, the various details in this specification can also be based on different viewpoints with application, without departing from Various modifications or alterations are carried out under the spirit of the present invention.It should be noted that in the case where there is no conflict, following embodiment and implementation Feature in example can be mutually combined.
It should be noted that the diagram provided in following embodiment only illustrates the basic structure of the present invention in a schematic way Think, then only the display component related with the present invention rather than component count, shape and size during according to actual implementation in schema It draws, kenel, quantity and the ratio of each component can be a kind of random change during actual implementation, and its assembly layout kenel It is likely more complexity.
Embodiment one
The present embodiment provides a kind of service interface providing methods based on uniform resource locator in http protocol, are applied to In the communication network of client and server end composition, referring to Fig. 1, being shown as based on uniform resource locator in http protocol Service interface providing method flow chart, the service interface providing method bag based on uniform resource locator in http protocol It includes:
Step S1, the client sends the HTTP with uniform resource locator form by designated port to network please It asks;The HTTP request with uniform resource locator form refers to the request header of http protocol, uniform resource locator The HTTP request of form can express request task performed in service processes, provide required parameter.It also wraps in step sl Include HTTP request of the generation with uniform resource locator form;There is the HTTP request of uniform resource locator form to be for generation It is asked according to transmission network data flow, end transmission network data flow or inquiry network data flow status requirements filling HTTP is started The uniform resource locator part asked, wherein, the uniform resource locator part includes HTTP method, order line and parameter; Wherein HTTP method is GET methods;Order row format is [client ip address]:[client port]/client service process.
Step S2, the HTTP request of the server end parsing with uniform resource locator form.Parsing has unified The HTTP request of Resource Locator form is using the GET methods tail of string as order line start, to be asked in the parameter Number for order line endings, the client ip address, client port and client service process of the HTTP request are parsed. Argument section be fromNumber start, character string HTTP/1.1 beginning for ending, using & as line of demarcation, each parameter is respectively with parameter item =parameter value represents, therefore, starts to send data flow, terminates to send data flow, query service status is all the shape with parameter Formula represents.
Step S3, the server end inspection have the command format of the HTTP request of uniform resource locator form;
Step S4, whether the command format of the HTTP request of the server end judgement with uniform resource locator form It is legal, if so, performing step S5;If it is not, performing step S7, that is, the illegal response of form is replied, then terminates process.Wherein, The whether legal foundation of the command format of HTTP request with uniform resource locator form described in judging is please according to Parameter is asked to whether there is, and parameter value is not sky.
Step S5, the server end replys the legal response of form to the client, and performs and determine with unified resource The HTTP request of position symbol form.
Step S6, the client detect and feed back the execution state of the HTTP request with uniform resource locator form To the server end.Wherein, the execution state of the HTTP request with uniform resource locator form includes the HTTP Request does not bring into operation, the HTTP request is among operation and the HTTP request terminates to run.
In abovementioned steps S1, the client is sent by the designated port on server end to network has unified resource The HTTP request of finger URL form includes starting to send to network transmission by first port meeting real-time transport protocol network number According to the HTTP request for flowing and having uniform resource locator form;And terminate to send symbol by the way that second port is specified to send to network Close real-time transport protocol network data flow and with uniform resource locator form HTTP request or pass through specify third port Meet real-time transport protocol network data stream mode to network transmission inquiry transmission and there is uniform resource locator form HTTP request.
2 are referred to, is shown as starting to send the net for meeting real-time transport protocol by the way that first port is specified to send to network Network data flow and with uniform resource locator form HTTP request process, wherein, start send meet real-time Transmission association The network data flow of view and the required parameter that there is the HTTP request of uniform resource locator form to provide include network data flow Source files (file), network data flow send destination address (destip), network data flow send target port (desport), whether the encoding and decoding (codec) of network data current load and network data flow need to cycle through (loop).It opens It originates and the network data flow for meeting real-time transport protocol and the HTTP request with uniform resource locator form is sent to be identified as start.The process specifically includes:
Step S1 ' starts to send the network data for meeting real-time transport protocol by the way that first port is specified to send to network Stream and the HTTP request with uniform resource locator form;Step S1 ' further include generation start send meet real-time Transmission association The network data flow of view and the HTTP request with uniform resource locator form are according to the need for starting transmission network data flow The uniform resource locator part of filling HTTP request is asked, wherein, the uniform resource locator part includes HTTP method, life Order row and parameter;Value.
Step S2 ', parsing start to send the network data flow for meeting real-time transport protocol and have uniform resource locator The HTTP request of form.Parsing starts to send the network data flow for meeting real-time transport protocol and has uniform resource locator lattice The HTTP request of formula is using the GET methods tail of string as order line start, using question mark in the parameter as order line knot Tail parses the client ip address, client port and client service process of the HTTP request.Argument section be from Number start, character string HTTP/1.1 beginning for ending, using & as line of demarcation, each parameter carrys out table with parameter item=parameter value respectively Show.
Step S3 ' is checked and is started to send the network data flow for meeting real-time transport protocol and have uniform resource locator The command format of the HTTP request of form;
Step S4 ' judges whether the command format of the HTTP request is legal, if so, performing step S5 ';If it is not, it then performs Step S7 ' replys the illegal response of form, terminates process.
Step S5 ' replys the legal response of form, performs and starts to send the network data flow and tool for meeting real-time transport protocol There is the HTTP request of uniform resource locator form, and obtain the mark Universally Unique Identifier of HTTP request execution (UUID);Wherein, the whether legal foundation of the command format of the HTTP request with uniform resource locator form is judged It is that whether there is according to the required parameter, and parameter value is not sky.With HTTP://[MediaPlayIP]: [MediaPlayPort]/MediaPlayCmd=start&file=busytone.wav&loop=1&codec=g711a& Exemplified by destip=192.168.1.1&destport=4000, judge whether to have in required parameter cmd=start and This four parameters of file, codec, destip, destport whether there is, and be worth for sky, if cmd=start and This four parameters of file, codec, destip, destport all exist, and are worth not for sky, then are legal.
In the present embodiment, server end can concurrently perform multiple tasks, in order to identify the uniqueness of task, start to send out It is that server program uses the IP address of client access, end that UUID, this UUID can be used during SCN Space Cable Network data flow Mouthful, receive three parameters of time generation of request, the algorithm of generation is UUID=client ip address character string+client end The time character string of mouthful character string+receive request.
Step S6 ', detects and feeds back and start to send the network data flow that meets real-time transport protocol and with unified resource The execution state of the HTTP request of finger URL form, which does not bring into operation including the HTTP request, the HTTP request Among operation and the HTTP request terminates to run.
Start to send to network transmission by specified first port and meet the network data flow of real-time transport protocol and have The HTTP request of uniform resource locator form is by taking table 1 as an example:
Table 1:It sends and starts to send the network data flow for meeting real-time transport protocol and there is uniform resource locator form HTTP request embodiment
3 are referred to, is shown as terminating to send the net for meeting real-time transport protocol by the way that second port is specified to send to network Network data flow and with uniform resource locator form HTTP request process, wherein, terminate send meets real-time Transmission association The network data flow of view and the required parameter that there is the HTTP request of uniform resource locator form to provide are included from by specifying First port starts to send the network data flow for meeting real-time transport protocol and with uniform resource locator lattice to network transmission The Universally Unique Identifier obtained during the HTTP request of formula.Terminate to send the network data flow for meeting real-time transport protocol And the HTTP request with uniform resource locator form is identified as stop.The process specifically includes:
S1 ", by specify second port to network send terminate send meet real-time transport protocol network data flow and HTTP request with uniform resource locator form;Generation end is further included in this step and is sent meets real-time transport protocol Network data flow and with uniform resource locator form HTTP request, be according to terminate send network data flow demand fill out The uniform resource locator part of HTTP request is filled,
S2 ", parsing terminate to send the network data flow for meeting real-time transport protocol and have uniform resource locator form HTTP request;
S3 " is checked and is terminated to send the network data flow for meeting real-time transport protocol and have uniform resource locator form HTTP request command format;
S4 " judges to terminate to send the network data flow for meeting real-time transport protocol and has uniform resource locator form HTTP request command format it is whether legal, if so, performing step S5 ";If it is not, then perform step S7 ".
S5 " replys the legal response of form, performs the HTTP request,.Wherein, terminate to send to meet real-time transport protocol Network data flow and the execution state of HTTP request with uniform resource locator form do not start to transport including the HTTP request Row, the HTTP request is among operation and the HTTP request terminates to run.Judging to terminate to send to meet real-time transport protocol Network data flow and with uniform resource locator form HTTP request command format it is whether legal when HTTP:// [MediaPlayIP]:[MediaPlayPort]/MediaPlayExemplified by cmd=stop&uuid=2003, judge be in parameter It is no with the presence of cmd=stop and UUID, and be worth for sky.If cmd=stop, and UUID exists, and the value of UUID is not sky, It is then legal.
S6 " is detected and fed back and terminates to send the network data flow for meeting real-time transport protocol and be positioned with unified resource The execution state of the HTTP request of form is accorded with, which does not bring into operation including the HTTP request, the HTTP request is being transported In the trade and the HTTP request terminates to run.
S7 " replys the illegal response of form, terminates process.
By the way that second port is specified to meet the network data flow of real-time transport protocol to network transmission end transmission and is had The HTTP request of uniform resource locator form is by taking table 2 as an example:
Table 2:It sends and terminates to send the network data flow for meeting real-time transport protocol and there is uniform resource locator form HTTP request embodiment
4 are referred to, is shown as meeting real-time transport protocol network by the way that third port is specified to send inquiry to network and send Data flow state and with uniform resource locator form HTTP request process, wherein, inquiry send meets real-time Transmission The required parameter that protocol network data flow state and HTTP request with uniform resource locator form provide is included from passing through First port is specified to start to send the network data flow for meeting real-time transport protocol and with unified resource positioning to network transmission The Universally Unique Identifier obtained during the HTTP request for according with form.Inquiry, which is sent, meets real-time transport protocol network data Stream mode and HTTP request with uniform resource locator form are identified as query.The inquiry, which is sent, meets real-time biography Defeated protocol network data flow state includes inquiry transmission and meets real-time transport protocol network data flow.The process specifically includes:
S1 " ' meets real-time transport protocol network data stream mode by the way that third port is specified to send inquiry to network and send And the HTTP request with uniform resource locator form;Generation inquiry is further included in this step and is sent meets real-time Transmission association Network data stream mode and the HTTP request with uniform resource locator form are discussed, generation inquiry, which is sent, meets real-time Transmission association Network data stream mode and the HTTP request with uniform resource locator form are discussed, is that network data flow need are sent according to inquiry The uniform resource locator part of filling HTTP request is asked, S2 " ', parsing inquiry, which is sent, meets real-time transport protocol network data Stream mode and the HTTP request with uniform resource locator form.
S3 " ' checks that inquiry is sent and meets real-time transport protocol network data stream mode and with uniform resource locator lattice The command format of the HTTP request of formula;
S4 " ' judges that inquiry is sent and meets real-time transport protocol network data stream mode and with uniform resource locator lattice Whether the command format of the HTTP request of formula is legal, if so, performing step S5 " ';If it is not, then perform step S7 " '.Wherein, Meet real-time transport protocol network data stream mode in judgement inquiry transmission and have the HTTP of uniform resource locator form please When whether the command format asked is legal.
With HTTP://[MediaPlayIP]:[MediaPlayPort]/MediaPlayCmd=Query&uuid= Exemplified by 2003, judge whether with the presence of cmd=query and UUID in parameter, and be worth not for sky.If cmd=stop, and UUID In the presence of, and the value of UUID is not sky, then is legal.
S5 " ' replys the legal response of form, performs the HTTP request.
S6 " ', is detected and feedback query transmission meets real-time transport protocol network data stream mode and determines with unified resource The execution state of the HTTP request of position symbol form.Wherein, inquiry, which is sent, meets real-time transport protocol network data stream mode and tool The execution state for having the HTTP request of uniform resource locator form does not bring into operation including the HTTP request, the HTTP request exists Among operation and the HTTP request terminates to run.
S7 " ' replys the illegal response of form, terminates process.
Meet real-time transport protocol network data stream mode and tool by the way that third port is specified to send inquiry to network and send Have the HTTP request of uniform resource locator form by taking table 3 as an example:
Table 3:It sends inquiry and sends and meet real-time transport protocol network data stream mode and with uniform resource locator lattice The HTTP request embodiment of formula
The present embodiment also provides a kind of service interface based on uniform resource locator in http protocol and provides system, please join Fig. 5 is read, the service interface based on uniform resource locator in http protocol is shown as and system principle structure chart, the service is provided Interface, which provides system 1, includes client 11 and server end 12.
For client 11 for generating the HTTP request with uniform resource locator form, sending has unified resource positioning Accord with the HTTP request of form;And the execution state for detecting and feeding back the HTTP request with uniform resource locator form. Wherein, the HTTP request with uniform resource locator form includes starting to send meeting real-time transport protocol network data Stream and the HTTP request with uniform resource locator form;Terminate to send and meet real-time transport protocol network data flow and have The HTTP request of uniform resource locator form or inquiry, which are sent, meets real-time transport protocol network data stream mode and with system The HTTP request of one Resource Locator form.Wherein, the HTTP request with uniform resource locator form refers to HTTP The request header of agreement, the HTTP request of uniform resource locator form can express request performed in service processes and appoint Business, provides required parameter.
Server end 12 is parsed and determined with unified resource for receiving the HTTP request with uniform resource locator form The HTTP request of position symbol form;Check the command format of the HTTP request with uniform resource locator form;Whether judge it Legal, if so, replying the legal response of form to the client 11, performing the HTTP with uniform resource locator form please It asks, and the execution state of the HTTP request with uniform resource locator form is obtained from the client 11;If it is not, it then replys The illegal response of form.
The server end 12 has designated port.The designated port include first port 121, second port 122 and Third port 123, wherein, the client 11 starts to send by the first port 121 to network transmission meets real-time biography Defeated protocol network data flow and the HTTP request with uniform resource locator form;The client 11 passes through the second end Mouth 122 meets real-time transport protocol network data flow to network transmission end transmission and has uniform resource locator form HTTP request or the client send inquiry and send to the third port 123 to network meets real-time transport protocol network Data flow state and the HTTP request with uniform resource locator form.The HTTP with uniform resource locator form The execution state of request does not bring into operation including the HTTP request, the HTTP request is among operation and the HTTP request terminates Operation.
Service interface providing method and system of the present invention based on uniform resource locator in http protocol utilize Http protocol operating system independence, any operating system can realize HTTP clients and HTTP server;It make use of The language independence of http protocol, any language can realize HTTP clients and HTTP server;Http protocol is to be based on Network, so can access between different processes.It is similar that a small amount of interface is only provided, the media play not being frequently used Service provides service interface using http protocol URL format, that is, spanning operation system platform is realized, across language, striding course, across text Part system, by not having to realize or quoting complicated frame.And transferring content is not required in HTTP transmission, it is only necessary to the content of URL Portal contents can be expressed, this service interface across language has very big practicability.
So the present invention effectively overcomes various shortcoming of the prior art and has high industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe Know the personage of this technology all can carry out modifications and changes under the spirit and scope without prejudice to the present invention to above-described embodiment.Cause This, those of ordinary skill in the art is complete without departing from disclosed spirit and institute under technological thought such as Into all equivalent modifications or change, should by the present invention claim be covered.

Claims (5)

1. a kind of service interface providing method based on uniform resource locator in http protocol, applied to client and server In the communication network for holding composition, which is characterized in that including:
HTTP request with uniform resource locator form is sent to network by designated port, it is described to determine with unified resource The HTTP request of position symbol form refers to the request header of http protocol, and the HTTP request of uniform resource locator form can be expressed Performed request task, provides required parameter in service processes;
HTTP request of the parsing with uniform resource locator form, and check that the HTTP with uniform resource locator form please The command format asked is to judge whether it is legal, if so, replying the legal response of form, performing has uniform resource locator form HTTP request;If it is not, then reply the illegal response of form;
It detects and feeds back the execution state of the HTTP request with uniform resource locator form;Wherein, it is described that there is unified money The execution state of the HTTP request of source finger URL form does not bring into operation including the HTTP request, the HTTP request is worked as in operation In and the HTTP request terminate to run;
The step of sending the HTTP request with uniform resource locator form to network by designated port further includes generation tool There is the HTTP request of uniform resource locator form;HTTP request of the generation with uniform resource locator form is according to beginning It sends network data flow, terminate the unification for sending network data flow or inquiring about network data flow status requirements filling HTTP request Resource Locator part, wherein, the uniform resource locator part includes HTTP method, order line and parameter;Wherein HTTP Method is GET methods;Order row format is [client ip address]:[client port]/client service process;
HTTP request of the parsing with uniform resource locator form is to be opened using the GET methods tail of string as order line Head, using question mark in the parameter as order line endings, parse the client ip address of the HTTP request, client port, And client service process;
Judging the command format of the HTTP request with uniform resource locator form, whether legal foundation is according to institute It states required parameter whether there is, and parameter value is not sky;
Sending the HTTP request with uniform resource locator form to network by designated port includes:
Meet real-time transport protocol network data flow and with unified money by the way that first port is specified to start to send to network transmission The HTTP request of source finger URL form;And
Meet real-time transport protocol network data flow and with unified money by the way that second port is specified to send to terminate to send to network The HTTP request of source finger URL form meets real-time transport protocol net by the way that third port is specified to send inquiry to network and send Network data flow state and the HTTP request with uniform resource locator form;
By the way that first port is specified to start to send the network data flow for meeting real-time transport protocol and have unified to network transmission The HTTP request of Resource Locator form;Wherein, start to send the network data flow for meeting real-time transport protocol and have unified The required parameter that the HTTP request of Resource Locator form provides includes the source files of network data flow, network data flow is sent Destination address, network data flow send target port, network data current load encoding and decoding and network data flow whether need It cycles through;
Parsing starts to send the network data flow for meeting real-time transport protocol and has the HTTP of uniform resource locator form please It asks;
It checks and starts to send the network data flow for meeting real-time transport protocol and have the HTTP of uniform resource locator form please The command format asked;
Judge to start to send the network data flow for meeting real-time transport protocol and have the HTTP of uniform resource locator form please Whether the command format asked is legal, if so, replying the legal response of form, performs and starts to send the network for meeting real-time transport protocol Data flow and the HTTP request with uniform resource locator form, and obtain the general unique knowledge of mark of HTTP request execution Other code;If it is not, then reply the illegal response of form;
It detects and feeds back and start to send the network data flow for meeting real-time transport protocol and there is uniform resource locator form The execution state of HTTP request.
2. the service interface providing method according to claim 1 based on uniform resource locator in http protocol, special Sign is:Meet real-time transport protocol network data flow and with unified by the way that second port is specified to send to terminate to send to network The HTTP request of Resource Locator form;Wherein, terminate to send and meet real-time transport protocol network data flow and with unified money The required parameter that the HTTP request of source finger URL form provides is included since by being sent specifying first port to network transmission It is obtained during meeting the network data flow of real-time transport protocol and the HTTP request with uniform resource locator form Universally Unique Identifier;
Parsing, which terminates to send, meets real-time transport protocol network data flow and the HTTP request with uniform resource locator form;
It checks and terminates to send the network data flow for meeting real-time transport protocol and have the HTTP of uniform resource locator form please The command format asked;
Judge to terminate to send to meet real-time transport protocol network data flow and the HTTP request with uniform resource locator form Command format it is whether legal, if so, reply the legal response of form, perform the HTTP request, and detect holding for the HTTP request Row state;If it is not, then reply the illegal response of form;
It detects and feeds back end transmission and meet real-time transport protocol network data flow and there is uniform resource locator form The execution state of HTTP request.
3. the service interface providing method according to claim 2 based on uniform resource locator in http protocol, special Sign is:By the way that third port is specified to meet real-time transport protocol network data stream mode to network transmission inquiry transmission and is had The HTTP request of uniform resource locator form;Wherein, inquiry, which is sent, meets real-time transport protocol network data stream mode and tool The required parameter that the HTTP request for having uniform resource locator form provides is included from by the way that first port is specified to be sent to network Start the process for sending the network data flow for meeting real-time transport protocol and the HTTP request with uniform resource locator form The Universally Unique Identifier of middle acquisition;
Parsing inquiry, which is sent, meets real-time transport protocol network data stream mode and the HTTP with uniform resource locator form Request;
It checks that inquiry is sent and meets real-time transport protocol network data stream mode and the HTTP with uniform resource locator form The command format of request;
Judge that inquiry is sent and meet real-time transport protocol network data stream mode and the HTTP with uniform resource locator form Whether the command format of request is legal, if so, replying the legal response of form, performs the HTTP request;If it is not, then reply form not Legal response;
It detects and feedback query transmission meets real-time transport protocol network data stream mode and with uniform resource locator form HTTP request execution state.
4. a kind of service interface based on uniform resource locator in http protocol provides system, using in such as claim 1-3 The service interface providing method based on uniform resource locator in http protocol described in any one, which is characterized in that including:
Client, for generating the HTTP request with uniform resource locator form, sending has uniform resource locator lattice The HTTP request of formula;And the execution state for detecting and feeding back the HTTP request with uniform resource locator form;
Server end, for receiving the HTTP request with uniform resource locator form, parsing has uniform resource locator The HTTP request of form;Check the command format of the HTTP request with uniform resource locator form;Judge that there is unified money Whether the command format of the HTTP request of source finger URL form is legal, if so, replying the legal response of form, performing has unified money The HTTP request of source finger URL form, and obtain holding for the HTTP request with uniform resource locator form from the client Row state;If it is not, then reply the illegal response of form;The server end has designated port;
Wherein, the HTTP request with uniform resource locator form refers to the request header of http protocol, unified resource The HTTP request of finger URL form can express request task performed in service processes, provide required parameter;It is described to have The execution state of the HTTP request of uniform resource locator form does not bring into operation including the HTTP request, the HTTP request is being transported In the trade and the HTTP request terminates to run.
5. the service interface according to claim 4 based on uniform resource locator in http protocol provides system, special Sign is:The designated port includes first port, second port and third port, wherein, the client passes through described the Single port, which to network transmission starts to send, meets real-time transport protocol network data flow and with uniform resource locator form HTTP request;The client sends to terminate to send to network by the second port meets real-time transport protocol network data The HTTP request or the client for flowing and having uniform resource locator form are looked by the third port to network transmission It askes to send and meets real-time transport protocol network data stream mode and the HTTP request with 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 CN103973812A (en) 2014-08-06
CN103973812B true 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)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105812481A (en) * 2016-04-20 2016-07-27 上海斐讯数据通信技术有限公司 Hypertext transfer protocol request identification system and hypertext transfer protocol request identification 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
CN107332891B (en) * 2017-06-22 2020-06-02 李辛 HTTP request processing method, server and client
CN110032458B (en) * 2019-04-12 2020-07-10 重庆天蓬网络有限公司 PHP cross-language unified calling system
CN110288356B (en) * 2019-05-31 2022-03-08 威富通科技有限公司 Payment service processing method, device, electronic equipment, storage medium and system
JP7427951B2 (en) * 2019-12-16 2024-02-06 ブラザー工業株式会社 Programs, program groups, and information processing devices

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI241808B (en) * 2004-07-28 2005-10-11 Realtek Semiconductor Corp Network address-port translation apparatus and method for IP fragment packets

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN103973812A (en) 2014-08-06

Similar Documents

Publication Publication Date Title
CN103973812B (en) Service interface providing method and system based on uniform resource locator in http protocol
Indrasiri et al. gRPC: up and running: building cloud native applications with Go and Java for Docker and Kubernetes
US9654586B2 (en) Resource server providing a rapidly changing resource
US9350793B2 (en) Converged call flow and web service application integration using a processing engine
US20080301320A1 (en) Method And System For Managing Communication Protocol Data Based On MIME Types
US20160294953A1 (en) System and method for providing a configuration wizard for use in creating representational state transfer services for execution in a service bus runtime
CN103747004A (en) Realizing method of internet of things communication protocol
TWI354475B (en) Dispatching client requests to appropriate server-
CN110049059A (en) A kind of outer net equipment and Intranet communication between devices method and relevant apparatus
WO2010127551A1 (en) Adaptiing method, adapter and adapter system for network service communication
CN104391868A (en) Staticizing device and method for dynamic page
CN108334411A (en) Resource transfer method and device based on Redfish in a kind of BMC
CN108984567A (en) A kind of Service Data Management system and method
CN104063407A (en) Browser architecture based on cloud computing and analysis method
CN108446335A (en) Heterogeneous system data pick-up based on database and unified outbound data exchange method
WO2023103727A1 (en) Routing method for service debugging, electronic device, medium and program product
US9742835B2 (en) System and method for backend control of frontend user interfaces
CN107665237A (en) Data structure sorter, the distribution subscription system of unstructured data and method
CN110083342A (en) A kind of program creating method, device and computer readable storage medium
CN104717647A (en) Service capability authentication method, equipment and system
CN112929437A (en) Data transmission system, method and device based on Internet of things MQTT technical framework
Balachandar RESTful Java Web Services: A pragmatic guide to designing and building RESTful APIs using Java
CN114466047A (en) Method, platform, equipment and medium for conveniently accessing Internet of things equipment to Internet of things platform
CN103927173A (en) Data processing method and system based on integrated sales operation
WO2017095645A1 (en) Data request transformation using loosely coupled visitors

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
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.