CN109150904A - Interface service call method and terminal device - Google Patents

Interface service call method and terminal device Download PDF

Info

Publication number
CN109150904A
CN109150904A CN201811119506.9A CN201811119506A CN109150904A CN 109150904 A CN109150904 A CN 109150904A CN 201811119506 A CN201811119506 A CN 201811119506A CN 109150904 A CN109150904 A CN 109150904A
Authority
CN
China
Prior art keywords
interface service
service
interface
address
url
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
CN201811119506.9A
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.)
Shenzhen Bai Qian Nationwide Financial Services Inc
Original Assignee
Shenzhen Bai Qian Nationwide Financial Services Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Bai Qian Nationwide Financial Services Inc filed Critical Shenzhen Bai Qian Nationwide Financial Services Inc
Priority to CN201811119506.9A priority Critical patent/CN109150904A/en
Publication of CN109150904A publication Critical patent/CN109150904A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0227Filtering policies
    • H04L63/0236Filtering by address, protocol, port number or service, e.g. IP-address or URL
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/126Applying verification of the received information the source of the received data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention is suitable for field of communication technology, provides a kind of interface service call method and terminal device, wherein the described method includes: receiving the HTTP request that third party system is sent, determines the source systems and interface service address URL of the HTTP request;According to the source systems and the interface service address URL, the version of the interface service of the HTTP request access is determined;According to the version of the interface service and the interface service address URL, target interface address of service URL is generated;The access address of interface service is obtained from registration center according to the target interface address of service URL, corresponding interface service is called according to the access address of the interface service, improve flexibility, the scalability of interface service platform, the perception for reducing third party system calling interface service is poor, time-consuming, blundering risk, it decreases because not while be adjusted due to leads to the probability of system fault, not being suitble to practical application.

Description

Interface service call method and terminal device
Technical field
The invention belongs to field of communication technology more particularly to a kind of interface service call methods and terminal device.
Background technique
Application interface platform externally provides interface service in a manner of micro services.The system docked with application interface platform It is more and more, the case where same interface service is called there are multiple systems.Once business is adjusted, corresponding interface service It is also required to accordingly adjust, the system being mated with also need to complete adjustment in point at the same time.Moreover, application interface platform is micro- Service is that access path is specified by way of URL, and the same interface service function is if there is multiple versions and when depositing, for Third party system needs the mode for modifying URL according to the actual situation to access, and it is poor not only to perceive in this way, but also time-consuming It is error-prone, it reports an error for example, system can not adjust in time, and then influence the use of system.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of interface service call method and terminal device, it is existing to solve It is poor that the service of third party system calling interface not only perceives, but also time-consuming error-prone problem.
The first aspect of the embodiment of the present invention provides a kind of interface service call method, comprising:
Receive the hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP) that third party system is sent Request, determines the source systems and interface service address uniform resource locator (Uniform Resource of the HTTP request Locator, URL);
According to the source systems and the interface service address URL, the interface service of the HTTP request access is determined Version;
According to the version of the interface service and the interface service address URL, target interface address of service URL is generated;
The access address for obtaining interface service from registration center according to the target interface address of service URL, according to described The access address of interface service calls corresponding interface service.
Optionally, above-mentioned interface service call method, further includes:
The HTTP request is verified according to default security strategy;
If the HTTP request is verified by security strategy, execute described according to the source systems and interface clothes The step of being engaged in address URL, determining the version of the interface service of HTTP request access.
Optionally, the HTTP request carries digital signature;
The basis presets security strategy and verify to the HTTP request
If the security strategy is signature check, the HTTP request is digitally signed by prestoring algorithm, if The digital signature of acquisition is consistent with the digital signature that the HTTP request carries, then determines that the HTTP request passes through signature school It tests;
If the security strategy is black and white lists verification, inquired in the interface service address URL blacklist prestored true Fixed interface service address URL;If not inquiring determining interface service in the interface service address URL blacklist prestored Address URL then determines that the HTTP request is verified by black and white lists.
Optionally, described according to the source systems and the interface service address URL, determine the HTTP request access The version of interface service include:
The information that each system prestored accesses the version of each interface service is obtained from control platform database;
According to the information of acquisition, the source systems and the interface service address URL, the HTTP request access is determined Interface service version.
Optionally, the version and the interface service address URL according to the interface service generates target interface clothes Business address URL include:
According to preset interface address of service URL create-rule, version and the interface service to the interface service Location URL is ranked up;
It is combined according to ranking results, generates the target interface address of service URL.
Optionally, described to include: according to the corresponding interface service of the access address of interface service calling
Service request is sent to corresponding interface service, so that the interface takes according to the access address of the interface service Business returns to corresponding data to the third party system according to the service request.
The second aspect of the embodiment of the present invention provides a kind of interface service calling device, comprising:
HTTP request processing unit determines the HTTP request for receiving the HTTP request of third party system transmission Source systems and interface service address URL;
Interface service version determining unit, for determining institute according to the source systems and the interface service address URL State the version of the interface service of HTTP request access;
Target interface address of service URL generation unit, for the version and the interface service according to the interface service Address URL generates target interface address of service URL;
Interface service call unit, for obtaining interface clothes from registration center according to the target interface address of service URL The access address of business calls corresponding interface service according to the access address of the interface service.
Optionally, above-mentioned interface service calling device, further includes:
HTTP request verification unit, for being verified according to default security strategy to the HTTP request;
The interface service version determining unit executes institute if verifying for the HTTP request by security strategy State the version that the interface service of the HTTP request access is determined according to the source systems and the interface service address URL The step of.
The third aspect of the embodiment of the present invention provides a kind of terminal device, including memory, processor and is stored in In the memory and the computer program that can run on the processor, when the processor executes the computer program It realizes such as the step of the above method.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, realizes when the computer program is executed by processor such as the step of the above method.
Existing beneficial effect is the embodiment of the present invention compared with prior art: the embodiment of the present invention is by receiving third party The HTTP request that system is sent determines the source systems and interface service address URL of the request, and according to system configuration, determines The corresponding interface service version of third party system, further calls corresponding interface service, improves the spirit of interface service platform Activity, scalability, the perception for reducing third party system calling interface service is poor, time-consuming, blundering risk, also reduces Lead to the probability of system fault due to not being adjusted simultaneously, while interface service can be completed in the case where unaware Edition upgrading is switched to early version when new version encounters problems, and is suitble to practical application.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is a kind of schematic flow diagram of interface service call method provided in an embodiment of the present invention;
Fig. 2 be another embodiment of the present invention provides a kind of interface service call method schematic flow diagram;
Fig. 3 is a kind of schematic flow diagram for interface service call method that yet another embodiment of the invention provides;
Fig. 4 is a kind of schematic flow diagram for interface service call method that further embodiment of this invention provides;
Fig. 5 is a kind of schematic block diagram of interface service calling device provided in an embodiment of the present invention;
Fig. 6 be another embodiment of the present invention provides a kind of interface service calling device schematic block diagram;
Fig. 7 is a kind of schematic block diagram of terminal device provided in an embodiment of the present invention.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
It is a kind of schematic flow diagram of interface service call method provided in an embodiment of the present invention referring to Fig. 1, Fig. 1, at this In embodiment, it is illustrated by taking the triggering of the angle of application interface platform gateway as an example, here, the basis of application interface platform gateway Function is the HTTP request for receiving third party system and sending, and calls corresponding interface service.As shown in Figure 1, in this embodiment, The treatment process of application interface platform gateway may comprise steps of:
S101: receiving the HTTP request that third party system is sent, and determines the source systems and interface clothes of the HTTP request Business address URL.
Here, third party system is any one system docked with application interface platform, and third party system passes through application Interface platform calling interface service.HTTP request is the request message from third party system to application interface platform, comprising: message In first trip, to the requesting method of resource, the identifier of resource and the agreement used etc..It is above-mentioned to be received in application interface platform gateway After the HTTP request that third party system is sent, the HTTP request is parsed, obtain the source systems of the HTTP request and is connect Oral business address URL.Wherein, URL is succinct to the position for the resource that can be obtained from internet and one kind of access method Expression, be the address of standard resource on internet.Each file on internet has a unique URL, what it included Information points out how the position of file and browser should handle it.
Before the HTTP request that application interface platform gateway receives that third party system is sent, application interface platform can be right The version that each system accesses each interface service is managed for configuration, and is stored in control platform database.
S102: according to the source systems and the interface service address URL, the interface of the HTTP request access is determined The version of service.
Specifically, according to the source systems and the interface service address URL, the HTTP request access is determined Before the version of interface service, the HTTP request can also be verified according to security strategy is preset, wherein security strategy It can also be arranged according to the actual situation, that is, support customized any interception to request.
It, can also be according to default current limliting strategy to the HTTP request if the HTTP request is verified by security strategy It is verified, wherein the purpose of current limliting is by carrying out the request in speed limit or a time window to concurrent access/request Speed limit is carried out to protect system, service can be refused if reaching limiting speed, be lined up or wait, degrade.Specifically, current limliting Strategy may include: the total number of concurrent of limitation, the instantaneous number of concurrent of limitation, Mean Speed in limitation time window etc., in addition may be used also With according to number of network connections, network flow, server load etc. come current limliting.
If the HTTP request is verified not over security strategy, can return to relevant error information to third party is System, and corresponding error result can be counted, it is synchronized to database, safe various dimensions can be carried out according to these data The displaying of report.
S103: according to the version of the interface service and the interface service address URL, target interface address of service is generated URL。
Here, the version of above-mentioned interface service may include version number, and version number can be V1 or V2 etc., above-mentioned generation mesh The mode for marking interface service address URL can be with are as follows: according to preset interface address of service URL create-rule, to the interface service Version and the interface service address URL be ranked up;It is combined according to ranking results, generates the target interface service Address URL, for example, the interface service address URL is Http: //aip.bqir.cn/aip-infoQuery/baseInfo/ GetInfo, for the version of the interface service is V2, above-mentioned target interface address of service URL can be Http: // aip.bqir.cn/aip-infoQuery/V2/baseInfo/getInfo.Wherein, preset interface address of service URL generates rule It can then be arranged according to the actual situation.
S104: obtaining the access address of interface service according to the target interface address of service URL from registration center, according to The access address of the interface service calls corresponding interface service.
Here, the corresponding relationship of the access address of registration center's storage interface service address URL and interface service, using connecing Mouth platform gateway can determine the access address of the corresponding interface service of above-mentioned target interface address of service URL according to the relationship, Service request is sent to corresponding interface service according to the access address of the interface service, and interface service receives above-mentioned service and asks It asks and returns to related data to third party system.
If third party system does not receive the related data of interface service return, Ke Yizai by prefixed time interval Secondary transmission HTTP request is to application interface platform gateway, the related data returned until receiving interface service.
It is evidenced from the above discussion that interface service call method of the embodiment of the present invention, by receiving third party system transmission HTTP request determines the source systems and interface service address URL of the request, and according to system configuration, determines third party system Corresponding interface service version, further calls corresponding interface service, improves the flexibility, expansible of interface service platform Property, the perception for reducing third party system calling interface service is poor, time-consuming, blundering risk, decreases because not simultaneously It is adjusted and is caused the probability of system fault, while the edition upgrading of interface service can be completed in the case where unaware, When new version encounters problems, it is switched to early version, is suitble to practical application.
Referring to Fig. 2, Fig. 2 be another embodiment of the present invention provides a kind of interface service call method exemplary flow Figure.The difference of the present embodiment and above-described embodiment is S202~S203, and S201 is identical as the S101 in a upper embodiment, S204 ~S205 is identical as S103~S104 in a upper embodiment, referring specifically to S101's in above-described embodiment and S103~S104 Associated description does not repeat herein.Interface service call method in the present embodiment can also include:
S202: the HTTP request is verified according to default security strategy.
S203: if the HTTP request is verified by security strategy, according to the source systems and the interface service Address URL determines the version of the interface service of the HTTP request access.
In addition, the HTTP request carries digital signature in a specific example;
The basis presets security strategy and verify to the HTTP request
If the security strategy is signature check, the HTTP request is digitally signed by prestoring algorithm, if The digital signature of acquisition is consistent with the digital signature that the HTTP request carries, then determines that the HTTP request passes through signature school It tests;
If the security strategy is black and white lists verification, inquired in the interface service address URL blacklist prestored true Fixed interface service address URL;If not inquiring determining interface service in the interface service address URL blacklist prestored Address URL then determines that the HTTP request is verified by black and white lists.
Here, above-mentioned HTTP request can carry digital signature, which is to send the third of above-mentioned HTTP request Method, system passes through the digital signature that associated digital signature algorithm carries out above-mentioned HTTP request.If above-mentioned security strategy is signature Verification, it may include: application interface platform net that application interface platform gateway, which carries out signature check to received above-mentioned HTTP request, The Digital Signature Algorithm for obtaining and saving is closed, third party system and application interface platform gateway consult Digital Signature Algorithm here, Above-mentioned HTTP request is digitally signed using same Digital Signature Algorithm.Application interface platform gateway is according to the number of preservation Signature algorithm is digitally signed received above-mentioned HTTP request, and the digital signature of acquisition and above-mentioned HTTP request are carried Digital signature is compared, if unanimously, by signature check, if passing through verification, it was demonstrated that above-mentioned HTTP request is not usurped Change.
If above-mentioned security strategy be black and white lists verification, application interface platform gateway to received above-mentioned HTTP request into The verification of row black and white lists may include: on application interface platform gateway is inquired in the interface service address URL blacklist prestored Determining interface service address URL is stated, if do not inquired, illustrates it is not blacklist interface service address, passes through black and white name Single verification.
Specifically, application interface platform gateway can also add label in the HTTP request, according to the label, note Record the security strategy checking procedure of the HTTP request, and the interface service called.Since application interface platform gateway receives The request arrived can be very much, when needing to some request tracing, can add a label, net when the request enters gateway The movement for closing the associated safety done to above-mentioned request in gateway according to the label records, that is, records above-mentioned request by gateway It has invoked which interface service and has carried out the execution of which security strategy, subsequent related personnel is facilitated to inquire data.
Referring to Fig. 3, Fig. 3 is a kind of exemplary flow for interface service call method that yet another embodiment of the invention provides Figure.The difference of embodiment corresponding with Fig. 1 is: it is described according to the source systems and the interface service address URL, it determines The version of the interface service of the HTTP request access may include S302.Wherein S301 and the S101 phase in a upper embodiment Together, S303~S304 is identical as S103~S104 in a upper embodiment, referring specifically to S101, S103 in above-described embodiment~ The associated description of S104, does not repeat herein.Specifically, S302 may include S3021~S3022:
S3021: the letter that each system prestored accesses the version of each interface service is obtained from control platform database Breath.
S3022: according to the information of acquisition, the source systems and the interface service address URL, determine that the HTTP is asked Seek the version of the interface service of access.
Here, the version that application interface platform accesses each interface service to each system in advance is managed for configuration, and It is stored in control platform database, application interface platform gateway receives the HTTP request that third party system is sent, and determining should The source systems and interface service address URL of HTTP request, according to the source systems and interface service address URL, from control The version that the interface service of the HTTP request access is determined in platform database, in this way, can be complete in the case where unaware It is switched to early version when new version encounters problems at the edition upgrading of interface service, is suitble to practical application.
Referring to Fig. 4, Fig. 4 be another embodiment of the present invention provides a kind of interface service call method exemplary flow Figure.The difference of embodiment corresponding with Fig. 1 is: the version according to the interface service and the interface service address URL, generating target interface address of service URL may include S403.Wherein the S101 in S401~S402 and a upper embodiment~ S102 is identical, and S404 is identical as the S104 in a upper embodiment, referring specifically to S101~S102 in above-described embodiment and S104 Associated description, do not repeat herein.Specifically, S403 may include S4031~S4032:
S4031: version and the interface according to preset interface address of service URL create-rule, to the interface service Address of service URL is ranked up.
S4032: being combined according to ranking results, generates the target interface address of service URL.
Here, URL create-rule in preset interface address of service can be arranged according to the actual situation, the version of above-mentioned interface service It originally may include version number, such as V1, V2 etc., according to the version number of the interface service of acquisition to above-mentioned interface service address URL It is supplemented, and is redirected, obtain target interface address of service URL, wherein redirection is exactly by various methods to ask network A fixed direction is asked again to go to other positions.
In addition, in a specific example, it is described to call corresponding interface to take according to the access address of the interface service Business includes:
Service request is sent to corresponding interface service, so that the interface takes according to the access address of the interface service Business returns to corresponding data to the third party system according to the service request.
Here, the corresponding relationship of the access address of registration center's storage interface service address URL and interface service, using connecing Mouth platform gateway can determine the access address of the corresponding interface service of above-mentioned target interface address of service URL according to the relationship, Service request is sent to corresponding interface service according to the access address of the interface service, and above-mentioned interface service receives above-mentioned clothes Business request returns to related data to third party system, the perception for reducing third party system calling interface service is poor, time-consuming, Blundering risk is decreased because not while be adjusted due to leads to the probability of system fault.
Corresponding to interface service call method described in foregoing embodiments, Fig. 5 shows provided in an embodiment of the present invention one The schematic block diagram of kind interface service calling device.The each unit that the interface service calling device 500 of the present embodiment includes is used for Each step in the corresponding embodiment of Fig. 1 is executed, referring specifically to the associated description in the corresponding embodiment of Fig. 1 and Fig. 1, herein It does not repeat.The interface service calling device 500 of the present embodiment is determined including HTTP request processing unit 501, interface service version Unit 502, target interface address of service URL generation unit 503 and interface service call unit 504.
Wherein, HTTP request processing unit 501, for receive third party system transmission HTTP request, determine described in The source systems and interface service address URL of HTTP request.Interface service version determining unit 502, for according to the source System and the interface service address URL determine the version of the interface service of the HTTP request access.Target interface service ground Location URL generation unit 503 generates target interface for the version and the interface service address URL according to the interface service Address of service URL.Interface service call unit 504, for being obtained according to the target interface address of service URL from registration center The access address of interface service calls corresponding interface service according to the access address of the interface service.
It is evidenced from the above discussion that interface service calling device of the embodiment of the present invention, by receiving third party system transmission HTTP request determines the source systems and interface service address URL of the request, and according to system configuration, determines third party system Corresponding interface service version, further calls corresponding interface service, improves the flexibility, expansible of interface service platform Property, the perception for reducing third party system calling interface service is poor, time-consuming, blundering risk, decreases because not simultaneously It is adjusted and is caused the probability of system fault, while the edition upgrading of interface service can be completed in the case where unaware, When new version encounters problems, it is switched to early version, is suitble to practical application.
Referring to Fig. 6, Fig. 6 be another embodiment of the present invention provides another interface service calling device schematic frame Figure.The interface service calling device 600 of the present embodiment includes HTTP request processing unit 601, interface service version determining unit 602, target interface address of service URL generation unit 603, interface service call unit 604 and HTTP request verification unit 605.
Wherein, HTTP request processing unit 601, interface service version determining unit 602, target interface address of service URL Generation unit 603 and interface service call unit 604 are handled referring specifically to HTTP request in the corresponding embodiment of Fig. 5 and Fig. 5 Unit 501, interface service version determining unit 502, target interface address of service URL generation unit 503 and interface service are called The associated description of unit 504, does not repeat herein.
Further, HTTP request verification unit 605, for carrying out school to the HTTP request according to default security strategy It tests.The interface service version determining unit 602, if being verified for the HTTP request by security strategy, described in execution According to the source systems and the interface service address URL, the version of the interface service of the HTTP request access is determined Step.
Further, the HTTP request carries digital signature.
The HTTP request verification unit 605 includes signature check unit 6051 and black and white lists verification unit 6052.
Wherein, signature check unit 6051, if being signature check for the security strategy, by prestoring algorithm to institute It states HTTP request to be digitally signed, if the digital signature obtained is consistent with the digital signature that the HTTP request carries, sentence The fixed HTTP request passes through signature check.Black and white lists verification unit 6052, if being black and white lists for the security strategy Verification, then inquire determining interface service address URL in the interface service address URL blacklist prestored;If being connect what is prestored Determining interface service address URL is not inquired in oral business address URL blacklist, then it is black to determine that the HTTP request passes through White list verification.
Further, the interface service version determining unit 602 includes that information acquisition unit 6021 and version determine list Member 6022.
Wherein, information acquisition unit 6021, it is every for obtaining each system prestored access from control platform database The information of the version of a interface service.Version determining unit 6022, for according to the information of acquisition, source systems and described Interface service address URL determines the version of the interface service of the HTTP request access.
Further, target interface address of service URL generation unit 603 includes sequencing unit 6031 and combination producing unit 6032。
Wherein, sequencing unit 6031 are used for according to preset interface address of service URL create-rule, to the interface service Version and the interface service address URL be ranked up.Combination producing unit 6032, for carrying out group according to ranking results It closes, generates the target interface address of service URL.
Further, described to include: according to the corresponding interface service of the access address of interface service calling
Service request is sent to corresponding interface service, so that the interface takes according to the access address of the interface service Business returns to corresponding data to the third party system according to the service request.
It is evidenced from the above discussion that the HTTP request that the embodiment of the present invention is sent by receiving third party system, determines that this is asked The source systems and interface service address URL asked, and according to system configuration, determine the corresponding interface service version of third party system This, further calls corresponding interface service, improves flexibility, the scalability of interface service platform, reduce third party The perception of system call interfaces service is poor, time-consuming, blundering risk, decreases because not while be adjusted due to leads to be The probability of system error, while the edition upgrading of interface service can be completed in the case where unaware, it encounters problems in new version When, it is switched to early version, is suitble to practical application.
It is a kind of schematic block diagram of terminal device provided by one embodiment of the present invention referring to Fig. 7, Fig. 7.As shown in fig. 7, The terminal device 70 of the embodiment includes: processor 700, memory 701 and is stored in the memory 701 and can be in institute State the computer program 702 run on processor 700, such as interface service caller.The processor 700 executes the meter The step in above-mentioned each interface service call method embodiment, such as step 101 shown in FIG. 1 are realized when calculation machine program 702 To 104.Alternatively, the processor 700 realizes each unit in above-mentioned each Installation practice when executing the computer program 702 Function, such as the function of unit 601 to 605 shown in Fig. 6.
The computer program 702 can be divided into one or more module/units, one or more of moulds Block/unit is stored in the memory 701, and is executed by the processor 700, to complete the present invention.It is one or Multiple module/units can be the series of computation machine program instruction section that can complete specific function, and the instruction segment is for describing Implementation procedure of the computer program 702 in the terminal device 70.For example, the computer program 702 can be divided It is cut into HTTP request processing unit, interface service version determining unit, target interface address of service URL generation unit, interface clothes Business call unit and HTTP request verification unit, each unit concrete function are as follows:
The HTTP request that third party system is sent is received, determines the source systems of the HTTP request With interface service address URL;
According to the source systems and the interface service address URL, the interface service of the HTTP request access is determined Version;
According to the version of the interface service and the interface service address URL, target interface address of service URL is generated;
The access address for obtaining interface service from registration center according to the target interface address of service URL, according to described The access address of interface service calls corresponding interface service.
Further, each unit concrete function further include:
The HTTP request is verified according to default security strategy;
If the HTTP request is verified by security strategy, execute described according to the source systems and interface clothes The step of being engaged in address URL, determining the version of the interface service of HTTP request access.
Further, the HTTP request carries digital signature;
The basis presets security strategy and verify to the HTTP request
If the security strategy is signature check, the HTTP request is digitally signed by prestoring algorithm, if The digital signature of acquisition is consistent with the digital signature that the HTTP request carries, then determines that the HTTP request passes through signature school It tests;
If the security strategy is black and white lists verification, inquired in the interface service address URL blacklist prestored true Fixed interface service address URL;If not inquiring determining interface service in the interface service address URL blacklist prestored Address URL then determines that the HTTP request is verified by black and white lists.
Further, described according to the source systems and the interface service address URL, determine that the HTTP request is visited The version for the interface service asked includes:
The information that each system prestored accesses the version of each interface service is obtained from control platform database;
According to the information of acquisition, the source systems and the interface service address URL, the HTTP request access is determined Interface service version.
Further, the version and the interface service address URL according to the interface service generates target interface Address of service URL includes:
According to preset interface address of service URL create-rule, version and the interface service to the interface service Location URL is ranked up;
It is combined according to ranking results, generates the target interface address of service URL.
Further, described to include: according to the corresponding interface service of the access address of interface service calling
Service request is sent to corresponding interface service, so that the interface takes according to the access address of the interface service Business returns to corresponding data to the third party system according to the service request.
The HTTP request that above scheme is sent by receiving third party system determines the source systems and interface clothes of the request Business address URL, and according to system configuration, it determines the corresponding interface service version of third party system, further calls and connect accordingly Oral business, improves flexibility, the scalability of interface service platform, reduces the perception of third party system calling interface service Difference, time-consuming, blundering risk, decreases because not while be adjusted due to leads to the probability of system fault, while can be with The edition upgrading that interface service is completed in the case where unaware is switched to early version when new version encounters problems, and is suitble to real Border application.
The terminal device 70 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set It is standby.The terminal device may include, but be not limited only to, processor 700, memory 701.It will be understood by those skilled in the art that Fig. 7 is only the example of terminal device 70, does not constitute the restriction to terminal device 70, may include more more or less than illustrating Component, perhaps combine certain components or different components, such as the terminal device can also be set including input and output Standby, network access equipment, bus etc..
Alleged processor 700 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 701 can be the internal storage unit of the terminal device 70, such as the hard disk of terminal device 70 Or memory.The memory 701 is also possible to the External memory equipment of the terminal device 70, such as on the terminal device 70 The plug-in type hard disk of outfit, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) Card, flash card (Flash Card) etc..Further, the memory 701 can also be both interior including the terminal device 70 Portion's storage unit also includes External memory equipment.The memory 701 is for storing the computer program and the terminal Other programs and data needed for equipment.The memory 701, which can be also used for temporarily storing, have been exported or will be defeated Data out.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code Dish, CD, computer storage, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the meter The content that calculation machine readable medium includes can carry out increase and decrease appropriate according to the requirement made laws in jurisdiction with patent practice, Such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and electricity Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of interface service call method characterized by comprising
The HTTP request that third party system is sent is received, determine the source systems of the HTTP request and is connect Mouth address of service uniform resource position mark URL;
According to the source systems and the interface service address URL, the version of the interface service of the HTTP request access is determined This;
According to the version of the interface service and the interface service address URL, target interface address of service URL is generated;
The access address for obtaining interface service from registration center according to the target interface address of service URL, according to the interface The access address of service calls corresponding interface service.
2. interface service call method as described in claim 1, which is characterized in that further include:
The HTTP request is verified according to default security strategy;
If the HTTP request by security strategy verify, execute it is described according to the source systems and the interface service Location URL, the step of determining the version of the interface service of HTTP request access.
3. interface service call method as claimed in claim 2, which is characterized in that the HTTP request carries digital signature;
The basis presets security strategy and verify to the HTTP request
If the security strategy is signature check, the HTTP request is digitally signed by prestoring algorithm, if obtaining Digital signature it is consistent with the digital signature that the HTTP request carries, then determine that the HTTP request passes through signature check;
If the security strategy is black and white lists verification, determination is inquired in the interface service address URL blacklist prestored Interface service address URL;If not inquiring determining interface service address in the interface service address URL blacklist prestored URL then determines that the HTTP request is verified by black and white lists.
4. interface service call method as described in claim 1, which is characterized in that described according to the source systems and described Interface service address URL determines that the version of the interface service of the HTTP request access includes:
The information that each system prestored accesses the version of each interface service is obtained from control platform database;
According to the information of acquisition, the source systems and the interface service address URL, connecing for the HTTP request access is determined The version of oral business.
5. interface service call method as described in claim 1, which is characterized in that the version according to the interface service With the interface service address URL, generating target interface address of service URL includes:
Version and the interface service address URL according to preset interface address of service URL create-rule, to the interface service It is ranked up;
It is combined according to ranking results, generates the target interface address of service URL.
6. interface service call method as described in claim 1, which is characterized in that the access according to the interface service The corresponding interface service of call by location includes:
Service request is sent to corresponding interface service, so that the interface service root according to the access address of the interface service Corresponding data is returned to the third party system according to the service request.
7. a kind of interface service calling device characterized by comprising
HTTP request processing unit determines the source of the HTTP request for receiving the HTTP request of third party system transmission System and interface service address URL;
Interface service version determining unit, described in determining according to the source systems and the interface service address URL The version of the interface service of HTTP request access;
Target interface address of service URL generation unit, for according to the interface service version and the interface service address URL generates target interface address of service URL;
Interface service call unit, for obtaining interface service from registration center according to the target interface address of service URL Access address calls corresponding interface service according to the access address of the interface service.
8. interface service calling device as claimed in claim 7, which is characterized in that further include:
HTTP request verification unit, for being verified according to default security strategy to the HTTP request;
The interface service version determining unit executes described if verifying for the HTTP request by security strategy According to the source systems and the interface service address URL, the step of the version of the interface service of the HTTP request access is determined Suddenly.
9. a kind of terminal device, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 6 when executing the computer program The step of any one the method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as claim 1 to 6 of realization the method.
CN201811119506.9A 2018-09-25 2018-09-25 Interface service call method and terminal device Pending CN109150904A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811119506.9A CN109150904A (en) 2018-09-25 2018-09-25 Interface service call method and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811119506.9A CN109150904A (en) 2018-09-25 2018-09-25 Interface service call method and terminal device

Publications (1)

Publication Number Publication Date
CN109150904A true CN109150904A (en) 2019-01-04

Family

ID=64812274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811119506.9A Pending CN109150904A (en) 2018-09-25 2018-09-25 Interface service call method and terminal device

Country Status (1)

Country Link
CN (1) CN109150904A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083695A (en) * 2019-05-10 2019-08-02 百度在线网络技术(北京)有限公司 Craft services call method, device and storage medium
CN110191164A (en) * 2019-05-20 2019-08-30 中国工商银行股份有限公司 Distributed Services access system and method
CN110324405A (en) * 2019-05-29 2019-10-11 北京奇艺世纪科技有限公司 Message method, device, system and computer readable storage medium
CN111131221A (en) * 2019-12-19 2020-05-08 中国平安财产保险股份有限公司 Interface checking device, method and storage medium
CN111381985A (en) * 2020-03-09 2020-07-07 中国建设银行股份有限公司 Heterogeneous system data calling method, device, equipment and storage medium
CN112202636A (en) * 2020-09-29 2021-01-08 中国银行股份有限公司 Communication test method and system
CN112350873A (en) * 2020-11-25 2021-02-09 中国工商银行股份有限公司 Application service information processing method, application service calling method, device and system
WO2021073202A1 (en) * 2019-10-15 2021-04-22 深圳壹账通智能科技有限公司 Intelligent contract processing method, computer device and storage medium
CN113422686A (en) * 2021-06-24 2021-09-21 平安国际智慧城市科技股份有限公司 Gateway layer authentication method, system, electronic device and storage medium
CN114363417A (en) * 2021-12-13 2022-04-15 南京莱斯信息技术股份有限公司 Optimization design method for service interface concurrent call between systems
CN116346472A (en) * 2023-03-29 2023-06-27 贝壳找房(北京)科技有限公司 Method, device, storage medium and computer program product for restoring call link

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631033A (en) * 2008-07-14 2010-01-20 中兴通讯股份有限公司 Method, system, server and client for calling remote component
CN102857555A (en) * 2012-08-03 2013-01-02 深圳中兴网信科技有限公司 Terminal, server and software updating method
CN103268444A (en) * 2012-12-28 2013-08-28 武汉安天信息技术有限责任公司 Android malicious code detection system and method based on plugin loading
CN103942225A (en) * 2013-01-23 2014-07-23 阿里巴巴集团控股有限公司 Method and system for invoking resources of Hybrid App client and client
US20140280473A1 (en) * 2013-03-15 2014-09-18 Disney Enterprises, Inc. Managing web services using a reverse proxy
CN106489145A (en) * 2015-12-28 2017-03-08 华为技术有限公司 The access method of web site, device and Web site system
CN108255615A (en) * 2017-11-30 2018-07-06 平安科技(深圳)有限公司 Across language call method, server and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631033A (en) * 2008-07-14 2010-01-20 中兴通讯股份有限公司 Method, system, server and client for calling remote component
CN102857555A (en) * 2012-08-03 2013-01-02 深圳中兴网信科技有限公司 Terminal, server and software updating method
CN103268444A (en) * 2012-12-28 2013-08-28 武汉安天信息技术有限责任公司 Android malicious code detection system and method based on plugin loading
CN103942225A (en) * 2013-01-23 2014-07-23 阿里巴巴集团控股有限公司 Method and system for invoking resources of Hybrid App client and client
US20140280473A1 (en) * 2013-03-15 2014-09-18 Disney Enterprises, Inc. Managing web services using a reverse proxy
CN106489145A (en) * 2015-12-28 2017-03-08 华为技术有限公司 The access method of web site, device and Web site system
CN108255615A (en) * 2017-11-30 2018-07-06 平安科技(深圳)有限公司 Across language call method, server and storage medium

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083695A (en) * 2019-05-10 2019-08-02 百度在线网络技术(北京)有限公司 Craft services call method, device and storage medium
CN110191164A (en) * 2019-05-20 2019-08-30 中国工商银行股份有限公司 Distributed Services access system and method
CN110324405B (en) * 2019-05-29 2022-05-17 北京奇艺世纪科技有限公司 Message sending method, device, system and computer readable storage medium
CN110324405A (en) * 2019-05-29 2019-10-11 北京奇艺世纪科技有限公司 Message method, device, system and computer readable storage medium
WO2021073202A1 (en) * 2019-10-15 2021-04-22 深圳壹账通智能科技有限公司 Intelligent contract processing method, computer device and storage medium
CN111131221A (en) * 2019-12-19 2020-05-08 中国平安财产保险股份有限公司 Interface checking device, method and storage medium
CN111131221B (en) * 2019-12-19 2022-04-12 中国平安财产保险股份有限公司 Interface checking device, method and storage medium
CN111381985A (en) * 2020-03-09 2020-07-07 中国建设银行股份有限公司 Heterogeneous system data calling method, device, equipment and storage medium
CN111381985B (en) * 2020-03-09 2023-09-19 中国建设银行股份有限公司 Heterogeneous system data calling method, device, equipment and storage medium
CN112202636A (en) * 2020-09-29 2021-01-08 中国银行股份有限公司 Communication test method and system
CN112350873B (en) * 2020-11-25 2022-10-25 中国工商银行股份有限公司 Application service information processing method, application service calling method, device and system
CN112350873A (en) * 2020-11-25 2021-02-09 中国工商银行股份有限公司 Application service information processing method, application service calling method, device and system
CN113422686A (en) * 2021-06-24 2021-09-21 平安国际智慧城市科技股份有限公司 Gateway layer authentication method, system, electronic device and storage medium
CN114363417A (en) * 2021-12-13 2022-04-15 南京莱斯信息技术股份有限公司 Optimization design method for service interface concurrent call between systems
CN116346472A (en) * 2023-03-29 2023-06-27 贝壳找房(北京)科技有限公司 Method, device, storage medium and computer program product for restoring call link
CN116346472B (en) * 2023-03-29 2023-12-12 贝壳找房(北京)科技有限公司 Method, device, storage medium and computer program product for restoring call link

Similar Documents

Publication Publication Date Title
CN109150904A (en) Interface service call method and terminal device
US10965772B2 (en) Interface invocation method and apparatus for hybrid cloud
WO2020057163A1 (en) Mec platform deployment method and device
CN109309666A (en) Interface security control method and terminal device in a kind of network security
CN106209726B (en) Mobile application single sign-on method and device
CN109218368A (en) Realize method, apparatus, electronic equipment and the readable medium of Http reverse proxy
CN110958237A (en) Authority verification method and device
CN110266764A (en) Internal services call method, device and terminal device based on gateway
CN111177112A (en) Database blocking method and device based on operation and maintenance management system and electronic equipment
CN109962855A (en) A kind of current-limiting method of WEB server, current-limiting apparatus and terminal device
CN111104675A (en) Method and device for detecting system security vulnerability
US20140019957A1 (en) Method, apparatus, and system for sharing software among terminals
CN106357609A (en) User creation method and system, public network server and private cloud equipment
CN109358880A (en) A kind of universal gateway configuration method and device
WO2014008864A1 (en) Method, apparatus, and system for sharing software among terminals
CN110266517A (en) External service call method, device and terminal device based on gateway
CN110245029A (en) A kind of data processing method, device, storage medium and server
CN104811922A (en) Adjacent node registration method and the device and cross-node registration method and system
CN110011875A (en) Dial testing method, device, equipment and computer readable storage medium
CN109255246A (en) Interface parameters encryption method, device, computer equipment and storage medium
CN111163052B (en) Method, device, medium and electronic equipment for connecting Internet of things platform
CN112015383A (en) Login method and device
CN111241504B (en) Identity verification method, device, electronic equipment and storage medium
CN113296744A (en) Application development system and method
CN115396221A (en) Authorization processing method, device and system, electronic equipment and storage medium

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190104

WD01 Invention patent application deemed withdrawn after publication