CN111722947A - Service calling method and system - Google Patents

Service calling method and system Download PDF

Info

Publication number
CN111722947A
CN111722947A CN202010598741.XA CN202010598741A CN111722947A CN 111722947 A CN111722947 A CN 111722947A CN 202010598741 A CN202010598741 A CN 202010598741A CN 111722947 A CN111722947 A CN 111722947A
Authority
CN
China
Prior art keywords
service
target
interface
calling
original
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
CN202010598741.XA
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.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202010598741.XA priority Critical patent/CN111722947A/en
Publication of CN111722947A publication Critical patent/CN111722947A/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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]
    • 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

Abstract

The embodiment of the invention provides a method for calling a service, which comprises the following steps: receiving registration requests of a demand party and a supply party, and distributing user IDs and keys; configuring a corresponding service interface according to the uploaded interface attribute information to generate a calling service; establishing a mapping relation between a calling service and a service interface; receiving a service calling request initiated by a demand party according to a user ID, a secret key and a target calling service, and analyzing the service calling request to obtain an original service calling; determining a target service interface according to the mapping relation and a preset rule, converting original service call into target service call according to the target service interface, and sending the target service call to the target service interface; and acquiring the fed back original format data from the target service interface, converting the original format data into target format data and sending the target format data to the target demand side. The embodiment of the invention can improve the efficiency of service calling.

Description

Service calling method and system
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a service calling method, a service calling system, computer equipment and a storage medium.
Background
Banks often need to open internal interfaces to external product parties for invocation to provide the product parties with financial support and services to facilitate the flow of funds and create economic value. In the prior art, the communication protocols and data formats adopted by the interfaces of each bank are different, so that when a product side calls the service interfaces of different banks, a plurality of different communication protocols and data formats need to be adapted to different banks. Even if a plurality of banks provide the same service, for example, loan service, each product side still needs to call the service of each bank separately, and such service calling mode causes the service calling efficiency to be very low.
Therefore, the present invention aims to solve the problem of inefficient service invocation.
Disclosure of Invention
In view of this, embodiments of the present invention provide a service invocation method, system, computer device, and computer-readable storage medium, which can effectively solve the problem of low service invocation efficiency.
The embodiment of the invention solves the technical problems through the following technical scheme:
a service invocation method, comprising:
receiving registration requests of a plurality of demanders and a plurality of suppliers, and respectively distributing corresponding user IDs and keys to each demander and each supplier according to the registration requests, wherein the user IDs and the keys are used for logging in a preset service platform and initiating a service calling request to the service platform;
acquiring a plurality of interface attribute information uploaded by a plurality of suppliers, and configuring a corresponding service interface according to the plurality of interface attribute information to generate a corresponding calling service, wherein each interface attribute information at least comprises a service ID, a service name, an interface address, a request parameter and a return parameter;
establishing a mapping relation between the calling service and the service interfaces, wherein each calling service maps at least one service interface;
receiving a service calling request initiated by a target requiring party according to a target user ID, a target key and a target calling service, and analyzing the service calling request to obtain an original service calling;
determining at least one mapping service interface corresponding to the target calling service according to the mapping relation;
determining a target service interface from the at least one mapping service interface according to a preset rule, converting the original service call into a target service call according to the target service interface, and sending the target service call to the target service interface;
and acquiring fed back original format data from the target service interface, converting the original format data into target format data, and sending the target format data to the target demand side.
Further, after configuring the corresponding service interface according to the plurality of interface attribute information, the method further includes:
and configuring the data format and the communication protocol of each service interface.
Further, the determining a target service interface from the at least one mapping service interface according to a preset rule includes:
acquiring the service state of each mapping service interface;
and determining a target service interface according to the service state.
Further, the converting the original service call request into the target service call includes:
acquiring a target data format and a target communication protocol of the target service interface;
converting the original data format of the original service call into a target data format;
and converting the original communication protocol of the original service call into a target communication protocol, and generating a target service call according to the target data format and the target communication protocol.
In order to achieve the above object, an embodiment of the present invention further provides a service invocation system, including:
the system comprises a registration module, a service platform and a service calling module, wherein the registration module is used for receiving registration requests of a plurality of demanders and a plurality of suppliers, and respectively distributing corresponding user IDs and keys to each demander and each supplier according to the registration requests, and the user IDs and the keys are used for logging in a preset service platform and initiating service calling requests to the service platform;
the configuration module is used for acquiring a plurality of interface attribute information uploaded by a plurality of suppliers and configuring a corresponding service interface according to the plurality of interface attribute information to generate a corresponding calling service, wherein each interface attribute information at least comprises a service ID, a service name, an interface address, a request parameter and a return parameter;
the mapping module is used for establishing a mapping relation between the calling service and the service interfaces, wherein each calling service maps at least one service interface;
the calling module is used for receiving a service calling request initiated by a target demander according to a target user ID, a target key and a target calling service, and analyzing the service calling request to acquire an original service call;
the analysis module is used for determining at least one mapping service interface corresponding to the target calling service according to the mapping relation;
the conversion module is used for determining a target service interface from the at least one mapping service interface according to a preset rule, converting the original service call into a target service call according to the target service interface, and sending the target service call to the target service interface;
and the sending module is used for acquiring the fed back original format data from the target service interface, converting the original format data into target format data and sending the target format data to the target demand side.
In order to achieve the above object, an embodiment of the present invention further provides a computer device, where the computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the service invocation method when executing the computer program.
In order to achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, where the computer program is executable by at least one processor, so as to cause the at least one processor to execute the steps of the service invocation method as described above.
The service calling method, the system, the computer equipment and the computer readable storage medium provided by the embodiment of the invention automatically adapt the service calling request initiated by the demand party to the data format and the communication protocol of the supply party, and then convert the data fed back by the supply party into the data with the uniform format and send the data to the demand party, thereby improving the service calling efficiency.
The invention is described in detail below with reference to the drawings and specific examples, but the invention is not limited thereto.
Drawings
FIG. 1 is a flowchart illustrating steps of a service invocation method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of a program module of a service invocation system according to a second embodiment of the present invention;
fig. 3 is a schematic hardware structure diagram of a computer device according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Technical solutions between various embodiments may be combined with each other, but must be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Example one
Referring to fig. 1, a flowchart illustrating steps of a service invocation method according to a first embodiment of the invention is shown. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. The following description is given by taking a computer device as an execution subject, specifically as follows:
step S100, receiving registration requests of a plurality of demanders and a plurality of suppliers, and respectively allocating corresponding user IDs and keys to each demander and each supplier according to the registration requests, wherein the user IDs and the keys are used for logging in a preset service platform and initiating a service calling request to the service platform.
Specifically, the Gamma O platform is a preset service platform, a bank as a supplier can register on the Gamma O platform, a product side as a demander can register on the Gamma O platform, and the Gamma O platform respectively distributes corresponding user ID and key to the bank and the product side according to the registration requests of the bank and the product side. According to the user ID and the secret key, the bank can log in the Gamma O platform by a supplier and issue a service interface provided by an internal system of the bank to the Gamma O platform for a product party to call; the product side can also be used as a demand side to log in the Gamma O platform according to the user ID and the key, and call a service interface provided by a bank through a calling service provided by the Gamma O platform, wherein the user ID and the key are also used for initiating a calling service request to the product side.
Step S102, acquiring a plurality of interface attribute information uploaded by a plurality of suppliers, and configuring a corresponding service interface according to the plurality of interface attribute information to generate a corresponding calling service, wherein each interface attribute information at least comprises a service ID, a service name, an interface address, a request parameter and a return parameter.
Specifically, when the supplier provides the interface calling service on the gamma o platform, detailed interface information needs to be configured on the administrator configuration interface provided by the gamma o platform, and the gamma o platform generates the calling service according to the interface information configured on the administrator configuration interface by the bank side, so that the product side can call the calling service. In this embodiment, the interface information that the banking party needs to configure at least includes a service ID, a service name, an interface address, a request parameter, and a return parameter, where the service ID represents a number of an interface, the service name represents a service provided by the interface, the interface address represents an address of the interface, the request parameter represents one or more fields to be acquired from the interface, and the return parameter represents a field returned by the interface to the caller.
For example, when a bank wants to provide a call service of a loan service on a gamma ao platform, interface information that needs to be configured includes: service ID "service 001", service name "loan", interface address "Https:// api. xxbank. com/loan/", request parameter "name", return parameter "balance".
Step S104, establishing a mapping relation between the calling service and the service interfaces, wherein each calling service maps at least one service interface.
In particular, different banks may employ different communication protocols and data formats. For example, bank A may employ the Http communication protocol and String data format, bank B may employ the Socket communication protocol and Json data format, and bank C may employ the Webservice communication protocol and Xml data format. If the product side directly calls the interface service of different banks, different codes need to be written. In this embodiment, in order to save manpower and material resources for a product side to write different codes, interfaces provided by each bank are encapsulated into calls through a gamma ao platform, and a mapping relationship between a call service and a service interface is established for the product side to call, wherein each call service may map one or more service interfaces of the bank. When one or more interfaces are packaged into calling services, attribute information of the service interface corresponding to each calling service, a communication protocol of the service interface, a data format of the service interface and a user ID of a bank corresponding to the service interface are also required to be configured.
And step S106, receiving a service calling request initiated by a target demander according to the target user ID, the target key and the target calling service, and analyzing the service calling request to acquire the original service calling.
Specifically, after service interfaces are packaged into calling services, all the calling services are displayed on a user interface of the Gamma O platform, one or more corresponding service interfaces are displayed in each calling service, and meanwhile, related developer documents are displayed on a display interface of the Gamma O platform, wherein the developer documents are used for guiding a demander to write an Http request message. The method comprises the steps that a demand party selects a target calling service meeting requirements from a plurality of calling services, and then the demand party initiates a service calling request based on an Http (Hyper text transfer Protocol) message on a Gamma O platform according to a user ID, a key and the target calling service, wherein Http is a stateless application layer Protocol based on a request and response mode, and is usually based on a TCP connection mode and used for communication between a server and a client. After receiving the service call request, the Gamma O platform analyzes the service call request to obtain an Http message therein, namely the original service call.
And step S108, determining at least one mapping service interface corresponding to the target calling service according to the mapping relation.
Specifically, the target call service corresponds to at least one service interface, and according to the mapping relationship, at least one service interface corresponding to the target call service, that is, the at least one mapping service interface, may be determined.
Step S110, determining a target service interface from the at least one mapping service interface according to a preset rule, converting the original service call into a target service call according to the target service interface, and sending the target service call to the target service interface.
Specifically, after determining at least one mapping service interface, the gamma ao platform acquires the service state of each mapping service interface, and determines a target service interface according to the service state. For example, when the product side initiates a service call request of loan service, gamma ao calculates the fund status (the amount of money released in the current day) of each mapping service interface, and then sends the service call to the mapping service interface with the least amount of money released.
In a possible embodiment, the number of calls of each mapping interface may also be obtained, and the service call is sent to the mapping service interface with the smallest number of calls.
Step S112, obtaining the fed back original format data from the target service interface, converting the original format data into target format data, and sending the target format data to the target demand side.
Specifically, after determining which service interface the service call is to be sent to, a target communication protocol and a target data format of the service interface are obtained, then the data format in the Http message is converted into the target format, the communication protocol of the Http message is converted into the target communication protocol, and then the target service call, that is, the request message meeting the requirements of the target service interface, is generated according to the target data format and the target communication protocol. And finally, acquiring an interface address in the attribute information of the target interface, and sending the new request message to a server of the target service interface through the interface address.
Illustratively, a service call request initiated by a product side through a gamma o platform is based on an Http communication protocol and a Json data format, and a target service interface adopts a Socket communication protocol and a String data format, so that the Json data format in the service call is converted into the String data format, the communication protocol in the Http message is converted into the communication protocol in the Socket format to generate a Socket request message, and the Socket request message is sent to an interface address of the target service interface.
In another possible embodiment, the target service interface may use Webservice communication protocol and Xml data format. Similarly, the Json data format in the Http message is converted into the Xml data format, then the communication protocol in the Http format is converted into the communication protocol in the Webservice format to generate a Webservice request message, and the Webservice request message is sent to the interface address of the target service interface.
The embodiment automatically adapts the service calling request initiated by the demand party to the data format and the communication protocol of the supply party, converts the data fed back by the supply party into the data with the uniform format, and then sends the data to the demand party, thereby improving the service calling efficiency.
Example two
Referring to fig. 2, a schematic diagram of program modules of a service invocation system according to a second embodiment of the invention is shown. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. In this embodiment, the service invocation system 20 may include or be divided into one or more program modules, which are stored in a storage medium and executed by one or more processors to implement the present invention and implement the service invocation methods described above. The program module referred to in the embodiments of the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable for describing the execution process of the service invocation system 20 in the storage medium than the program itself. The following description will specifically describe the functions of the program modules of the present embodiment:
the registration module 200 is configured to receive registration requests of multiple demanders and multiple suppliers, and allocate corresponding user IDs and keys to each demander and each supplier according to the registration requests, where the user IDs and the keys are used to log in a preset service platform and initiate a service invocation request to the service platform.
Specifically, the Gamma O platform is a preset service platform, a bank as a supplier can register on the Gamma O platform, a product side as a demander can register on the Gamma O platform, and the Gamma O platform respectively distributes corresponding user ID and key to the bank and the product side according to the registration requests of the bank and the product side. According to the user ID and the secret key, the bank can log in the Gamma O platform by a supplier and issue a service interface provided by an internal system of the bank to the Gamma O platform for a product party to call; the product side can also be used as a demand side to log in the Gamma O platform according to the user ID and the key, and call a service interface provided by a bank through a calling service provided by the Gamma O platform, wherein the user ID and the key are also used for initiating a calling service request to the product side.
The configuration module 202 is configured to obtain a plurality of interface attribute information uploaded by a plurality of suppliers, and configure a corresponding service interface according to the plurality of interface attribute information to generate a corresponding call service, where each interface attribute information at least includes a service ID, a service name, an interface address, a request parameter, and a return parameter.
Specifically, when the supplier provides the interface calling service on the gamma o platform, detailed interface information needs to be configured on the administrator configuration interface provided by the gamma o platform, and the gamma o platform generates the calling service according to the interface information configured on the administrator configuration interface by the bank side, so that the product side can call the calling service. In this embodiment, the interface information that the banking party needs to configure at least includes a service ID, a service name, an interface address, a request parameter, and a return parameter, where the service ID represents a number of an interface, the service name represents a service provided by the interface, the interface address represents an address of the interface, the request parameter represents one or more fields to be acquired from the interface, and the return parameter represents a field returned by the interface to the caller.
For example, when a bank wants to provide a call service of a loan service on a gamma ao platform, interface information that needs to be configured includes: service ID "service 001", service name "loan", interface address "Https:// api. xxbank. com/loan/", request parameter "name", return parameter "balance".
A mapping module 204, configured to establish a mapping relationship between the calling service and the service interface, where each calling service maps at least one service interface.
In particular, different banks may employ different communication protocols and data formats. For example, bank A may employ the Http communication protocol and String data format, bank B may employ the Socket communication protocol and Json data format, and bank C may employ the Webservice communication protocol and Xml data format. If the product side directly calls the interface service of different banks, different codes need to be written. In this embodiment, in order to save manpower and material resources for a product side to write different codes, interfaces provided by each bank are encapsulated into calls through a gamma ao platform, and a mapping relationship between a call service and a service interface is established for the product side to call, wherein each call service may map one or more service interfaces of the bank. When one or more interfaces are packaged into calling services, attribute information of the service interface corresponding to each calling service, a communication protocol of the service interface, a data format of the service interface and a user ID of a bank corresponding to the service interface are also required to be configured.
The invoking module 206 is configured to receive a service invoking request initiated by the target demander according to the target user ID, the target key, and the target invoking service, and parse the service invoking request to obtain an original service invocation.
Specifically, after service interfaces are packaged into calling services, all the calling services are displayed on a user interface of the Gamma O platform, one or more corresponding service interfaces are displayed in each calling service, and meanwhile, related developer documents are displayed on a display interface of the Gamma O platform, wherein the developer documents are used for guiding a demander to write an Http request message. The method comprises the steps that a demand party selects a target calling service meeting requirements from a plurality of calling services, and then the demand party initiates a service calling request based on an Http (Hyper text transfer Protocol) message on a Gamma O platform according to a user ID, a key and the target calling service, wherein Http is a stateless application layer Protocol based on a request and response mode, and is usually based on a TCP connection mode and used for communication between a server and a client. After receiving the service call request, the Gamma O platform analyzes the service call request to obtain an Http message therein, namely the original service call.
And the analysis module 208 is configured to determine at least one mapping service interface corresponding to the target invocation service according to the mapping relationship.
Specifically, the target call service corresponds to at least one service interface, and according to the mapping relationship, at least one service interface corresponding to the target call service, that is, the at least one mapping service interface, may be determined.
A conversion module 210, configured to determine a target service interface from the at least one mapping service interface according to a preset rule, convert the original service call into a target service call according to the target service interface, and send the target service call to the target service interface.
Specifically, after determining at least one mapping service interface, the gamma ao platform acquires the service state of each mapping service interface, and determines a target service interface according to the service state. For example, when the product side initiates a service call request of loan service, gamma ao calculates the fund status (the amount of money released in the current day) of each mapping service interface, and then sends the service call to the mapping service interface with the least amount of money released.
In a possible embodiment, the number of calls of each mapping interface may also be obtained, and the service call is sent to the mapping service interface with the smallest number of calls.
A sending module 212, configured to obtain fed back original format data from the target service interface, convert the original format data into target format data, and send the target format data to the target demander.
Specifically, after determining which service interface the service call is to be sent to, a target communication protocol and a target data format of the service interface are obtained, then the data format in the Http message is converted into the target format, the communication protocol of the Http message is converted into the target communication protocol, and then the target service call, that is, the request message meeting the requirements of the target service interface, is generated according to the target data format and the target communication protocol. And finally, acquiring an interface address in the attribute information of the target interface, and sending the new request message to a server of the target service interface through the interface address.
Illustratively, a service call request initiated by a product side through a gamma o platform is based on an Http communication protocol and a Json data format, and a target service interface adopts a Socket communication protocol and a String data format, so that the Json data format in the service call is converted into the String data format, the communication protocol in the Http message is converted into the communication protocol in the Socket format to generate a Socket request message, and the Socket request message is sent to an interface address of the target service interface.
In another possible embodiment, the target service interface may use Webservice communication protocol and Xml data format. Similarly, the Json data format in the Http message is converted into the Xml data format, then the communication protocol in the Http format is converted into the communication protocol in the Webservice format to generate a Webservice request message, and the Webservice request message is sent to the interface address of the target service interface.
The embodiment automatically adapts the service calling request initiated by the demand party to the data format and the communication protocol of the supplier, converts the data fed back by the supplier into the data with the uniform format, and then sends the data to the demand party, thereby improving the service calling efficiency.
EXAMPLE III
Fig. 3 is a schematic diagram of a hardware architecture of a computer device according to a third embodiment of the present invention. In the present embodiment, the computer device 2 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a preset or stored instruction. The computer device 2 may be a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers), and the like. As shown in FIG. 3, the computer device 2 includes, but is not limited to, at least a memory 21, a processor 22, a network interface 23, and a service invocation system 20, which may be communicatively coupled to each other via a system bus. Wherein:
in this embodiment, the memory 21 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 21 may be an internal storage unit of the computer device 2, such as a hard disk or a memory of the computer device 2. In other embodiments, the memory 21 may also be an external storage device of the computer device 2, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like provided on the computer device 2. Of course, the memory 21 may also comprise both internal and external memory units of the computer device 2. In this embodiment, the memory 21 is generally used for storing an operating system installed in the computer device 2 and various application software, such as the program code of the service invocation system 20 in the second embodiment. Further, the memory 21 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 22 is typically used to control the overall operation of the computer device 2. In this embodiment, the processor 22 is configured to execute the program code stored in the memory 21 or process data, for example, execute the service invocation system 20, so as to implement the service invocation method of the first embodiment.
The network interface 23 may comprise a wireless network interface or a wired network interface, and the network interface 23 is generally used for establishing communication connection between the computer device 2 and other electronic apparatuses. For example, the network interface 23 is used to connect the computer device 2 to an external terminal through a network, establish a data transmission channel and a communication connection between the computer device 2 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System for mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, and the like.
It is noted that fig. 3 only shows the computer device 2 with components 20-23, but it is to be understood that not all shown components are required to be implemented, and that more or less components may be implemented instead.
In this embodiment, the service invocation system 20 stored in the memory 21 may also be divided into one or more program modules, and the one or more program modules are stored in the memory 21 and executed by one or more processors (in this embodiment, the processor 22) to complete the present invention.
For example, fig. 2 shows a schematic diagram of program modules of the service invocation system 20, and in this embodiment, the service invocation system 20 may be divided into a registration module 200, a configuration module 202, a mapping module 204, a calling module 206, a parsing module 208, a conversion module 210, and a sending module 212. The program module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable than a program for describing the execution process of the service invocation system 20 in the computer device 2. The specific functions of the program modules 200 and 212 have been described in detail in the second embodiment, and are not described herein again.
Example four
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer-readable storage medium of this embodiment is used for storing the service invocation system 20, and when being executed by the processor, implements the service invocation method of the first embodiment.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A service invocation method, characterized by comprising:
receiving registration requests of a plurality of demanders and a plurality of suppliers, and respectively distributing corresponding user IDs and keys to each demander and each supplier according to the registration requests, wherein the user IDs and the keys are used for logging in a preset service platform and initiating a service calling request to the service platform;
acquiring a plurality of interface attribute information uploaded by a plurality of suppliers, and configuring a corresponding service interface according to the plurality of interface attribute information to generate a corresponding calling service, wherein each interface attribute information at least comprises a service ID, a service name, an interface address, a request parameter and a return parameter;
establishing a mapping relation between the calling service and the service interfaces, wherein each calling service maps at least one service interface;
receiving a service calling request initiated by a target requiring party according to a target user ID, a target key and a target calling service, and analyzing the service calling request to obtain an original service calling;
determining at least one mapping service interface corresponding to the target calling service according to the mapping relation;
determining a target service interface from the at least one mapping service interface according to a preset rule, converting the original service call into a target service call according to the target service interface, and sending the target service call to the target service interface;
and acquiring fed back original format data from the target service interface, converting the original format data into target format data, and sending the target format data to the target demand side.
2. The service invocation method according to claim 1, wherein, after configuring the corresponding service interface according to the plurality of interface attribute information, further comprising:
and configuring the data format and the communication protocol of each service interface.
3. The service invocation method according to claim 1, wherein the step of determining a target service interface from the at least one mapping service interface according to a preset rule comprises:
acquiring the service state of each mapping service interface;
and determining a target service interface according to the service state.
4. The service invocation method according to claim 2, wherein said converting the original service invocation request into the target service invocation comprises:
acquiring a target data format and a target communication protocol of the target service interface;
converting the original data format of the original service call into a target data format;
and converting the original communication protocol of the original service call into a target communication protocol, and generating a target service call according to the target data format and the target communication protocol.
5. A service invocation system, characterized by comprising:
the system comprises a registration module, a service platform and a service calling module, wherein the registration module is used for receiving registration requests of a plurality of demanders and a plurality of suppliers, and respectively distributing corresponding user IDs and keys to each demander and each supplier according to the registration requests, and the user IDs and the keys are used for logging in a preset service platform and initiating service calling requests to the service platform;
the configuration module is used for acquiring a plurality of interface attribute information uploaded by a plurality of suppliers and configuring a corresponding service interface according to the plurality of interface attribute information to generate a corresponding calling service, wherein each interface attribute information at least comprises a service ID, a service name, an interface address, a request parameter and a return parameter;
the mapping module is used for establishing a mapping relation between the calling service and the service interfaces, wherein each calling service maps at least one service interface;
the calling module is used for receiving a service calling request initiated by a target demander according to a target user ID, a target key and a target calling service, and analyzing the service calling request to acquire an original service call;
the analysis module is used for determining at least one mapping service interface corresponding to the target calling service according to the mapping relation;
the conversion module is used for determining a target service interface from the at least one mapping service interface according to a preset rule, converting the original service call into a target service call according to the target service interface, and sending the target service call to the target service interface;
and the sending module is used for acquiring the fed back original format data from the target service interface, converting the original format data into target format data and sending the target format data to the target demand side.
6. The service invocation system according to claim 5, wherein the configuration module is further configured to:
and configuring the data format and the communication protocol of each service interface.
7. The service invocation system according to claim 5, wherein the translation module is further configured to:
acquiring the service state of each mapping service interface;
and determining a target service interface according to the service state.
8. The service invocation system according to claim 6, wherein the translation module is further configured to:
acquiring a target data format and a target communication protocol of the target service interface;
converting the original data format of the original service call into a target data format;
and converting the original communication protocol of the original service call into a target communication protocol, and generating a target service call according to the target data format and the target communication protocol.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the service invocation method according to any of the claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which is executable by at least one processor to cause the at least one processor to perform the steps of the service invocation method according to any of the claims 1-4.
CN202010598741.XA 2020-06-28 2020-06-28 Service calling method and system Pending CN111722947A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010598741.XA CN111722947A (en) 2020-06-28 2020-06-28 Service calling method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010598741.XA CN111722947A (en) 2020-06-28 2020-06-28 Service calling method and system

Publications (1)

Publication Number Publication Date
CN111722947A true CN111722947A (en) 2020-09-29

Family

ID=72569368

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010598741.XA Pending CN111722947A (en) 2020-06-28 2020-06-28 Service calling method and system

Country Status (1)

Country Link
CN (1) CN111722947A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112256452A (en) * 2020-10-21 2021-01-22 上海商汤智能科技有限公司 Service item determination method, device, equipment and storage medium of cloud service platform
CN112416597A (en) * 2020-12-01 2021-02-26 太平金融科技服务(上海)有限公司 System calling method and device, computer equipment and storage medium
CN112948798A (en) * 2021-03-19 2021-06-11 深圳市商汤科技有限公司 Data processing method and related product
CN112988289A (en) * 2021-04-09 2021-06-18 北京字节跳动网络技术有限公司 Method and system for calling interface
CN113296987A (en) * 2021-06-24 2021-08-24 平安壹钱包电子商务有限公司 Interface calling method and device for calling module, computer equipment and storage medium
CN113706299A (en) * 2021-09-10 2021-11-26 京东科技控股股份有限公司 Data processing method and device, electronic equipment and medium
CN114257635A (en) * 2021-11-19 2022-03-29 建信金融科技有限责任公司 Service calling method, system, computer device, storage medium, and program product
CN116132385A (en) * 2022-08-18 2023-05-16 马上消费金融股份有限公司 Data forwarding method, device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255905A (en) * 2017-05-04 2018-07-06 平安科技(深圳)有限公司 Interface calls data processing method, device and computer equipment
CN109240838A (en) * 2018-09-20 2019-01-18 深圳市牛鼎丰科技有限公司 Interface call method, device, computer equipment and storage medium
CN111049854A (en) * 2019-12-25 2020-04-21 微民保险代理有限公司 Service request transmission method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255905A (en) * 2017-05-04 2018-07-06 平安科技(深圳)有限公司 Interface calls data processing method, device and computer equipment
CN109240838A (en) * 2018-09-20 2019-01-18 深圳市牛鼎丰科技有限公司 Interface call method, device, computer equipment and storage medium
CN111049854A (en) * 2019-12-25 2020-04-21 微民保险代理有限公司 Service request transmission method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112256452A (en) * 2020-10-21 2021-01-22 上海商汤智能科技有限公司 Service item determination method, device, equipment and storage medium of cloud service platform
CN112416597A (en) * 2020-12-01 2021-02-26 太平金融科技服务(上海)有限公司 System calling method and device, computer equipment and storage medium
CN112948798A (en) * 2021-03-19 2021-06-11 深圳市商汤科技有限公司 Data processing method and related product
CN112988289A (en) * 2021-04-09 2021-06-18 北京字节跳动网络技术有限公司 Method and system for calling interface
CN113296987A (en) * 2021-06-24 2021-08-24 平安壹钱包电子商务有限公司 Interface calling method and device for calling module, computer equipment and storage medium
CN113706299A (en) * 2021-09-10 2021-11-26 京东科技控股股份有限公司 Data processing method and device, electronic equipment and medium
CN114257635A (en) * 2021-11-19 2022-03-29 建信金融科技有限责任公司 Service calling method, system, computer device, storage medium, and program product
CN114257635B (en) * 2021-11-19 2023-05-23 建信金融科技有限责任公司 Service calling method, system, computer device, storage medium and program product
CN116132385A (en) * 2022-08-18 2023-05-16 马上消费金融股份有限公司 Data forwarding method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111722947A (en) Service calling method and system
CN108255615B (en) Cross-language calling method, server and storage medium
CN109522139B (en) Data table service generation and calling method, device, equipment and storage medium
WO2018210096A1 (en) Rule engine-based rule configuration method, terminal and device, and storage medium
CN112422450B (en) Computer equipment, and flow control method and device for service request
CN110706093A (en) Accounting processing method and device
WO2017143747A1 (en) Network request method and system for network terminal
CN107273226B (en) Method and device for integrating components in android system and calling integrated components
CN111881329A (en) Account balance management method and system
CN111104556A (en) Service processing method and device
CN112559027A (en) Method, system, device and readable storage medium for creating and managing functional components
CN112818270A (en) Data cross-domain transfer method and device and computer equipment
CN111159226A (en) Index query method and system
CN116112457A (en) Method, device, computer equipment and storage medium for notifying message
CN115858905A (en) Data processing method and device, electronic equipment and storage medium
CN114625458A (en) Page data processing method and device, electronic equipment and storage medium
CN113296987B (en) Interface calling method and device for calling module, computer equipment and storage medium
CN113918245A (en) Data calling method, device, equipment and computer readable storage medium
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN112559646A (en) Report downloading method and device
CN113485902A (en) Method, device, equipment and computer readable medium for testing service platform
CN112799744A (en) Calling method and device of industrial APP, computer readable medium and electronic equipment
CN113779122A (en) Method and apparatus for exporting data
CN112230911A (en) Model deployment method, device, computer equipment and storage medium
CN113448960A (en) Method and device for importing form file

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
AD01 Patent right deemed abandoned
AD01 Patent right deemed abandoned

Effective date of abandoning: 20240227