Multi-gateway scheduling processing method, device, system, server and storage medium

By directly connecting the client to the capability gateway cluster and using gateway subscription information to determine the gateway address and permissions, the pressure on the gateway access proxy server in high-concurrency scenarios of multi-gateway cluster collaborative systems is solved, thereby improving the system's stability and request processing capabilities.

CN117014189BActive Publication Date: 2026-05-19CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNITED NETWORK COMM GRP CO LTD
Filing Date
2023-07-05
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In high-concurrency scenarios with a large number of client requests, existing multi-gateway cluster collaborative systems face immense pressure on the reverse gateway access proxy server, making it prone to crashing. This can cause client requests to fail to reach the gateway, rendering the entire system unable to provide services.

Method used

By obtaining the client's gateway subscription information, the address and permission information of the capability gateway to be connected are determined based on the application identifier and capability identifier. The system communicates directly with the capability gateway cluster, reducing requests to access the proxy server through the gateway. The gateway subscription information is used to grant the client direct connection permissions, thereby reducing the connection pressure on the gateway to access the proxy server.

Benefits of technology

In high-concurrency scenarios, it reduces the pressure on the gateway access proxy server, lowers the possibility of its crash, ensures that client requests can reach the gateway in a timely manner, and improves system stability and availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117014189B_ABST
    Figure CN117014189B_ABST
Patent Text Reader

Abstract

The application provides a multi-gateway scheduling processing method, device, system, server and storage medium, and relates to the technical field of communication. The method comprises the following steps: acquiring an access request of a client to a capability gateway cluster; if the access mode is a software development kit access, acquiring gateway subscription information of the client, determining a capability gateway address to be connected and permission information according to the application identifier, the capability identifier and the gateway subscription information, sending the capability gateway address to be connected and the permission information to the client, so that the client sends an authentication request to the capability gateway cluster corresponding to the capability gateway address to be connected, and completes the authentication according to the received authentication request response result. The method of the application avoids that all requests pass through a gateway access proxy server to distribute capability gateway addresses and permission information, thereby reducing the connection pressure of the gateway access proxy server and reducing the possibility of collapse of the gateway access proxy server in a high-concurrency scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a multi-gateway scheduling processing method, device, system, server, and storage medium. Background Technology

[0002] A multi-gateway cluster collaborative system manages multiple gateway clusters in a unified manner to achieve a balanced distribution of client requests among the multiple gateway clusters.

[0003] The existing multi-gateway cluster collaborative system works by setting up a reverse gateway access proxy server service in front of the gateway cluster. Through the allocation of the gateway access proxy server, the client's requests are distributed to each gateway cluster to balance the request load of each client.

[0004] However, in high-concurrency scenarios with a large number of client requests, the existing multi-gateway cluster collaborative system will cause huge pressure on the reverse gateway access proxy server. If the reverse gateway access proxy server crashes at this time, client requests will not be able to reach the gateway, and the entire system will be unable to provide services to the outside world. Summary of the Invention

[0005] This application provides a multi-gateway scheduling processing method, device, system, server, and storage medium to solve the problem that in existing multi-gateway cluster collaborative systems, under high-concurrency scenarios with many client requests, the reverse gateway access proxy server will be under great pressure. If the reverse gateway access proxy server crashes at this time, client requests will not be able to reach the gateway, and the entire system will be unable to provide services to the outside world.

[0006] Firstly, this application provides a multi-gateway scheduling processing method, including:

[0007] Obtain client access requests to the capability gateway cluster; wherein, the access request includes access method, application identifier, and capability identifier, the access method includes software development kit access and non-software development kit access, and the capability gateway cluster includes at least one capability gateway address;

[0008] If the access method is software development kit (SDK) access, then the client's gateway subscription information is obtained, and the address and permission information of the capability gateway to be connected are determined based on the application identifier, capability identifier, and gateway subscription information. The address and permission information of the capability gateway to be connected are sent to the client, so that the client sends an authentication request to the capability gateway cluster corresponding to the capability gateway address to be connected, and completes authentication based on the received authentication request response result. The gateway subscription information pre-stores the correspondence between the application identifier, capability identifier, capability gateway address, and permission information.

[0009] In one possible design, determining the address of the capability gateway to be connected based on the application identifier, capability identifier, and gateway subscription information includes:

[0010] Based on the application identifier, capability identifier, and gateway subscription information, determine a list of available gateways in the gateway subscription information that match the application identifier and capability identifier; wherein, the list of available gateways stores at least one capability gateway address;

[0011] The list of available gateways is filtered according to a preset gateway grouping and weighting formula to obtain the optimal capability gateway address;

[0012] Use the optimal capability gateway address as the capability gateway address to be connected.

[0013] In one possible design, before filtering the available gateway list according to a preset gateway grouping and weighting formula to obtain the optimal capability gateway address, the method further includes:

[0014] Obtain log statistics data of the capability gateway cluster; wherein, the log statistics data includes the actual call volume of each capability gateway address;

[0015] Based on the actual call volume of each capability gateway address in the log statistics, determine the percentage of actual call volume for each capability gateway address.

[0016] If the difference between the actual call volume ratio of the capability gateway address and the pre-allocated weight ratio of the capability gateway address in the preset gateway grouping and weighting formula is greater than a preset deviation threshold, then the actual call volume ratio of the capability gateway address will be used as the pre-allocated weight ratio of the capability gateway address in the preset gateway grouping and weighting formula.

[0017] In one possible design, if the access method is software development kit (SDK) access, after obtaining the client's gateway subscription information, the method further includes:

[0018] If the client's gateway subscription information is not obtained, the address and permission information of the capability gateway to be connected are determined based on the application identifier, capability identifier, and gateway access proxy server; wherein, the gateway access proxy server pre-stores the correspondence between the application identifier, capability identifier, capability gateway address, and permission information.

[0019] One possible design also includes:

[0020] If the access method is non-software development kit access, then the address and permission information of the capability gateway to be connected are determined based on the application identifier, capability identifier, and gateway access proxy server; wherein, the gateway access proxy server pre-stores the correspondence between the application identifier, capability identifier, capability gateway address, and permission information.

[0021] In one possible design, if the access method is software development kit (SDK) access, then the method further includes:

[0022] Monitor the health status of the gateway cluster;

[0023] If there is an unhealthy capability gateway in the capability gateway cluster, the unhealthy capability gateway will be sent to the client via gateway subscription push, thereby triggering the client to delete the capability gateway address corresponding to the unhealthy capability gateway in the gateway subscription information.

[0024] In one possible design, if the access method is software development kit (SDK) access, then the method further includes:

[0025] New data information of the monitoring capability gateway cluster; wherein, the new data information includes new gateway registration information and / or gateway change information;

[0026] If new data information exists in the capability gateway cluster, the new data information is sent to the client via gateway subscription push to trigger the client to update the capability gateway address corresponding to the new data information in the gateway subscription information; wherein, updating the gateway subscription information includes adding capability gateway address and permission information to the gateway subscription information based on the new gateway registration information, and / or changing capability gateway address and permission information in the gateway subscription information based on gateway change information.

[0027] Secondly, this application provides a scheduling gateway, comprising:

[0028] The acquisition module is used to acquire the client's access request to the capability gateway cluster; wherein, the access request includes access method, application identifier and capability identifier, the access method includes software development kit access and non-software development kit access, and the capability gateway cluster includes at least one capability gateway address;

[0029] The processing module is configured to, if the access method is software development kit access, trigger the acquisition module to acquire the client's gateway subscription information, and determine the capability gateway address and permission information to be connected based on the application identifier, capability identifier, and gateway subscription information; wherein, the gateway subscription information pre-stores the correspondence between the application identifier, capability identifier, capability gateway address, and permission information.

[0030] The sending module is used to send the address of the capability gateway to be connected and the permission information to the client, so that the client sends an authentication request to the capability gateway cluster corresponding to the capability gateway address to be connected, and completes the authentication based on the received authentication request response result.

[0031] The processing module is further configured to determine the address of the capability gateway to be connected based on the application identifier, capability identifier, and gateway subscription information, including:

[0032] Based on the application identifier, capability identifier, and gateway subscription information, determine a list of available gateways in the gateway subscription information that match the application identifier and capability identifier; wherein, the list of available gateways stores at least one capability gateway address;

[0033] The list of available gateways is filtered according to a preset gateway grouping and weighting formula to obtain the optimal capability gateway address;

[0034] Use the optimal capability gateway address as the capability gateway address to be connected.

[0035] The processing module is further configured to filter the list of available gateways according to a preset gateway grouping and weighting formula. Before obtaining the optimal capability gateway address, the method further includes:

[0036] The acquisition module is triggered to obtain log statistics data of the capability gateway cluster; wherein, the log statistics data includes the actual call volume of each capability gateway address;

[0037] The processing module is also used to determine the percentage of actual call volume for each capability gateway address based on the actual call volume of each capability gateway address in the log statistics.

[0038] If the difference between the actual call volume ratio of the capability gateway address and the pre-allocated weight ratio of the capability gateway address in the preset gateway grouping and weighting formula is greater than a preset deviation threshold, then the actual call volume ratio of the capability gateway address will be used as the pre-allocated weight ratio of the capability gateway address in the preset gateway grouping and weighting formula.

[0039] The processing module is further configured to, if the access method is software development kit access, after obtaining the client's gateway subscription information, the method further includes:

[0040] If the client's gateway subscription information is not obtained, the address and permission information of the capability gateway to be connected are determined based on the application identifier, capability identifier, and gateway access proxy server; wherein, the gateway access proxy server pre-stores the correspondence between the application identifier, capability identifier, capability gateway address, and permission information.

[0041] The processing module is further configured to, if the access method is non-software development kit access, determine the capability gateway address and permission information to be connected based on the application identifier, capability identifier, and gateway access proxy server; wherein the gateway access proxy server pre-stores the correspondence between the application identifier, capability identifier, capability gateway address, and permission information.

[0042] The processing module is further configured to, if the access method is software development kit access, then the method further includes:

[0043] Trigger the monitoring module to monitor the health status of the gateway cluster.

[0044] The processing module is further configured to, if there is an unhealthy capability gateway in the capability gateway cluster, send the unhealthy capability gateway to the client via a gateway subscription push method, so as to trigger the client to delete the capability gateway address corresponding to the unhealthy capability gateway in the gateway subscription information.

[0045] The processing module is further configured to, if the access method is software development kit access, then the method further includes:

[0046] The monitoring module is triggered to monitor newly added data information of the gateway cluster; wherein, the newly added data information includes newly registered gateway information and / or gateway change information;

[0047] The processing module is further configured to, if there is new data information in the capability gateway cluster, send the new data information to the client via a gateway subscription push method, thereby triggering the client to update the capability gateway address corresponding to the new data information in the gateway subscription information; wherein, updating the gateway subscription information includes adding capability gateway address and permission information to the gateway subscription information based on new gateway registration information, and / or changing capability gateway address and permission information in the gateway subscription information based on gateway change information.

[0048] Thirdly, this application provides a server, including: a processor, and a memory communicatively connected to the processor;

[0049] The memory stores computer-executed instructions;

[0050] The processor executes computer execution instructions stored in the memory to implement the multi-gateway scheduling processing method.

[0051] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement a multi-gateway scheduling processing method.

[0052] Fifthly, this application provides a multi-gateway cluster collaborative system, including: a client, a scheduling gateway, and a capability gateway cluster; the scheduling gateway is communicatively connected to the client and the capability gateway cluster respectively; the scheduling gateway is used to implement a method for multi-gateway scheduling processing.

[0053] The multi-gateway scheduling processing method, device, system, server, and storage medium provided in this application obtain client access requests to a capability gateway cluster. If the access method is software development kit (SDK) access, the application's gateway subscription information is obtained. Based on the application identifier, capability identifier, and gateway subscription information, the address and permission information of the capability gateway to be connected are determined. The client sends the address and permission information of the capability gateway to be connected to the client, enabling the client to send an authentication request to the capability gateway cluster corresponding to the capability gateway address to be connected to. The authentication is completed based on the received authentication request response, enabling the client to establish a communication connection with the corresponding capability gateway address in the capability gateway cluster. Compared to existing multi-gateway cluster collaborative systems, which can lead to enormous service pressure on the reverse gateway access proxy server in high-concurrency scenarios with many client requests, and whose failure would prevent client requests from reaching the gateway and the entire system from providing services, this application utilizes gateway subscription information to grant clients a certain number of direct connection permissions. This avoids all requests being allocated capability gateway addresses and permission information through the gateway access proxy server, thereby reducing the connection pressure on the gateway access proxy server and lowering its likelihood of failure in high-concurrency scenarios. Attached Figure Description

[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0055] Figure 1 This is a schematic diagram illustrating an application scenario for multi-gateway scheduling processing provided in the embodiments of this application;

[0056] Figure 2 A flowchart illustrating the multi-gateway scheduling processing method provided in this application embodiment. Figure 1 ;

[0057] Figure 3 A flowchart illustrating the multi-gateway scheduling processing method provided in this application embodiment. Figure 2 ;

[0058] Figure 4 This is a schematic diagram of the structure of the scheduling gateway provided in an embodiment of this application;

[0059] Figure 5 A schematic diagram of the hardware structure of the server provided in an embodiment of this application;

[0060] Figure 6 This is a schematic diagram of the composition and data flow of a multi-gateway cluster collaborative system provided in an embodiment of this application. Detailed Implementation

[0061] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.

[0062] When a client sends a large number of requests to the existing multi-gateway cluster collaborative system, the service pressure on the gateway access proxy server of the multi-gateway cluster collaborative system is enormous, which can easily lead to the service crash of the gateway access proxy server, so that the client requests cannot be delivered to the capability gateway cluster.

[0063] Based on the aforementioned technical problems, the inventive concept of this application is to establish a software development kit on the client side so that the client and the capability gateway cluster can directly connect through the software development kit. To ensure the security of the direct connection process, authorization information needs to be pushed to the client in advance through the scheduling gateway in the form of gateway subscription information, so that the client can establish a connection with the capability gateway cluster by means of the gateway subscription information containing authorization information and authentication by the capability gateway cluster. This aims to solve the aforementioned technical problems of the prior art.

[0064] The specific application scenarios for this application are as follows:

[0065] Figure 1 This is a schematic diagram illustrating an application scenario of the multi-gateway scheduling processing method provided in this application embodiment. For example... Figure 1 As shown, client 101 generates an access request to capability gateway cluster 103, obtains the capability gateway address and permission information corresponding to the access request through scheduling gateway 102, and then returns the obtained capability gateway address and permission information to the client. The client directly accesses the corresponding capability gateway cluster 103 based on the capability gateway address and permission information to complete the communication connection between the client and the capability gateway cluster.

[0066] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0067] Figure 2 A flowchart illustrating the multi-gateway scheduling processing method provided in this application embodiment. Figure 1 .like Figure 2 As shown, the method includes:

[0068] S201. Obtain the client's access request to the capability gateway cluster.

[0069] The access request includes the access method, application identifier, and capability identifier. The access method includes software development kit (SDK) access and non-SDK access. The capability gateway cluster includes at least one capability gateway address.

[0070] Specifically, any system that needs to be called by other systems needs to expose an Application Programming Interface (API). As the unified entry point of an open platform, the API gateway usually has multiple functions such as authentication, monitoring, and conversion. In order to improve the working efficiency of the API gateway, multiple API gateways are divided into multiple capability gateway clusters in a cluster grouping manner. Each API gateway is regarded as a capability gateway carrying the capability gateway address so that the client can connect according to the capability gateway address.

[0071] Before a client can connect to the capability gateway, the capability gateway needs to authenticate the client to ensure the security of data transmission after the connection. This requires the client to send an access request to the capability gateway cluster before connecting, so that authentication can be performed based on the access request.

[0072] S202. If the access method is software development kit access, then obtain the client's gateway subscription information, and determine the address and permission information of the capability gateway to be connected based on the application identifier, capability identifier and gateway subscription information.

[0073] The gateway subscription information pre-stores the correspondence between application identifiers, capability identifiers, capability gateway addresses, and permission information.

[0074] Specifically, clients with pre-configured software development kits can connect to the capability gateway cluster via the software development kit access method. However, the gateway needs to push the capability gateway address and permission information to the client in advance so that the client can complete the authentication through the capability gateway address and permission information.

[0075] Furthermore, since the access request includes an application identifier and a capability identifier, and the gateway subscription information pre-stores the correspondence between the application identifier, capability identifier, capability gateway address, and permission information, the capability gateway address and permission information matching the access request can be found through the application identifier and capability identifier.

[0076] Since the same capability identifier may correspond to multiple available capability gateways, the scheduling gateway needs to filter the multiple available capability gateways, select the most suitable one as the capability gateway to be connected, and return the capability gateway address and permission information of the capability gateway to be connected to the client. This allows the client to directly connect to the corresponding capability gateway cluster based on the returned capability gateway address and permission information, complete the authentication between the client and the capability gateway, and thus realize the direct connection between the client and the capability gateway cluster.

[0077] S203. Send the address of the capability gateway to be connected and the permission information to the client, so that the client sends an authentication request to the capability gateway cluster corresponding to the capability gateway address to be connected, and completes the authentication based on the received authentication request response result.

[0078] Specifically, after determining the address and permission information of the capability gateway to be connected, it needs to be sent to the client so that the client can send authentication information for the access request to the capability gateway cluster based on the address and permission information of the capability gateway to be connected. The corresponding capability gateway in the capability gateway cluster performs authentication based on the permission information. After successful authentication, the client can communicate and connect with the corresponding capability gateway address in the capability gateway cluster.

[0079] The method provided in this embodiment obtains a client's access request to a capability gateway cluster. This access request includes an access method, an application identifier, and a capability identifier. The access method includes software development kit (SDK) access and non-SDK access. The capability gateway cluster includes at least one capability gateway address. If the access method is SSD access, the method obtains the client's gateway subscription information and, based on the application identifier, capability identifier, and gateway subscription information, determines the capability gateway address and permission information to be connected. It then sends the capability gateway address and permission information to the client, enabling the client to send an authentication request to the capability gateway cluster corresponding to the target capability gateway address. The method completes authentication based on the received authentication request response, allowing the client to establish a communication connection with the corresponding capability gateway address in the capability gateway cluster. The gateway subscription information grants the client a certain number of direct connection permissions, thus avoiding all requests having to go through the gateway access proxy server to allocate capability gateway addresses and permission information. This reduces the connection pressure on the gateway access proxy server and lowers its likelihood of crashing in high-concurrency scenarios.

[0080] The multi-gateway scheduling processing method of this application will be described in detail below with reference to a specific embodiment.

[0081] Figure 3 A flowchart illustrating the multi-gateway scheduling processing method provided in this application embodiment. Figure 2 .like Figure 3 As shown, the method includes:

[0082] S301. Obtain the client's access request to the capability gateway cluster.

[0083] The access request includes the access method, application identifier, and capability identifier. The access method includes software development kit (SDK) access and non-SDK access. The capability gateway cluster includes at least one capability gateway address.

[0084] The implementation of S301 is similar to that of S201 described above, and will not be repeated here in this embodiment.

[0085] S302. If the access method is software development kit access, then obtain the client's gateway subscription information.

[0086] Specifically, if the access method is software development kit (SDK) access, it means that the client has an SSD set up, and then the client and the scheduling gateway can communicate with each other through the gateway subscription function in the SSD.

[0087] More specifically, the client and the scheduling gateway are connected via a subscription interface, a push interface, and a feedback reporting interface. The subscription interface outputs all capability gateway addresses and permission information that match the application identifier input by the client. These capability gateway addresses and permission information are pre-ordered. During the connection process, when events such as failover, address changes, or changes in subscription relationships occur, the push interface pushes the changed capability gateway addresses and permission information to the client to ensure that the client can connect to the capability gateway cluster based on the latest capability gateway addresses and permission information. The feedback reporting interface monitors the network status information of the capability corresponding to the application identifier input by the client, and promptly feeds back the available gateway addresses and permission information to the client.

[0088] Furthermore, when calling the feedback reporting interface to determine whether the network status information is abnormal, it is necessary to count the number of network anomalies since the last anomaly report. Only when the number of anomalies since the last anomaly report is greater than the reporting count threshold will the network anomaly be reported to the client, thus avoiding oversensitivity and reducing the frequency of direct connection usage.

[0089] S303. Based on the application identifier, capability identifier, and gateway subscription information, determine the list of available gateways in the gateway subscription information that match the application identifier and capability identifier.

[0090] The list of available gateways stores at least one capability gateway address.

[0091] Specifically, the gateway subscription information stores all gateway information output by the subscription interface, push interface, and feedback reporting interface. Each gateway information carries an appropriate application identifier and capability identifier. Therefore, matching gateway information can be filtered from multiple gateway information through the application identifier and capability identifier. These matching gateway information constitute the available gateway list.

[0092] Furthermore, since the client needs to directly connect to a specific capability gateway address, and multiple capability gateway addresses may exist simultaneously in the available gateway list, further filtering of these capability gateway addresses is required. One feasible filtering and allocation method is to filter based on a preset gateway grouping and weighting formula.

[0093] The preset gateway groups are divided according to the attributes of the capabilities (protocol, packet length, request method, etc.), ensuring that a capability exists in only one group. The weights of multiple capability gateways in the same group are pre-configured and managed according to the cluster's load capacity and functional requirements (canary release), that is, the planned call volume of different capability gateway clusters is pre-reported as the basis for the initial preset gateway grouping and weight formula allocation.

[0094] S304. Obtain log statistics data of the capability gateway cluster.

[0095] The log statistics include the actual number of calls made to each capability gateway address.

[0096] Specifically, since the connection method using a non-gateway proxy server is adopted, the direct connection method of the client does not go through the monitoring of the scheduling gateway. This makes it impossible for the scheduling gateway to accurately allocate the traffic ratio of each capability gateway cluster according to the weight. Therefore, it is necessary to balance the traffic weight by planning traffic allocation and subsequent statistical adjustment. Thus, the first step is to obtain the recent traffic allocation of the capability gateway cluster through the logs, that is, to obtain the log statistics of the capability gateway cluster.

[0097] S305. Based on the actual call volume of each capability gateway address in the log statistics, determine the percentage of actual call volume for each capability gateway address.

[0098] Specifically, based on log statistics, the actual call volume percentage for each allocated capability gateway cluster is calculated according to the ratio of the number of connections to the total number of connections within the statistical period. It should be noted that this actual call volume percentage includes gateway access to proxy servers and non-gateway access to proxy servers, reflecting the actual usage of the capability gateway cluster after a certain period of operation.

[0099] S306. If the difference between the actual call volume ratio of the capability gateway address and the pre-allocated weight ratio of the capability gateway address in the preset gateway grouping and weighting formula is greater than the preset deviation threshold, then the actual call volume ratio of the capability gateway address shall be used as the pre-allocated weight ratio of the capability gateway address in the preset gateway grouping and weighting formula.

[0100] Specifically, if the difference between the actual call volume ratio of the capability gateway address and the pre-allocated weight ratio of the capability gateway address in the preset gateway grouping and weighting formula is greater than the preset deviation threshold, it indicates that the deviation between the planned call volume and the actual call volume is large. It is necessary to use the actual call volume to correct the planned call volume, that is, to use the actual call volume ratio of the capability gateway address as the pre-allocated weight ratio of the capability gateway address in the preset gateway grouping and weighting formula.

[0101] S307. Filter the list of available gateways according to the preset gateway grouping and weight formula to obtain the optimal capability gateway address.

[0102] Specifically, the optimal capability gateway address is a fixed capability gateway address. If multiple capability gateway addresses with equal values ​​are obtained simultaneously based on the preset gateway grouping and weighting formula, one of them will be selected as the optimal capability gateway address according to a random algorithm, so as to avoid the client sending an access request to multiple capability gateway addresses.

[0103] S308. Use the optimal capability gateway address as the capability gateway address to be connected, and obtain the corresponding permission information.

[0104] The gateway subscription information pre-stores the correspondence between application identifiers, capability identifiers, capability gateway addresses, and permission information.

[0105] Specifically, after selecting the optimal capability gateway address through preset gateway grouping and weight formula, the permission information corresponding to the optimal capability gateway address can be obtained based on the correspondence between the capability gateway address and permission information pre-stored in the gateway subscription information, thereby obtaining the capability gateway address and permission information to be connected.

[0106] S309. If the client's gateway subscription information is not obtained, or the access method is not software development kit access, then determine the address and permission information of the capability gateway to be connected based on the application identifier, capability identifier and gateway access proxy server.

[0107] The gateway access proxy server pre-stores the correspondence between application identifiers, capability identifiers, capability gateway addresses, and permission information.

[0108] Specifically, the failure to obtain the client's gateway subscription information indicates that the application identifier has not subscribed to the corresponding capability gateway direct connection access permission; the access method is non-software development kit access, indicating that the client has not installed the software development kit and cannot obtain the corresponding capability gateway direct connection access permission; in this case, the only way is to follow the original gateway access proxy server method, allocate and grant permissions through the gateway access proxy server so that the client can connect to the capability gateway cluster.

[0109] S310, monitor the health status of the gateway cluster.

[0110] S311. If there is an unhealthy capability gateway in the capability gateway cluster, the unhealthy capability gateway will be sent to the client via gateway subscription push to trigger the client to delete the capability gateway address corresponding to the unhealthy capability gateway in the gateway subscription information.

[0111] Specifically, the health status monitoring of the capability gateway cluster is a periodic scheduled task. After a preset interval, it initiates a polling check of each gateway, calling the capability gateway addresses for health checks in a pre-configured order. When an unhealthy capability gateway is detected, it triggers the push of relevant subscription information, recalculates the capability gateway cluster routes that meet the connection conditions, and pushes the updated capability gateway information to the client. This avoids scenarios where the client connects to the capability gateway cluster based on unhealthy capability gateway addresses and permission information, resulting in connection or transmission failures. This improves the connection success rate between the client and the capability gateway cluster and reduces the network resource consumption caused by failure information transmission.

[0112] S312, New data information for the monitoring capability gateway cluster.

[0113] The newly added data includes new gateway registration information and / or gateway change information.

[0114] S313. If there is new data information in the capability gateway cluster, the new data information is sent to the client via gateway subscription push to trigger the client to update the capability gateway address corresponding to the new data information in the gateway subscription information.

[0115] The updated gateway subscription information includes adding capability gateway addresses and permission information to the gateway subscription information based on the newly added gateway registration information, and / or changing capability gateway addresses and permission information to the gateway subscription information based on gateway change information.

[0116] Specifically, since capability gateways may be added or deleted at any time during operation, or even have their permission information changed or adjusted, these changes need to be promptly communicated to the client. This is to prevent the client from connecting to the capability gateway cluster using the previously obtained capability gateway address and permission information, or from queuing to connect using the previous gateway access proxy server method. This will help avoid reducing the connection success rate and improve the efficiency of connection request processing.

[0117] S314. Send the address of the capability gateway to be connected and the permission information to the client.

[0118] Specifically, the capability gateway address and permission information to be connected are pushed to the client through a network management subscription message, so that the client sends an authentication request to the capability gateway cluster corresponding to the capability gateway address to be connected, and completes the authentication based on the received authentication request response result, thereby enabling the client to communicate and connect with the corresponding capability gateway address in the capability gateway cluster.

[0119] The method provided in this embodiment obtains the client's access request to the capability gateway cluster; if the access method is software development kit access, then the client's gateway subscription information is obtained; based on the application identifier, capability identifier, and gateway subscription information, a list of available gateways matching the application identifier and capability identifier in the gateway subscription information is determined; log statistics of the capability gateway cluster are obtained; based on the actual call volume of each capability gateway address in the log statistics, the actual call volume ratio of each capability gateway address is determined; if the difference between the actual call volume ratio of the capability gateway address and the pre-allocated weight ratio of the capability gateway address in the preset gateway grouping and weighting formula is greater than a preset deviation threshold, then the actual call volume ratio of the capability gateway address is used as the pre-allocated weight ratio of the capability gateway address in the preset gateway grouping and weighting formula; the available gateway list is filtered according to the preset gateway grouping and weighting formula to obtain the optimal capability gateway address; and the optimal capability gateway address is... The system uses the application identifier, capability identifier, and gateway access proxy server as the connection address to be connected and obtains the corresponding permission information. If the client's gateway subscription information is not obtained, or the access method is not software development kit access, the system determines the connection address and permission information based on the application identifier, capability identifier, and gateway access proxy server. The system sends the connection address and permission information to the client, enabling the client to send an authentication request to the capability gateway cluster corresponding to the connection address. The system completes authentication based on the received authentication request response, allowing the client to communicate and connect with the corresponding capability gateway address in the capability gateway cluster. This allows the client to connect to the capability gateway cluster via either a gateway access proxy server or a direct connection, thereby reducing the service pressure on the gateway access proxy server in high-concurrency request scenarios and avoiding the drawback of all access requests being unable to be processed due to an unexpected crash of the gateway access proxy server, thus improving the adaptability of the client's network connection.

[0120] By monitoring the health status of the capability gateway cluster, if there is an unhealthy capability gateway in the cluster, the unhealthy capability gateway is sent to the client via gateway subscription push, which triggers the client to delete the capability gateway address corresponding to the unhealthy capability gateway in the gateway subscription information. This method promptly removes unhealthy capability gateways and improves the connection efficiency and stability between the client and the capability gateway cluster.

[0121] By monitoring new data information in the capability gateway cluster, if new data information exists in the capability gateway cluster, the new data information is sent to the client via gateway subscription push, thereby triggering the client to update the capability gateway address corresponding to the new data information in the gateway subscription information. This timely sends the latest capability gateway address and permission information to the client, improving the connection efficiency between the client and the capability gateway cluster.

[0122] In this embodiment of the invention, the server or main control device can be divided into functional modules according to the above method examples. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional module. It should be noted that the module division in this embodiment of the invention is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0123] Figure 4 This is a schematic diagram of the scheduling gateway provided in an embodiment of this application. Figure 4 As shown, the device 40 includes:

[0124] The acquisition module 401 is used to acquire client access requests to the capability gateway cluster.

[0125] The access request includes the access method, application identifier, and capability identifier. The access method includes software development kit (SDK) access and non-SDK access. The capability gateway cluster includes at least one capability gateway address.

[0126] The processing module 402 is used to trigger the acquisition module 401 to acquire the client's gateway subscription information if the access method is software development kit access, and to determine the address and permission information of the capability gateway to be connected based on the application identifier, capability identifier and gateway subscription information.

[0127] The gateway subscription information pre-stores the correspondence between application identifiers, capability identifiers, capability gateway addresses, and permission information.

[0128] The sending module 403 is used to send the address of the capability gateway to be connected and the permission information to the client, so as to trigger the client to send an authentication request to the capability gateway cluster corresponding to the capability gateway address to be connected, and complete the authentication based on the received authentication request response result.

[0129] Specifically, the processing module 402 is used to determine the address of the capability gateway to be connected based on the application identifier, capability identifier, and gateway subscription information, including:

[0130] Based on the application identifier, capability identifier, and gateway subscription information, determine a list of available gateways in the gateway subscription information that match the application identifier and capability identifier; wherein, the list of available gateways stores at least one capability gateway address;

[0131] The list of available gateways is filtered according to a preset gateway grouping and weighting formula to obtain the optimal capability gateway address;

[0132] Use the optimal capability gateway address as the capability gateway address to be connected.

[0133] Specifically, before the processing module 402 filters the available gateway list according to the preset gateway grouping and weighting formula to obtain the optimal capability gateway address, the method further includes:

[0134] The acquisition module 401 is triggered to acquire log statistics of the capability gateway cluster; wherein, the log statistics include the actual call volume of each capability gateway address;

[0135] The processing module 402 is also used to determine the percentage of actual call volume for each capability gateway address based on the actual call volume of each capability gateway address in the log statistics.

[0136] If the difference between the actual call volume ratio of the capability gateway address and the pre-allocated weight ratio of the capability gateway address in the preset gateway grouping and weighting formula is greater than the preset deviation threshold, then the actual call volume ratio of the capability gateway address will be used as the pre-allocated weight ratio of the capability gateway address in the preset gateway grouping and weighting formula.

[0137] Specifically, if the access method is software development kit (SDK) access, then after obtaining the client's gateway subscription information, the method further includes:

[0138] If the client's gateway subscription information is not obtained, the address and permission information of the capability gateway to be connected are determined based on the application identifier, capability identifier, and gateway access proxy server. The gateway access proxy server pre-stores the correspondence between the application identifier, capability identifier, capability gateway address, and permission information.

[0139] The processing module 402 is further configured to, if the access method is non-software development kit access, determine the address and permission information of the capability gateway to be connected based on the application identifier, capability identifier, and gateway access proxy server; wherein the gateway access proxy server pre-stores the correspondence between the application identifier, capability identifier, capability gateway address, and permission information.

[0140] Specifically, if the access method is a software development kit (SDK) access, the processing module 402 further includes the following:

[0141] Trigger the monitoring module to monitor the health status of the gateway cluster.

[0142] The processing module 402 is further configured to send the unhealthy capability gateway to the client via gateway subscription push if there is an unhealthy capability gateway in the capability gateway cluster, so as to trigger the client to delete the capability gateway address corresponding to the unhealthy capability gateway in the gateway subscription information.

[0143] The processing module 402 is further configured to, if the access method is software development kit access, then the method further includes:

[0144] The monitoring module is triggered to monitor newly added data information in the gateway cluster.

[0145] The newly added data includes new gateway registration information and / or gateway change information;

[0146] Specifically, the processing module 402 is used to send the new data information to the client via a gateway subscription push method if there is new data information in the capability gateway cluster, so as to trigger the client to update the capability gateway address corresponding to the new data information in the gateway subscription information; wherein, the updated gateway subscription information includes adding capability gateway address and permission information in the gateway subscription information according to the new gateway registration information, and / or changing capability gateway address and permission information in the gateway subscription information according to the gateway change information.

[0147] The scheduling gateway provided in this embodiment can execute the multi-gateway scheduling processing method of the above embodiment. Its implementation principle and technical effect are similar, and will not be described again in this embodiment.

[0148] In the specific implementation of the aforementioned scheduling gateway, each module can be implemented as a processor. The processor can execute computer execution instructions stored in the memory, thereby enabling the processor to execute the aforementioned multi-gateway scheduling processing method.

[0149] Figure 5 This is a schematic diagram of the hardware structure of the server provided in an embodiment of this application. Figure 5 As shown, the server 50 includes at least one processor 501 and a memory 502. The server 50 also includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.

[0150] In the specific implementation process, at least one processor 501 executes the computer execution instructions stored in the memory 502, causing at least one processor 501 to execute the multi-gateway scheduling processing method executed on the server side as described above.

[0151] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0152] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0153] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage.

[0154] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0155] The above description of the functions implemented by the server and main control device illustrates the solutions provided by the embodiments of the present invention. It is understood that, in order to implement the above functions, the server or main control device includes corresponding hardware structures and / or software modules for executing each function. By combining the units and algorithm steps of the various examples described in the embodiments of the present invention, the embodiments of the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions of the embodiments of the present invention.

[0156] Figure 6 This is a schematic diagram illustrating the composition and data flow of a multi-gateway cluster collaborative system provided in an embodiment of this application. Figure 6As shown, the gateway cluster collaborative system includes: a client 601, a scheduling gateway 602, and a capability gateway cluster 603; the scheduling gateway 602 is communicatively connected to the client 601 and the capability gateway cluster 603 respectively; the scheduling gateway 602 is used to implement a method for multi-gateway scheduling processing.

[0157] The client 601 includes a no-software development kit (SDK) unit and a software development kit (SDK) unit, wherein the SSD unit contains gateway invocation, gateway subscription, and error feedback modules; the scheduling gateway 602 includes a gateway access proxy server and a gateway access application programming interface (API) server; and the capability gateway cluster 603 includes multiple capability gateway clusters such as capability gateway cluster A, capability gateway cluster B, and capability gateway cluster C.

[0158] According to the multi-gateway scheduling method, access requests at the client 601's no-software development kit unit can only be forwarded to the capability gateways in the capability gateway cluster 603 via the gateway access proxy server within scheduling gateway 602. However, access requests at the client 601's software development kit unit can, in addition to being forwarded to the capability gateways in the capability gateway cluster 603 via the gateway access proxy server within scheduling gateway 602, also obtain the address and permission information of the capability gateway to be connected from the gateway access application programming interface server using the network management subscription module. Then, based on the address and permission information of the capability gateway to be connected, the gateway calling module can be used to directly connect to the corresponding capability gateway in the capability gateway cluster 603.

[0159] In practical applications, the client-side software development kit (SDK) contains a collection of client-side tools. If the client is a Java system, it is provided as a JAR file; if the client program is Python, it provides Python libraries. The functional flow of the SSD includes initialization, authentication, and request / invocation functions.

[0160] Initialization involves establishing a connection with the scheduling gateway to send a subscription request and establish a subscription / push mechanism for communication between the client and the scheduling gateway. Authentication involves sending an authentication request to the capability gateway cluster, carrying the client's request information, to complete the authentication operation before connection. The request call function sends a business request to the capability gateway that has completed authentication, and can report abnormal information to the scheduling gateway when the gateway is abnormal.

[0161] Configure the data model shown in Table 1 in the scheduling gateway to realize the function of scheduling service management client.

[0162] Table 1

[0163]

[0164]

[0165] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described multi-gateway scheduling processing method.

[0166] The aforementioned computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0167] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in a server or host device.

[0168] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-gateway scheduling processing method, characterized in that, include: Obtain client access requests to the capability gateway cluster; wherein, the access request includes access method, application identifier, and capability identifier, the access method includes software development kit (SDK) access and non-SDK access, and the capability gateway cluster includes at least one capability gateway address; If the access method is software development kit access, then the client's gateway subscription information is obtained, and the address and permission information of the capability gateway to be connected are determined according to the application identifier, capability identifier and the gateway subscription information; wherein, the gateway subscription information pre-stores the correspondence between the application identifier, capability identifier and capability gateway address and permission information. The system sends the address of the capability gateway to be connected and the permission information to the client, so that the client sends an authentication request to the capability gateway cluster corresponding to the capability gateway address to be connected, and completes the authentication based on the received authentication request response result.

2. The method according to claim 1, characterized in that, The step of determining the address of the capability gateway to be connected based on the application identifier, capability identifier, and gateway subscription information includes: Based on the application identifier, capability identifier, and gateway subscription information, a list of available gateways matching the application identifier and capability identifier in the gateway subscription information is determined; wherein, the list of available gateways stores at least one capability gateway address; The available gateway list is filtered according to a preset gateway grouping and weighting formula to obtain the optimal capability gateway address; Use the optimal capability gateway address as the capability gateway address to be connected.

3. The method according to claim 2, characterized in that, Before filtering the available gateway list according to the preset gateway grouping and weighting formula to obtain the optimal capability gateway address, the method further includes: Obtain log statistics data of the capability gateway cluster; wherein, the log statistics data includes the actual call volume of each capability gateway address; Based on the actual call volume of each capability gateway address in the log statistics, determine the percentage of actual call volume for each capability gateway address. If the difference between the actual call volume ratio of the capability gateway address and the pre-allocated weight ratio of the capability gateway address in the preset gateway grouping and weighting formula is greater than a preset deviation threshold, then the actual call volume ratio of the capability gateway address will be used as the pre-allocated weight ratio of the capability gateway address in the preset gateway grouping and weighting formula.

4. The method according to claim 1, characterized in that, If the access method is software development kit access, then after obtaining the client's gateway subscription information, the method further includes: If the client's gateway subscription information is not obtained, the address and permission information of the capability gateway to be connected are determined based on the application identifier, capability identifier, and gateway access proxy server; wherein, the gateway access proxy server pre-stores the correspondence between the application identifier, capability identifier, capability gateway address, and permission information.

5. The method according to claim 1, characterized in that, Also includes: If the access method is non-software development kit access, then the address and permission information of the capability gateway to be connected are determined based on the application identifier, capability identifier, and gateway access proxy server; wherein, the gateway access proxy server pre-stores the correspondence between the application identifier, capability identifier, capability gateway address, and permission information.

6. The method according to claim 1, characterized in that, If the access method is software development kit access, then the method further includes: Monitor the health status of the gateway cluster; If there is an unhealthy capability gateway in the capability gateway cluster, the unhealthy capability gateway will be sent to the client via gateway subscription push, thereby triggering the client to delete the capability gateway address corresponding to the unhealthy capability gateway in the gateway subscription information.

7. The method according to claim 1, characterized in that, If the access method is software development kit access, then the method further includes: New data information of the monitoring capability gateway cluster; wherein, the new data information includes new gateway registration information and / or gateway change information; If new data information exists in the capability gateway cluster, the new data information is sent to the client via gateway subscription push to trigger the client to update the capability gateway address corresponding to the new data information in the gateway subscription information; wherein, updating the gateway subscription information includes adding capability gateway address and permission information to the gateway subscription information based on the new gateway registration information, and / or changing capability gateway address and permission information in the gateway subscription information based on gateway change information.

8. A scheduling gateway, characterized in that, include: The acquisition module is used to acquire the client's access request to the capability gateway cluster; wherein, the access request includes access method, application identifier and capability identifier, the access method includes software development kit access and non-software development kit access, and the capability gateway cluster includes at least one capability gateway address; The processing module is configured to, if the access method is software development kit access, trigger the acquisition module to acquire the client's gateway subscription information, and determine the capability gateway address and permission information to be connected based on the application identifier, capability identifier, and gateway subscription information; wherein, the gateway subscription information pre-stores the correspondence between the application identifier, capability identifier, capability gateway address, and permission information. The sending module is used to send the address of the capability gateway to be connected and the permission information to the client, so that the client sends an authentication request to the capability gateway cluster corresponding to the capability gateway address to be connected, and completes the authentication based on the received authentication request response result.

9. A server, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 7.

10. A multi-gateway cluster collaborative system, characterized in that, include: Client, scheduling gateway, and capability gateway cluster; The scheduling gateway is communicatively connected to both the client and the capability gateway cluster. The scheduling gateway is used to implement the method as described in any one of claims 1 to 7.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 7.