CN112732372A - Service calling method and device and server - Google Patents

Service calling method and device and server Download PDF

Info

Publication number
CN112732372A
CN112732372A CN202110062656.6A CN202110062656A CN112732372A CN 112732372 A CN112732372 A CN 112732372A CN 202110062656 A CN202110062656 A CN 202110062656A CN 112732372 A CN112732372 A CN 112732372A
Authority
CN
China
Prior art keywords
service
interface
target
user
business
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.)
Pending
Application number
CN202110062656.6A
Other languages
Chinese (zh)
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.)
China Travelsky Technology Co Ltd
China Travelsky Holding Co
Original Assignee
China Travelsky Holding Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Travelsky Holding Co filed Critical China Travelsky Holding Co
Priority to CN202110062656.6A priority Critical patent/CN112732372A/en
Publication of CN112732372A publication Critical patent/CN112732372A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0637Strategic management or analysis, e.g. setting a goal or target of an organisation; Planning actions based on goals; Analysis or evaluation of effectiveness of goals

Abstract

The application provides a service calling method, a service calling device and a server, wherein the method comprises the following steps: after a user logs in an aviation service management system through a terminal, outputting a service management page to the terminal of the user; acquiring at least one service operation request input by a user on the service management page, wherein the service operation request is used for requesting a target service; obtaining service characteristic information associated with the user, wherein the service characteristic information is used for representing an airline company to which the user belongs and a requirement type of the airline company to which the user belongs for providing business service for the user; and aiming at each business operation request, determining a target service interface address matched with the service characteristic information from at least one service interface address associated with the target business service requested by the business operation request, and calling a service interface pointed by the target service interface address to process the business operation request. The scheme of the application can reduce the complexity of the interface for calling the business service.

Description

Service calling method and device and server
Technical Field
The present application relates to the field of communications technologies, and in particular, to a service invocation method, an apparatus, and a server.
Background
Flight services of different airlines can be managed through an airline service management system of a third party. For example, an airline employee may log into a third party airline management system to query for information about flights involved under the airline and to manage tickets to the flights.
The type of business service required by each airline company is various, for example, the business service of the airline company may involve business services such as flight control, ticket sales, and report statistics. In order to meet different business service requirements of the same airline company, an airline business management system of a third party is required to configure and call service interfaces of background subsystems of different business services. On the basis, the airline business management system of the third party needs to develop pages of different business services for each airline company, and simultaneously defines interface calling methods required by different business services respectively.
Because the third-party airline business management system relates to business services related to a plurality of airlines, and business services of the same business of different flights are different, the third-party airline business management system needs to develop a large number of business service pages, develop and define a large number of interface calling methods, and increase the complexity of business service calling.
Disclosure of Invention
The application provides a service calling method, a service calling device and a server, so as to reduce the complexity of an interface for calling a business service.
In order to achieve the above purpose, the present application provides the following technical solutions:
in one aspect, the present application further provides a service invoking method, including:
after a user logs in an aviation service management system through a terminal, outputting a service management page to the terminal of the user;
obtaining at least one business operation request input by the user on the business management page, wherein the business operation request is used for requesting a target business service;
obtaining service characteristic information associated with the user, wherein the service characteristic information is used for representing an airline company to which the user belongs and a demand type of the airline company to which the user belongs for providing business service for the user;
and aiming at each business operation request, determining a target service interface address matched with the service characteristic information from at least one service interface address associated with the target business service requested by the business operation request, and calling a service interface pointed by the target service interface address to process the business operation request.
In another aspect, the present application further provides a service invoking device, including:
the system comprises a page output unit, a service management unit and a service management unit, wherein the page output unit is used for outputting a service management page to a terminal of a user after the user logs in an aviation service management system through the terminal;
a request obtaining unit, configured to obtain at least one service operation request input by the user on the service management page, where the service operation request is used to request a target service;
an information obtaining unit, configured to obtain service feature information associated with the user, where the service feature information is used to characterize an airline company to which the user belongs and a demand type of the airline company to which the user belongs for providing a business service for the user;
and the calling processing unit is used for determining a target service interface address matched with the service characteristic information from at least one service interface address associated with the target service requested by the service operation request according to each service operation request, and calling a service interface pointed by the target service interface address to process the service operation request.
In yet another aspect, the present application further provides a server comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement the service invocation method as described above.
According to the technical scheme, the uniform service management interface can be provided for users of different airlines, and after the users of any airline company log in the service management system, the users can apply for service operation requests in the service management interface. On the basis, the service management system can automatically match a service interface address required to be called by the target service requested by the service operation request according to the service characteristic information associated with the user and call a corresponding service interface, so that a set of service pages do not need to be separately developed and an interface calling method does not need to be defined for each service of different airlines, and the complexity of service calling is further reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a service invocation method according to an embodiment of the present application;
FIG. 2 is a schematic flow diagram of one implementation of a business service configuration enabled service interface for an airline;
FIG. 3 is a schematic diagram of an address configuration interface according to the present application;
fig. 4 is a further flowchart of a service invoking method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a rule configuration interface for configuring routing rules according to the present application;
FIG. 6 is a schematic diagram of a rule script input interface of the present application;
fig. 7 is a schematic structural diagram illustrating an embodiment of a service invocation device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a server according to an embodiment of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be practiced otherwise than as specifically illustrated.
Detailed Description
The scheme of the application is suitable for an aviation business management system, the aviation business management system is a third party management platform except an airline company, and the aviation business management system can be accessed to a plurality of airline companies to provide business services of related businesses such as flights, ticket selling and the like for the plurality of airline companies.
In the application, the aviation service system may be a cluster or distributed system formed by a plurality of servers, for example, the aviation service system may be a cloud platform.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without inventive step, are within the scope of the present disclosure.
As shown in fig. 1, which shows a flowchart of an embodiment of a service invocation method of the present application, the method of the present embodiment is applied to an airline business management system, and the method of the present embodiment may include:
s101, after a user logs in the aviation business management system through a terminal, a business management page is output to the terminal of the user.
Wherein, the user can log in the aviation business management system through the browser of the terminal. It will be appreciated that the airline management system verifies the identity of the user before the user successfully logs into the airline management system. For example, the user name and password of the user are verified to determine whether the user is a worker of the airline company accessing the airline business management system.
The business management page is a uniform entry page provided by the airline business management system to users of different airlines. The business management page may provide for a user to enter business service related parameters and trigger a business operation request.
For example, the service management page may include a plurality of categories of service options, and after a certain service option is selected, an interface related to the service option may be presented, and a corresponding service may be performed on the interface related to the service option. For example, in the application scenario of flight management, the service options may include flight inquiry, flight modification, flight batch modification, flight history, and so on, and after clicking the service option, a corresponding sub-page may be displayed, so that the business operation may be input in the sub-page.
S102, at least one business operation request input by a user on a business management page is obtained, and the business operation request is used for requesting a target business service.
The service operation request may indicate a requested target service, for example, a name of the target service may be carried, or a service interface name of a service to be called.
For example, the service operation request is a request for a user to modify a flight, and the service requested by the service operation request is a flight modification.
It is understood that the service operation request may further include a parameter related to the request of the target service, so that the processing related to the service operation request is subsequently completed by calling the corresponding interface. Wherein the parameters of the service operation request can be determined based on information input or selected by the user on the service management interface.
For example, taking the target service as a flight modification example, in the service management interface, the user needs to input the flight number and the departure date of the flight to be modified, and may also select the slot to be modified in the flight, and on this basis, the user clicks the "modification" option in the interface to trigger the service operation request, and the service operation request may also include one or more of the information such as the flight number, the departure date, and the slot.
S103, obtaining the service characteristic information associated with the user.
The service characteristic information is used for representing the airline company to which the user belongs and the demand type of business service provided by the airline company user to which the user belongs. That is, the service feature information is user association information for characterizing a service interface suitable for providing the target service to the user.
In the present application, the service characteristic information may include at least an airline company to which the user belongs. In practical applications, the service feature information may also include a user role of the user in the airline to which the user belongs.
As an optional manner, the service feature information associated with the user may include, in addition to the attributes of the user itself, such as the airline driver to which the user belongs and the role of the user, the following: configured parameters, e.g., parameter values specifying parameters, etc.; the method can also comprise the following steps: and the device environment information related to the user, such as the IP address and the version effective time range of the device where the user is located, and the like.
It can be understood that, after the user logs in the service management system through the terminal, the server may query the service feature information associated with the user.
S104, aiming at each business operation request, determining a target service interface address matched with the service characteristic information from at least one service interface address associated with the target business service requested by the business operation request, and calling a service interface pointed by the target service interface address to process the business operation request.
It can be understood that each service corresponds to a service interface name, and due to various requirements of different airlines or the same airline operator, the same service interface name may correspond to a plurality of service interfaces, and on this basis, in order to determine which service interfaces need to process the service operation request, the service interface suitable for being called needs to be determined by using service characteristic information associated with the user. Wherein each service interface corresponds to a service interface address.
The matching of the target service interface address and the service characteristic information means that part or all of the service characteristic information is matched with the configuration information configured by the target service interface address.
The service interface can be accurately positioned and suitable for being called by the user through the service characteristic information associated with the user, so that the calling of the corresponding interface can be completed through the service management system of the third party.
In an optional manner, since the data formats supported by the subsystems corresponding to the interfaces set for different airlines may also be different, each service interface address also corresponds to a corresponding interface data format. Correspondingly, the service interface pointed by the target service interface address is called to process the service operation request after the format is converted.
It can be understood that after the service interface pointed by the target service interface address is called, the page data returned by the service interface can be obtained, and then the page data can be displayed, and the page data can include processing result data of the service operation request.
Of course, if multiple service operation requests exist at the same time and the multiple service operation requests call different service interfaces, the page data corresponding to the multiple service operation requests may be merged and displayed.
Therefore, the method and the device can provide a uniform service management interface for users of different airlines, and the users of any airline company can apply for service operation requests in the service management interface after logging in the service management system. On the basis, the service management system can automatically match a service interface address required to be called by the target service requested by the service operation request according to the service characteristic information associated with the user and call a corresponding service interface, so that a set of service pages do not need to be separately developed and an interface calling method does not need to be defined for each service of different airlines, and the complexity of service calling is further reduced.
Meanwhile, compared with the situation that different requirements for different navigation departments relate to independent program entry and program implementation independently, a set of independent codes is developed for each background interface service independently, the scheme of the application can not only reduce the complexity of interface calling development, but also avoid the situation that the interface calling codes are modified in a large quantity after the service requirements change.
In addition, because the application is a uniform service management interface for carrying out service operation, interface versions required by different service operations can be automatically called, so that a user does not need to open different pages according to different service requirements, and the condition that the user mistakenly opens the pages to cause operation errors such as flight stock adjustment and the like can be reduced.
In the present application, for a service interface name of the same service, there are many possibilities for matching rules configured for each service interface address corresponding to the service interface name.
For example, in a possible case where a business service of the same airline company does not care about the user role and other information, one or more service interfaces and service interface addresses corresponding to the service interfaces may be configured for the business service, but only the service interface address corresponding to one service interface may be activated at the same time. On this basis, the obtained user associated service characteristic information at least comprises: information of the airline company to which the user belongs, such as an identification or name of the airline company.
Correspondingly, if the target business service requested by the business operation request is configured with an enabled service interface address corresponding to the airline company, the service interface address configured by the target business service is determined as the target service interface address matched with the service characteristic information.
The above situation belongs to a situation of simply configuring a service interface, and for the situation, in order to facilitate a developer to configure relevant parameters such as a service interface address and the like for a certain service operation of an airline company, the present application may further provide a corresponding configuration interface to the developer to complete the configuration and the starting related to the interface of the corresponding service operation before a user of the airline company performs the service operation.
As shown in fig. 2, which shows a schematic flow chart of an implementation of the service interface enabled for the configuration of the business service of the airline according to the present application, the flow chart may include:
s201, outputting an address configuration interface to a terminal of a developer.
The address configuration interface comprises an airline department input box and at least one interface parameter input box related to the interface.
S202, based on the information of the target airline company to be configured input by the developer in the driver input box and the interface parameters input by the at least one interface parameter input box, determining and storing a service interface address configured for business service by the target airline company.
Fig. 3 is a schematic diagram of an address configuration interface, and as can be seen from fig. 3, the interface includes an input box of "airline company", which can input an identification or a short name of an airline company. Meanwhile, the interface can further comprise an interface name, a data format, a version and an input box of a subsystem, wherein the subsystem represents the subsystem called by the interface corresponding to the interface name. An interface address can be uniquely determined by the interface name, subsystem and version.
It will be appreciated that a developer configures one or more different versions for an interface name of an airline, each version corresponding to an interface address.
And S203, displaying an interface address selection interface to the developer.
Wherein the interface address selection interface comprises at least one service interface address configured for business services by the target airline.
S204, configuring a service interface address selected by the developer on the interface address selection interface as a service interface address opened by the target airline company for the business service.
In practical applications, the developers in steps S202 and S203 may be the same or different. After configuring service interface addresses corresponding to different interface versions for an interface name in step S202, if it is desired to adopt a certain interface version as an interface version to be called for processing the service, an address selection interface may be requested to be displayed, a corresponding service system may display the interface address selection interface through a display screen or to display the interface address selection interface to a terminal of a developer, and after the developer selects a certain service interface address, the selected service interface address is used as a unique interface address to be called for the service.
In yet another possible scenario, the interface address that needs to be invoked for a certain business service may also be decided for different airlines, different user roles in the airlines, and other information associated with the user, as needed. In this case, multiple routing rules may be configured for the same business service (or business interface name), and a matching routing rule may be determined according to the service feature information of the user. This is described below in conjunction with the flowchart of fig. 4.
As shown in fig. 4, which shows a flowchart of another embodiment of the service invocation method according to the present application, the method of the present embodiment is applied to an airline business management system, and the method of the present embodiment may include:
s401, after the user logs in the aviation business management system through the terminal, a business management page is output to the terminal of the user.
S402, at least one business operation request input by a user on a business management page is obtained, and the business operation request is used for requesting a target business service.
S403, obtaining the service characteristic information associated with the user.
For example, the user-associated service feature information may include: the navigation department to which the user belongs, the role of the user, the IP address of the equipment where the user is located, the current time and other information.
S404, aiming at each business operation request, determining a plurality of routing rules of the target business service configuration requested by the business operation request.
For example, each service operation request may request a target service, and the target service corresponds to a service interface name, and the service interface name may be configured with a plurality of service interface addresses. In this embodiment, each service interface address corresponds to one routing rule, and therefore, a plurality of routing rules to be matched can be obtained.
Wherein the routing rule includes a routing condition and a service interface address.
The routing condition in the routing rule is a matching condition for matching the service interface address in the routing rule, and the service interface address can be called only if the routing condition is met.
As an alternative, the routing rule may further include: for characterizing the priority level of the matching priority. The priority level is used for subsequently determining the matching sequence of the routing rule and the service characteristic information of the user.
The routing rule may be a regular expression, which may be stored in a string format.
For example, the specific format of the routing rule may be expressed as: service a < - > b: the priority includes service name, a routing condition, b subsystem (representing service interface address), and priority. Wherein the priority may be set or not set as desired. The routing rule indicates that if the condition a is satisfied for the service interface service, the background subsystem is called as b, and the priority of the rule is priority.
Various expression symbols may be included in the routing rule, such as:
' indicates that the conditions match exactly;
' is not the same;
'&' conditional and relational;
'|' conditional or relational;
parenthesis, the expression in parenthesis is calculated preferentially.
In the routing rule, the parameter values involved may adopt a plurality of comma-separated values, and the wildcards are denoted by the wildcards.
For example, the following steps are carried out:
routing rule 1 is as follows:
Travelsky.air.inv.SetSegmentClassInhibit:orihost=172.24.1.39<->SAT/2.0/JS ON:1;
in the routing rule, if the ip of the device where the user is located is 172.24.1.39, the backstage hosting software is accessed to uniformly call the 2.0 version of the service, the data format is json, and the priority of the rule is 1 (wherein the smaller the numerical value of the priority is, the higher the priority is).
For the above interface name, there may also be a routing rule 2, where the routing rule 2 is:
Travelsky.air.inv.SetSegmentClassInhibit:orihost=172.24.2.20<->SAT/1.0/JS ON:2;
the routing rule 2 indicates: a request from a host with ip 172.24.2.20 is then made to access the interface of version 1.0 of the background hosting software unified call service.
Therefore, the effect of automatically judging and calling different background subsystem interfaces according to different conditions can be realized through the two routing rules.
S405, determining a target routing rule with the routing condition matched with the service characteristic information of the user from the plurality of routing rules, and determining the service interface address in the target routing rule as a target service interface address.
As described above, since each routing rule includes a routing condition, and the routing condition includes a condition required to satisfy the routing rule, if the service characteristic information of the user matches with the routing condition in the routing rule, it indicates that the service interface address in the routing rule is the service interface address to be invoked. For the sake of distinction, a routing rule matching the service feature information of the user is referred to as a target routing rule.
The service characteristic information of the user may include various types of different information, and the routing condition in each routing rule may be a condition that needs to be satisfied by one or more types.
The following examples illustrate:
assume the routing rules are as follows:
travelsky.air.inv.interf:param.key=v1&user.airline=MU<->TAP/1.0/XML:1
the routing rule is that when an interface with an interface name of "key v1& user ai rline MU" needs to be accessed, the routing condition is drafted, and if the service feature information of the user has a parameter with a key name and a value of v1, and the airline company to which the user belongs is the MU, the user feature information is matched with the routing rule. Meanwhile, the service interface address in the routing rule is TAP/1.0, which means that the TAP1.0 version interface needs to be called according to the routing rule. Wherein, XML represents data format, interface service address and data format are composed as result in routing rule, and result uses three parts of data divided by '/' for example, TAP/1.0/XML corresponds to meaning: interface provider/interface version/data format.
As another example, assume the routing rule is as follows:
travelsky.air.inv.interf:time=[2020-01-0100:00:00,2020-01-3100:00:00]<->TAP/1.0/XML:1
if access to the traffic.air.inv.intf interface is required, the TAP version 1.0 interface may be invoked if the current time is 1 month of 2020.
It can be understood that, for the same target service, the present application may also prioritize the routing rules, that is, the routing rules are also provided with priority levels. In this case, the service feature information of the user may be sequentially matched with the routing condition of the at least one routing rule in an order from the highest priority level to the lowest priority level of the plurality of routing rules until the target routing rule with the routing condition matched with the service feature information of the user is determined.
That is to say. According to the high order of the priority of the routing rule, if the service characteristic information of the user is matched with the routing condition in a certain routing rule, the routing rule is directly determined as a target routing rule without continuously matching other routing rules.
For example, the following routing rules are configured for the service interface name of the same target service:
routing rule 1:
travelsky.air.inv.interf:orihost=172.24.1.*,10.221.158.159<->TAP/2.0/XML:1
routing rule 2:
travelsky.air.inv.interf:param.key^v1&(user.airline=MU|user.airline=CA)<->TAP/1.0/XML:2
routing rule 3:
travelsky.air.inv.interf:nil<->nil:3
the last number in the routing rule represents the priority of the routing rule, wherein the smaller the number is, the higher the priority is, for example, the priority of routing rule 1 is 1, and the priority is the highest; the routing rule 3 has a priority of 3, which is the lowest priority.
Correspondingly, the service characteristic information of the user can be matched with the routing condition of the routing rule 1, if the routing rule is not matched, the service characteristic information is matched with the routing condition of the routing rule 2, and if the routing condition of the routing rule 2 is met, the routing rule 2 is determined as the target routing rule without being matched with the routing rule 3.
S406, the service interface pointed by the target service interface address is called to process the service operation request.
Of course, after the target service interface address is called, the page data reflected by the service interface can be obtained and displayed.
As can be seen from the related description of fig. 3 and the related description of the embodiment of fig. 4, when a call of a background interface is developed, only a developer needs to define and configure the interface, and other parts related to the call of the interface are completed by the airline business management system, so that other coding work of the developer is reduced. Meanwhile, the service function of route configuration work and flight adjustment of the service interface is thoroughly decoupled through the scheme of the application, and a service function developer does not need to care about the link operation and interaction details of the service interface and only needs to concentrate on processing the service logic of the function.
The routing rules involved in the embodiment of fig. 4 may be configured by a developer, so that the airline business management system obtains and stores the routing rules.
For example, in one possible scenario, a rule configuration interface of a business service may be output to a terminal of a developer, where the rule configuration interface includes: a first configuration operating area of a service interface address of the service interface and a second configuration operating area of the routing condition.
The first configuration operation area can input information of the address of the service interface, such as a background subsystem and a version corresponding to the service interface. Information may also be entered that fits the data format for which the service interface address fits.
The second configuration operation area can select or input parameters and conditions related to routing conditions.
On the basis, the aviation business management system can determine the routing rule of the business service based on the parameters of the service interface address configured by the developer in the first configuration operation area of the rule configuration interface and the parameters related to the routing condition configured in the second configuration operation area, and store the routing rule of the business service.
Fig. 5 is a schematic diagram of a rule configuration interface for configuring routing rules in the present application;
fig. 5 is a routing rule configuration interface corresponding to a service interface name. The "background", "version" and "data format" corresponding to the "destination" in the interface may be a first configuration operation area, and a user may select a name and a version of a background subsystem to complete configuration of an interface service address. Meanwhile, the data format adopted by the interface pointed by the interface service address can be configured.
And the input field corresponding to the destination is a second configuration operation area, for example, at least one routing condition in the routing rule can be configured in the second configuration operation area, each routing condition can include at least one condition and an input box of a rule and a value, and simultaneously, the priority of each routing rule can be set.
It can be understood that if there are many routing rules to be configured, it may be troublesome to configure the routing rules on the interface, and in order to further improve convenience of configuring the routing rules, the developer may also directly generate a rule configuration script for configuring the routing rules. As shown in fig. 6, which is a schematic diagram of a rule script input interface, the airline business management system can output the rule script input interface to a terminal of a developer, and the developer inputs a script for configuring a routing rule for a certain service interface name.
After the aviation business management system obtains the rule configuration script compiled for the business service by the developer, the rule configuration script can be analyzed to obtain at least one routing rule of the business service; accordingly, at least one routing rule for a traffic service may be stored.
It will be appreciated that after the developer configures the routing rule and validates it through scripting, the developer need not reuse the other previous methods to configure the routing rule.
In the above embodiment of the present application, after the target service interface address is determined, before the service interface pointed by the target service interface address is called, the authority verification information of the user may also be obtained, and if it is verified that the user has the authority to call the service interface according to the authority verification information, the service interface pointed by the target service interface address is called.
In another possible case, after the service interface pointed by the target service interface address is called, an interface call log may be further recorded, and information of time and time consumption for calling the interface may be recorded in the log, so as to perform an exception analysis according to the log.
In another possible case, before the service interface pointed by the target service interface address is called, the application may further detect whether a total call amount per unit time of a call request currently calling the service interface pointed by the target service interface address exceeds a set threshold, and if the total call amount per unit time of the call request currently calling the service interface pointed by the target service interface address does not exceed the set threshold, perform the call of the service interface; if the total call quantity of the current call of the service interface exceeds a set threshold value, the concurrence request quantity is over large, and the call is rejected. For example, the unit time may be 1 minute, and may be specifically set as needed.
In a possible situation, the application can also monitor the call failure rate corresponding to different interfaces by adding programs such as an extension interceptor and the like. On the basis, under the condition that one business service is configured with a plurality of routing rules, after a target routing rule is matched and a service interface address in the target routing rule is obtained, the historical calling failure rate of a service interface pointed by the target service interface address can be detected; if the historical calling failure rate corresponding to the target service interface address exceeds a set threshold, the service characteristic information of the user and the route rule which is not matched yet and has the highest priority can be matched according to the priority of the multi-route rule until the route rule which is matched with the service characteristic information and has the calling failure rate lower than the set threshold is matched.
If the historical call failure rate corresponding to the target service interface address does not exceed the set threshold, the operation of calling the service interface pointed by the target service interface address can be executed.
For example, assume that for a certain background service interface, the service interface addresses matching the service feature information of the user are three service interface addresses a, b, and c. The priority of the routing rule in which a is positioned is the highest, and the priority of the routing rule in which c is positioned is the lowest. If the failure rate of the interface a reaches 90%, the interface is indicated to have problems. The program automatically switches to call the b interface. If the failure rate of the b interface also exceeds the threshold, the c interface is called.
Of course, if only one destination address can be matched according to the routing rule, for example, only one service interface address is matched, dynamic switching is not needed.
The application also provides a service calling device corresponding to the service scheduling method. As shown in fig. 7, which shows a schematic structural diagram of an embodiment of a service invocation device according to the present application, the device of the embodiment may include:
the system comprises a page output unit 701, a service management unit and a service management unit, wherein the page output unit is used for outputting a service management page to a terminal of a user after the user logs in an aviation service management system through the terminal;
a request obtaining unit 702, configured to obtain at least one service operation request input by the user on the service management page, where the service operation request is used to request a target service;
an information obtaining unit 703 is configured to obtain service feature information associated with the user, where the service feature information is used to represent an airline company to which the user belongs and a demand type of the airline company to which the user belongs for providing a business service for the user;
a call processing unit 704, configured to determine, for each service operation request, a target service interface address matching the service feature information from at least one service interface address associated with a target service requested by the service operation request, and call a service interface pointed by the target service interface address to process the service operation request.
In one possible implementation manner, the call processing unit includes:
a rule determining unit, configured to determine, for each service operation request, a plurality of routing rules of a target service configuration requested by the service operation request, where the routing rules include routing conditions and service interface addresses;
a route matching unit, configured to determine, from the multiple routing rules, a target routing rule whose routing condition matches the service feature information of the user, and determine a service interface address in the target routing rule as a target service interface address;
and the first interface calling unit is used for calling the service interface pointed by the target service interface address to process the service operation request.
As an optional manner, the routing rule determined by the rule determining unit further includes: a priority level for characterizing a matching priority;
and a route matching unit, configured to match, in order from high to low in priority levels of the multiple routing rules, the service feature information of the user with the routing condition of the at least one routing rule in sequence until a target routing rule is determined, where the routing condition is matched with the service feature information of the user, and determine a service interface address in the target routing rule as a target service interface address.
In one possible implementation, the apparatus further includes:
the first interface output unit is used for outputting a rule configuration interface of business service to a terminal of a developer before a user logs in the aviation business management system through the terminal, and the rule configuration interface comprises: a first configuration operation area of a service interface address of the service interface and a second configuration operation area of the routing condition;
and the rule configuration unit is used for determining the routing rule of the business service based on the parameters of the service interface address configured by the developer in the first configuration operation area of the rule configuration interface and the parameters related to the routing condition configured in the second configuration operation area, and storing the routing rule of the business service.
In yet another possible implementation manner, the apparatus further includes:
the system comprises a script obtaining unit, a rule configuration script obtaining unit and a rule configuration script obtaining unit, wherein the script obtaining unit is used for obtaining a rule configuration script compiled for business services by developers before a user logs in an aviation business management system through a terminal;
a rule obtaining unit, configured to analyze the rule configuration script to obtain at least one routing rule of the service;
and the rule storage unit is used for storing at least one routing rule of the business service.
In another possible implementation manner, the service feature information associated with the user obtained by the information obtaining unit includes: information of an airline company to which the user belongs;
a call processing unit comprising:
a second interface calling unit, configured to configure, for each business operation request, for example, a target business service requested by the business operation request has an enabled service interface address corresponding to the airline, determine the service interface address configured by the target business service as a target service interface address matched with the service feature information, and call a service interface pointed by the target service interface address to process the business operation request.
In yet another possible implementation manner, the apparatus further includes:
the second interface output unit is used for outputting an address configuration interface to the terminal of a developer before a user logs in the aviation business management system through the terminal, and the address configuration interface comprises an airline department input box and at least one interface parameter input box related to the interface;
the information storage unit is used for determining and storing a service interface address configured for business service by the target airline company based on the information of the target airline company to be configured and the interface parameter input by the at least one interface parameter input box input by a developer in the airline department input box;
a third interface output unit, configured to display an interface address selection interface to the developer, where the interface address selection interface includes at least one service interface address configured for the business service by the target airline company;
and the interface starting unit is used for configuring one service interface address selected by the developer on the interface address selection interface as a service interface address opened by the target airline company for the business service.
In yet another aspect, the present application further provides a server, which may be a server of an airline business management system. As shown in fig. 8, which shows a schematic diagram of a component structure of the server provided in the present application, as can be seen from fig. 8, the server at least includes a processor 801 and a memory 802.
The server may also include a communication module 803. The processor 801, the memory 802, and the communication module 803 may be connected by a communication bus 804.
Wherein the memory has stored therein at least one instruction, at least one program, set of codes, or set of instructions that is loaded and executed by the processor to implement the service invocation method as described in any of the above embodiments.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
Meanwhile, the features described in the embodiments of the present specification may be replaced or combined with each other, so that those skilled in the art can implement or use the present application. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A service invocation method, characterized by comprising:
after a user logs in an aviation service management system through a terminal, outputting a service management page to the terminal of the user;
obtaining at least one business operation request input by the user on the business management page, wherein the business operation request is used for requesting a target business service;
obtaining service characteristic information associated with the user, wherein the service characteristic information is used for representing an airline company to which the user belongs and a demand type of the airline company to which the user belongs for providing business service for the user;
and aiming at each business operation request, determining a target service interface address matched with the service characteristic information from at least one service interface address associated with the target business service requested by the business operation request, and calling a service interface pointed by the target service interface address to process the business operation request.
2. The method of claim 1, wherein the determining a target service interface address matching the service characteristic information from at least one service interface address associated with the target service requested by the service operation request comprises:
determining a plurality of routing rules of target business service configuration requested by the business operation request, wherein the routing rules comprise routing conditions and service interface addresses;
and determining a target routing rule with the routing condition matched with the service characteristic information of the user from the plurality of routing rules, and determining the service interface address in the target routing rule as a target service interface address.
3. The method of claim 2, wherein the routing rule further comprises: a priority level for characterizing a matching priority;
the determining, from the plurality of routing rules, a target routing rule whose routing condition matches the service feature information of the user includes:
and matching the service characteristic information of the user with the routing conditions of the at least one routing rule in sequence according to the sequence of the priority levels of the plurality of routing rules from high to low until determining a target routing rule of which the routing conditions are matched with the service characteristic information of the user.
4. The method of claim 1, wherein the user-associated service characteristic information comprises: information of an airline company to which the user belongs;
determining a target service interface address matched with the service characteristic information from at least one service interface address associated with the target service requested by the service operation request, including:
and if the target business service requested by the business operation request is configured with an enabled service interface address corresponding to the airline company, determining the service interface address configured by the target business service as the target service interface address matched with the service characteristic information.
5. The method of claim 2, further comprising, prior to the user logging into the airline operations management system via the terminal:
a rule configuration interface for outputting a business service to a developer's terminal, the rule configuration interface comprising: a first configuration operation area of a service interface address of the service interface and a second configuration operation area of the routing condition;
and determining the routing rule of the business service based on the parameters of the service interface address configured by the developer in the first configuration operation area of the rule configuration interface and the parameters related to the routing condition configured in the second configuration operation area, and storing the routing rule of the business service.
6. The method of claim 2, wherein before the user logs in the airline business management system through the terminal, the method further comprises:
acquiring a rule configuration script compiled for business services by a developer;
analyzing the rule configuration script to obtain at least one routing rule of the business service;
storing at least one routing rule for the traffic service.
7. The method of claim 4, further comprising, before the user logs into the airline management system via the terminal:
outputting an address configuration interface to a terminal of a developer, wherein the address configuration interface comprises an airline department input box and at least one interface parameter input box related to an interface;
determining and storing a service interface address configured for business service by the target airline company based on information of the target airline company to be configured and the interface parameter input by the at least one interface parameter input box input by a developer in the airline department input box;
displaying an interface address selection interface to the developer, wherein the interface address selection interface comprises at least one service interface address configured for the business service by the target airline company;
and configuring one service interface address selected by the developer on the interface address selection interface as a service interface address opened by the target airline company for the business service.
8. A service invocation apparatus, characterized by comprising:
the system comprises a page output unit, a service management unit and a service management unit, wherein the page output unit is used for outputting a service management page to a terminal of a user after the user logs in an aviation service management system through the terminal;
a request obtaining unit, configured to obtain at least one service operation request input by the user on the service management page, where the service operation request is used to request a target service;
an information obtaining unit, configured to obtain service feature information associated with the user, where the service feature information is used to characterize an airline company to which the user belongs and a demand type of the airline company to which the user belongs for providing a business service for the user;
and the calling processing unit is used for determining a target service interface address matched with the service characteristic information from at least one service interface address associated with the target service requested by the service operation request according to each service operation request, and calling a service interface pointed by the target service interface address to process the service operation request.
9. The apparatus of claim 8, wherein the call processing unit comprises:
a rule determining unit, configured to determine, for each service operation request, a plurality of routing rules of a target service configuration requested by the service operation request, where the routing rules include routing conditions and service interface addresses;
a route matching unit, configured to determine, from the multiple routing rules, a target routing rule whose routing condition matches the service feature information of the user, and determine a service interface address in the target routing rule as a target service interface address;
and the first interface calling unit is used for calling the service interface pointed by the target service interface address to process the service operation request.
10. A server, comprising a processor and a memory, wherein the memory has stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement the service invocation method according to claims 1-7.
CN202110062656.6A 2021-01-18 2021-01-18 Service calling method and device and server Pending CN112732372A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110062656.6A CN112732372A (en) 2021-01-18 2021-01-18 Service calling method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110062656.6A CN112732372A (en) 2021-01-18 2021-01-18 Service calling method and device and server

Publications (1)

Publication Number Publication Date
CN112732372A true CN112732372A (en) 2021-04-30

Family

ID=75592222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110062656.6A Pending CN112732372A (en) 2021-01-18 2021-01-18 Service calling method and device and server

Country Status (1)

Country Link
CN (1) CN112732372A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114297058A (en) * 2021-12-23 2022-04-08 马上消费金融股份有限公司 Test method and device
CN114827282A (en) * 2022-03-30 2022-07-29 阿里云计算有限公司 Service routing method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140244809A1 (en) * 2011-11-04 2014-08-28 Huawei Technologies Co., Ltd. Service configuration method and apparatus
CN105357143A (en) * 2015-11-27 2016-02-24 华为技术有限公司 Forwarding method and service routing relay node
CN107018174A (en) * 2016-12-27 2017-08-04 阿里巴巴集团控股有限公司 A kind of method, device and the transaction processing system of blocking system service processing
CN110020955A (en) * 2017-08-24 2019-07-16 腾讯科技(深圳)有限公司 Online medical insurance information processing method and device, server and user terminal
CN110928709A (en) * 2019-11-21 2020-03-27 中国民航信息网络股份有限公司 Service calling method and device under micro-service framework and server
CN111314459A (en) * 2020-02-13 2020-06-19 北京奇艺世纪科技有限公司 Service request method, device, electronic equipment and storage medium
CN111600930A (en) * 2020-04-09 2020-08-28 网宿科技股份有限公司 Micro-service request traffic management method, device, server and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140244809A1 (en) * 2011-11-04 2014-08-28 Huawei Technologies Co., Ltd. Service configuration method and apparatus
CN105357143A (en) * 2015-11-27 2016-02-24 华为技术有限公司 Forwarding method and service routing relay node
CN107018174A (en) * 2016-12-27 2017-08-04 阿里巴巴集团控股有限公司 A kind of method, device and the transaction processing system of blocking system service processing
CN110020955A (en) * 2017-08-24 2019-07-16 腾讯科技(深圳)有限公司 Online medical insurance information processing method and device, server and user terminal
CN110928709A (en) * 2019-11-21 2020-03-27 中国民航信息网络股份有限公司 Service calling method and device under micro-service framework and server
CN111314459A (en) * 2020-02-13 2020-06-19 北京奇艺世纪科技有限公司 Service request method, device, electronic equipment and storage medium
CN111600930A (en) * 2020-04-09 2020-08-28 网宿科技股份有限公司 Micro-service request traffic management method, device, server and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114297058A (en) * 2021-12-23 2022-04-08 马上消费金融股份有限公司 Test method and device
CN114827282A (en) * 2022-03-30 2022-07-29 阿里云计算有限公司 Service routing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US9053231B2 (en) Systems and methods for analyzing operations in a multi-tenant database system environment
US20200242015A1 (en) Automated test case management systems and methods
US20230418570A1 (en) Constructing executable program code based on sequence codes
US20150161112A1 (en) One click localization techniques
CN108628748B (en) Automatic test management method and automatic test management system
US9910858B2 (en) System and method for providing contextual analytics data
US9451033B2 (en) Enhanced command selection in a networked computing environment
CN110532025B (en) Data processing method, device and equipment based on micro-service architecture and storage medium
CN110728491B (en) Work order processing method and device, computer equipment and storage medium
CN112732372A (en) Service calling method and device and server
SG191557A1 (en) Methods and systems for service discovery and selection
CN110362473A (en) Test optimization method and device, storage medium, the terminal of environment
CN110909013A (en) Service list generation method, device, equipment and computer readable storage medium
CN110011875A (en) Dial testing method, device, equipment and computer readable storage medium
CN111258832B (en) Interface parameter verification method, device, equipment and medium
US10140163B2 (en) Intelligent framework for shared services orchestration
CN113191889A (en) Wind control configuration method, configuration system, electronic device and readable storage medium
CN110852050A (en) Method and device for configuring report generation system and electronic equipment
US20230195792A1 (en) Database management methods and associated apparatus
US11456933B2 (en) Generating and updating a performance report
CN113422778B (en) Firewall policy configuration method and device and electronic equipment
US20230093666A1 (en) Removing data having a data type from a data set
CN117251436A (en) Data processing method, device and storage medium
CN115348053A (en) Access permission control method and device, electronic equipment and computer storage medium
CN114707961A (en) Pending task execution method, device, equipment, medium and program product based on approval flow configuration

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