Service invocation method, apparatus, device, medium, and program product

By working collaboratively with the service caller and provider and the service management platform, a rate limiting and circuit breaker mechanism is implemented. Requests are allowed to enter the service provider only when the caller's and provider's policies are met. This solves the performance bottleneck problem caused by abnormal traffic and improves the system's availability and security.

CN119676285BActive Publication Date: 2025-11-07INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411890293.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-11-07
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

In a distributed service system, abnormal traffic will still first enter the service provider, causing the nodes that execute rate limiting and circuit breaking logic to become performance bottlenecks, affecting the normal call of services.

Method used

By working together with the service caller and provider and the service management platform, a rate limiting and circuit breaker mechanism is implemented. Requests are only allowed to enter the service provider's functional logic call when the caller and provider's call control policies are met. Specific control policies for callers and providers are configured to deal with abnormal calls.

Benefits of technology

It effectively prevents abnormal call traffic from entering the service provider, improves the availability of the application system, prevents performance bottlenecks, and enhances the reliability and security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676285B_ABST
    Figure CN119676285B_ABST
Patent Text Reader

Abstract

The disclosure provides a service calling method of a bilateral service party, which can be applied to the field of distributed technology. The method comprises the following steps: when a service calling party determines that a first calling request of a first service meets a current caller calling control strategy, the service calling party sends a second calling request corresponding to the first service to a service providing party based on registration information; when the service providing party determines that the second calling request meets a current provider calling control strategy, the service providing party calls the first service based on the second calling request to return a calling return request of the first service to the service calling party; and the service calling party receives the calling return request of the first service to complete the calling of the first service. Therefore, the disclosure improves the usability of an application system and avoids abnormal calling traffic from entering the service providing party. The disclosure also provides a service calling device of a bilateral service party, equipment, a medium and a program product.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of distribution, and more particularly to a service calling method and device of bilateral service providers, equipment, medium and program product. BACKGROUND

[0002] In a distributed service system, various complex network environments often need to be faced, and in complex and variable network environments, various unpredictable sudden situations may occur. In order to deal with various sudden situations, the current distributed application system often configures a flow limiting and fusing strategy on the interface service provided to the outside, so as to ensure that the application system will not cause the entire system to fail due to abnormal calls of some calling parties. The common service calling method interaction process is as shown in the following figure: Figure 1 As shown in the figure, the service calling party initiates service calling, and the service request reaches the service provider. The service provider first performs flow limiting and fusing operations to prevent too many requests from causing system overload or failure. Through the flow limiting mechanism, the number of requests entering the system is limited, and through the fusing mechanism, when the system fails or is overloaded, the service is automatically cut off to protect the system. After completing the flow limiting and fusing operations, the subsequent processing logic of the provider is entered to realize actual business processing on the requests screened by the flow limiting and fusing.

[0003] However, through this processing method, abnormal traffic will first enter the service provider, so the node executing the flow limiting and fusing logic may become a performance bottleneck, thereby affecting the normal calling of the service. SUMMARY

[0004] In view of at least one aspect of the above problem, the embodiments of the present disclosure provide a service calling method and device of bilateral service providers, equipment, medium and program product, which effectively avoid abnormal calling traffic from entering the service provider.

[0005] According to a first aspect of the present disclosure, a service invocation method of a bilateral service provider is provided, applied to a service invocation control system, the service invocation control system comprising a service invoker, a service provider and a service management platform, the method comprising: initiating, by the service invoker, a first invocation request corresponding to a first service, and obtaining registration information corresponding to the first service in the service management platform and a current invoker invocation control policy; when the service invoker determines that the first invocation request meets the current invoker invocation control policy, sending, by the service invoker, a second invocation request corresponding to the first service to the service provider based on the registration information; receiving, by the service provider, the second invocation request, and obtaining a current provider invocation control policy corresponding to the first service in the service management platform; when the service provider determines that the second invocation request meets the current provider invocation control policy, invoking, by the service provider, the first service based on the second invocation request to return an invocation return request of the first service to the service invoker; and receiving, by the service invoker, the invocation return request of the first service to complete the invocation of the first service.

[0006] According to an embodiment of the present disclosure, before the initiating, by the service invoker, a first invocation request corresponding to a first service, the method further comprises: registering, by the service provider, invocation information corresponding to the first service to the service management platform to form registration information corresponding to the first service; and configuring, by the service management platform, an invoker invocation control policy and a provider invocation control policy corresponding to the first service based on the registration information.

[0007] According to an embodiment of the present disclosure, the service management platform comprises an invoker access management module and a provider access management module, and the configuring, by the service management platform, an invoker invocation control policy and a provider invocation control policy corresponding to the first service based on the registration information comprises: configuring, by the invoker access management module, an invocation control policy of a service invoker in the service invoker based on the registration information to obtain the invoker invocation control policy corresponding to the first service; and configuring, by the provider access management module, a protection policy of a service provider in the service provider based on the registration information to obtain the provider invocation control policy corresponding to the first service.

[0008] According to an embodiment of the present disclosure, the invoker invocation control policy comprises an invoker flow limiting policy, an invoker fuse policy and an invoker security control policy; and the provider invocation control policy comprises a provider flow limiting policy, a provider fuse policy and a provider security control policy.

[0009] According to an embodiment of the present disclosure, the service invoker comprises a service invoker component, and the sending, by the service invoker, of the second invocation request corresponding to the first service to the service provider based on the registration information comprises: obtaining, by the service invoker component, service provider environment information in the service management platform based on the registration information; selecting, by the service invoker component, a corresponding service provider in the service provider according to the service provider environment information and a routing selection strategy; and generating, by the service invoker component, the second invocation request corresponding to the first service based on the selected service provider, and sending the second invocation request to the service provider.

[0010] According to an embodiment of the present disclosure, the service provider comprises a service provider component, and the invoking, by the service provider, of the first service based on the second invocation request to return an invocation return request of the first service to the service invoker comprises: invoking, by the selected service provider, the first service according to a function logic of the first service based on the second invocation request; updating, by the service provider component, provider service statistical information, and obtaining an invocation processing result of the first service; and returning, by the service provider component, the invocation return request of the first service to the service invoker based on the invocation processing result.

[0011] According to an embodiment of the present disclosure, the receiving, by the service invoker, of the invocation return request of the first service to complete the invocation of the first service comprises: receiving, by the service invoker component, the invocation return request of the first service; and updating, by the service invoker component, invoker service statistical information based on the returned invocation processing result to complete the invocation of the first service.

[0012] According to an embodiment of the present disclosure, the service management platform further comprises a service monitoring module, and the method further comprises: obtaining, by the service monitoring module, updated invoker service statistical information and updated provider service statistical information to count service statistical information; and monitoring, by the service monitoring module, service invocation conditions of the service invoker and the service provider based on the counted service statistical information.

[0013] According to an embodiment of the present disclosure, the method further comprises: when the service monitoring module detects that the call request initiated by the service invoker satisfies a policy adjustment condition, retrieving, by the invoker access management module, a caller corresponding to the initiated call request to obtain a to-be-adjusted caller; adjusting, by the invoker access management module, a call control policy of the to-be-adjusted caller based on a service adjustment policy; pushing, by the invoker access management module, the adjusted call control policy to the service invoker component in real time; and updating, by the service invoker component, the caller call control policy based on the adjusted call control policy.

[0014] A second aspect of the present disclosure provides a service invocation device of a bilateral service provider, comprising: a call initiation unit configured to initiate, by a service invoker, a first call request corresponding to a first service, and acquire registration information corresponding to the first service in a service management platform and a current caller call control policy; an invoker determination unit configured to, when the service invoker determines that the first call request satisfies the current caller call control policy, send, by the service invoker, a second call request corresponding to the first service to a service provider based on the registration information; a call request receiving unit configured to receive, by the service provider, the second call request, and acquire a current provider call control policy corresponding to the first service in the service management platform; a provider determination unit configured to, when the service provider determines that the second call request satisfies the current provider call control policy, invoke, by the service provider, the first service based on the second call request to return a call return request of the first service to the service invoker; and a return request receiving unit configured to receive, by the service invoker, the call return request of the first service to complete the invocation of the first service.

[0015] According to an embodiment of the present disclosure, the device further comprises: a registration unit configured to register, by the service provider, call information corresponding to the first service to the service management platform to form registration information corresponding to the first service; and configure, by the service management platform, a caller call control policy and a provider call control policy corresponding to the first service based on the registration information.

[0016] According to an embodiment of the present disclosure, the service management platform comprises a caller access management module and a provider access management module, and the registration unit comprises: the first registration subunit, configured to configure, by the caller access management module, a service invocation control policy of a service invoker in the service caller based on the registration information, to obtain a caller invocation control policy corresponding to the first service; and the second registration subunit, configured to configure, by the provider access management module, a protection policy for a service provider in the service provider based on the registration information, to obtain a provider invocation control policy corresponding to the first service.

[0017] According to an embodiment of the present disclosure, the caller invocation control policy comprises a caller flow limiting policy, a caller fuse policy and a caller security control policy; and the provider invocation control policy comprises a provider flow limiting policy, a provider fuse policy and a provider security control policy.

[0018] According to an embodiment of the present disclosure, the service caller comprises a service caller component, and the caller determination unit comprises: a first caller determination subunit, configured to acquire, by the service caller component, service provider environment information in the service management platform based on the registration information; a second caller determination subunit, configured to select, by the service caller component, a corresponding service provider in the service provider according to the service provider environment information and a routing selection policy; and a third caller determination subunit, configured to generate, by the service caller component, a second invocation request corresponding to the first service based on the selected service provider, and send the second invocation request to the service provider.

[0019] According to an embodiment of the present disclosure, the service provider comprises a service provider component, and the provider determination unit comprises: a first provider determination subunit, configured to invoke the first service according to a function logic of the first service based on the second invocation request by using the selected service provider; a second provider determination subunit, configured to update provider service statistical information by the service provider component, and acquire an invocation processing result of the first service; and a third provider determination subunit, configured to return, by the service provider component, an invocation return request of the first service to the service caller component based on the invocation processing result.

[0020] According to an embodiment of the present disclosure, the return request receiving unit comprises: a first return request receiving subunit, configured to receive, by the service caller component, an invocation return request of the first service; and a second return request receiving subunit, configured to update, by the service caller component, caller service statistical information based on the returned invocation processing result, to complete invocation of the first service.

[0021] According to an embodiment of the present disclosure, the service management platform further comprises a service monitoring module, and the device further comprises: a service monitoring unit, configured to acquire updated invoker service statistical information and updated provider service statistical information by the service monitoring module, to count service statistical information; and monitor service invocation conditions of the service invoker and the service provider based on the counted service statistical information by the service monitoring module.

[0022] According to an embodiment of the present disclosure, the device further comprises: a policy adjustment unit, configured to, when the service monitoring module detects that an invocation request initiated by the service invoker meets a policy adjustment condition, retrieve an invoker corresponding to the initiated invocation request by the invoker access management module, to obtain a to-be-adjusted invoker; adjust an invocation control policy of the to-be-adjusted invoker based on a service adjustment policy by the invoker access management module; push the adjusted invocation control policy to the service invoker component in real time by the invoker access management module; and update the invoker invocation control policy based on the adjusted invocation control policy by the service invoker component.

[0023] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method.

[0024] A fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, wherein the computer program or instructions are executed by a processor to implement the steps of the method.

[0025] A fifth aspect of the present disclosure further provides a computer program product comprising a computer program or instructions, wherein the computer program or instructions are executed by a processor to implement the steps of the method.

[0026] By implementing the embodiments of the present disclosure, the service invoker will only send relevant invocation requests to the service provider when it is determined that the current invoker invocation control policy is met, and only the invocation requests that meet the current provider invocation control policy of the service provider will actually enter the function logic of the service provider to invoke relevant services, thereby implementing a service provider and invoker simultaneous effective flow limiting and fusing mechanism. When an abnormal invocation occurs, different invoker invocation control policies and provider invocation control policies can effectively control the invocation initiated by the invoker, further improve the usability of the application system, and avoid abnormal invocation traffic from entering the service provider. BRIEF DESCRIPTION OF DRAWINGS

[0027] The above and other objects, features and advantages of the present disclosure will become more apparent from the following description when taken in conjunction with the accompanying drawings, in which:

[0028] Figure 1 An interaction process diagram of a common service calling method is schematically shown;

[0029] Figure 2 An application scenario diagram of a service calling method of a bilateral service party according to an embodiment of the present disclosure is schematically shown;

[0030] Figure 3 A structural diagram of a service calling control system according to an embodiment of the present disclosure is schematically shown;

[0031] Figure 4 A flowchart of a service calling method of a bilateral service party according to an embodiment of the present disclosure is schematically shown;

[0032] Figure 5 A bilateral interaction diagram of a service calling method of a bilateral service party according to an embodiment of the present disclosure is schematically shown;

[0033] Figure 6 A registration flowchart of a service calling method of a bilateral service party according to an embodiment of the present disclosure is schematically shown;

[0034] Figure 7 A calling update flowchart of a service calling method of a bilateral service party according to an embodiment of the present disclosure is schematically shown;

[0035] Figure 8 A service monitoring flowchart of a service calling method of a bilateral service party according to an embodiment of the present disclosure is schematically shown;

[0036] Figure 9 A strategy adjustment flowchart of a service calling method of a bilateral service party according to an embodiment of the present disclosure is schematically shown;

[0037] Figure 10 A structural block diagram of a service calling apparatus of a bilateral service party according to an embodiment of the present disclosure is schematically shown; and

[0038] Figure 11 A block diagram of an electronic device suitable for implementing a service calling method of a bilateral service party according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0039] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood, however, that the description is merely exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description of the embodiments of the present disclosure, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. However, it would be apparent to those skilled in the art that the embodiments of the present disclosure can be practiced without these specific details. In other instances, well-known structures and

[0040] The terms used herein are merely used to describe specific embodiments and are not intended to limit the present disclosure. The terms "include", "comprise" and the like used herein indicate the presence of the features, steps, operations and / or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.

[0041] All terms used herein, including technical and scientific terms, have the same meanings as those generally understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having meanings consistent with the context of the specification, and should not be interpreted in an idealized or excessively formal manner.

[0042] In the case of using expressions similar to "at least one of A, B, and C, etc.", it should generally be interpreted to include at least one of the items, unless otherwise defined (for example, "a system having at least one of A, B, and C" should include but not be limited to a system having A alone, a system having B alone, a system having C alone, a system having both A and B, a system having both A and C, a system having both B and C, and / or a system having A, B, and C together, etc.).

[0043] Embodiments of the present disclosure provide a service calling method of a bilateral service provider, applied to a service calling control system, the service calling control system including a service caller, a service provider, and a service management platform, the method including: initiating, by the service caller, a first calling request corresponding to a first service, and acquiring registration information corresponding to the first service in the service management platform and a current caller calling control policy; when the service caller determines that the first calling request satisfies the current caller calling control policy, transmitting, by the service caller, a second calling request corresponding to the first service to the service provider based on the registration information; receiving, by the service provider, the second calling request, and acquiring a current provider calling control policy corresponding to the first service in the service management platform; when the service provider determines that the second calling request satisfies the current provider calling control policy, calling, by the service provider, the first service based on the second calling request to return a calling return request of the first service to the service caller; and receiving, by the service caller, the calling return request of the first service to complete calling of the first service.

[0044] In the embodiments of the present disclosure, when dealing with various emergencies in a complex network environment, the prior art tends to configure flow limiting and fusing strategies on the interface services provided externally. In this way, abnormal traffic will first enter the service provider, affecting the normal invocation of the service. By implementing the embodiments of the present disclosure, the service invoker will only send the relevant invocation request to the service provider when it is determined that the current invoker invocation control strategy is met. Only the invocation request that meets the current provider invocation control strategy of the service provider will actually enter the function logic invocation of the service provider, invoke the relevant service, and implement the flow limiting and fusing mechanism that is effective for both the service provider and the invoker. When an abnormal invocation occurs, different invoker invocation control strategies and provider invocation control strategies can effectively control the invocation initiated by the invoker, further improve the usability of the application system, and avoid abnormal invocation traffic from entering the service provider.

[0045] Figure 2 An application scenario diagram of a service invocation method of a bilateral service provider according to an embodiment of the present disclosure is schematically shown.

[0046] As shown in Figure 2 The application scenario 200 according to the embodiment can include a service invocation scenario. The network 204 is a medium for providing a communication link between the first terminal device 201, the second terminal device 202, the third terminal device 203, and the server 205. The network 204 can include various connection types, such as wired, wireless communication links, or optical fiber cables, and the like.

[0047] The user can use the first terminal device 201, the second terminal device 202, and the third terminal device 203 to interact with the server 205 through the network 204 to receive or send messages, and the like. Various communication client applications can be installed on the first terminal device 201, the second terminal device 202, and the third terminal device 203, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, and the like (only as examples).

[0048] The first terminal device 201, the second terminal device 202, and the third terminal device 203 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, laptop computers, desktop computers, and the like.

[0049] The server 205 can be a server providing various services, for example, a background management server providing support for a website browsed by a user using the first terminal device 201, the second terminal device 202, and the third terminal device 203 (only as an example). The background management server can analyze and process received user requests and the like, and feed back the processing results (for example, a webpage, information, or data generated or obtained according to a user request) to the terminal device.

[0050] It should be noted that the service calling method of the bilateral service provider provided in the embodiments of the present disclosure can generally be executed by the server 205. Accordingly, the service calling device of the bilateral service provider provided in the embodiments of the present disclosure can generally be arranged in the server 205. The service calling method of the bilateral service provider provided in the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 205 and capable of communicating with the first terminal device 201, the second terminal device 202, the third terminal device 203, and / or the server 205. Accordingly, the service calling device of the bilateral service provider provided in the embodiments of the present disclosure can also be arranged in a server or a server cluster different from the server 205 and capable of communicating with the first terminal device 201, the second terminal device 202, the third terminal device 203, and / or the server 205.

[0051] It should be understood that Figure 2 The number of terminal devices, networks, and servers in the above scenario is only illustrative. According to the needs of implementation, there can be any number of terminal devices, networks, and servers.

[0052] The service calling method of the bilateral service provider provided in the embodiments of the present disclosure will be described in detail based on the scenario described above. Figure 2 Figures 3-9 The service calling method of the bilateral service provider provided in the embodiments of the present disclosure will be described in detail based on the scenario described above.

[0053] The service calling method of the bilateral service provider of the present disclosure is applied to a service calling control system, Figure 3 The structure diagram of the service calling control system according to the embodiments of the present disclosure is schematically shown.

[0054] As shown in Figure 3 The service calling control system includes three parts of a service management and control platform, a service caller, and a service provider. The service caller integrates a service caller component, the service provider integrates a service provider component, and the service management and control platform includes a service caller access management module, a service provider access management module, a service monitoring module, and a user management module. It should be noted that the bilateral service provider is the service caller and the service provider, and the service calling of the bilateral service provider is a service calling process in which the service caller and the service provider interact through the service management and control platform.

[0055] ​Service invoker component: This component needs to be integrated with the service management platform for full-duplex communication. On the one hand, it receives various data sent by the service management platform, including: (1) registration information of service providers; (2) access configuration parameters of service invokers; on the other hand, it sends service invoker registration information and monitoring information during the service invocation process to the management platform. In addition, the service invoker needs to complete the related service invocation of the service provider through the service invoker component, and the invoker invocation control strategy processing will be completed in the invoker component.

[0056] Service provider component: This component needs to be integrated with the service management platform for full-duplex communication. On the one hand, it receives various data sent by the service management platform, including: service provider access configuration parameters; on the other hand, it sends service provider registration information and monitoring information during the service provision process to the management platform. In addition, the service provider needs to complete the invocation request received through the service provider component, and the provider invocation control strategy processing will be completed in the provider component.

[0057] Invoker access management module: For invokers that need to invoke services, they need to be managed in this module, and the functions include: service invoker registration, service invocation access control, service invoker flow control, and fuse strategy configuration and pushing.

[0058] Provider access management module: For service providers that need to provide services, they need to be managed in this module, and the functions include: service provider registration, service provider access control, service provider flow control, fuse strategy configuration and pushing, and service provider information query. The service provider component will query the service provider information from the provider access management function to facilitate subsequent service invocation.

[0059] Service monitoring module: During service invocation, monitoring information of service invokers and service providers is collected, including: service invocation concurrency value, service invocation quantity statistics, service invocation success rate / failure rate statistics, and service invocation time consumption.

[0060] User management module: In this module, the use of users and related permissions of the service management platform can be managed. Including: adding new users, assigning permissions to existing users, and other module usage permissions.

[0061] Figure 4 A flowchart of a service invocation method of a bilateral service provider according to an embodiment of the disclosure is schematically shown.

[0062] Figure 5 A bilateral interaction diagram of a service invocation method of a bilateral service provider according to an embodiment of the disclosure is schematically shown.

[0063] AsFigure 4 , 5 As shown, the service invocation method of the two-sided service parties in this embodiment includes operations S410 to S450, and the service invocation method can be executed automatically.

[0064] When operating S410, the service caller initiates the first call request corresponding to the first service and obtains the registration information of the first service and the current caller call control policy from the service management platform.

[0065] The first service is the service that the service provider has registered in the service management platform, and the first call request is the call request initiated by the service caller to call the first service.

[0066] For example, such as Figure 4 As shown, taking service caller B (hereinafter referred to as caller B) calling service a as an example, service provider A (which has two providers: service provider A1 and service provider A2, hereinafter referred to as providers A1 and A2) simultaneously provides service a with a certain function. Service caller B needs to complete the relevant function by calling service a. At this time, service caller B does not know the information of providers A1 and A2, and only needs to configure the address and access information of service management platform C (hereinafter referred to as platform C). When caller B needs to call service a registered on platform C, the service caller component of caller B will initiate a call request to service a. The service caller component will obtain the registration information of relevant providers A1 and A2 and the corresponding caller call control policy from platform C.

[0067] When operating S420, if the service caller determines that the first call request meets the current caller call control policy, it sends the second call request corresponding to the first service to the service provider based on the registration information.

[0068] For example, if caller B's call request does not meet the current caller invocation control policy as determined by the service caller component, the relevant call will not actually be sent to service providers A1 or A2, and caller B will return an exception result when processing the service call. Only when the current caller invocation control policy is met, and caller B selects the appropriate service provider (e.g., provider A1) based on registration and other relevant information, will a second call request (call request A) be generated for provider A1 and service a. At this point, call request A will be sent from the service caller component to the service provider component.

[0069] When operating S430, the service provider receives the second call request and obtains the current provider call control policy corresponding to the first service in the service management platform.

[0070] Exemplarily, the service provider component receives a service invocation request from the invoker B, queries the service provider information from the provider access management function of the platform C, and obtains the corresponding provider invocation control policy of the a service.

[0071] In operation S440, when the service provider determines that the second invocation request meets the current provider invocation control policy, the first service is invoked by the service provider based on the second invocation request to return an invocation return request of the first service to the service invoker.

[0072] After receiving the invocation request, the service provider determines whether to allow the related service invocation via the service provider component, and whether the invocation request meets the current provider invocation control policy. If the conditions are met, the invocation request is transmitted to the actual invoker processing logic for subsequent processing. If the conditions are not met, an error information is returned to the service invoker.

[0073] Exemplarily, for the service provider A, after the service provider component receives the invocation request A, it is determined whether the request meets the provider invocation control policy configured on the platform C for the a service provider. Only the invocation request meeting the control policy will actually enter the function logic of the service provider A to invoke the a service. Otherwise, the a service related provider control error information is directly returned to the service invoker component of the invoker B.

[0074] In operation S450, the invocation return request of the first service is received by the service invoker to complete the invocation of the first service.

[0075] Figure 6 A registration flowchart of a service invocation method of a bilateral service provider according to an embodiment of the present disclosure is schematically shown.

[0076] As shown in Figure 6 According to an embodiment of the present disclosure, before the first invocation request corresponding to the first service is initiated by the service invoker in operation S410, the method includes operations S610-S620.

[0077] In operation S610, the invocation information corresponding to the first service is registered to the service management platform by the service provider to form the registration information corresponding to the first service.

[0078] Exemplarily, taking the invocation of the a service by the service invoker B as an example, before the a service is invoked by the service invoker B, the service provider A1 and the service provider A2 in the service provider A need to register the invocation information required for invoking the a service to the service management platform C.

[0079] At operation S620, the invoker invocation control policy and the provider invocation control policy corresponding to the first service are configured based on the registration information by the service management platform.

[0080] Exemplarily, on the platform C, the relevant invocation control policies for the a service can be configured for the provider and the invoker respectively, including but not limited to the flow limiting and fuse policies, the invocation security control policy, etc.

[0081] It is worth noting that the service provider that has been started can register the service provider to the provider access management module via the integrated service provider component. At this time, the user logs in the service management platform to see the relevant registered services and the corresponding provider environment information. The service invoker that has been started can register the invoker to the invoker access management module via the integrated service invoker component. At this time, the user logs in the service management platform to see the relevant invocation application information.

[0082] According to embodiments of the present disclosure, there can be multiple service providers for a certain service, and the invocation information required for invoking the certain service is registered to the service management platform, so as to facilitate understanding of the service providers of the certain service, so as to select a suitable service provider from the registration information when the invocation request meets the invoker invocation control policy, and improve the service invocation efficiency.

[0083] According to embodiments of the present disclosure, in operation S620, the invoker invocation control policy and the provider invocation control policy corresponding to the first service are configured based on the registration information by the service management platform, and the method comprises operations S6201-S6202.

[0084] At operation S6201, the invocation control policy of the service invoker to the service in the service invoker is configured based on the registration information by the invoker access management module, so as to obtain the invoker invocation control policy corresponding to the first service.

[0085] The invoker invocation control policy is configured for the service invoker, which is mainly for the control of the service invocation of a certain invoker, so as to avoid the traffic that does not meet the invocation condition from entering the service provider. Various invocation control policies can be configured for a certain or all service providers in the provider access management module, including whether to prohibit providing the corresponding service and the flow limiting and fuse parameters for providing the service, etc.

[0086] At operation S6202, the protection policy of the service provider in the service provider is configured based on the registration information by the provider access management module, so as to obtain the provider invocation control policy corresponding to the first service.

[0087] The service provider configuration provides a provider call control strategy, mainly to protect the service provider, to avoid requests exceeding the performance capacity from entering the service provider, and to cause the service provider to collapse. The call control strategy configuration can be performed on one or all service callers in the caller access management module, including whether to allow the call to the corresponding service and the flow limiting and fuse parameters of initiating the related call.

[0088] According to the embodiments of the present disclosure, the service caller configuration is configured to configure the caller call control strategy, mainly for the control of the service call of a certain caller, to avoid traffic that does not meet the call condition from entering the service provider, and the service provider configuration is configured to configure the provider call control strategy, mainly to protect the service provider, to avoid requests exceeding the performance capacity from entering the service provider, and to cause the service provider to collapse. Different call control strategies are adopted for different roles to improve the availability, reliability and security of the service call control system in the service call process.

[0089] According to the embodiments of the present disclosure, the caller call control strategy includes a caller flow limiting strategy, a caller fuse strategy and a caller security control strategy. The provider call control strategy includes a provider flow limiting strategy, a provider fuse strategy and a provider security control strategy.

[0090] The call control strategy covers the caller call control strategy of the caller and the provider security control strategy of the provider, which includes but is not limited to the flow limiting strategy, the fuse strategy, the security control strategy and the like.

[0091] The flow limiting strategy, the business scenarios and performance requirements of the caller and the provider are often different. For the caller, it may be necessary to limit the rate of sending requests according to its own business priority and resource allocation. In order to avoid the system from collapsing due to frequent sending of requests to the inventory service provider, it can set a suitable flow limiting strategy according to its own processing capacity, which can include but is not limited to that the service call amount within a specified time cannot be higher than x, and the call greater than the threshold is directly prompted to limit flow error. For the provider, it may need to face the requests of multiple callers, and its flow limiting strategy is more focused on the protection of overall resources. For example, the inventory service provider can limit the total request flow according to the CPU and memory usage of the server, which can include but is not limited to starting to limit the request when the usage rate reaches x%, to ensure the stability and availability of the service.

[0092] The caller can set the fuse strategy according to the quality of service and importance of the provider, and for the caller, the fuse strategy can include but is not limited to configuring an error prompt when the average response time of a service call is greater than xx seconds within a specified time, or quickly fusing the call to the service when the error rate of the service call is slightly high, and instead using the local default recommended strategy. For the provider, when the provider detects that a sub-service of itself has a failure or a serious performance decline (such as a database connection exception or a too long execution time of an algorithm), the provider can fuse the call path of the sub-service to avoid the spread of the failure, and attempt self-repair or notify the operation and maintenance personnel.

[0093] The security control strategy can include but is not limited to configuring a service disabling strategy for all service callers and providers on the platform C. For the caller, the security strategy of the caller can focus on protecting the business data and user privacy of the caller, such as discovering that a service caller B1 exists in a batch call for a short time through the service monitoring function, and then directly disabling the calling permission of the service caller B1 on the platform C, so that when B1 calls a service, a security control error is directly prompted. For example, a financial payment application as a caller sends a payment request to a bank service provider, and uses a security control strategy such as encrypted transmission and digital signature to ensure that the payment information is not stolen or tampered with. For the provider, the security strategy of the provider needs to consider more extensive factors, including preventing malicious attacks and protecting the data security of multiple callers. For example, a bank service provider uses a firewall, an intrusion detection system, and other security mechanisms to strictly authenticate and authorize the access of different callers, to ensure that only legitimate callers can access the corresponding service, and to prevent data leakage and illegal access.

[0094] In an embodiment of the present disclosure, the caller and the provider adopt corresponding caller call control strategies and provider call control strategies, decouple the call control strategies, configure respective corresponding call control strategies in different complex situations, ensure the safety of the caller and the provider, better implement fault isolation, flexibly customize related strategies in the aspects of flow limiting, fusing, and security control, optimize resource configuration, and improve resource utilization efficiency.

[0095] According to an embodiment of the present disclosure, the method includes operations S4201-S4203.

[0096] In operation S4201, the service caller component acquires service provider environment information in the service management and control platform based on the registration information.

[0097] When the service caller program logic involves calling a certain service, first determine whether the current caller calling control policy, such as whether to allow the call to be initiated and whether it is within the flow control or fuse threshold, via the service caller component, if the calling condition is met, the service provider environment information is applied to the provider access management module by the service caller component, and the subsequent service is called, if the calling condition is not met, the calling process is directly exited and an error is returned.

[0098] In operation S4202, according to the service provider environment information and the routing selection policy, the service provider corresponding to the service provider is selected by the service caller component.

[0099] Based on the obtained service provider environment information, the service caller component selects a service caller to initiate an actual service call according to the default routing selection policy or the routing selection policy implemented by the service caller itself.

[0100] In operation S4203, the service caller component generates a second call request corresponding to the first service based on the selected service provider, and sends the second call request to the service provider.

[0101] After selecting the actual service provider, the service caller component generates a service corresponding call request based on the information of the service provider, and sends the call request to the service provider, so that the service provider performs the actual call service.

[0102] According to the embodiments of the present disclosure, by considering the service provider environment information (such as server configuration, available memory, CPU performance, etc.) and the routing selection policy, the request can be directed to the service provider with sufficient resources, the resources and demand can be adapted, the dynamic resource allocation can be realized, the service quality and performance can be improved, and the reliability and fault tolerance of the system can be enhanced.

[0103] Figure 7 The call update flowchart of the service calling method of the bilateral service party according to the embodiments of the present disclosure is schematically shown.

[0104] As Figure 7 shown, according to the embodiments of the present disclosure, in operation S440, the first service is called by the service provider based on the second call request to return the call return request of the first service to the service caller, and the method comprises operations S710-S730.

[0105] In operation S710, the selected service provider is used to call the first service based on the second call request according to the function logic of the first service.

[0106] Exemplarily, after entering the provider A1, the service request A follows the service established process and function logic setting to step by step go to the specific business processing stage, to realize the complete process of corresponding service function, output expected result.

[0107] In operation S720, the provider service statistical information is updated by the service provider component, and the calling processing result of the first service is obtained.

[0108] In operation S730, the calling return request of the first service is returned to the service invoker component based on the calling processing result by the service provider component.

[0109] According to the embodiments of the present disclosure, the calling according to the function logic of the service can ensure that the implementation process of the service follows the established rules and processes. This helps to maintain the consistency and stability of the service, and avoids the functional confusion or errors caused by the randomness of the calling mode. By updating the provider service statistical information, the usage and performance of the provider service can be grasped in real time, which facilitates the adjustment of the related provider calling control strategy and the optimization of the service and the allocation of resources.

[0110] According to the embodiments of the present disclosure, in operation S450, the first service is called by the service provider based on the second calling request, and the calling return request of the first service is returned to the service invoker in operation S4501-S4502.

[0111] In operation S4501, the calling return request of the first service is received by the service invoker component.

[0112] In operation S4502, the calling invoker service statistical information is updated based on the returned calling processing result by the service invoker component, to complete the calling of the first service.

[0113] According to the embodiments of the present disclosure, by updating the calling invoker service statistical information, the usage and performance of the calling invoker service can be grasped in real time, which helps to accurately monitor the performance indicators of the service, facilitates the adjustment of the related calling invoker control strategy, avoids the resource bottleneck, and helps to improve the user experience.

[0114] Figure 8 The service monitoring flowchart of the service calling method of the bilateral service party according to the embodiments of the present disclosure is schematically shown.

[0115] As Figure 8 shown, according to the embodiments of the present disclosure, the service calling method of the present disclosure further includes monitoring the service calling situation of the service invoker and the service provider in the process of calling the service, and the monitoring process includes operations S810-S820.

[0116] At operation S810, the updated invoker service statistical information and the updated provider service statistical information are acquired by the service monitoring module to count the service statistical information.

[0117] At operation S820, the service monitoring module monitors the service invocation of the service invoker and the service provider based on the counted service statistical information.

[0118] The service invoker and the service provider send the statistical information to the service monitoring module in the service management platform for the service invocation, and the service monitoring module monitors and counts the service invocation.

[0119] According to the embodiments of the present disclosure, through the monitoring of the service statistical information, the interaction between the service invoker and the service provider can be observed in real time, faults can be found in time, and it can be accurately located whether the service invoker or the service provider has a performance bottleneck, the corresponding invocation control strategy is taken, the service quality is optimized, and the system safety is ensured.

[0120] Figure 9 A strategy adjustment flowchart of the service invocation method of the bilateral service party according to the embodiments of the present disclosure is schematically shown.

[0121] As shown in Figure 9 According to the embodiments of the present disclosure, the service invocation method of the present disclosure further comprises adjusting the invocation control strategy in the process of invoking the service, and the process comprises operations S910-S940.

[0122] At operation S910, when the service monitoring module detects that the invocation request initiated by the service invoker satisfies the strategy adjustment condition, the invoker access management module is used to retrieve the invoker corresponding to the initiated invocation request to obtain the invoker to be adjusted.

[0123] For example, when the monitoring module of the platform C monitors and finds that the request initiated from a certain invoker B1 satisfies the strategy adjustment condition (such as: the traffic is abnormally large), the invoker access management module is entered, and the corresponding invoker to be adjusted, i.e., the service invoker B1, is searched.

[0124] At operation S920, the invocation control strategy of the invoker to be adjusted is adjusted based on the service adjustment strategy by the invoker access management module.

[0125] For example, for the service adjustment strategy (such as: the flow limiting value related to the service configuration of the invocation), the invoker B1 current invoker invocation control strategy can be adjusted in the invoker access management module.

[0126] At operation S930, the invoker access management module is used to push the adjusted invocation control strategy to the service invoker component in real time.

[0127] Exemplarily, the invoker access management module of platform C pushes in real time to the service invoker component of the corresponding service invoker B1.

[0128] In operation S940, the service invoker component updates the caller invocation control policy based on the adjusted invocation control policy.

[0129] Exemplarily, at this time, the updated caller invocation control policy of invoker B1 will be the current caller invocation control policy. After the service invocation traffic of invoker B1 passes through the service invoker component, the traffic is judged according to the new flow limiting value. The traffic greater than the threshold value is directly returned with an error.

[0130] According to the embodiments of the present disclosure, by adjusting the invocation control policy in real time, when the invocation is abnormal, the abnormal traffic will not enter the service provider, avoiding the related invocation request from being sent to the service provider to affect the system performance, and improving the availability and stability of the system.

[0131] Based on the above-mentioned service invocation method of the bilateral service side, the present disclosure further provides a service invocation device of the bilateral service side. The following will be described in detail Figure 10 The device.

[0132] Figure 10 The structure block diagram of the service invocation device of the bilateral service side according to the embodiments of the present disclosure is schematically shown.

[0133] As Figure 10 shown, the service invocation device of the bilateral service side of the embodiment 1000 includes an invocation initiation unit 1010, an invoker determination unit 1020, an invocation request receiving unit 1030, a provider determination unit 1040 and a return request receiving unit 1050.

[0134] The invocation initiation unit 1010 is configured to initiate a first invocation request corresponding to a first service through a service invoker, and obtain registration information corresponding to the first service in a service management platform and a current caller invocation control policy. In an embodiment, the invocation initiation unit 1010 can be configured to perform the operation S410 described above, and details are not repeated here.

[0135] The invoker determination unit 1020 is configured to, when the service invoker determines that the first invocation request meets the current caller invocation control policy, send a second invocation request corresponding to the first service to a service provider based on the registration information through the service invoker. In an embodiment, the invoker determination unit 1020 can be configured to perform the operation S420 described above, and details are not repeated here.

[0136] The invocation request receiving unit 1030 is configured to receive, by the service provider, a second invocation request, and obtain a current provider invocation control policy corresponding to the first service in the service management platform. In an embodiment, the invocation request receiving unit 1030 can be configured to perform the operation S430 described above, and details are not repeated here.

[0137] The provider determining unit 1040 is configured to, when the service provider determines that the second invocation request meets the current provider invocation control policy, invoke, by the service provider, the first service based on the second invocation request, to return an invocation return request of the first service to the service invoker. In an embodiment, the provider determining unit 1040 can be configured to perform the operation S440 described above, and details are not repeated here.

[0138] The return request receiving unit 1050 is configured to receive, by the service invoker, the invocation return request of the first service, to complete the invocation of the first service. In an embodiment, the return request receiving unit 1050 can be configured to perform the operation S450 described above, and details are not repeated here.

[0139] According to an embodiment of the present disclosure, the service management platform includes an invoker access management module and a provider access management module, and the registration unit 1060 includes: a first registration sub-unit configured to configure, by the invoker access management module, an invocation control policy of a service invoker in the service invoker to the service based on the registration information, to obtain an invoker invocation control policy corresponding to the first service; and a second registration sub-unit configured to configure, by the provider access management module, a protection policy of a service provider in the service provider based on the registration information, to obtain a provider invocation control policy corresponding to the first service.

[0140] According to an embodiment of the present disclosure, the invoker invocation control policy includes an invoker flow limiting policy, an invoker fuse policy and an invoker security control policy; and the provider invocation control policy includes a provider flow limiting policy, a provider fuse policy and a provider security control policy.

[0141] According to an embodiment of the present disclosure, the service invoker includes a service invoker component, and the invoker determining unit 1020 includes: a first invoker determining sub-unit configured to obtain, by the service invoker component, service provider environment information in the service management platform based on the registration information; a second invoker determining sub-unit configured to select, by the service invoker component, a corresponding service provider in the service provider according to the service provider environment information and a routing selection policy; and a third invoker determining sub-unit configured to generate, by the service invoker component, a second invocation request corresponding to the first service based on the selected service provider, and send the second invocation request to the service provider.

[0142] According to an embodiment of the present disclosure, the service provider comprises a service provider component, the provider determining unit 1040 comprises: a first provider determining subunit configured to utilize the selected service provider to invoke the first service according to the function logic of the first service based on the second invocation request; a second provider determining subunit configured to update the provider service statistical information through the service provider component and obtain the invocation processing result of the first service; and a third provider determining subunit configured to utilize the service provider component to return the invocation return request of the first service to the service invoker component based on the invocation processing result.

[0143] According to an embodiment of the present disclosure, the return request receiving unit 1050 comprises: a first return request receiving subunit configured to receive the invocation return request of the first service through the service invoker component; and a second return request receiving subunit configured to utilize the service invoker component to update the invoker service statistical information based on the returned invocation processing result to complete the invocation of the first service.

[0144] According to an embodiment of the present disclosure, the service management platform further comprises a service monitoring module, and the device further comprises: a service monitoring unit 1070 configured to obtain the updated invoker service statistical information and the updated provider service statistical information through the service monitoring module to count the service statistical information; and utilize the service monitoring module to monitor the service invocation situation of the service invoker and the service provider based on the counted service statistical information.

[0145] According to an embodiment of the present disclosure, the device further comprises: a policy adjusting unit 1080 configured to, when the service monitoring module detects that the invocation request initiated by the service invoker satisfies the policy adjusting condition, retrieve the invoker corresponding to the initiated invocation request through the invoker access management module to obtain a to-be-adjusted invoker; adjust the invocation control policy of the to-be-adjusted invoker based on the service adjustment policy through the invoker access management module; utilize the invoker access management module to push the adjusted invocation control policy to the service invoker component in real time; and update the invoker invocation control policy based on the adjusted invocation control policy through the service invoker component.

[0146] According to an embodiment of the present disclosure, any multiple modules of the call initiation unit 1010, the caller determination unit 1020, the call request receiving unit 1030, the provider determination unit 1040, the return request receiving unit 1050, the registration unit 1060, the service monitoring unit 1070 and the policy adjustment unit 1080 can be combined in one module, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of the modules can be combined with at least part of the functions of other modules, and implemented in one module. According to an embodiment of the present disclosure, at least one of the call initiation unit 1010, the caller determination unit 1020, the call request receiving unit 1030, the provider determination unit 1040, the return request receiving unit 1050, the registration unit 1060, the service monitoring unit 1070 and the policy adjustment unit 1080 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application specific integrated circuit (ASIC), or any other reasonable manner of hardware or firmware by integrating or packaging the circuit, or implemented in any one of software, hardware and firmware or in a proper combination of any of them. Alternatively, at least one of the call initiation unit 1010, the caller determination unit 1020, the call request receiving unit 1030, the provider determination unit 1040, the return request receiving unit 1050, the registration unit 1060, the service monitoring unit 1070 and the policy adjustment unit 1080 can be at least partially implemented as a computer program module which can perform the corresponding functions when the computer program module is run.

[0147] Figure 11 A block diagram of an electronic device suitable for implementing the service calling method of the bilateral service provider according to an embodiment of the present disclosure is schematically shown.

[0148] As shown in Figure 11 The electronic device 1100 according to an embodiment of the present disclosure includes a processor 1101 which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1102 or loaded from a storage portion 1108 into a random access memory (RAM) 1103. The processor 1101 can include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset, and / or a special-purpose microprocessor (e.g., an application specific integrated circuit (ASIC)), and the like. The processor 1101 can also include an on-board memory for cache use. The processor 1101 can include a single processing unit or a plurality of processing units for performing different actions of the method processes according to an embodiment of the present disclosure.

[0149] In the RAM 1103, various programs and data required for the operation of the electronic device 1100 are stored. The processor 1101, the ROM 1102, and the RAM 1103 are connected to each other via the bus 1104. The processor 1101 performs various operations of the method flow according to the embodiments of the present disclosure by executing the programs in the ROM 1102 and / or the RAM 1103. It should be noted that the programs can also be stored in one or more memories other than the ROM 1102 and the RAM 1103. The processor 1101 can also perform various operations of the method flow according to the embodiments of the present disclosure by executing the programs stored in the one or more memories.

[0150] According to embodiments of the present disclosure, the electronic device 1100 can further include an input / output (I / O) interface 1105, which is also connected to the bus 1104. The electronic device 1100 can further include one or more of the following components connected to the input / output (I / O) interface 1105: an input part 1106 including a keyboard, a mouse, and the like; an output part 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage part 1108 including a hard disk, and the like; and a communication part 1109 including a network interface card such as a LAN card, a modem, and the like. The communication part 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the input / output (I / O) interface 1105 as necessary. A removable medium 1111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the drive 1110 as necessary, so that a computer program read therefrom is installed in the storage part 1108 as necessary.

[0151] The present disclosure also provides a computer readable storage medium, which can be included in the device / apparatus / system described in the above embodiments; or can exist separately without being assembled into the device / apparatus / system. The above computer readable storage medium carries one or more programs, when the one or more programs are executed, the method according to the embodiments of the present disclosure is implemented.

[0152] According to an embodiment of the present disclosure, the computer readable storage medium can be a nonvolatile computer readable storage medium, for example, can include, but is not limited to, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination thereof. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, the computer readable storage medium can include one or more memories, such as the ROM 1102 and / or the RAM 1103 described above, and / or one or more memories other than the ROM 1102 and the RAM 1103.

[0153] An embodiment of the present disclosure further includes a computer program product including a computer program containing program codes for executing the methods shown in the flowcharts. When the computer program product is run in a computer system, the program codes are used to make the computer system implement the service calling method of the bilateral service provider provided by the embodiments of the present disclosure.

[0154] The above-described functions defined in the system / device of the embodiments of the present disclosure are performed when the computer program is executed by the processor 1101. According to an embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by computer program modules.

[0155] In one embodiment, the computer program can rely on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program can also be transmitted, distributed, and downloaded in the form of a signal on a network medium, and be downloaded and installed through the communication part 1109, and / or installed from the detachable medium 1111. The program codes contained in the computer program can be transmitted by any appropriate network medium, including but not limited to wireless, wired, etc., or any appropriate combination thereof.

[0156] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1109, and / or installed from the detachable medium 1111. When the computer program is executed by the processor 1101, the above-described functions defined in the system of the embodiments of the present disclosure are performed. According to an embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by computer program modules.

[0157] According to embodiments of the present disclosure, program code of the computer programs provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages, and specifically, these computer programs can be implemented using a high-level procedural and / or object-oriented programming language, and / or an assembly / machine language. The programming language includes, but is not limited to, a programming language such as Java, C++, Python, "C" language, or a similar programming language. The program code can be executed entirely on a user computing device, partially on a user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case involving a remote computing device, the remote computing device can be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, connected to the Internet through an Internet service provider).

[0158] The flow diagrams and the block diagrams in the drawings are illustrations of possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.

[0159] Those skilled in the art will understand that features recited in the various embodiments of the present disclosure can be combined and / or integrated in a variety of ways, even if such combinations or integrations are not expressly noted in the present disclosure. In particular, features recited in the various embodiments of the present disclosure can be combined and / or integrated in a variety of ways without departing from the spirit and teachings of the present disclosure. All such combinations and / or integrations are within the scope of the present disclosure.

[0160] The embodiments of the present disclosure are described above. However, these embodiments are merely for illustrative purposes, and are not intended to limit the scope of the present disclosure. Although each embodiment is described above separately, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Those skilled in the art can make various substitutions and modifications without departing from the scope of the present disclosure, and these substitutions and modifications should all fall within the scope of the present disclosure.

Claims

1. A service invocation method with two service providers, applied to a service invocation control system, characterized in that, The service invocation control system comprises a service invoker, a service provider and a service management platform, and the method comprises the following steps: initiating, by the service invoker, a first invocation request corresponding to a first service, and obtaining registration information of the first service in the service management platform and a current invoker invocation control policy; when the service invoker determines that the first invocation request meets the current invoker invocation control policy, sending, by the service invoker, a second invocation request corresponding to the first service to the service provider based on the registration information; receiving, by the service provider, the second invocation request, and obtaining a current provider invocation control policy of the first service in the service management platform; when the service provider determines that the second invocation request meets the current provider invocation control policy, invoking, by the service provider, the first service based on the second invocation request, so as to return an invocation return request of the first service to the service invoker; and receiving, by the service invoker, the invocation return request of the first service, so as to complete the invocation of the first service.

2. The method of claim 1, wherein, Before the step of initiating, by the service invoker, a first invocation request corresponding to a first service, the method further comprises the following steps: registering, by the service provider, invocation information corresponding to the first service to the service management platform, so as to form registration information of the first service; and configuring, by the service management platform, an invoker invocation control policy and a provider invocation control policy corresponding to the first service based on the registration information.

3. The method of claim 2, wherein, The service management platform comprises an invoker access management module and a provider access management module, and the step of configuring, by the service management platform, an invoker invocation control policy and a provider invocation control policy corresponding to the first service based on the registration information comprises the following steps: configuring, by the invoker access management module, an invocation control policy of a service invoker in the service invoker based on the registration information, so as to obtain an invoker invocation control policy corresponding to the first service; and configuring, by the provider access management module, a protection policy of a service provider in the service provider based on the registration information, so as to obtain a provider invocation control policy corresponding to the first service.

4. The method of claim 3, wherein, The invoker invocation control policy comprises an invoker flow limiting policy, an invoker fuse policy and an invoker security control policy; and The provider invocation control policy comprises a provider flow limiting policy, a provider fuse policy and a provider security control policy.

5. The method of claim 1, wherein, The service invoker comprises a service invoker component, and the step of sending, by the service invoker, a second invocation request corresponding to the first service to the service provider based on the registration information comprises the following steps: obtaining, by the service invoker component, service provider environment information in the service management platform based on the registration information; selecting, by the service invoker component, a corresponding service provider in the service provider according to the service provider environment information and a routing selection policy; and The service invoker component is used to generate a second invocation request corresponding to the first service based on the selected service provider, and send the second invocation request to the service provider.

6. The method of claim 5, wherein, The service provider includes a service provider component, and the first service is invoked based on the second invocation request through the service provider to return an invocation return request of the first service to the service invoker. The first service is invoked based on the second invocation request through the selected service provider according to the function logic of the first service; The service provider component is used to update the provider service statistical information and obtain the invocation processing result of the first service; and The service provider component is used to return the invocation return request of the first service to the service invoker component based on the invocation processing result.

7. The method according to any one of claims 1 to 6, characterized in that, The service invoker is used to receive the invocation return request of the first service to complete the invocation of the first service, including: The service invoker component is used to receive the invocation return request of the first service; and The service invoker component is used to update the invoker service statistical information based on the returned invocation processing result to complete the invocation of the first service.

8. The method of claim 7, wherein, The service management platform further includes a service monitoring module, and the method further includes: The service monitoring module is used to obtain the updated invoker service statistical information and the updated provider service statistical information to count the service statistical information; and The service monitoring module is used to monitor the service invocation of the service invoker and the service provider based on the counted service statistical information.

9. The method according to claim 3 or 8, characterized in that, The method further includes: When the service monitoring module detects that the invocation request initiated by the service invoker meets a policy adjustment condition, the invoker access management module is used to retrieve the invoker corresponding to the initiated invocation request to obtain a to-be-adjusted invoker; The invoker access management module is used to adjust the invocation control policy of the to-be-adjusted invoker based on a service adjustment policy; The invoker access management module is used to push the adjusted invocation control policy to the service invoker component in real time; and The service invoker component is used to update the invoker invocation control policy based on the adjusted invocation control policy.

10. A service invocation apparatus of a bilateral service provider, characterized by comprising: The apparatus includes: An invocation initiation unit is configured to initiate a first invocation request corresponding to a first service through a service invoker, and obtain registration information corresponding to the first service and a current invoker invocation control policy in a service management platform; A service invoker determination unit is configured to, when the service invoker determines that the first invocation request meets the current invoker invocation control policy, send a second invocation request corresponding to the first service to a service provider based on the registration information through the service invoker; An invocation request receiving unit is configured to receive the second invocation request through the service provider, and obtain a current provider invocation control policy corresponding to the first service in the service management platform; The service provider determines that the second invocation request satisfies the current provider invocation control policy, the service provider invokes the first service based on the second invocation request to return an invocation return request of the first service to the service invoker; and The return request receiving unit receives the invocation return request of the first service with the service invoker to complete the invocation of the first service. 11.An electronic device comprising: one or more processors; memory storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1-9.

12. A computer readable storage medium having stored thereon a computer program or instructions, characterized in that, The computer program or instruction is executed by the processor to implement the steps of the method according to any one of claims 1-9.

13. A computer program product comprising computer programs or instructions, characterized in that, The computer program or instruction is executed by the processor to implement the steps of the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Service calling method, device and system based on block chain and electronic equipment

    CN114866615A

  • Cross-cloud service calling method and system, electronic equipment and storage medium

    CN118283106A