Cross-bus cluster service calling method and device, equipment and storage medium

By developing and implementing Apisix gateway plugins and authentication mechanisms, the problems of complex network policies and high security risks in cross-city bus calls have been solved. This has enabled simplified network policies and improved security for cross-bus cluster service calls, thereby enhancing operational efficiency.

CN120915850APending Publication Date: 2025-11-07DIGITAL GUANGDONG NETWORK CONSTR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511017038.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

In the government sector, cross-city data service bus calls present challenges such as complex network policies, high security risks, and difficult operation and maintenance. In particular, when the requester needs to access services in other locations, it is necessary to connect multiple bus node entry points, which leads to complex network management and does not comply with security management regulations.

Method used

Plugin development utilizes the Apisix gateway. By determining whether the requester and target service are registered in the same city, and verifying this using unique identifiers and digital signatures, cross-bus cluster service calls are enabled. For requests within the same city, service data is directly forwarded; for requests from other cities, the requests are forwarded through the bus entry point to the Apisix gateway in the registered city for processing, simplifying network policies and improving security.

Benefits of technology

It enables cross-bus cluster service calls without needing to open up the bus node entry points for each requester in all cities. The network policy is simple and highly secure. Furthermore, the data service bus management terminal enables centralized management and dynamic configuration synchronization of data service buses in various cities, improving operation and maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120915850A_ABST
    Figure CN120915850A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-bus cluster service calling method and device, equipment and a storage medium. Performing plug-in development based on an open source gateway Apix, when the city where a requester is located is a local city, judging whether the registration place of a target service to be called by the service calling request is the local city, if so, forwarding the service calling request to a target application programming interface corresponding to the target service on a local bus, and if not, forwarding the target application programming interface to the requester; if yes, the service calling request is forwarded to a bus entry of a service registration place, and if not, the service calling request is forwarded to a target application programming interface corresponding to a target service on a local bus by an Apix gateway in a bus cluster of the registration place, and the service calling request is forwarded to the target application programming interface corresponding to the target service on the local bus by the Apix gateway in the bus cluster of the registration place. And forwarding the service data returned by the target application programming interface to the requester. When the cross-bus cluster calling service is carried out, bus node entrances of all cities do not need to be opened for each requester, the network strategy is simple, and the security is high.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the communication technology, and particularly relates to a service calling method, device and equipment of cross-bus cluster and storage medium. BACKGROUND

[0002] With the development of the government industry, the role of the data service bus is more and more important. The service provider registers the service on the bus, and the service requester calls the service through the bus. The requester and the service constitute a service-publishing relationship, and the requester and the service constitute a service-subscribing relationship. The communication between the services is very frequent and complex, and the management and control of these communications are usually carried out through the bus.

[0003] In actual business, each city has an independent bus cluster. The requester of the local city can only access the bus cluster of the local city, and can only access the service on the bus cluster of the local city through the local bus cluster. The service provider of the local city can only connect the service to the bus cluster of the local city.

[0004] If the requester X of A city wants to access the service provided by the provider Y of B city, usually, the requester X needs to access the bus node entrance of B city. However, due to the complexity of the cross-city network, the opening strategy needs to pass through the layer-by-layer approval of the security side, and does not conform to the safety management regulations. Once there are many requesters, the network strategy is very complex, and it is difficult to maintain, and there is a security risk. SUMMARY

[0005] The present application provides a service calling method, device and equipment of cross-bus cluster and storage medium, which simplifies the network strategy and improves the network security.

[0006] In a first aspect, the present application provides a service calling method of cross-bus cluster, which is applied to an Apisix gateway in a bus cluster. The method comprises the following steps:

[0007] In response to a service calling request issued by a requester, it is judged whether the city where the requester is located is a local city;

[0008] When the city where the requester is located is a local city, it is judged whether the registration place of a target service to be called by the service calling request is a local city;

[0009] When the registration place of the target service is a local city, the service calling request is forwarded to a target application programming interface corresponding to the target service on a local bus, and service data returned by the target application programming interface is forwarded to the requester;

[0010] When the registration place of the target service is not the local city, the registration place of the target service is found, and the service call request is forwarded to the bus portal of the registration place, and the step of forwarding the service call request to the target application programming interface corresponding to the target service on the local bus by the Apisix gateway in the bus cluster of the registration place and forwarding the service data returned by the target application programming interface to the requester is performed.

[0011] Optionally, the service call request comprises a unique identity of the requester, the unique identity of the requester is associated with the cluster identifier of the bus cluster in the city where the requester is located, and the step of determining whether the registration place of the target service to be called by the service call request is the local city comprises:

[0012] determining the cluster identifier of the bus cluster in the city where the requester is located based on the unique identity of the requester;

[0013] determining whether the cluster identifier of the current bus cluster is consistent with the cluster identifier of the bus cluster in the city where the requester is located;

[0014] if yes, it is determined that the city where the requester is located is the local city;

[0015] if no, it is determined that the city where the requester is located is not the local city.

[0016] Optionally, the service call method across bus clusters further comprises:

[0017] when the city where the requester is located is not the local city, prompting information that the requester does not belong to the local bus cluster is returned to the requester, and the service call process is ended.

[0018] Optionally, the service call request comprises a target interface path of a target application programming interface corresponding to a target service to be called, the target interface path is associated with a cluster identifier of a bus cluster in a city where the target service is located, and the step of determining whether the registration place of the target service to be called by the service call request is the local city comprises:

[0019] determining the cluster identifier of the bus cluster in the city where the target service is located based on the target interface path;

[0020] determining whether the cluster identifier of the current bus cluster is consistent with the cluster identifier of the bus cluster in the city where the target service is located;

[0021] if yes, it is determined that the city where the target service is located is the local city;

[0022] if no, it is determined that the city where the target service is located is not the local city.

[0023] Optionally, when the service party registers, a globally unique interface identifier is used to replace the interface path of the service party, and the service call request is forwarded to a target application programming interface corresponding to the target service on the local bus, comprising:

[0024] According to the globally unique interface identifier of the target service, the interface path of the target application programming interface of the target service is found;

[0025] Based on the interface path of the target application programming interface, the service call request is forwarded to the target application programming interface corresponding to the target service on the local bus.

[0026] Optionally, the service call request includes a digital signature of the request party, and when the city where the request party is located is a local city, it further includes:

[0027] The digital signature is verified by using the public key obtained from the request party;

[0028] When the verification is passed, the step of judging whether the registration place of the target service to be called by the service call request is a local city is executed;

[0029] When the verification is not passed, the request party is returned with prompt information that the digital signature is incorrect, and the service call process is ended.

[0030] Optionally, when the city where the request party is located is a local city, it further includes:

[0031] Judge whether the request party has the right to call the target service;

[0032] When the request party has the right to call the target service, the step of judging whether the registration place of the target service to be called by the service call request is a local city is executed;

[0033] When the request party does not have the right to call the target service, the request party is returned with prompt information that the request party does not have the right to call the target service, and the service call process is ended.

[0034] In a second aspect, the application further provides a service call device of a bus cluster, which is applied to an Apisix gateway in the bus cluster, and the device comprises:

[0035] The first judging module is used to judge whether the city where the request party is located is a local city in response to the service call request issued by the request party;

[0036] The second judging module is used to judge whether the registration place of the target service to be called by the service call request is a local city when the city where the request party is located is a local city;

[0037] The first request forwarding module is configured to, when the registration place of the target service is a local city, forward the service call request to a target application programming interface corresponding to the target service on a local bus, and forward service data returned by the target application programming interface to the requester;

[0038] The second request forwarding module is configured to, when the registration place of the target service is not a local city, find the registration place of the target service, and forward the service call request to a bus entrance of the registration place, and perform the steps of forwarding the service call request to a target application programming interface corresponding to the target service on a local bus by an Apisix gateway in a bus cluster of the registration place, and forwarding service data returned by the target application programming interface to the requester.

[0039] In a third aspect, the present application further provides an electronic device, comprising:

[0040] one or more processors;

[0041] a storage device configured to store one or more programs;

[0042] When the one or more programs are executed by the one or more processors, the one or more processors implement the service call method across the bus cluster as provided in the first aspect of the present application.

[0043] In a fourth aspect, the present application further provides a computer readable storage medium having a computer program stored thereon, which is executed by a processor to implement the service call method across the bus cluster as provided in the first aspect of the present application.

[0044] The application provides a service calling method across bus clusters, plugin development is carried out based on an open source gateway Apisix, the Apisix gateway is deployed on a bus of the bus clusters, in response to a service calling request issued by a requester, it is judged whether a city where the requester is located is a local city, when the city where the requester is located is the local city, it is judged whether a registration place of a target service to be called by the service calling request is the local city, when the registration place of the target service is the local city, the service calling request is forwarded to a target application programming interface corresponding to the target service on a local bus, and service data returned by the target application programming interface is forwarded to the requester, when the registration place of the target service is not the local city, the registration place of the target service is found, the service calling request is forwarded to a bus entrance of the registration place, and the Apisix gateway in the bus cluster of the registration place is used to execute the steps of forwarding the service calling request to the target application programming interface corresponding to the target service on the local bus, and forwarding service data returned by the target application programming interface to the requester. When the service is called across the bus clusters, it is not necessary to pass through bus node entrances of all cities for each requester, the network strategy is simple, and the safety is high. In addition, a plurality of bus nodes of different cities can be managed through a data service bus management end, centralized management of data service buses of the cities and dynamic synchronization of configurations of the cities are realized, and the operation and maintenance efficiency is improved.

[0045] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the application, nor is it used to limit the scope of the application. Other features of the application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments description. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can also be obtained by those skilled in the art without any creative effort based on these drawings.

[0047] Figure 1 A bus cluster deployment relationship diagram provided by the application;

[0048] Figure 2 A flowchart of a service calling method across bus clusters provided by the application;

[0049] Figure 3 A structural schematic diagram of a service calling device across bus clusters provided by the application;

[0050] Figure 4 A structural schematic diagram of an electronic device provided by the embodiments of the application.

[0051] The specific embodiments of the present application have been shown and described in the above drawings, and will be described in more detail hereinafter. These drawings and descriptions are not intended to limit the scope of the present application concept in any way, but to illustrate the present application concept to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0052] In order to make the technical personnel in the art better understand the present application scheme, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.

[0053] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0054] The acquisition, storage, use, processing, etc. of data in the technical solutions of the present application all comply with the relevant provisions of national laws and regulations.

[0055] Figure 1 The bus cluster deployment relationship diagram provided by the present application is shown in Figure 1 Each city bus cluster constitutes a mesh structure that can visit each other, and is used for service access across bus clusters. In some embodiments of the present application, the province bus cluster has the same status as each city bus cluster, that is, the province bus cluster is equivalent to a city bus cluster.

[0056] In the embodiment of the application, the Apisix gateway is deployed on the bus of each bus cluster, and a management interface of the Apisix gateway is encapsulated to form an SDK (Software Development Kit) data service bus management end calling SDK interface to realize CRUD (Create, Read, Update and Delete) functions of request parties, routes, service providers and plug-in data, and realize functions such as service registration, application registration and service subscription of the application (including the request party and the service provider) to the Apisix bus through the SDK. Apisix is an open source scalable gateway, which provides a plug-in function and can be extended to solve the problem of customized personalized functions, avoid repeated development of a framework of a high-level language, and reduce the cost and difficulty of maintenance and the risk of performance reduction if a high-level language such as JAVA is used for development.

[0057] The etcd serves as a data storage middleware and a configuration center, and saves all application, route and authorization configuration information. All city bus clusters are centered on the etcd to form a star structure and are used to read and synchronize configuration information from the etcd.

[0058] The existing scheme using an Nginx type web proxy service static route mapping has the following problems. Firstly, the static mapping technology is limited by the number of service resources, and each server needs to be configured one by one. Once the configuration of the B city is adjusted, all Nginx of the A city needs to be adjusted at the same time, which is not convenient for operation and maintenance. Secondly, when the number of interfaces connected across the bus is too large, the Nginx configuration is increased by several times, which is also not convenient for maintenance. Thirdly, due to the characteristics of Nginx, the corresponding SDK and API cannot be called by the application to interact with the management end, and the management end cannot be dynamically added or deleted, but the configuration file needs to be frequently modified manually, which is not convenient for operation and maintenance. The dynamic configuration of the service target cannot be met, and the configuration workload is large. The Apisix gateway plug-in scheme adopted by the application can dynamically read and synchronize configuration information through the etcd to realize dynamic synchronization of the configuration of each city and improve the operation and maintenance efficiency.

[0059] Figure 2 A flowchart of a service calling method across bus clusters is provided in the application. The embodiment can be applied to service calling across bus clusters through the Apisix gateway. The method can be executed by a service calling device across bus clusters provided by the application. The device can be realized by software and / or hardware, and is usually configured in an electronic device, such as the one shown in the figure. Figure 2 The service calling method across bus clusters includes the following steps.

[0060] S101, in response to a service calling request issued by a request party, it is judged whether the city where the request party is located is the local city.

[0061] For example, requester A sends a service call request to the bus of bus cluster X. The Apisix gateway of bus cluster X responds to the service call request by determining whether the city where requester A is located is a local city. If the city where requester A is located is a local city, step S102 is executed. If the city where requester A is located is not a local city, a message indicating that the requester does not belong to the local bus cluster is returned to the requester, and the service call process ends.

[0062] Both service requesters and service providers need to register on the bus and will obtain three business attributes: paasid, paastoken, and the cluster identifier (clusterid) of their respective bus cluster. The paasid is the unique identifier of the requester, and the paastoken is the requester's private key, used to generate a digital signature according to the agreed-upon signature algorithm. Service requesters use the paasid and paastoken for subsequent digital signature verification. Since the service registration management process needs to identify which service provider published the service, the corresponding service provider's paasid needs to be recorded during service registration. Because each requester can only belong to one city and can only directly access the bus of its own bus cluster, the cluster identifier (clusterid) of its bus cluster is also recorded for subsequent verification. Furthermore, in this embodiment of the invention, a global plugin called gateway-auth is developed to add three attributes: paasid, paastoken, and clusterid, for storing these attributes. The plugin's function is to perform digital signature verification.

[0063] After completing the development of the bus authentication, bus authorization, and routing forwarding plugins, install the plugins on the Apisix gateway and configure them. Restart the Apisix gateway to make the plugins effective. You can configure the plugins in the corresponding scope (global or route) using the curl command, or configure the relevant parameters of the plugins on the official Apisix management interface (apisix-dashboard), and configure the default service entry route and cross-node forwarding entry routes for each city.

[0064] For example, the service invocation request includes a unique identity (passid) of the requestor A, and the unique identity (paasid) of the requestor is associated with a cluster identifier (clusterid) of a bus cluster in the city where the requestor is located. In an embodiment of the present application, the cluster identifier (clusterid) associated with the unique identity (passid) of the requestor A can be found, that is, the cluster identifier (clusterid) of the bus cluster in the city where the requestor A is located. In addition, the service invocation request further includes a bus request entry address (for example, 10.2.3.4:9080 / http / invoke) of the bus cluster X, and the request entry address is associated with the cluster identifier (clusterid) of the bus cluster X. The cluster identifier (clusterid) of the bus cluster in the city where the requestor A is located is compared with the cluster identifier (clusterid) of the bus cluster X receiving the request, to determine whether the cluster identifier (clusterid) of the current bus cluster X (that is, the bus cluster receiving the request) is consistent with the cluster identifier (clusterid) of the bus cluster in the city where the requestor A is located. If yes, it is determined that the city where the requestor A is located is the local city; if no, it is determined that the city where the requestor A is located is not the local city.

[0065] In some embodiments of the present application, the service invocation request includes a digital signature of the requestor, which is generated by using a signature algorithm with a private key passtoken of the requestor. At the same time, the requestor pre-distributes a public key to the Apisix gateway of each bus cluster. When the Apisix gateway of the bus cluster receives the service invocation request and confirms that the city where the requestor is located is the local city, the public key is used to verify the digital signature, and when the verification is passed, step S102 is performed. When the verification is not passed, a prompt information that the digital signature is incorrect is returned to the requestor, and the service invocation process is ended.

[0066] The digital signature verification is used to verify the authenticity and integrity of the service invocation request, to verify whether the service invocation request is indeed from the claimed sender and has not been tampered with in the transmission process. For example, the requestor generates a digest of the service invocation request using a hash algorithm, encrypts the digest using a private key to generate a digital signature, and sends the original service invocation request data and the digital signature together. After receiving the service invocation request, the Apisix gateway generates a digest of the received original service invocation request data using the same hash algorithm, decrypts the digital signature using the public key of the requestor to obtain the original digest, and then compares whether the two digests are consistent. If consistent, the verification is passed; if not consistent, the verification fails.

[0067] In some embodiments of the present application, when it is confirmed that the city where the requestor is located is the local city, it is determined whether the requestor has the permission to call the target service, and when the requestor has the permission to call the target service, step S102 is executed; when the requestor does not have the permission to call the target service, prompt information that the requestor does not have the permission to call the target service is returned to the requestor, and the service calling process is ended.

[0068] It should be noted that the above digital signature verification process and the calling permission verification process can verify one of them, or both, and when both are verified, the order of the digital signature verification and the calling permission verification is not limited, and the digital signature can be verified first, or the calling permission can be verified first, which is not limited in the embodiments of the present application.

[0069] S102, it is determined whether the registration place of the target service to be called by the service calling request is the local city.

[0070] When the city where the requestor A is located is the local city, it is determined whether the registration place of the target service to be called by the service calling request is the local city. If yes, step S103 is executed, and if no, step S104 is executed.

[0071] For example, in some embodiments of the present application, the service calling request further includes a target interface path (for example, 10.1.2.3:9090 / a / b / c) of a target application programming interface corresponding to the target service to be called, and the interface path is associated with the cluster identifier (clusterid) of the bus cluster of the target service registration place. In the embodiments of the present application, the cluster identifier (clusterid) of the bus cluster of the city where the target service is located is determined based on the target interface path, and is compared with the cluster identifier (clusterid) of the bus cluster X (i.e. the current bus cluster) receiving the request, to determine whether the cluster identifier (clusterid) of the current bus cluster is consistent with the cluster identifier (clusterid) of the bus cluster of the city where the target service is located. If yes, it is determined that the city where the target service is located is the local city; if no, it is determined that the city where the target service is located is not the local city.

[0072] In some embodiments of the present application, in order to avoid interface path exposure and improve security, a globally unique interface identifier is used to replace the target interface path. For example, for a service provider, when the operator registers the service through the data service bus management terminal, a globally unique serviceId is obtained. A custom plug-in is developed to save the serviceId, which is used to find the original corresponding interface path according to the serviceId in subsequent plug-ins. The bus provides only one calling method, which uses a globally unified entry path and x-tif-serviceId to call the interface, and the plug-in must have the application programming interface (API) and path of the corresponding service according to the x-tif-serviceId. For example, a service provider registers an API with the actual path 10.1.2.3:9090 / a / b / c. After registering through the bus management terminal, a route is formed, and the globally unique interface identifier is S01. The above information is recorded on the route, and the request entry of the data service bus is 10.2.3.4:9080. The configured unified entry address is / http / invoke. If the unified entry path and x-tif-serviceId are used to call the interface, the request address is 10.2.3.4:9080 / http / invoke. At this time, the x-tif-serviceId needs to be added to the request header, and the value is S01.

[0073] S103, forwarding the service call request to the target application programming interface corresponding to the target service on the local bus, and forwarding the service data returned by the target application programming interface to the requester.

[0074] When the registration place of the target service is the local city, the service call request is forwarded to the target application programming interface corresponding to the target service on the local bus, and the service data returned by the target application programming interface is forwarded to the requester.

[0075] For example, in the embodiments of the present application, when the registration place of the target service is the local city, the target interface path of the target application programming interface is found according to the globally unique interface identifier of the target application programming interface, and then the service call request is forwarded to the target application programming interface corresponding to the target service on the local bus based on the target interface path. The target service receives the service call request through the target application programming interface, and responds to the service call request by returning the service data through the target application programming interface. The Apisix gateway forwards the service data to the requester.

[0076] S104, finding the registration place of the target service, and forwarding the service call request to the bus entry of the registration place.

[0077] When it is confirmed that the registration place of the target service is not the local city, the registration place of the target service is found, and the Apisix gateway in the bus cluster of the registration place is used to forward the service call request to the target application programming interface corresponding to the target service on the local bus, and forward the service data returned by the target application programming interface to the requester.

[0078] For example, when it is confirmed that the registration place of the target service is not the local city, the target interface path of the target application programming interface is found according to the globally unique interface identifier of the target application programming interface, and then the cluster identifier (clusterid) of the bus cluster of the registration place of the target service is determined, and the service call request is forwarded to the bus entrance of the registration place. The Apisix gateway in the bus cluster of the registration place is used to forward the service call request to the target application programming interface corresponding to the target service on the local bus, and forward the service data returned by the target application programming interface to the requester.

[0079] The service call method across bus clusters provided by the application is based on the open source gateway Apisix for plug-in development. The Apisix gateway is deployed on the bus of the bus cluster. In response to a service call request issued by a requester, it is determined whether the city where the requester is located is a local city. When the city where the requester is located is a local city, it is determined whether the registration place of a target service to be called by the service call request is a local city. When the registration place of the target service is a local city, the service call request is forwarded to a target application programming interface corresponding to the target service on a local bus, and service data returned by the target application programming interface is forwarded to the requester. When the registration place of the target service is not a local city, the registration place of the target service is found, and the service call request is forwarded to the bus entrance of the registration place. The Apisix gateway in the bus cluster of the registration place is used to forward the service call request to the target application programming interface corresponding to the target service on the local bus, and forward the service data returned by the target application programming interface to the requester. When the service is called across the bus cluster, it is not necessary to open all bus node entrances of all cities for each requester, the network strategy is simple, and the security is high. In addition, a plurality of bus nodes in different cities can be managed by a data service bus management terminal, centralized management of data service buses in each city is realized, dynamic synchronization of configurations in each city is realized, and the operation and maintenance efficiency is improved.

[0080] Figure 3 The structure diagram of the service call device across bus clusters provided by the application is applied to the Apisix gateway in the bus cluster, as shown in Figure 3 The service call device across bus clusters includes:

[0081] The first determination module 201 is used to determine whether the city where the requester is located is a local city in response to a service call request issued by the requester.

[0082] The second judging module 202 is configured to judge whether the registration place of the target service to be called by the service calling request is the local city when the city where the requestor is located is the local city.

[0083] The first request forwarding module 203 is configured to forward the service calling request to the target application programming interface corresponding to the target service on the local bus when the registration place of the target service is the local city, and forward the service data returned by the target application programming interface to the requestor.

[0084] The second request forwarding module 204 is configured to find the registration place of the target service when the registration place of the target service is not the local city, and forward the service calling request to the bus entrance of the registration place, and perform the steps of forwarding the service calling request to the target application programming interface corresponding to the target service on the local bus by the Apisix gateway in the bus cluster of the registration place, and forwarding the service data returned by the target application programming interface to the requestor.

[0085] In some embodiments of the present application, the service calling request comprises a unique identity of the requestor, the unique identity of the requestor is associated with the cluster identifier of the bus cluster of the city where the requestor is located, and the first judging module 201 comprises:

[0086] The first cluster identifier determining submodule is configured to determine the cluster identifier of the bus cluster of the city where the requestor is located based on the unique identity of the requestor.

[0087] The first judging submodule is configured to judge whether the cluster identifier of the current bus cluster is consistent with the cluster identifier of the bus cluster of the city where the requestor is located.

[0088] If yes, it is determined that the city where the requestor is located is the local city.

[0089] If no, it is determined that the city where the requestor is located is not the local city.

[0090] In some embodiments of the present application, the service calling method across the bus cluster further comprises:

[0091] The first return prompt module is configured to return prompt information that the requestor does not belong to the local bus cluster to the requestor when the city where the requestor is located is not the local city, and end the service calling process.

[0092] In some embodiments of the present application, the service call request comprises a target interface path of a target application programming interface corresponding to a target service to be called, and the target interface path is associated with a cluster identifier of a bus cluster in a city where the target service is located, and the second determining module 202 comprises:

[0093] a second cluster identifier determining sub-module configured to determine the cluster identifier of the bus cluster in the city where the target service is located based on the target interface path;

[0094] a second determining sub-module configured to determine whether the cluster identifier of the current bus cluster is consistent with the cluster identifier of the bus cluster in the city where the target service is located;

[0095] if yes, it is determined that the city where the target service is located is the local city;

[0096] if no, it is determined that the city where the target service is located is not the local city.

[0097] In some embodiments of the present application, when a service party registers, a globally unique interface identifier is used to replace the interface path of the service party, and the first request forwarding module 203 comprises:

[0098] an interface path determining sub-module configured to find the interface path of the target application programming interface of the target service according to the globally unique interface identifier of the target service;

[0099] a request forwarding sub-module configured to forward the service call request to the target application programming interface of the target service on the local bus based on the interface path of the target application programming interface.

[0100] In some embodiments of the present application, the service call request comprises a digital signature of the request party, and the cross-bus cluster service calling device further comprises:

[0101] a signature verifying module configured to verify the digital signature by using a public key obtained from the request party when the city where the request party is located is the local city;

[0102] a first executing module configured to execute the step of determining whether the registered city of the target service to be called by the service call request is the local city when the verification is passed;

[0103] a second returning prompting module configured to return prompt information that the digital signature is incorrect to the request party and end the service calling process when the verification is not passed.

[0104] In some embodiments of the present application, the cross-bus cluster service calling device further comprises:

[0105] The third judging module is configured to judge whether the requestor has the permission to call the target service when the city where the requestor is located is the local city.

[0106] The second executing module is configured to execute the step of judging whether the registered place of the target service to be called by the service calling request is the local city when the requestor has the permission to call the target service.

[0107] The third returning prompting module is configured to return the prompt information that the requestor has no permission to call the target service to the requestor and end the service calling process when the requestor has no permission to call the target service.

[0108] The service calling device across the bus cluster can execute the service calling method across the bus cluster provided by the foregoing embodiments of the present application, and has the corresponding function modules and beneficial effects of the service calling method across the bus cluster.

[0109] Figure 4 A structure schematic diagram of an electronic device is provided for the embodiments of the present application. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices (such as headsets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections, and their functions, as well as the software implemented by the electronic device, are meant only to be examples and are not intended to limit the present application as described and / or claimed herein.

[0110] As shown in Figure 4 The electronic device includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which are communicatively connected to the at least one processor 11, wherein the memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0111] A plurality of components in the electronic device are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, and the like; an output unit 17, such as various types of displays, speakers, and the like; a storage unit 18, such as a magnetic disk, an optical disk, and the like; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 19 allows the electronic device to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0112] The processor 11 can be various general and / or special purpose processing components having processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, and the like. The processor 11 performs various methods and processes described above, such as the service invocation method across bus clusters.

[0113] In some embodiments, the service invocation method across bus clusters can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device via the ROM 12 and / or the communication unit 19. When the computer program is loaded onto the RAM 13 and executed by the processor 11, one or more steps of the service invocation method across bus clusters described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the service invocation method across bus clusters by any other appropriate means, such as by means of firmware.

[0114] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0115] Computer programs for implementing the methods of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program, when executed, can cause instructions defined in the flow charts and / or block diagrams to be implemented. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package and partially on a remote machine or entirely on a remote machine or server.

[0116] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, 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), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0117] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0118] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0119] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.

[0120] The embodiment of the present application further provides a computer program product, comprising a computer program which, when executed by a processor, implements the service calling method across a bus cluster as provided in any embodiment of the present application.

[0121] The computer program code implementing the application can be written in one or more programming languages or combinations of languages including object oriented languages such as Java, Smalltalk, C++ or the like and conventional procedural programming languages such as "C" or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0122] It should be understood that the various forms of flow shown above can be used to reorder, add, or remove steps. For example, the steps recited in the present application can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, which are not limited herein.

[0123] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method of service invocation across a bus cluster, the method comprising: The method applied to an Apisix gateway in a bus cluster comprises: In response to a service invocation request issued by a requester, determining whether a city where the requester is located is a local city; When the city where the requester is located is the local city, determining whether a registration place of a target service to be invoked by the service invocation request is the local city; When the registration place of the target service is the local city, forwarding the service invocation request to a target application programming interface corresponding to the target service on a local bus, and forwarding service data returned by the target application programming interface to the requester; When the registration place of the target service is not the local city, finding the registration place of the target service, and forwarding the service invocation request to an entrance of a bus in the registration place, and performing, by an Apisix gateway in a bus cluster in the registration place, the steps of forwarding the service invocation request to the target application programming interface corresponding to the target service on the local bus, and forwarding service data returned by the target application programming interface to the requester.

2. The method of claim 1, wherein, The service invocation request comprises a unique identity of the requester, the unique identity of the requester is associated with a cluster identifier of a bus cluster in a city where the requester is located, and the determination of whether the registration place of the target service to be invoked by the service invocation request is the local city comprises: determining the cluster identifier of the bus cluster in the city where the requester is located based on the unique identity of the requester; determining whether the cluster identifier of the current bus cluster is consistent with the cluster identifier of the bus cluster in the city where the requester is located; if yes, determining that the city where the requester is located is the local city; if no, determining that the city where the requester is located is not the local city.

3. The method of claim 1, wherein, The method further comprises: when the city where the requester is located is not the local city, returning prompt information that the requester does not belong to the local bus cluster to the requester, and ending a service invocation process.

4. The method of claim 1-3, wherein, The service invocation request comprises a target interface path of a target application programming interface corresponding to a target service to be invoked, the target interface path is associated with a cluster identifier of a bus cluster in a city where the target service is located, and the determination of whether the registration place of the target service to be invoked by the service invocation request is the local city comprises: determining the cluster identifier of the bus cluster in the city where the target service is located based on the target interface path; determining whether the cluster identifier of the current bus cluster is consistent with the cluster identifier of the bus cluster in the city where the target service is located; if yes, determining that the city where the target service is located is the local city; if no, determining that the city where the target service is located is not the local city.

5. The method of claim 4, wherein, When a service provider is registered, a globally unique interface identifier is used to replace an interface path of the service provider, and the forwarding of the service invocation request to the target application programming interface corresponding to the target service on the local bus comprises: finding an interface path of the target application programming interface of the target service according to the globally unique interface identifier of the target service; forwarding the service invocation request to the target application programming interface corresponding to the target service on the local bus based on the interface path of the target application programming interface.

6. The method of claim 1-3, wherein, The service calling request comprises a digital signature of the requester, and further comprises a prompt information that the digital signature is incorrect when the city where the requester is located is a local city. The digital signature is verified by using a public key obtained from the requester; When the verification is passed, a step of judging whether a registration place of a target service to be called by the service calling request is a local city is performed; When the verification is not passed, a prompt information that the digital signature is incorrect is returned to the requester, and the service calling process is ended.

7. The method of claim 1-3, wherein, When the city where the requester is located is a local city, the method further comprises: Judging whether the requester has a permission to call the target service; When the requester has the permission to call the target service, the step of judging whether the registration place of the target service to be called by the service calling request is the local city is performed; When the requester does not have the permission to call the target service, a prompt information that the requester does not have the permission to call the target service is returned to the requester, and the service calling process is ended.

8. A service invocation device across a bus cluster, characterized in that, The application is applied to an Apisix gateway in a bus cluster, and the device comprises: A first judging module is configured to judge whether a city where a requester is located is a local city in response to a service calling request issued by the requester; A second judging module is configured to judge whether a registration place of a target service to be called by the service calling request is the local city when the city where the requester is located is the local city; A first request forwarding module is configured to forward the service calling request to a target application programming interface corresponding to the target service on a local bus when the registration place of the target service is the local city, and forward service data returned by the target application programming interface to the requester; A second request forwarding module is configured to find the registration place of the target service when the registration place of the target service is not the local city, and forward the service calling request to a bus entrance of the registration place, so that an Apisix gateway in a bus cluster of the registration place performs a step of forwarding the service calling request to the target application programming interface corresponding to the target service on the local bus, and forwarding service data returned by the target application programming interface to the requester.

9. An electronic device, comprising: comprise: one or more processors; a storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the service calling method across the bus cluster as claimed in any one of claims 1-7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the service calling method across the bus cluster as claimed in any one of claims 1-7.