[go: up one dir, main page]

CN115118652A - Route distribution method, apparatus and device, and storage medium - Google Patents

Route distribution method, apparatus and device, and storage medium Download PDF

Info

Publication number
CN115118652A
CN115118652A CN202210841560.4A CN202210841560A CN115118652A CN 115118652 A CN115118652 A CN 115118652A CN 202210841560 A CN202210841560 A CN 202210841560A CN 115118652 A CN115118652 A CN 115118652A
Authority
CN
China
Prior art keywords
downstream
upstream system
upstream
address
same
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210841560.4A
Other languages
Chinese (zh)
Inventor
周欢
王一嘉
董亚鹏
周竣涛
辛子英
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CITIC Aibank Corp Ltd
Original Assignee
CITIC Aibank Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CITIC Aibank Corp Ltd filed Critical CITIC Aibank Corp Ltd
Priority to CN202210841560.4A priority Critical patent/CN115118652A/en
Publication of CN115118652A publication Critical patent/CN115118652A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/30Routing of multiclass traffic

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a routing distribution method, a device and equipment based on the same machine room priority and a storage medium. The method adopts a strategy with the priority of the machine room, and when an upstream system calls API gateway equipment, the upstream system carries caller IP address information; the API gateway equipment judges which machine room the upstream system belongs to according to the IP address information provided by the calling upstream system, judges which downstream system and the calling upstream system are in the same machine room according to the IP address information uploaded during registration service of the downstream system, and preferentially distributes the calling request to the downstream system in the same machine room. The beneficial effects obtained by the application include but are not limited to: based on the routing distribution with the same machine room priority, the disaster recovery purpose of single machine room disaster can be achieved, the probability of cross-machine room calling can be effectively reduced, the increase of network time consumption caused by flow distribution to other machine rooms is avoided, and therefore the response time is shortened.

Description

路由分配方法、装置和设备及存储介质Route distribution method, device and device, and storage medium

技术领域technical field

本申请涉及数据处理技术领域,具体涉及一种基于同机房优先的路由分配方法、装置和设备及存储介质。The present application relates to the technical field of data processing, and in particular, to a method, device, and device for routing allocation based on the same computer room preference, and a storage medium.

背景技术Background technique

在金融信息系统中,分布式架构越来越普遍。而在分布式架构体系下,会存在大量信息系统间相互调用的情况。大量的企业采用API(Application Programming Interface,应用程序接口)网关的方式来进行系统间调用的管理和控制,通用的分配方式是基于下游的响应系统情况均匀的分配流量。In financial information systems, distributed architectures are increasingly common. Under the distributed architecture system, there will be a large number of information systems calling each other. A large number of enterprises use API (Application Programming Interface, application programming interface) gateways to manage and control calls between systems. The general allocation method is to evenly distribute traffic based on downstream response system conditions.

在金融企业进行IT系统容灾建设的背景下,随着双活或多活需求的出现,均匀的分配流量会导致一部分流量分配到其他机房。而跨机房调用网络耗时的增加,会导致响应时间变长,从而引起用户体验下降,是不被业务方所接受的。In the context of IT system disaster recovery construction in financial enterprises, with the emergence of active-active or multi-active requirements, evenly distributing traffic will lead to a portion of traffic being distributed to other computer rooms. The increase in the time-consuming of calling the network across the computer room will lead to a longer response time, which will lead to a decline in user experience, which is not acceptable to the business side.

发明内容SUMMARY OF THE INVENTION

本申请提供一种基于同机房优先的路由分配方法、装置和设备及存储介质,可用于在双活或多活的容灾建设下,降低由于跨机房调用网络耗时增加而导致的响应时间变长的问题。The present application provides a route allocation method, device and device and storage medium based on the priority of the same computer room, which can be used to reduce the change in response time caused by the increased time-consuming of calling the network across the computer room under the construction of active-active or multi-active disaster recovery. long question.

第一方面,本申请提供一种路由分配方法,包括:接收上游系统发送的用来调用下游系统的调用请求,所述调用请求携带所述上游系统的IP地址;根据所述上游系统的IP地址,找出与所述上游系统处于同一机房的下游系统;将所述上游系统的调用请求优先分配给与所述上游系统处于同一机房的下游系统。In a first aspect, the present application provides a route allocation method, comprising: receiving an invocation request sent by an upstream system for invoking a downstream system, the invocation request carrying the IP address of the upstream system; according to the IP address of the upstream system , find out the downstream system in the same computer room as the upstream system; and assign the call request of the upstream system to the downstream system in the same computer room as the upstream system preferentially.

在一些可选的实施方式中,所述下游系统具有多个,分别部署于不同的机房,所述方法还包括:获取多个所述下游系统在注册服务时上送的IP地址。In some optional embodiments, there are multiple downstream systems, which are respectively deployed in different computer rooms, and the method further includes: acquiring the IP addresses sent by the multiple downstream systems when registering the service.

在一些可选的实施方式中,所述根据所述上游系统的IP地址,找出与所述上游系统处于同一机房的下游系统包括:根据所述上游系统的IP地址,多个所述下游系统的IP地址,以及本地维护的IP归属机房信息,找出与所述上游系统处于同一机房的下游系统。In some optional implementation manners, the finding the downstream system in the same equipment room as the upstream system according to the IP address of the upstream system includes: according to the IP address of the upstream system, a plurality of the downstream systems The IP address and the IP home computer room information maintained locally, find out the downstream system in the same computer room as the upstream system.

在一些可选的实施方式中,多个所述下游系统是同一个下游系统分别部署于不同机房的多个实例。In some optional implementations, the multiple downstream systems are multiple instances of the same downstream system that are respectively deployed in different computer rooms.

第二方面,本申请提供一种路由分配装置,包括:接收模块,被配置成接收上游系统发送的用来调用下游系统的调用请求,所述调用请求携带所述上游系统的IP地址;查询模块,被配置成根据所述上游系统的IP地址,找出与所述上游系统处于同一机房的下游系统;分配模块,被配置成将所述上游系统的调用请求优先分配给与所述上游系统处于同一机房的下游系统。In a second aspect, the present application provides a route allocation device, comprising: a receiving module configured to receive a call request sent by an upstream system for calling a downstream system, the call request carrying the IP address of the upstream system; a query module , is configured to find the downstream system in the same computer room as the upstream system according to the IP address of the upstream system; the allocation module is configured to preferentially allocate the call request of the upstream system to the upstream system in the same computer room; Downstream systems in the same room.

在一些可选的实施方式中,所述下游系统具有多个,分别部署于不同的机房,所述接收模块进一步被配置成:获取多个所述下游系统在注册服务时上送的IP地址。In some optional implementations, there are multiple downstream systems, which are respectively deployed in different computer rooms, and the receiving module is further configured to: acquire the IP addresses sent by the multiple downstream systems when registering the service.

在一些可选的实施方式中,所述查询模块进一步被配置成:根据所述上游系统的IP地址,多个所述下游系统的IP地址,以及本地维护的IP归属机房信息,找出与所述上游系统处于同一机房的下游系统。In some optional implementation manners, the query module is further configured to: according to the IP address of the upstream system, the IP addresses of a plurality of the downstream systems, and the IP home computer room information maintained locally, find out the relevant data The upstream system is located in the downstream system of the same equipment room.

在一些可选的实施方式中,多个所述下游系统是同一个下游系统分别部署于不同机房的多个实例。In some optional implementations, the multiple downstream systems are multiple instances of the same downstream system that are respectively deployed in different computer rooms.

第三方面,本申请提供一种计算机设备,包括:一个或多个处理器;存储装置,其上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如第一方面所述的路由分配方法。In a third aspect, the present application provides a computer device, comprising: one or more processors; a storage device on which one or more programs are stored, when the one or more programs are processed by the one or more programs When the processor is executed, the one or more processors are caused to implement the route allocation method described in the first aspect.

第四方面,本申请提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被一个或多个处理器执行时实现如第一方面所述的路由分配方法。In a fourth aspect, the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by one or more processors, implements the route allocation method according to the first aspect.

为了解决跨机房调用网络耗时增加而导致的响应时间变长的技术问题,本申请提出了一种基于同机房优先的路由分配方法、装置和设备及存储介质。本申请采用同机房优先的策略,上游系统调用API网关设备时,携带调用者IP地址信息;API网关设备根据发起调用的上游系统提供的IP地址信息判断上游系统属于哪个机房,再根据下游系统注册服务时上送的IP地址信息,判断哪些下游系统与发起调用的上游系统处于同一个机房,优先将调用请求分配给同机房的下游系统。本申请取得的有益效果包括但不限于:基于同机房优先的路由分配,既能达到单机房灾难的容灾目的,又能有效的降低跨机房调用发生的概率,避免流量分配到其他机房导致的网络耗时增加,从而缩短响应时间。In order to solve the technical problem that the response time becomes longer due to the increased time consuming of calling the network across computer rooms, the present application proposes a route allocation method, device, device and storage medium based on the same computer room priority. This application adopts the same computer room priority strategy. When the upstream system calls the API gateway device, it carries the caller's IP address information; the API gateway device determines which computer room the upstream system belongs to according to the IP address information provided by the upstream system that initiates the call, and then registers according to the downstream system. The IP address information sent during the service determines which downstream systems are in the same computer room as the upstream system that initiates the call, and assigns the call request to the downstream system in the same computer room first. The beneficial effects obtained by this application include, but are not limited to, route allocation based on the priority of the same computer room, which can not only achieve the purpose of disaster recovery in a single computer room, but also effectively reduce the probability of cross-computer room calls, and avoid traffic distribution to other computer rooms. Network time increases, resulting in shorter response times.

附图说明Description of drawings

通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显。附图仅用于示出具体实施方式的目的,而并不认为是对本申请的限制。在附图中:Other features, objects and advantages of the present application will become more apparent upon reading the detailed description of non-limiting embodiments taken with reference to the following drawings. The drawings are for the purpose of illustrating specific embodiments only, and are not to be considered limiting of the present application. In the attached image:

图1是适用于本申请的路由分配方法和装置的一个实施例的示例性系统架构示意图;FIG. 1 is a schematic diagram of an exemplary system architecture of an embodiment of the route allocation method and apparatus applicable to the present application;

图2是根据本申请的路由分配方法的一个实施例的流程图;2 is a flowchart of an embodiment of a route allocation method according to the present application;

图3是根据本申请的路由分配方法中注册服务步骤的一个实施例的流程图;3 is a flowchart of an embodiment of a step of registering a service in a route allocation method according to the present application;

图4是根据本申请的路由分配装置的一个实施例的结构示意图;4 is a schematic structural diagram of an embodiment of a route distribution apparatus according to the present application;

图5是根据本申请的计算机设备的一个实施例的硬件组成结构示意图。FIG. 5 is a schematic structural diagram of a hardware composition of an embodiment of a computer device according to the present application.

具体实施方式Detailed ways

为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。In order to have a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

参考图1,图1示出了根据本申请的基于同机房优先的路由分配方法和装置的至少一个实施例的示例性系统架构100。Referring to FIG. 1 , FIG. 1 shows an exemplary system architecture 100 of at least one embodiment of a method and apparatus for route allocation based on same-room preference according to the present application.

如图1所示,系统架构100可以包括至少一个信息系统101和API网关设备102以及网络(图中未示意出)。网络用以在信息系统101和API网关设备102之间提供通信链路的介质。网络可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , the system architecture 100 may include at least one information system 101 and an API gateway device 102 and a network (not shown in the figure). The medium used by the network to provide a communication link between the information system 101 and the API gateway device 102 . A network may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.

信息系统101可以是提供各种信息服务的系统。信息系统101可以采用分布式架构,部署于多台计算机设备(服务器)。不同的计算机设备可位于不同的机房内。在容灾建设的背景下,基于双活或多活需求,信息系统101可以具有分别部署于不同机房内的不同实例。The information system 101 may be a system that provides various information services. The information system 101 may adopt a distributed architecture and be deployed on multiple computer devices (servers). Different computer equipment may be located in different computer rooms. In the context of disaster recovery construction, based on active-active or multi-active requirements, the information system 101 may have different instances respectively deployed in different computer rooms.

API网关(Gateway)设备102又称网间连接器、协议转换器,是多个网络间提供数据转换服务的计算机系统或设备。各信息系统101可以通过API网关设备102实现系统间调用的管理和控制。The API gateway (Gateway) device 102, also known as an Internet connector and a protocol converter, is a computer system or device that provides data conversion services between multiple networks. Each information system 101 can implement management and control of calls between systems through the API gateway device 102 .

需要说明的是,本申请所提供的基于同机房优先的路由分配方法一般由API网关设备102执行,相应地,基于同机房优先的路由分配装置一般设置于API网关设备102中。It should be noted that the route allocation method based on the same computer room preference provided in this application is generally executed by the API gateway device 102 , and accordingly, the route allocation device based on the same computer room preference is generally set in the API gateway device 102 .

参考图2,图2是根据本申请的基于同机房优先的路由分配方法的一个实施例的流程图。Referring to FIG. 2 , FIG. 2 is a flow chart of an embodiment of a route allocation method based on the same computer room preference according to the present application.

如图2所示,本申请的路由分配方法可包括以下步骤:As shown in Figure 2, the route allocation method of the present application may include the following steps:

步骤201、提前维护机房信息和IP(Internet Protocol,网际互联协议)归属机房信息。IP归属机房信息记录哪些IP地址处于哪一个机房内,存储于API网关设备或者可由API网关设备访问的存储设备。Step 201: Maintain the computer room information and IP (Internet Protocol, Internet Protocol) home computer room information in advance. The IP home computer room information records which IP addresses are in which computer room, and is stored in the API gateway device or a storage device that can be accessed by the API gateway device.

步骤202、各信息系统向API网关设备注册服务时,上送信息系统所在的计算机设备的IIP地址信息给API网关设备,如图3所示。Step 202 , when each information system registers a service with the API gateway device, it uploads the IIP address information of the computer device where the information system is located to the API gateway device, as shown in FIG. 3 .

步骤203、上游的信息系统(简称上游系统)通过调用API网关来调用下游的信息系统(简称下游系统)时,上送上游系统所在的计算机设备的IP地址信息给API网关设备。上游系统的IP地址可以携带在上游系统发送的调用请求中。Step 203: When the upstream information system (referred to as the upstream system) calls the downstream information system (referred to as the downstream system) by calling the API gateway, it uploads the IP address information of the computer device where the upstream system is located to the API gateway device. The IP address of the upstream system can be carried in the call request sent by the upstream system.

API网关设备通过接收上游系统发送的用来调用下游系统的调用请求,获取调用请求携带的上游系统的IP地址。The API gateway device obtains the IP address of the upstream system carried in the call request by receiving the call request sent by the upstream system to call the downstream system.

步骤204、API网关设备根据上游系统的IP地址,找出与上游系统处于同一机房的下游系统。具体的,API网关设备根据上游系统的IP地址,多个下游系统的IP地址(在注册服务时上送的),以及本地维护的IP归属机房信息,判断哪些下游系统与发起调用的上游系统处于同一机房。Step 204, the API gateway device finds out the downstream system in the same equipment room as the upstream system according to the IP address of the upstream system. Specifically, according to the IP address of the upstream system, the IP addresses of multiple downstream systems (sent when registering the service), and the IP home computer room information maintained locally, the API gateway device determines which downstream systems are in the same state as the upstream system that initiated the call. the same room.

步骤205、API网关设备根据上一步骤获取的同机房下游系统信息,优先把上游系统的调用请求分配给与上游系统处于同一机房的下游系统。Step 205: The API gateway device preferentially allocates the call request of the upstream system to the downstream system in the same computer room as the upstream system according to the downstream system information in the same computer room obtained in the previous step.

为便于理解本申请,下面结合一个具体应用场景实施例来进一步说明本申请方案。In order to facilitate the understanding of the present application, the solution of the present application is further described below with reference to a specific application scenario embodiment.

假设上游系统为信贷订单系统,下游系统为信贷额度系统,以信贷订单系统通过AIP网关设备调用信贷额度系统为例进行说明。这里,信贷订单系统与信贷额度系统通常是金融信贷业务必备的系统。方案如下:Assuming that the upstream system is a credit order system, and the downstream system is a credit line system, the credit order system calls the credit line system through the AIP gateway device as an example to illustrate. Here, the credit order system and the credit line system are usually necessary systems for financial credit business. The plan is as follows:

s1、信贷订单系统与信贷额度系统均在A和B两个机房各部署一个实例提供服务,以实现双活需求。其中,信贷订单系统在A机房的实例的IP地址为192.168.1.1,在B机房的实例的IP地址为192.168.2.1;信贷额度系统在A机房的实例的IP地址为192.168.1.2,在B机房的实例的IP地址为192.168.2.2。示例性的,信贷订单系统在A机房和B机房的两个实例中,一个作为主系统,另一个作为备系统;信贷额度系统在A机房和B机房的两个实例中,一个作为主系统,另一个作为备系统。s1. Both the credit order system and the credit line system deploy an instance in each of the two computer rooms A and B to provide services to achieve active-active requirements. Among them, the IP address of the instance of the credit order system in computer room A is 192.168.1.1, and the IP address of the instance in computer room B is 192.168.2.1; the IP address of the instance of the credit line system in computer room A is 192.168.1.2, and the IP address of the instance in computer room B is 192.168.1.2. The IP address of the instance is 192.168.2.2. Exemplarily, in the two instances of computer room A and computer room B, the credit order system is used as the main system and the other is used as the standby system; in the two instances of computer room A and computer room B, the credit line system is used as the main system, The other is used as a backup system.

s2、在API网关设备提供的后管中维护IP归属机房信息,包括:IP地址192.168.1.1和192.168.1.2属于A机房,IP地址192.168.2.1和192.168.2.2属于B机房。s2. Maintain the IP home computer room information in the back management provided by the API gateway device, including: IP addresses 192.168.1.1 and 192.168.1.2 belong to the A computer room, and IP addresses 192.168.2.1 and 192.168.2.2 belong to the B computer room.

s3、信贷订单系统和信贷额度系统进行服务注册时上送各自的IP地址信息给API网关设备,分别为192.168.1.1,192.168.1.2,192.168.2.1,192.168.2.2。s3, the credit order system and the credit line system send their respective IP address information to the API gateway device during service registration, which are 192.168.1.1, 192.168.1.2, 192.168.2.1, and 192.168.2.2 respectively.

s4、当A机房IP地址为192.168.1.1的信贷订单系统的实例,想通过API网关设备调用信贷额度系统时,发送调用请求,并上送其IP地址信息192.168.1.1给API网关设备。s4. When the instance of the credit order system with the IP address of the A computer room at 192.168.1.1 wants to call the credit line system through the API gateway device, it sends a call request and sends its IP address information 192.168.1.1 to the API gateway device.

s5、API网关设备根据上送的IP地址信息192.168.1.1和步骤s2维护的IP归属机房信息,以及步骤s3信贷额度系统上送的IP地址192.168.2.1和192.168.2.2,可知调用请求来自A机房,同时可以获知信贷额度系统在A机房的实例的IP地址为192.168.1.2。此步骤找出与信贷订单系统实例192.168.1.1处于同一机房的信贷额度系统实例192.168.1.2。s5. According to the uploaded IP address information 192.168.1.1 and the IP home computer room information maintained in step s2, and the IP addresses 192.168.2.1 and 192.168.2.2 sent by the credit line system in step s3, it can be seen that the call request comes from computer room A , and you can learn that the IP address of the instance of the credit line system in computer room A is 192.168.1.2. This step finds the credit line system instance 192.168.1.2 in the same room as the credit order system instance 192.168.1.1.

s6、API网关设备分配调用请求给IP地址为192.168.1.2的信贷额度系统的实例。s6. The API gateway device allocates the call request to the instance of the credit line system whose IP address is 192.168.1.2.

以上,本申请公开了一种基于同机房优先的路由分配方法。该方法采用同机房优先的策略,上游系统调用API网关设备时,携带调用者IP地址信息;API网关设备根据发起调用的上游系统提供的IP地址信息判断上游系统属于哪个机房,再根据下游系统注册服务时上送的IP地址信息,判断哪些下游系统与发起调用的上游系统处于同一个机房,优先将调用请求分配给同机房的下游系统。本申请取得的有益效果包括但不限于:基于同机房优先的路由分配,既能达到单机房灾难的容灾目的,又能有效的降低跨机房调用发生的概率,避免流量分配到其他机房导致的网络耗时增加,从而缩短响应时间。Above, the present application discloses a route allocation method based on the same computer room preference. This method adopts the same computer room priority strategy. When the upstream system calls the API gateway device, it carries the caller's IP address information; the API gateway device determines which computer room the upstream system belongs to according to the IP address information provided by the upstream system that initiates the call, and then registers according to the downstream system. The IP address information sent during the service determines which downstream systems are in the same computer room as the upstream system that initiates the call, and assigns the call request to the downstream system in the same computer room first. The beneficial effects obtained by this application include, but are not limited to, route allocation based on the priority of the same computer room, which can not only achieve the purpose of disaster recovery in a single computer room, but also effectively reduce the probability of cross-computer room calls, and avoid traffic distribution to other computer rooms. Network time increases, resulting in shorter response times.

参考图4,图4是根据本申请的基于同机房优先的路由分配装置的一个实施例的结构示意图。本申请的路由分配装置可以部署于AIP网关设备。Referring to FIG. 4 , FIG. 4 is a schematic structural diagram of an embodiment of a routing distribution apparatus based on the same computer room preference according to the present application. The route distribution apparatus of the present application can be deployed in an AIP gateway device.

如图4所示,本申请的路由分配装置400可包括:As shown in FIG. 4 , the route distribution apparatus 400 of the present application may include:

接收模块401,被配置成接收上游系统发送的用来调用下游系统的调用请求,调用请求携带上游系统的IP地址;The receiving module 401 is configured to receive a call request sent by the upstream system for calling the downstream system, and the call request carries the IP address of the upstream system;

查询模块402,被配置成根据上游系统的IP地址,找出与上游系统处于同一机房的下游系统;The query module 402 is configured to find the downstream system in the same computer room as the upstream system according to the IP address of the upstream system;

分配模块403,被配置成将上游系统的调用请求优先分配给与上游系统处于同一机房的下游系统。The allocation module 403 is configured to preferentially allocate the call request of the upstream system to the downstream system in the same computer room as the upstream system.

在一些可选的实施方式中,下游系统具有多个,分别部署于不同的机房,接收模块401进一步被配置成:获取多个下游系统在注册服务时上送的IP地址。In some optional implementations, there are multiple downstream systems, which are respectively deployed in different computer rooms, and the receiving module 401 is further configured to: acquire the IP addresses sent by the multiple downstream systems when registering the service.

在一些可选的实施方式中,查询模块402进一步被配置成:根据上游系统的IP地址,多个下游系统的IP地址,以及本地维护的IP归属机房信息,找出与上游系统处于同一机房的下游系统。In some optional embodiments, the query module 402 is further configured to: according to the IP address of the upstream system, the IP addresses of the multiple downstream systems, and the IP home computer room information maintained locally, find out the computer room that is in the same computer room as the upstream system. downstream system.

在一些可选的实施方式中,多个下游系统是同一个下游系统分别部署于不同机房的多个实例。In some optional embodiments, the multiple downstream systems are multiple instances of the same downstream system that are respectively deployed in different computer rooms.

需要说明的是,本实施例装置中各个模块的实现细节和技术效果可以参考本申请中其它实施例的说明,在此不再赘述。该装置的每个模块中的实现方案具有多样性,只要能达到模块的目的即可,实际部署中不受限于具体的实施方案。It should be noted that, for the implementation details and technical effects of each module in the apparatus of this embodiment, reference may be made to the descriptions of other embodiments in this application, which will not be repeated here. The implementation scheme in each module of the device is diverse, as long as the purpose of the module can be achieved, and the actual deployment is not limited to a specific implementation scheme.

参考图5,图5是根据本申请的用于实现API网关设备的计算机设备的一个实施例的结构示意图。如图5所示,本申请的计算机设备500可包括:Referring to FIG. 5 , FIG. 5 is a schematic structural diagram of an embodiment of a computer device for implementing an API gateway device according to the present application. As shown in FIG. 5 , the computer device 500 of the present application may include:

一个或多个处理器501;one or more processors 501;

存储器502,其上存储有一个或多个程序503;memory 502 on which one or more programs 503 are stored;

处理器501和存储器502等组件可通过总线系统504耦合在一起;总线系统504用于实现这些组件之间的连接通信;Components such as the processor 501 and the memory 502 can be coupled together through a bus system 504; the bus system 504 is used to implement connection and communication between these components;

当一个或多个程序503被一个或多个处理器501执行时,使得一个或多个处理器501实现如上文方法实施例中所公开的路由分配方法。When the one or more programs 503 are executed by the one or more processors 501, the one or more processors 501 are caused to implement the route allocation method as disclosed in the above method embodiments.

其中,总线系统504除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线。存储器502可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。处理器501可能是具有信号处理能力的集成电路芯片,可以是通用处理器、数字信号处理器(DSP,Digital Signal Processor),或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。Wherein, the bus system 504 may include a power bus, a control bus and a status signal bus in addition to the data bus. Memory 502 may be volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. The processor 501 may be an integrated circuit chip with signal processing capability, and may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. .

本申请实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被一个或多个处理器执行时实现如上文方法实施例中所公开的路由分配方法。Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by one or more processors, implements the route allocation method disclosed in the above method embodiments.

本申请是参照根据本申请实施例的方法、设备(系统)和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present application. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

应理解,本申请中术语“系统”和“网络”在本文中常被可互换使用。本申请中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本申请中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the terms "system" and "network" in this application are often used interchangeably herein. The term "and/or" in this application is only an association relationship to describe associated objects, which means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, independently There are three cases of B. In addition, the character "/" in this application generally indicates that the related objects are an "or" relationship.

以上所述,仅为本申请的较佳实施例,并非用于限定本申请的保护范围,凡在本申请的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本申请的保护范围之内。The above are only preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the present application. within the scope of protection of the application.

Claims (10)

1.一种路由分配方法,其特征在于,包括:1. a route distribution method, is characterized in that, comprises: 接收上游系统发送的用来调用下游系统的调用请求,所述调用请求携带所述上游系统的IP地址;receiving an invocation request sent by an upstream system for invoking a downstream system, where the invocation request carries the IP address of the upstream system; 根据所述上游系统的IP地址,找出与所述上游系统处于同一机房的下游系统;According to the IP address of the upstream system, find out the downstream system in the same computer room as the upstream system; 将所述上游系统的调用请求优先分配给与所述上游系统处于同一机房的下游系统。The invocation request of the upstream system is preferentially allocated to the downstream system in the same equipment room as the upstream system. 2.根据权利要求1所述的方法,其特征在于,所述下游系统具有多个,分别部署于不同的机房,所述方法还包括:2. The method according to claim 1, wherein there are multiple downstream systems, which are respectively deployed in different computer rooms, the method further comprising: 获取多个所述下游系统在注册服务时上送的IP地址。Obtain a plurality of IP addresses sent by the downstream systems when registering the service. 3.根据权利要求2所述的方法,其特征在于,所述根据所述上游系统的IP地址,找出与所述上游系统处于同一机房的下游系统包括:3. The method according to claim 2, wherein, according to the IP address of the upstream system, finding the downstream system in the same equipment room as the upstream system comprises: 根据所述上游系统的IP地址,多个所述下游系统的IP地址,以及本地维护的IP归属机房信息,找出与所述上游系统处于同一机房的下游系统。According to the IP address of the upstream system, the IP addresses of a plurality of downstream systems, and the IP home computer room information maintained locally, find out the downstream system in the same computer room as the upstream system. 4.根据权利要求1所述的方法,其特征在于,多个所述下游系统是同一个下游系统分别部署于不同机房的多个实例。4 . The method according to claim 1 , wherein the multiple downstream systems are multiple instances of the same downstream system respectively deployed in different computer rooms. 5 . 5.一种路由分配装置,其特征在于,包括:5. A routing distribution device, comprising: 接收模块,被配置成接收上游系统发送的用来调用下游系统的调用请求,所述调用请求携带所述上游系统的IP地址;a receiving module, configured to receive an invocation request sent by an upstream system for invoking a downstream system, where the invocation request carries the IP address of the upstream system; 查询模块,被配置成根据所述上游系统的IP地址,找出与所述上游系统处于同一机房的下游系统;a query module, configured to find a downstream system in the same computer room as the upstream system according to the IP address of the upstream system; 分配模块,被配置成将所述上游系统的调用请求优先分配给与所述上游系统处于同一机房的下游系统。The allocation module is configured to preferentially allocate the invocation request of the upstream system to the downstream system in the same computer room as the upstream system. 6.根据权利要求5所述的装置,其特征在于,所述下游系统具有多个,分别部署于不同的机房,所述接收模块进一步被配置成:获取多个所述下游系统在注册服务时上送的IP地址。6 . The apparatus according to claim 5 , wherein there are multiple downstream systems, which are respectively deployed in different computer rooms, and the receiving module is further configured to: acquire when registering services of multiple downstream systems. 7 . The uploaded IP address. 7.根据权利要求5所述的装置,其特征在于,所述查询模块进一步被配置成:根据所述上游系统的IP地址,多个所述下游系统的IP地址,以及本地维护的IP归属机房信息,找出与所述上游系统处于同一机房的下游系统。7. The apparatus according to claim 5, wherein the query module is further configured to: according to the IP address of the upstream system, the IP addresses of a plurality of the downstream systems, and the IP home computer room maintained locally information to find the downstream system in the same room as the upstream system. 8.根据权利要求5所述的装置,其特征在于,多个所述下游系统是同一个下游系统分别部署于不同机房的多个实例。8 . The apparatus according to claim 5 , wherein the multiple downstream systems are multiple instances of the same downstream system respectively deployed in different computer rooms. 9 . 9.一种API网关设备,其特征在于,包括:9. An API gateway device, comprising: 一个或多个处理器;one or more processors; 存储装置,其上存储有一个或多个程序,a storage device on which one or more programs are stored, 当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如权利要求1-4中任一所述的路由分配方法。When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the route allocation method according to any one of claims 1-4. 10.一种计算机可读存储介质,其特征在于,其上存储有计算机程序,所述计算机程序被一个或多个处理器执行时实现如权利要求1-4中任一所述的路由分配方法。10. A computer-readable storage medium, characterized in that a computer program is stored thereon, and when the computer program is executed by one or more processors, the route allocation method according to any one of claims 1-4 is implemented .
CN202210841560.4A 2022-07-18 2022-07-18 Route distribution method, apparatus and device, and storage medium Pending CN115118652A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210841560.4A CN115118652A (en) 2022-07-18 2022-07-18 Route distribution method, apparatus and device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210841560.4A CN115118652A (en) 2022-07-18 2022-07-18 Route distribution method, apparatus and device, and storage medium

Publications (1)

Publication Number Publication Date
CN115118652A true CN115118652A (en) 2022-09-27

Family

ID=83331887

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210841560.4A Pending CN115118652A (en) 2022-07-18 2022-07-18 Route distribution method, apparatus and device, and storage medium

Country Status (1)

Country Link
CN (1) CN115118652A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116633856A (en) * 2023-05-30 2023-08-22 中国银行股份有限公司 Service processing method, device, equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110149964A1 (en) * 2009-12-17 2011-06-23 Judge Alan M Distributed routing architecture
CN105991694A (en) * 2015-02-05 2016-10-05 阿里巴巴集团控股有限公司 Method and device for realizing distributed service invocation
CN106572069A (en) * 2015-10-12 2017-04-19 阿里巴巴集团控股有限公司 Network access control method and server server
CN111181865A (en) * 2019-12-11 2020-05-19 天翼电子商务有限公司 A service-based traffic distribution method and system, storage medium and terminal
CN111435942A (en) * 2019-01-14 2020-07-21 北京京东尚科信息技术有限公司 Redis cluster access method, system, middleware, medium and equipment
WO2021179493A1 (en) * 2020-03-09 2021-09-16 平安科技(深圳)有限公司 Microservice-based load balancing method, apparatus and device, and storage medium
US20210377326A1 (en) * 2020-05-28 2021-12-02 Wangsu Science & Technology Co., Ltd. Method, apparatus, device and storage medium for pushing video stream
WO2021237827A1 (en) * 2020-05-28 2021-12-02 网宿科技股份有限公司 Method, apparatus and device for pushing video stream, and storage medium
CN113810474A (en) * 2021-08-30 2021-12-17 福建天泉教育科技有限公司 Request distribution method and terminal
CN114448867A (en) * 2022-02-23 2022-05-06 百果园技术(新加坡)有限公司 Route visualization method, device, equipment and storage medium
CN114564450A (en) * 2022-03-04 2022-05-31 北京宇信科技集团股份有限公司 Processing method, device, system, medium and equipment of distributed file system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110149964A1 (en) * 2009-12-17 2011-06-23 Judge Alan M Distributed routing architecture
CN105991694A (en) * 2015-02-05 2016-10-05 阿里巴巴集团控股有限公司 Method and device for realizing distributed service invocation
CN106572069A (en) * 2015-10-12 2017-04-19 阿里巴巴集团控股有限公司 Network access control method and server server
CN111435942A (en) * 2019-01-14 2020-07-21 北京京东尚科信息技术有限公司 Redis cluster access method, system, middleware, medium and equipment
CN111181865A (en) * 2019-12-11 2020-05-19 天翼电子商务有限公司 A service-based traffic distribution method and system, storage medium and terminal
WO2021179493A1 (en) * 2020-03-09 2021-09-16 平安科技(深圳)有限公司 Microservice-based load balancing method, apparatus and device, and storage medium
US20210377326A1 (en) * 2020-05-28 2021-12-02 Wangsu Science & Technology Co., Ltd. Method, apparatus, device and storage medium for pushing video stream
WO2021237827A1 (en) * 2020-05-28 2021-12-02 网宿科技股份有限公司 Method, apparatus and device for pushing video stream, and storage medium
CN113810474A (en) * 2021-08-30 2021-12-17 福建天泉教育科技有限公司 Request distribution method and terminal
CN114448867A (en) * 2022-02-23 2022-05-06 百果园技术(新加坡)有限公司 Route visualization method, device, equipment and storage medium
CN114564450A (en) * 2022-03-04 2022-05-31 北京宇信科技集团股份有限公司 Processing method, device, system, medium and equipment of distributed file system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116633856A (en) * 2023-05-30 2023-08-22 中国银行股份有限公司 Service processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN102655503B (en) Use the Resourse Distribute in shared resource pond
US11403009B2 (en) Storage system, and method and apparatus for allocating storage resources
CN111585887B (en) Communication method and device based on multiple networks, electronic equipment and storage medium
CN107465616B (en) Client-based service routing method and device
CN114189525B (en) Service request method and device and electronic equipment
WO2022007908A1 (en) Method for service collaboration between network element devices, and network element device
CN115118652A (en) Route distribution method, apparatus and device, and storage medium
CN111652728A (en) A transaction processing method and device
WO2023046026A1 (en) Containerized vnf deployment method and apparatus
CN114257545B (en) Message forwarding method and device
CN109462537B (en) Cross-network intercommunication method and device
KR102119456B1 (en) Distributed Broker Coordinator System and Method in a Distributed Cloud Environment
CN105657009A (en) Object gateway load balancing system and method, and cross-region object gateway storage system
CN113068083B (en) A method, apparatus, device and computer-readable storage medium for establishing a connection
CN106254103B (en) A kind of dynamically configurable method and device of RTMP group system
US11337038B2 (en) Method, device and system for transmitting multicast group information
CN108156078A (en) A kind of flow table construction method and system
CN116567094A (en) Service information processing method based on micro service system
CN115174649A (en) Cross-machine-room RPC calling method, device and medium
CN113660353A (en) Method, device, equipment and medium for managing Provisioner address based on Bluetooth Mesh
CN110990123A (en) Method and device for constructing virtual machine network system
CN115134357B (en) A capability deployment method, device and edge computing service operation equipment
CN115473942B (en) A routing allocation method and system based on master database priority
CN104753747A (en) Gateway and device connecting method and device and gateway device
JP2013232807A (en) Data center apparatus, backup service execution method, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220927

RJ01 Rejection of invention patent application after publication