CN108512903A - A kind of exception information processing method, device, storage medium and API gateway - Google Patents

A kind of exception information processing method, device, storage medium and API gateway Download PDF

Info

Publication number
CN108512903A
CN108512903A CN201810161447.5A CN201810161447A CN108512903A CN 108512903 A CN108512903 A CN 108512903A CN 201810161447 A CN201810161447 A CN 201810161447A CN 108512903 A CN108512903 A CN 108512903A
Authority
CN
China
Prior art keywords
information
response message
transformation rule
escape
relation table
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
CN201810161447.5A
Other languages
Chinese (zh)
Other versions
CN108512903B (en
Inventor
谢济帆
王枫
谭仕朝
杨尚京
王文武
严宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Lexin Software Technology Co Ltd
Original Assignee
Shenzhen Lexin Software 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 Shenzhen Lexin Software Technology Co Ltd filed Critical Shenzhen Lexin Software Technology Co Ltd
Priority to CN201810161447.5A priority Critical patent/CN108512903B/en
Publication of CN108512903A publication Critical patent/CN108512903A/en
Application granted granted Critical
Publication of CN108512903B publication Critical patent/CN108512903B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5003Managing SLA; Interaction between SLA and QoS
    • H04L41/5019Ensuring fulfilment of SLA
    • H04L41/5025Ensuring fulfilment of SLA by proactively reacting to service quality change, e.g. by reconfiguration after service quality degradation or upgrade
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Abstract

The embodiment of the invention discloses a kind of exception information processing method, device, storage medium and API gateways.The exception information processing method includes:Receive the request response message that server is sent, wherein the request response message is the feedback information for the service requesting information that server customer in response end is sent;When the request response message is exception information, the business interface information of the server and the service requesting information are obtained;According to the business interface information and service requesting information, escape information corresponding with the request response message is determined;The request response message is converted into the escape information, and the escape information is sent to client.The technical solution provided through the embodiment of the present invention can be directed to the different server service interfaces application scenarios different with client, provide different exception information prompt schemes, enhance the flexibility of the exception information processing to server feedback.

Description

A kind of exception information processing method, device, storage medium and API gateway
Technical field
The present embodiments relate to technical field of software development more particularly to a kind of exception information processing method, device, deposit Storage media and API gateway.
Background technology
Currently, various network services generally have client and server-side, and intermediate all there are one API (Application Programming Interface, application programming interfaces) gateway uniformly receives the called sides such as client or outside partner Request, and according to the different logic of each interface, carry out certain verification and logical process, relay to back-end services side.
Obviously, API gateway is the intermediate bridge that client and back-end services are accepted in network service, is that HTTP request is opened up Open up the process of back-end services.During each back-end services are supplied to client by gateway system, back-end services Fang Jing Often it will appear the prompt message that reports an error, however, report an error prompt message of the existing gateway system to each back-end services side, lacking can Configurationization reports an error prompt message escape function.
Existing the report an error gateway system of prompt message escape function of configurableization that lacks has the following defects:1, gateway system The prompt message that reports an error united to being supplied to client, can not dynamic realtime adjustment processing.It is supplied to the prompt letter that reports an error of client Breath is provided by back-end services side, when the prompt message that reports an error changes, needs to carry out adaptation adjustment to back-end services side, and efficiency is low, Lack real-time;2, it is directed to the same service requesting information, the error information of different business scenarios, gateway system can not provide The different prompts that reports an error, lacks flexibility;3, gateway system is to reports such as the frame exception of server-side request generation or service exceptions Wrong information is supplied directly to client, it has not been convenient to which user understands that gateway system lacks friendly without escape processing.
Invention content
A kind of exception information processing method of offer of the embodiment of the present invention, device, storage medium and API gateway, it is existing to optimize There is the scheme of processing server feedback abnormal prompt information in technology.
In a first aspect, an embodiment of the present invention provides a kind of exception information processing method, this method includes:
Receive the request response message that server is sent, wherein the request response message is server response visitor The feedback information for the service requesting information that family end is sent;
When the request response message is exception information, the business interface information of the server and the business are obtained Solicited message;
According to the business interface information and service requesting information, escape letter corresponding with the request response message is determined Breath;
The request response message is converted into the escape information, and the escape information is sent to client.
Further, it according to the business interface information and service requesting information, determines and the request response message pair The escape information answered, including:
Obtain pre-stored transformation rule relation table, wherein the transformation rule relation table includes pre-set business interface Correspondence between information, pre-set business solicited message and default escape information;
According to the business interface information and the service requesting information, lookup and institute from the transformation rule relation table State the corresponding escape information of request response message.
Further, before obtaining pre-stored transformation rule relation table, further include:
Judge whether to receive transformation rule change information input by user;
When receiving the transformation rule change information, the pre-stored transformation rule relation table is carried out more Newly.
Further, before obtaining pre-stored transformation rule relation table, further include:
Monitor whether the transformation rule relation table has update in real time;
The pre-stored transformation rule relation table of acquisition, including:
After monitoring the transformation rule relation table update, updated transformation rule relation table is obtained.
Further, the exception information includes that service exception and frame are abnormal.
Second aspect, the embodiment of the present invention additionally provide a kind of exception information processing unit, which includes:
Response message receiving module, the request response message for receiving server transmission, wherein the request response letter Breath is the feedback information for the service requesting information that server customer in response end is sent;
Business information obtaining module, for when the request response message is exception information, obtaining the server Business interface information and the service requesting information;
Escape information determination module, for according to the business interface information and service requesting information, determination to be asked with described Seek the corresponding escape information of response message;
Escape information sending module for the request response message to be converted to the escape information, and described will turn Adopted information is sent to client.
Further, the escape information determination module, including:
Relation table acquiring unit, for obtaining pre-stored transformation rule relation table, wherein the transformation rule relationship Table includes the correspondence between pre-set business interface message, pre-set business solicited message and default escape information;
Escape information searching unit is used for according to the business interface information and the service requesting information, from described turn It changes and searches escape information corresponding with the request response message in rule relation table.
Further, further include:
Information judging unit is changed, for before obtaining pre-stored transformation rule relation table, judging whether to receive Information is changed to transformation rule input by user;
Relation table updating unit, for when receiving the transformation rule and changing information, to described pre-stored turn Rule relation table is changed to be updated.
Further, further include:
Monitoring unit is updated, for before obtaining pre-stored transformation rule relation table, monitoring the conversion in real time Whether rule relation table has update;
The relation table acquiring unit, is used for:
After monitoring the transformation rule relation table update, updated transformation rule relation table is obtained.
Further, the exception information includes that service exception and frame are abnormal.
The third aspect, the embodiment of the present invention additionally provide a kind of computer readable storage medium, are stored thereon with computer Program realizes the exception information processing method as described in first aspect of the embodiment of the present invention when program is executed by processor.
Fourth aspect processor and is stored in storage an embodiment of the present invention provides a kind of API gateway, including memory It can realize on device and when the computer program of processor operation, the processor execute the computer program such as the present invention in fact Apply the exception information processing method described in a first aspect.
Exception information processing scheme provided in an embodiment of the present invention, the request response message sent by receiving server, Wherein, request response message is the feedback information for the service requesting information that server customer in response end is sent, when request response letter When breath is exception information, the business interface information and service requesting information of server are obtained;, and according to business interface information and industry Business solicited message determines escape information corresponding with request response message, and request response message is finally converted to escape information, And escape information is sent to client, the different server service interfaces application scenarios different with client can be directed to, Different exception information prompt schemes is provided, the flexibility of the exception information processing to server feedback is enhanced.
Description of the drawings
Fig. 1 is a kind of flow diagram for exception information processing method that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow diagram of exception information processing method provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of flow diagram for exception information processing method that the embodiment of the present invention three provides;
Fig. 4 is a kind of flow diagram for exception information processing method that the embodiment of the present invention four provides;
Fig. 5 is a kind of structural schematic diagram for exception information processing unit that the embodiment of the present invention five provides;
Fig. 6 is a kind of structural schematic diagram for API gateway that the embodiment of the present invention seven provides.
Specific implementation mode
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limitation of the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is the flow diagram of exception information processing method provided in an embodiment of the present invention, and this method is applicable to pair It, can be with the case where processing exception information when the request response message that API gateway feeds back server end is exception information It is executed by exception information processing unit, wherein the device can be generally integrated in API gateway by software and or hardware realization. As shown in Figure 1, this method includes:
S110, the request response message that server is sent is received.
Wherein, request response message is the feedback information for the service requesting information that server customer in response end is sent.
In inventive embodiments, API gateway is the bridge that client and server carries out data transmission, when receiving visitor When the service requesting information that family end is sent, API gateway is according to pre-stored server configuration information by the service requesting information It is forwarded to corresponding server, server responds the service requesting information, and generates request response for the service requesting information The request response message is sent to API gateway by information, server.API gateway receives the request response message that server is sent, Wherein, which may include that server is directed to the service requesting information that client is sent, and be supplied to client Business information, i.e. server are supplied to the information on services of client, can also include when server is directed to the industry that client is sent Be engaged in solicited message can not normal response when, the server exception information of feedback.
S120, when ask response message be exception information when, obtain server business interface information and service request letter Breath.
When the request response message that server is sent is exception information, i.e., when server is directed to the business that client is sent Solicited message can not normal response when, when to feed back to API gateway be server exception information, obtain the business interface of server Information and service requesting information.Wherein, service requesting information is that client is sent to API gateway, is intended to access certain by API gateway The access information namely client of a server are intended to call the call request of the business service of some server by API gateway Information.The business interface information of server is the business interface information for the server for sending the request response message, namely according to The service requesting information is forwarded to and is somebody's turn to do by the service requesting information and pre-stored server configuration information that client is sent The relevant information of the interface of the corresponding server of service requesting information.
Optionally, when the request response message for receiving server transmission is exception information, which can wrap It includes service exception and frame is abnormal.Wherein, service exception can be understood as the service requesting information that client is sent and not meet visit When the regulation for the server asked, server is directed to the abnormal prompt information that such case returns.Illustratively, client is sent When service requesting information is registration information, the registration information that client is sent is forwarded to corresponding clothes by API gateway Be engaged in device, server tests to registration information, if the registration information that client is sent to be registered by other users, At this point, server is exception information for the feedback information (request response message) of registration information response, i.e. business is different Often, if the request response message is " user is existing ".Frame can be understood as the service requesting information of client transmission extremely It is normal with server itself, but during client and server carry out data communication, transmission data is non- Normal logic intercepts, and server is directed to the abnormal prompt information that such case returns.Illustratively, the business that client is sent is asked Ask information be registration information when, the registration information that client is sent is forwarded to corresponding server by API gateway, if Because of reasons such as database exceptions, the entirely service that server provides is unavailable, at this point, server is directed to the registration information The feedback information (request response message) of response is exception information, i.e. frame is abnormal, if the request response message is that " database connects Connect failure ".
S130, according to business interface information and service requesting information, determine escape information corresponding with response message is asked.
In inventive embodiments, when the request response message that server is sent is exception information, according to the business of acquisition Interface message and service requesting information determine escape information corresponding with the request response message.It is understood that when request When response message is exception information, i.e., no matter the exception information is that service exception or frame are abnormal, it is required for believing the exception Breath feeds back to client by API gateway, and user is made to understand what server was responded for the service requesting information that client is sent Feedback result.But it is making by oneself with server to be sent to the request response message (exception information) of API gateway by server What the form of adopted agreement was presented, user does not allow concrete meaning that is readily understood, or even can not understanding the exception information, also, is asking Ask response message be exception information when, usual user, which is not concerned with specifically which configuration module of server, to go wrong.Cause This, needs the request response message for sending not intelligible server, is converted to that user is readily comprehensible to be responded with the request The corresponding escape information of information.It is understood that escape information is another expression side corresponding with request response message Formula, but escape information is relative to request response message, it is easier to so that user is understood, and user can be made according to the escape information The flow operations responded.
Wherein, business interface information is different, and service requesting information is different, and escape information corresponding with request response message is not Together.Therefore, it is necessary to according to business interface information and service requesting information, determine escape information corresponding with request response message. Optionally, obtain pre-stored transformation rule relation table, wherein transformation rule relation table include pre-set business interface message, Then correspondence between pre-set business solicited message and default escape information is believed according to business interface information and service request Breath searches escape information corresponding with request response message from transformation rule relation table.
S140, request response message is converted into escape information, and escape information is sent to client.
In the present embodiment, request response message is converted to the escape information by the escape information determined according to S130, and The escape information is sent to client, use for reference.It is understood that request response message is converted to escape Information is the conversion to two kinds of expression ways, and request response message is sent to visitor with a kind of straightaway linguistic form Family end.
Exception information processing method provided in an embodiment of the present invention, the request response message sent by receiving server, Wherein, request response message is the feedback information for the service requesting information that server customer in response end is sent, when request response letter When breath is exception information, the business interface information and service requesting information of server are obtained;, and according to business interface information and industry Business solicited message determines escape information corresponding with request response message, and request response message is finally converted to escape information, And escape information is sent to client, the different server service interfaces application scenarios different with client can be directed to, Different exception information prompt schemes is provided, the flexibility of the exception information processing to server feedback is enhanced.
Embodiment two
Fig. 2 is a kind of flow diagram of exception information processing method provided by Embodiment 2 of the present invention.The present embodiment with It optimizes based on above-described embodiment, in the present embodiment, step is believed according to the business interface information and service request Breath determines escape information corresponding with the request response message, is optimized for:Pre-stored transformation rule relation table is obtained, Wherein, the transformation rule relation table include pre-set business interface message, pre-set business solicited message and default escape information it Between correspondence;According to the business interface information and the service requesting information, looked into from the transformation rule relation table Look for escape information corresponding with the request response message.Correspondingly, the method for the present embodiment specifically includes:
S210, the request response message that server is sent is received.
Wherein, request response message is the feedback information for the service requesting information that server customer in response end is sent.
S220, when ask response message be exception information when, obtain server business interface information and service request letter Breath.
S230, pre-stored transformation rule relation table is obtained.
Wherein, transformation rule relation table includes pre-set business interface message, pre-set business solicited message and default escape letter Correspondence between breath.
In embodiments of the present invention, pre-stored transformation rule relation table is obtained, wherein in the transformation rule relation table Describe the correspondence between different business interface information, different service requesting informations and different escape information.It can be with Understand, the different service requesting information of same business interface information, corresponding escape information is different, that is, is directed to client and visits The server service interface asked is different, and the exception information that server provides is supplied to the exception information prompting mode of client not Together.Illustratively, the same service request letter that same client accesses different server interfaces namely same client is sent Breath, is forwarded to different server interfaces, for example, same client distinguishes access server interface A and server interface B, When the request response message of server interface A and server interface B feedbacks are exception information, in transformation rule relation table In, the corresponding escape information of exception information of server interface A feedbacks is " input logs in phone number format error ", and is serviced The corresponding escape information of exception information of device interface B feedbacks is " the password mistake of input ".Same service requesting information is different Business interface information, corresponding escape information is different, that is, is directed to the client difference for initiating server access request, or persuade The application scenarios for device offer business information of being engaged in are different, and the exception information that server provides is supplied to the different of each different client Normal information alert mode is different.Illustratively, two same server interfaces of different client calls, e.g., client first Distinguish invoking server interface A with client second, i.e. server interface A is called by client first and client second respectively, works as clothes The request response message and server interface A for the service requesting information that business device interface A is sent for client first are directed to client When the service requesting information that second is sent is exception information, in transformation rule relation table, abnormal letter corresponding with client first The escape information of breath is " please call can service calls * * * ", and the escape information of exception information corresponding with client second is " to ask Again it logs in ".
S240, according to business interface information and service requesting information, search from transformation rule relation table and responded with request The corresponding escape information of information.
It from transformation rule relation table, searches whether that there are business interface information and service requesting informations, that is, judges turning It changes in rule relation table, if there is pre-set business interface message identical with business interface information, and and service requesting information Identical pre-set business solicited message.In transformation rule relation table, there is pre-set business identical with business interface information Interface message, and when pre-set business solicited message identical with service requesting information, will be connect with the service requesting information and business Message ceases corresponding default escape information, as the corresponding escape information of the request response message that is sent with server.
S250, request response message is converted into escape information, and escape information is sent to client.
Exception information processing method provided in an embodiment of the present invention, by obtaining pre-stored transformation rule relation table, Wherein, transformation rule relation table includes between pre-set business interface message, pre-set business solicited message and default escape information Correspondence, and according to the business interface information and the service requesting information, search and ask from transformation rule relation table The corresponding escape information of response message is sought, escape information corresponding with request response message can be accurately and rapidly determined, realize For the different server service interfaces application scenarios different with client, different exception information prompt schemes is provided, is increased By force to the flexibility of the exception information of server feedback processing.
Embodiment three
Fig. 3 is a kind of flow diagram for exception information processing method that the embodiment of the present invention three provides.The present embodiment with It optimizes based on above-described embodiment, in the present embodiment, before obtaining pre-stored transformation rule relation table, increases Step:Judge whether to receive transformation rule change information input by user;When receiving the transformation rule change information, The pre-stored transformation rule relation table is updated.Correspondingly, the method for the present embodiment specifically includes:
S310, the request response message that server is sent is received.
Wherein, request response message is the feedback information for the service requesting information that server customer in response end is sent.
S320, when ask response message be exception information when, obtain server business interface information and service request letter Breath.
S330, judge whether to receive transformation rule change information input by user.
In embodiments of the present invention, judge whether to receive transformation rule change information input by user.It is appreciated that It is, it, can be in transformation rule pipe when developer needs that preset transformation rule relation table is modified or updated Reason center inputs corresponding transformation rule and changes information.Wherein, transformation rule change information may include to transformation rule relationship The correspondence between pre-set business interface message, pre-set business solicited message and default escape information in table is changed, It can also include the corresponding pass increased between new pre-set business interface message, pre-set business solicited message and default escape information System, can also include pair between existing pre-set business interface message, pre-set business solicited message and default escape information It should be related to and be deleted.
S340, when receive transformation rule change information when, pre-stored transformation rule relation table is updated.
When receiving transformation rule change information input by user, information is changed to prestoring according to the transformation rule Transformation rule relation table be updated, i.e., in transformation rule relation table pre-set business interface message, pre-set business ask Correspondence between information and default escape information is updated.
S350, updated transformation rule relation table is obtained.
Wherein, updated transformation rule relation table includes newest pre-set business interface message, pre-set business request letter Correspondence between breath and default escape information.
S360, according to business interface information and service requesting information, searched from updated transformation rule relation table with Ask the corresponding escape information of response message.
S370, request response message is converted into escape information, and escape information is sent to client.
Exception information processing method provided in an embodiment of the present invention, by obtaining pre-stored transformation rule relation table Before, judge whether to receive transformation rule change information input by user, when receiving transformation rule change information, to pre- The transformation rule relation table first stored is updated, and may be implemented to adjust the Configuration Online and dynamic of transformation rule relation table, Different transformation rules can be made to come into force immediately, imminent failure makes different transformation rules have timeliness.
Example IV
Fig. 4 is a kind of flow diagram for exception information processing method that the embodiment of the present invention four provides.The present embodiment with It optimizes based on above-described embodiment, in the present embodiment, before obtaining pre-stored transformation rule relation table, increases Step:Monitor whether the transformation rule relation table has update in real time;Correspondingly, pre-stored conversion will be obtained described in step Rule relation table, is optimized for:After monitoring the transformation rule relation table update, updated transformation rule relationship is obtained Table.Correspondingly, the method for the present embodiment specifically includes:
S410, the request response message that server is sent is received.
Wherein, request response message is the feedback information for the service requesting information that server customer in response end is sent.
S420, when ask response message be exception information when, obtain server business interface information and service request letter Breath.
Whether S430, real time monitoring transformation rule relation table have update.
In embodiments of the present invention, monitor whether pre-stored transformation rule relation table has update in real time.Wherein, when turn Change the correspondence between the pre-set business interface message in rule relation table, pre-set business solicited message and default escape information Change, and/or increase in transformation rule relation table new pre-set business interface message, pre-set business solicited message and Correspondence between default escape information, and/or by existing pre-set business interface message in transformation rule relation table, default When correspondence between service requesting information and default escape information has carried out deletion, it can indicate to monitor transformation rule pass It is that table has update.
S440, monitor transformation rule relation table update after, obtain updated transformation rule relation table.
Wherein, updated transformation rule relation table includes newest pre-set business interface message, pre-set business request letter Correspondence between breath and default escape information.
In the present embodiment, it when monitoring transformation rule relation table in the presence of update, obtains updated transformation rule and closes It is table, is believed with the request response that for different business interface information and service requesting information, accurate determination is provided with server Cease (exception information) corresponding escape information.
S450, according to business interface information and service requesting information, searched from updated transformation rule relation table with Ask the corresponding escape information of response message.
S460, request response message is converted into escape information, and escape information is sent to client.
Exception information processing method provided in an embodiment of the present invention, by obtaining pre-stored transformation rule relation table Before, monitor whether the transformation rule relation table has update in real time, and after monitoring the transformation rule relation table update, Updated transformation rule relation table is obtained, it is (abnormal to believe that the request response message that accurate determination is provided with server may be implemented Breath) corresponding escape information.
Embodiment five
Fig. 5 is a kind of structural schematic diagram for exception information processing unit that the embodiment of the present invention five provides.As shown in figure 5, Described device includes:Response message receiving module 510, business information obtaining module 520, escape information determination module 530 and turn Adopted information sending module 540, wherein:
Response message receiving module 510, the request response message for receiving server transmission, wherein the request is rung It is the feedback information for the service requesting information that server customer in response end is sent to answer information;
Business information obtaining module 520, for when the request response message is exception information, obtaining the server Business interface information and the service requesting information;
Escape information determination module 530, for according to the business interface information and service requesting information, determine with it is described Ask the corresponding escape information of response message;
Escape information sending module 540, for the request response message to be converted to the escape information, and will be described Escape information is sent to client.
Exception information processing unit provided in an embodiment of the present invention, the request response message sent by receiving server, Wherein, request response message is the feedback information for the service requesting information that server customer in response end is sent, when request response letter When breath is exception information, the business interface information and service requesting information of server are obtained;, and according to business interface information and industry Business solicited message determines escape information corresponding with request response message, and request response message is finally converted to escape information, And escape information is sent to client, the different server service interfaces application scenarios different with client can be directed to, Different exception information prompt schemes is provided, the flexibility of the exception information processing to server feedback is enhanced.
Optionally, the escape information determination module, including:
Relation table acquiring unit, for obtaining pre-stored transformation rule relation table, wherein the transformation rule relationship Table includes the correspondence between pre-set business interface message, pre-set business solicited message and default escape information;
Escape information searching unit is used for according to the business interface information and the service requesting information, from described turn It changes and searches escape information corresponding with the request response message in rule relation table.
Optionally, which further includes:
Information judging unit is changed, for before obtaining pre-stored transformation rule relation table, judging whether to receive Information is changed to transformation rule input by user;
Relation table updating unit, for when receiving the transformation rule and changing information, to described pre-stored turn Rule relation table is changed to be updated.
Optionally, which further includes:
Monitoring unit is updated, for before obtaining pre-stored transformation rule relation table, monitoring the conversion in real time Whether rule relation table has update;
The relation table acquiring unit, is used for:
After monitoring the transformation rule relation table update, updated transformation rule relation table is obtained.
Optionally, the exception information includes that service exception and frame are abnormal.
Embodiment six
The embodiment of the present invention six provides a kind of storage medium including computer executable instructions, and the computer is executable It instructs and includes for the processing method of exception information, this method when being executed by computer processor:
Receive the request response message that server is sent, wherein the request response message is server response visitor The feedback information for the service requesting information that family end is sent;
When the request response message is exception information, the business interface information of the server and the business are obtained Solicited message;
According to the business interface information and service requesting information, escape letter corresponding with the request response message is determined Breath;
The request response message is converted into the escape information, and the escape information is sent to client.
Storage medium --- any various types of memory devices or storage device.Term " storage medium " is intended to wrap It includes:Install medium, such as CD-ROM, floppy disk or magnetic tape equipment;Computer system memory or random access memory, such as DRAM, DDRRAM, SRAM, EDORAM, blue Bath (Rambus) RAM etc.;Nonvolatile memory, such as flash memory, magnetic medium (example Such as hard disk or optical storage);The memory component etc. of register or other similar types.Storage medium can further include other types Memory or combinations thereof.In addition, storage medium can be located at program in the first computer system being wherein performed, or It can be located in different second computer systems, second computer system is connected to the first meter by network (such as internet) Calculation machine system.Second computer system can provide program instruction to the first computer for executing.Term " storage medium " can To include two or more that may reside in different location (such as in different computer systems by network connection) Storage medium.Storage medium can store the program instruction that can be executed by one or more processors and (such as be implemented as counting Calculation machine program).
Certainly, a kind of storage medium including computer executable instructions that the embodiment of the present invention is provided, computer The exception information processing operation that executable instruction is not limited to the described above can also be performed what any embodiment of the present invention was provided Relevant operation in exception information processing method.
Embodiment seven
Fig. 6 is that the embodiment of the present invention seven provides a kind of structural schematic diagram of API gateway, as shown in fig. 6, the API gateway 600 May include:Memory 601, processor 602 and storage on a memory and can processor operation computer program, it is described Processor 602 realizes the configuration method of API gateway as described in the embodiments of the present invention when executing the computer program.
API gateway provided in an embodiment of the present invention receives the request response message that server is sent, wherein request response Information is the feedback information for the service requesting information that server customer in response end is sent, when request response message is exception information When, obtain the business interface information and service requesting information of server;, and according to business interface information and service requesting information, It determines escape information corresponding with request response message, request response message is finally converted into escape information, and escape is believed Breath is sent to client.By using above-mentioned technical proposal, different server service interfaces and client difference can be directed to Application scenarios, different exception information prompt schemes are provided, the flexibility of the exception information processing to server feedback is enhanced.
The executable present invention of exception information processing unit, storage medium and API gateway provided in above-described embodiment is implemented The corresponding exception information processing method that example is provided has and executes the corresponding function module of this method and advantageous effect.Do not exist The technical detail of detailed description in above-described embodiment, reference can be made to the exception information processing side that any embodiment of the present invention is provided Method.
Note that above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that The present invention is not limited to specific embodiments described here, can carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out to the present invention by above example It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also May include other more equivalent embodiments, and the scope of the present invention is determined by scope of the appended claims.

Claims (10)

1. a kind of exception information processing method, which is characterized in that including:
Receive the request response message that server is sent, wherein the request response message is server customer in response end The feedback information of the service requesting information of transmission;
When the request response message is exception information, the business interface information of the server and the service request are obtained Information;
According to the business interface information and service requesting information, escape information corresponding with the request response message is determined;
The request response message is converted into the escape information, and the escape information is sent to client.
2. according to the method described in claim 1, it is characterized in that, according to the business interface information and service requesting information, Determine escape information corresponding with the request response message, including:
Obtain pre-stored transformation rule relation table, wherein the transformation rule relation table include pre-set business interface message, Correspondence between pre-set business solicited message and default escape information;
According to the business interface information and the service requesting information, searches from the transformation rule relation table and asked with described Seek the corresponding escape information of response message.
3. according to the method described in claim 2, it is characterized in that, before obtaining pre-stored transformation rule relation table, Further include:
Judge whether to receive transformation rule change information input by user;
When receiving the transformation rule change information, the pre-stored transformation rule relation table is updated.
4. according to the method described in claim 2, it is characterized in that, before obtaining pre-stored transformation rule relation table, Further include:
Monitor whether the transformation rule relation table has update in real time;
The pre-stored transformation rule relation table of acquisition, including:
After monitoring the transformation rule relation table update, updated transformation rule relation table is obtained.
5. according to any methods of claim 1-4, which is characterized in that the exception information includes service exception and frame It is abnormal.
6. a kind of exception information processing unit, which is characterized in that including:
Response message receiving module, the request response message for receiving server transmission, wherein the request response message is The feedback information for the service requesting information that server customer in response end is sent;
Business information obtaining module, for when the request response message is exception information, obtaining the business of the server Interface message and the service requesting information;
Escape information determination module, for according to the business interface information and service requesting information, determining and being rung with the request Answer the corresponding escape information of information;
Escape information sending module for the request response message to be converted to the escape information, and the escape is believed Breath is sent to client.
7. device according to claim 6, which is characterized in that the escape information determination module, including:
Relation table acquiring unit, for obtaining pre-stored transformation rule relation table, wherein the transformation rule relation table packet Include the correspondence between pre-set business interface message, pre-set business solicited message and default escape information;
Escape information searching unit, for according to the business interface information and the service requesting information, being advised from the conversion Escape information corresponding with the request response message is then searched in relation table.
8. device according to claim 7, which is characterized in that further include:
Information judging unit is changed, for before obtaining pre-stored transformation rule relation table, judging whether to receive use The transformation rule of family input changes information;
Relation table updating unit, for when receiving the transformation rule change information, being advised to the pre-stored conversion Then relation table is updated.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor Exception information processing method according to any one of claims 1 to 5 is realized when row.
10. a kind of API gateway, which is characterized in that including memory, processor and storage can transport on a memory and in processor Capable computer program, the processor realize exception according to any one of claims 1 to 5 when executing the computer program Information processing method.
CN201810161447.5A 2018-02-27 2018-02-27 Abnormal information processing method and device, storage medium and API gateway Active CN108512903B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810161447.5A CN108512903B (en) 2018-02-27 2018-02-27 Abnormal information processing method and device, storage medium and API gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810161447.5A CN108512903B (en) 2018-02-27 2018-02-27 Abnormal information processing method and device, storage medium and API gateway

Publications (2)

Publication Number Publication Date
CN108512903A true CN108512903A (en) 2018-09-07
CN108512903B CN108512903B (en) 2021-04-23

Family

ID=63375385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810161447.5A Active CN108512903B (en) 2018-02-27 2018-02-27 Abnormal information processing method and device, storage medium and API gateway

Country Status (1)

Country Link
CN (1) CN108512903B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110958127A (en) * 2018-09-26 2020-04-03 瑞数信息技术(上海)有限公司 Exception handling method, device and equipment and computer storage medium
CN111641691A (en) * 2020-05-20 2020-09-08 北京字节跳动网络技术有限公司 Session message transmission method and device and electronic equipment
CN111722949A (en) * 2019-03-18 2020-09-29 北京京东尚科信息技术有限公司 Information processing method, terminal, server and storage medium
CN111988384A (en) * 2020-08-10 2020-11-24 北京百度网讯科技有限公司 Information transmission method and device, electronic equipment and storage medium
CN112583930A (en) * 2020-12-25 2021-03-30 四川安迪科技实业有限公司 Data forwarding synchronization method, system and device for multi-independent system interaction
CN113900895A (en) * 2021-10-08 2022-01-07 深圳市欢太数字科技有限公司 Information processing method, information processing apparatus, storage medium, and electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6665730B1 (en) * 1999-12-16 2003-12-16 At&T Corp. Method and apparatus for transaction routing in a connection-oriented packet network using a non-fault-tolerant directory server
US20080282078A1 (en) * 2007-05-10 2008-11-13 Murata Machinery, Ltd. Gateway device, controlling method of the same, and program record medium storing controlling method
CN103620576A (en) * 2010-11-01 2014-03-05 七网络公司 Caching adapted for mobile application behavior and network conditions
CN104363072A (en) * 2014-10-29 2015-02-18 中国建设银行股份有限公司 Error information transfer and escape method, error information transfer and escape device and error information transfer and escape system
CN104601540A (en) * 2014-12-05 2015-05-06 华为技术有限公司 Cross-site scripting (XSS) attack defense method and Web server
CN107204961A (en) * 2016-03-16 2017-09-26 阿里巴巴集团控股有限公司 The treating method and apparatus of ESC is needed in interface packets

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6665730B1 (en) * 1999-12-16 2003-12-16 At&T Corp. Method and apparatus for transaction routing in a connection-oriented packet network using a non-fault-tolerant directory server
US20080282078A1 (en) * 2007-05-10 2008-11-13 Murata Machinery, Ltd. Gateway device, controlling method of the same, and program record medium storing controlling method
CN103620576A (en) * 2010-11-01 2014-03-05 七网络公司 Caching adapted for mobile application behavior and network conditions
CN104363072A (en) * 2014-10-29 2015-02-18 中国建设银行股份有限公司 Error information transfer and escape method, error information transfer and escape device and error information transfer and escape system
CN104601540A (en) * 2014-12-05 2015-05-06 华为技术有限公司 Cross-site scripting (XSS) attack defense method and Web server
CN107204961A (en) * 2016-03-16 2017-09-26 阿里巴巴集团控股有限公司 The treating method and apparatus of ESC is needed in interface packets

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
XINCHANG ZHANG: ""A Transfer Fault Diagnosing Method for Protocol Conformance Test Based on FSMs"", 《IEEE》 *
姜学东: ""VPDN用户故障影响PPP指标的案例分析"", 《CNKI》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110958127A (en) * 2018-09-26 2020-04-03 瑞数信息技术(上海)有限公司 Exception handling method, device and equipment and computer storage medium
CN111722949A (en) * 2019-03-18 2020-09-29 北京京东尚科信息技术有限公司 Information processing method, terminal, server and storage medium
CN111722949B (en) * 2019-03-18 2024-04-05 北京京东尚科信息技术有限公司 Information processing method, terminal, server and storage medium
CN111641691A (en) * 2020-05-20 2020-09-08 北京字节跳动网络技术有限公司 Session message transmission method and device and electronic equipment
CN111641691B (en) * 2020-05-20 2022-09-23 北京字节跳动网络技术有限公司 Session message transmission method and device and electronic equipment
CN111988384A (en) * 2020-08-10 2020-11-24 北京百度网讯科技有限公司 Information transmission method and device, electronic equipment and storage medium
CN111988384B (en) * 2020-08-10 2022-08-30 北京百度网讯科技有限公司 Information transmission method and device, electronic equipment and storage medium
CN112583930A (en) * 2020-12-25 2021-03-30 四川安迪科技实业有限公司 Data forwarding synchronization method, system and device for multi-independent system interaction
CN113900895A (en) * 2021-10-08 2022-01-07 深圳市欢太数字科技有限公司 Information processing method, information processing apparatus, storage medium, and electronic device

Also Published As

Publication number Publication date
CN108512903B (en) 2021-04-23

Similar Documents

Publication Publication Date Title
CN108512903A (en) A kind of exception information processing method, device, storage medium and API gateway
US10063599B2 (en) Controlling registration floods in VOIP networks via DNS
US10034319B2 (en) System and method for analyzing messages and initiating communication sessions
US8041800B2 (en) Automatic orchestration of dynamic multiple party, multiple media communications
CN108429645A (en) A kind of configuration method of API gateway, device, storage medium and API gateway
KR20040037800A (en) A SIP(Session Initiation Protocol) Load Balancing Apparatus and Method
US20220255999A1 (en) Function-as-a-service for two-way communication systems
WO2016184266A1 (en) Early warning method and device, and processing server
US10044597B2 (en) System and method for processing service requests using logical environments
US11095580B2 (en) Instant message (IM) routing to a virtual user consisting of a group of possible sub-users associated with a common IM identity
CN110880100A (en) Business approval processing method, device and system
CN112288577B (en) Transaction processing method, device, electronic equipment and medium for distributed service
WO2020258653A1 (en) Cross-node data processing method and apparatus
US20150358263A1 (en) Communication between a web application instance connected to a connection server and a calling entity other than said connection server
US20090187444A1 (en) Service knowledge map
CN117135580A (en) 5G message universal access system and method
CN111131397B (en) Application management method and system, gateway platform, server and storage medium
CN109743232B (en) Interface detection method and device
KR20040105588A (en) Method with management of an opaque user identifier for checking complete delivery of a service using a set of servers
US7359960B1 (en) Telecommunications control system using data interchange
KR102223022B1 (en) RPA service system and method for contact center
US20060129532A1 (en) Form generation system and method
CN117221323B (en) Service dynamic forwarding method
CN114448703B (en) Request processing method, request processing device, electronic equipment and storage medium
US8752065B2 (en) Rules engine for a persistent message store

Legal Events

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