WO2020232895A1 - Dynamic sub-database routing method and device, server, and storage medium - Google Patents

Dynamic sub-database routing method and device, server, and storage medium Download PDF

Info

Publication number
WO2020232895A1
WO2020232895A1 PCT/CN2019/103386 CN2019103386W WO2020232895A1 WO 2020232895 A1 WO2020232895 A1 WO 2020232895A1 CN 2019103386 W CN2019103386 W CN 2019103386W WO 2020232895 A1 WO2020232895 A1 WO 2020232895A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
service group
groups
group
configuration table
Prior art date
Application number
PCT/CN2019/103386
Other languages
French (fr)
Chinese (zh)
Inventor
黄威翔
卢锦波
付慧颖
黄岐
李佳星
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020232895A1 publication Critical patent/WO2020232895A1/en

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/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • H04L45/306Route determination based on the nature of the carried application
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

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

Abstract

The present application provides a dynamic sub-database routing method, comprising: providing a route configuration table, wherein the route configuration table is used to record a correspondence between multiple platforms and multiple service groups, and record a port corresponding to each of the multiple service groups; upon reception of a service request transmitted from one of the multiple platforms, searching the route configuration table according to the platform, and determining a target service group from the multiple service groups and a port corresponding to the target service group, wherein the target service group is a service group corresponding to the platform among the multiple service groups recorded in the route configuration table; and transmitting the received service request to the port corresponding to the target service group. The present application also provides a device for implementing the dynamic sub-database routing method, a server, and a storage medium. The present application solves the technical problem in which a high-volume transaction cannot be handled flexibly.

Description

动态分库路由方法、装置、服务器及存储介质Dynamic sub-library routing method, device, server and storage medium
本申请要求于2019年05月23日提交中国专利局,申请号为201910436135.5发明名称为“动态分库路由方法、装置、服务器及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on May 23, 2019. The application number is 201910436135.5. The invention title is "Dynamic sub-library routing method, device, server and storage medium". The entire content is incorporated by reference. In this application.
技术领域Technical field
本申请涉及计算机技术领域,具体涉及一种动态分库路由方法、装置、服务器及存储介质。This application relates to the field of computer technology, in particular to a dynamic database routing method, device, server and storage medium.
背景技术Background technique
数据库作为单点运行,一旦出现问题则系统整体瘫痪。一般数据库的分表方法与程序的耦合度非常高,不易扩展和开发。然而,通常来讲,互联网电商交易量大,并发高,交易时间非常集中,无分表分库的系统难以承载。The database runs as a single point, once a problem occurs, the entire system is paralyzed. The general database table splitting method and the program have a very high coupling degree, and it is not easy to expand and develop. However, generally speaking, Internet e-commerce transaction volume is large, concurrency is high, transaction time is very concentrated, and systems without sub-meters and sub-databases are difficult to carry.
发明内容Summary of the invention
鉴于以上内容,有必要提出一种动态分库路由方法、装置、服务器及存储介质,用以解决不能灵活处理量大的交易的技术问题。In view of the above, it is necessary to propose a dynamic sub-database routing method, device, server and storage medium to solve the technical problem of not being able to flexibly handle large transactions.
本申请的第一方面提供一种动态分库路由方法,应用于通讯服务器中,所述通讯服务器与包括多个服务组的应用服务器连接,所述方法包括:The first aspect of the present application provides a dynamic database routing method, which is applied to a communication server, where the communication server is connected to an application server including multiple service groups, and the method includes:
设置一个路由配置表,其中,所述路由配置表用于记录多个平台与所述多个服务组之间的对应关系,以及记录所述多个服务组中的每个服务组所对应的端口,其中,不同的平台对应不同的服务组;Set up a routing configuration table, where the routing configuration table is used to record the correspondence between multiple platforms and the multiple service groups, and to record the port corresponding to each service group in the multiple service groups , Where different platforms correspond to different service groups;
当接收到所述多个平台中的任一平台发送过来的业务请求时,根据所述发送业务请求的平台检索所述路由配置表,从所述多个服务组中确定一个目标服务组以及所述目标服务组所对应的端口,其中,所述目标服务组为所述路由配置表所记录的多个服务组中,与所述发送业务请求的平台对应的服务组;及When a service request sent by any one of the multiple platforms is received, the routing configuration table is retrieved according to the platform sending the service request, and a target service group and all service groups are determined from the multiple service groups. The port corresponding to the target service group, wherein the target service group is a service group corresponding to the platform that sends the service request among the multiple service groups recorded in the routing configuration table; and
将所接收到的业务请求发送到所述目标服务组所对应的端口。Send the received service request to the port corresponding to the target service group.
优选地,所述方法还包括:Preferably, the method further includes:
定期从所述应用服务器获取所述多个服务组中的每个服务组在预设时间段内的运行状况,其中,所述运行状况包括每个服务组启用最大线程数时的时间;及Obtain the operating status of each service group in the plurality of service groups in a preset time period from the application server on a regular basis, wherein the operating status includes the time when the maximum number of threads is enabled for each service group; and
根据所述多个服务组中的每个服务组在所述预设时间段内的运行状况调整所述路由配置表。The routing configuration table is adjusted according to the operating status of each service group in the plurality of service groups within the preset time period.
优选地,所述根据所述多个服务组中的每个服务组在所述预设时间段内的运行状况调整所述路由配置表包括:Preferably, the adjusting the routing configuration table according to the operating status of each service group in the plurality of service groups within the preset time period includes:
统计所述多个服务组中的每个服务组在所述预设时间段内启用最大线程数时的总时长,以得到所述多个服务组中的每个服务组对应的一个总时长;Counting the total duration of each service group in the plurality of service groups when the maximum number of threads is activated within the preset time period to obtain a total duration corresponding to each service group in the plurality of service groups;
确定每个服务组所对应的总时长是否超过预定时长;Determine whether the total duration corresponding to each service group exceeds the predetermined duration;
若所述多个服务组中的每个服务组所对应的总时长都小于或者等于所述预定时长,则确定无需更新所述路由配置表;If the total duration corresponding to each of the multiple service groups is less than or equal to the predetermined duration, it is determined that there is no need to update the routing configuration table;
若所述多个服务组中至少一个服务组所对应的总时长大于所述预定时长,则确定需更新所述路由配置表,及当确定需更新所述路由配置表时,在所述路 由配置表中,将与最长总时长所对应的服务组和与最短总时长所对应的服务组对调。If the total duration corresponding to at least one of the multiple service groups is greater than the predetermined duration, it is determined that the routing configuration table needs to be updated, and when it is determined that the routing configuration table needs to be updated, in the routing configuration In the table, swap the service group corresponding to the longest total time with the service group corresponding to the shortest total time.
本申请第二方面提供一种动态分库路由方法,应用于包括多个服务组的应用服务器中,所述应用服务器与通讯服务器和包括多个数据库的数据库服务器连接,所述方法包括:The second aspect of the present application provides a dynamic database routing method, applied to an application server including multiple service groups, the application server being connected to a communication server and a database server including multiple databases, the method includes:
为所述多个服务组中的每个服务组配置一个目标数据库,其中,所述目标数据库为所述多个数据库中的其中一个数据库,每个目标数据库用于存储多个平台的业务数据,所述多个服务组中的每个服务组对应一个端口;及Configure a target database for each of the multiple service groups, where the target database is one of the multiple databases, and each target database is used to store business data of multiple platforms, Each service group in the plurality of service groups corresponds to a port; and
实时侦测所述多个服务组分别对应的端口是否接收到从所述通讯服务器所发送过来的业务请求,当所述多个服务组中的某个服务组所对应的端口接收到所述业务请求时,控制所述某个服务组执行所述业务请求。Real-time detection of whether the ports corresponding to the multiple service groups receive the service request sent from the communication server, and when the port corresponding to a certain service group in the multiple service groups receives the service When requested, control the certain service group to execute the service request.
优选地,所述执行所述业务请求指从与所述某个服务组所对应的目标数据库中读取所述业务请求所请求的数据,或者将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组所对应的所述目标数据库。Preferably, the execution of the service request refers to reading the data requested by the service request from a target database corresponding to the certain service group, or storing the data requested by the service request to store/update /Update to the target database corresponding to the certain service group.
优选地,所述方法还包括:Preferably, the method further includes:
统计所述多个服务组中的每个服务组的运行状况,其中,所述运行状况包括每个服务组启用最大线程数时的时间,其中,所述多个服务组中的每个服务组所对应的最大线程数相同或者不同。Calculate the operating status of each service group in the multiple service groups, where the operating status includes the time when the maximum number of threads is enabled for each service group, wherein each service group in the multiple service groups The corresponding maximum number of threads is the same or different.
本申请第三方面提供一种动态分库路由装置,运行于通讯服务器中,所述通讯服务器与包括多个服务组的应用服务器连接,所述装置包括:A third aspect of the present application provides a dynamic database routing device, which runs in a communication server, and the communication server is connected to an application server including multiple service groups, and the device includes:
设置模块,用于设置一个路由配置表,其中,所述路由配置表用于记录多个平台与所述多个服务组之间的对应关系,以及记录所述多个服务组中的每个服务组所对应的端口,其中,不同的平台对应不同的服务组;The setting module is used to set a routing configuration table, wherein the routing configuration table is used to record the correspondence between multiple platforms and the multiple service groups, and to record each service in the multiple service groups The port corresponding to the group, where different platforms correspond to different service groups;
执行模块,用于当接收到所述多个平台中的任一平台发送过来的业务请求时,根据所述发送业务请求的平台检索所述路由配置表,从所述多个服务组中确定一个目标服务组以及所述目标服务组所对应的端口,其中,所述目标服务组为所述路由配置表所记录的多个服务组中,与所述发送业务请求的平台对应的服务组;及The execution module is configured to, when a service request sent by any one of the multiple platforms is received, retrieve the routing configuration table according to the platform that sent the service request, and determine one from the multiple service groups A target service group and a port corresponding to the target service group, wherein the target service group is a service group corresponding to the platform that sends the service request among the multiple service groups recorded in the routing configuration table; and
所述执行模块,还用于将所接收到的业务请求发送到所述目标服务组所对应的端口。The execution module is also used to send the received service request to the port corresponding to the target service group.
本申请第四方面提供一种动态分库路由装置,运行于包括多个服务组的应用服务器中,所述应用服务器与通讯服务器和包括多个数据库的数据库服务器连接,所述装置包括:The fourth aspect of the present application provides a dynamic database routing device, which runs on an application server including multiple service groups, the application server is connected to a communication server and a database server including multiple databases, and the device includes:
配置模块,用于为所述多个服务组中的每个服务组配置一个目标数据库,其中,所述目标数据库为所述多个数据库中的其中一个数据库,每个目标数据库用于存储多个平台的业务数据,所述多个服务组中的每个服务组对应一个端口;及The configuration module is used to configure a target database for each of the multiple service groups, where the target database is one of the multiple databases, and each target database is used to store multiple Business data of the platform, each of the multiple service groups corresponds to a port; and
控制模块,用于实时侦测所述多个服务组分别对应的端口是否接收到从所述通讯服务器所发送过来的业务请求,当所述多个服务组中的任一服务组所对应的端口接收到所述业务请求时,控制接收到所述业务请求的服务组执行所述业务请求,其中,所述执行所述业务请求是指从与所述接收到所述业务请求的服务组所对应的目标数据库中读取所述业务请求所请求的数据,或者将所述业务请求所请求存储/更新的数据存储/更新到与所述接收到所述业务请求的服务组所对应的所述目标数据库。The control module is used to detect in real time whether the respective ports corresponding to the multiple service groups receive the service request sent from the communication server, when the port corresponding to any one of the multiple service groups When the service request is received, the service group that has received the service request is controlled to execute the service request, where the execution of the service request refers to the service group corresponding to the service group that received the service request Read the data requested by the service request in the target database, or store/update the data requested to be stored/updated by the service request to the target corresponding to the service group that received the service request database.
本申请第五方面提供一种服务器,所述服务器包括处理器,所述处理器用 于执行存储器中存储的计算机可读指令时实现所述动态分库路由方法。A fifth aspect of the present application provides a server, the server includes a processor, and the processor is used to implement the dynamic database routing method when executing computer-readable instructions stored in a memory.
本申请第六方面提供一种非易失性可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现所述动态分库路由方法。A sixth aspect of the present application provides a non-volatile readable storage medium having computer readable instructions stored thereon, and when the computer readable instructions are executed by a processor, the dynamic database routing method is implemented.
本申请实施例中所述的动态分库分表方法、装置、服务器及存储介质,通过设置一个路由配置表,其中,所述路由配置表记录多个平台、所述多个服务组,以及所述多个服务组中的每个服务组所对应的端口,其中,不同的平台对应不同的服务组;接收从所述多个平台发送过来的业务请求;当接收到所述多个平台中的其中某个平台发送过来的业务请求时,根据所述某个平台检索所述路由配置表,从所述多个服务组中确定一个目标服务组以及所述目标服务组所对应的端口,其中,所述目标服务组为所述路由配置表所记录的多个服务组中,与所述某个平台对应的服务组;及将所接收到的业务请求发送到所述目标服务组所对应的端口,可以实现动态交易路由,将业务请求分发到不同的服务组端口,有效解决不能灵活处理量大的交易的技术问题。The method, device, server, and storage medium for dynamic database and table sharding described in the embodiments of the present application set a routing configuration table, wherein the routing configuration table records multiple platforms, the multiple service groups, and all Ports corresponding to each service group in the multiple service groups, where different platforms correspond to different service groups; receive service requests sent from the multiple platforms; when the multiple platforms are received When a service request is sent from a certain platform, the routing configuration table is retrieved according to the certain platform, and a target service group and the port corresponding to the target service group are determined from the multiple service groups, where: The target service group is a service group corresponding to the certain platform among multiple service groups recorded in the routing configuration table; and the received service request is sent to the port corresponding to the target service group , Can realize dynamic transaction routing, distribute business requests to different service group ports, and effectively solve the technical problem of not being able to flexibly handle large transactions.
另外通过为所述多个服务组中的每个服务组配置一个目标数据库,其中,所述目标数据库为所述多个数据库中的其中一个数据库,每个目标数据库用于存储多个平台的业务数据,所述多个服务组中的每个服务组对应一个端口;及实时侦测所述多个服务组分别对应的端口是否接收到从所述通讯服务器所发送过来的业务请求,当所述多个服务组中的某个服务组所对应的端口接收到所述业务请求时,控制所述某个服务组执行所述业务请求,其中,所述执行所述业务请求指从与所述某个服务组所对应的目标数据库中读取所述业务请求所请求的数据,或者将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组所对应的所述目标数据库,可以实现动态分库,支撑海量交易,系统处理灵活,能够有效支持交易大并发高的场景。In addition, a target database is configured for each of the multiple service groups, wherein the target database is one of the multiple databases, and each target database is used to store services of multiple platforms Data, each of the multiple service groups corresponds to a port; and real-time detection of whether the respective ports corresponding to the multiple service groups receive the service request sent from the communication server, when the When a port corresponding to a certain service group in a plurality of service groups receives the service request, the certain service group is controlled to execute the service request, wherein the execution of the service request refers to Read the data requested by the service request from the target database corresponding to each service group, or store/update the data requested by the service request to store/update to the target corresponding to the certain service group The database can realize dynamic sub-database, support massive transactions, flexible system processing, and can effectively support scenarios with large transaction concurrency.
附图说明Description of the drawings
图1是本申请实施例一提供的动态分库路由方法的应用环境架构图。FIG. 1 is an application environment architecture diagram of the dynamic database routing method provided in Embodiment 1 of the present application.
图2是本申请实施例二提供的动态分库路由方法的流程图。FIG. 2 is a flowchart of a dynamic database routing method provided in Embodiment 2 of the present application.
图3是本申请实施例三提供的动态分库路由方法的流程图。Fig. 3 is a flowchart of a dynamic database routing method provided in the third embodiment of the present application.
图4是本申请实施例四提供的动态分库路由装置的结构图。Fig. 4 is a structural diagram of a dynamic sub-library routing device provided in the fourth embodiment of the present application.
图5是本申请实施例五提供的动态分库路由装置的结构图。Fig. 5 is a structural diagram of a dynamic sub-library routing device provided in Embodiment 5 of the present application.
图6是本申请实施例六提供的通讯服务器的示意图。Fig. 6 is a schematic diagram of a communication server provided in the sixth embodiment of the present application.
图7是本申请实施例七提供的应用服务器的示意图。FIG. 7 is a schematic diagram of an application server provided in Embodiment 7 of the present application.
如下具体实施方式将结合上述附图进一步说明本申请。The following specific embodiments will further illustrate this application in conjunction with the above-mentioned drawings.
具体实施方式Detailed ways
实施例一Example one
参阅图1所示,为本申请实施例一提供的动态分库路由方法的应用环境架构图。本申请的动态分库路由方法应用在互相之间通讯连接的多个服务器所构成的环境中。例如,由通讯服务器3和应用服务器4以及数据库服务器5所构成的环境中。Refer to FIG. 1, which is an application environment architecture diagram of the dynamic database routing method provided in Embodiment 1 of this application. The dynamic sub-database routing method of the present application is applied in an environment composed of multiple servers communicating with each other. For example, in an environment composed of a communication server 3, an application server 4, and a database server 5.
在一个实施例中,所述通讯服务器3与应用服务器4可以通过有线(例如USB(Universal Serial Bus,通用串行总线)或无线的方式建立通讯连接。所述应用服务器4与数据库服务器5可以通过有线或无线的方式建立通讯连接。In one embodiment, the communication server 3 and the application server 4 may establish a communication connection through a wired (for example, USB (Universal Serial Bus, Universal Serial Bus) or wireless manner. The application server 4 and the database server 5 may be Establish a communication connection in a wired or wireless way.
在一个实施例中,所述无线方式可以是传统无线通讯的任何类型,例如无线电、无线保真(Wireless Fidelity,WIFI)、蜂窝、卫星、广播等。无线通讯技术 可以包括,但不限于,全球移动通信系统(Global System for Mobile Communications,GSM)、通用分组无线业务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA),宽带码分多址(W-CDMA)、CDMA2000、IMT单载波(IMT Single Carrier)、增强型数据速率GSM演进(Enhanced Data Rates for GSM Evolution,EDGE)、长期演进技术(Long-Term Evolution,LTE)、高级长期演进技术、时分长期演进技术(Time-Division LTE,TD-LTE)、高性能无线电局域网(High Performance Radio Local Area Network,HiperLAN)、高性能无线电广域网(High Performance Radio Wide Area Network,HiperWAN)、本地多点派发业务(Local Multipoint Distribution Service,LMDS)、全微波存取全球互通(Worldwide Interoperability for Microwave Access,WiMAX)、紫蜂协议(ZigBee)、蓝牙、正交频分复用技术(Flash Orthogonal Frequency-Division Multiplexing,Flash-OFDM)、大容量空分多路存取(High Capacity Spatial Division Multiple Access,HC-SDMA)、通用移动电信系统(Universal Mobile Telecommunications System,UMTS)、通用移动电信系统时分双工(UMTS Time-Division Duplexing,UMTS-TDD)、演进式高速分组接入(Evolved High Speed Packet Access,HSPA+)、时分同步码分多址(Time Division Synchronous Code Division Multiple Access,TD-SCDMA)、演进数据最优化(Evolution-Data Optimized,EV-DO)、数字增强无绳通信(Digital Enhanced Cordless Telecommunications,DECT)及其他。In an embodiment, the wireless method may be any type of traditional wireless communication, such as radio, wireless fidelity (WIFI), cellular, satellite, broadcast, and so on. Wireless communication technologies may include, but are not limited to, Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (W-CDMA), CDMA2000, IMT Single Carrier (IMT Single Carrier), Enhanced Data Rates for GSM Evolution (EDGE), Long-Term Evolution Technology (Long-Term Evolution, LTE) , Advanced long-term evolution technology, Time-Division LTE (TD-LTE), High-Performance Radio Local Area Network (HiperLAN), High-Performance Radio Wide Area Network (HiperWAN) , Local Multipoint Distribution Service (LMDS), Worldwide Interoperability for Microwave Access (WiMAX), ZigBee Protocol (ZigBee), Bluetooth, Orthogonal Frequency Division Multiplexing (Flash Orthogonal) Frequency-Division Multiplexing, Flash-OFDM), High Capacity Spatial Division Multiple Access (HC-SDMA), Universal Mobile Telecommunications System (UMTS), Universal Mobile Telecommunications System, Time Division Dual Industrial (UMTS Time-Division Duplexing, UMTS-TDD), Evolved High Speed Packet Access (HSPA+), Time Division Synchronous Code Division Multiple Access (Time Division Multiple Access, TD-SCDMA), Evolution Data optimization (Evolution-Data Optimized , EV-DO), Digital Enhanced Cordless Telecommunications (DECT) and others.
实施例二Example two
图2是本申请实施例二提供的动态分库路由方法的流程图。在本实施例中,所述动态分库路由方法可以应用于通讯服务器中,对于需要进行动态分库路由的通讯服务器,可以直接在通讯服务器上集成本申请的方法所提供的用于动态分库路由的功能,或者以软件开发工具包(Software Development Kit,SDK)的形式运行在通讯服务器上。FIG. 2 is a flowchart of a dynamic database routing method provided in Embodiment 2 of the present application. In this embodiment, the dynamic database routing method can be applied to a communication server. For a communication server that needs to perform dynamic database routing, the communication server can be directly integrated with the dynamic database database provided by the method of this application. The routing function may run on the communication server in the form of a software development kit (SDK).
如图2所示,所述动态分库路由方法具体包括以下步骤,根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。As shown in FIG. 2, the dynamic database routing method specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
步骤S1、通讯服务器设置一个路由配置表,其中,所述路由配置表用于记录多个平台与多个服务组之间的对应关系,以及记录所述多个服务组中的每个服务组所对应的端口,其中,不同的平台对应不同的服务组。Step S1. The communication server sets up a routing configuration table, where the routing configuration table is used to record the correspondence between multiple platforms and multiple service groups, and record the location of each service group in the multiple service groups. Corresponding ports, where different platforms correspond to different service groups.
本实施例中,所述多个平台可以是互联网电商平台,或其他需要用到数据库的平台。在一个实施例中,在所述路由配置表中,所述多个平台可以分别采用不同的代码表示。In this embodiment, the multiple platforms may be Internet e-commerce platforms, or other platforms that require a database. In one embodiment, in the routing configuration table, the multiple platforms may be represented by different codes.
举例而言,假设所述多个平台包括电商平台A1、电商平台A2、电商平台A3,则在所述路由配置表中可以利用代码“3001”代表电商平台A1,利用代码“3002”代表电商平台A2,利用代码“3003”代表电商平台A3。For example, assuming that the multiple platforms include e-commerce platform A1, e-commerce platform A2, and e-commerce platform A3, the code "3001" can be used to represent the e-commerce platform A1 in the routing configuration table, and the code "3002" "Represents e-commerce platform A2, and the code "3003" represents e-commerce platform A3.
举例而言,在所述路由配置表中,可以设置代码“3001”对应服务组B1,服务组B1与端口9001对应;设置代码“3002”对应服务组B2,服务组B2与端口9002对应;设置代码“3003”对应服务组B3,服务组B3与端口9003对应。由此,通过所示路由配置表为所述三个电商平台(即电商平台A1、A2、A3)分别配置了一个服务组。For example, in the routing configuration table, the code "3001" can be set to correspond to service group B1, and service group B1 corresponds to port 9001; the code "3002" to correspond to service group B2, and service group B2 corresponds to port 9002; set The code "3003" corresponds to service group B3, and service group B3 corresponds to port 9003. Therefore, a service group is configured for the three e-commerce platforms (ie, the e-commerce platforms A1, A2, A3) through the routing configuration table shown.
本实施例中,所述多个服务组可以分别是软件程序模块,运行在应用服务器中,每个服务组用于执行对应平台的业务请求。In this embodiment, the multiple service groups may be software program modules, respectively, running in an application server, and each service group is used to execute service requests of the corresponding platform.
本实施例中,应用服务器为所述多个服务组中的每个服务组配置一个目标数据库,每个目标数据库用于存储所述多个平台的业务数据。本实施例中,所述目标数据库为数据库服务器所包括的多个数据库中的其中一个数据库。In this embodiment, the application server configures a target database for each of the multiple service groups, and each target database is used to store business data of the multiple platforms. In this embodiment, the target database is one of multiple databases included in the database server.
本实施例中,所述多个平台的业务数据可以是指电商交易相关的数据,例如订单数量,每笔订单所涉及的金额等数据。In this embodiment, the business data of the multiple platforms may refer to data related to e-commerce transactions, such as the number of orders, the amount involved in each order, and other data.
举例而言,应用服务器可以为服务组B1配置目标数据库D1,为服务组B2配置目标数据库D2,为服务组B3配置目标数据库D3,所述目标数据库D1、D2、D3分别用于存储所述电商平台A1、A2、A3的所述业务数据。换句话来讲,所述目标数据库D1用于存储所述电商平台A1、A2、A3的所述业务数据,所述目标数据库D2用于存储所述电商平台A1、A2、A3的所述业务数据,所述目标数据库D3用于存储所述电商平台A1、A2、A3的所述业务数据。For example, the application server may configure a target database D1 for the service group B1, a target database D2 for the service group B2, and a target database D3 for the service group B3. The target databases D1, D2, and D3 are respectively used to store the electricity The business data of the business platforms A1, A2, A3. In other words, the target database D1 is used to store the business data of the e-commerce platforms A1, A2, A3, and the target database D2 is used to store all the business data of the e-commerce platforms A1, A2, A3. The business data, the target database D3 is used to store the business data of the e-commerce platforms A1, A2, A3.
在一个实施例中,所述多个服务组中的每个服务组所对应的最大线程数可以相同或者不同。例如,所述多个服务组中的每个服务组的最大线程数可以都为60、70或其他数值。本实施例中,每个线程数用于响应与服务组所对应的平台所发送的一个业务请求。In an embodiment, the maximum number of threads corresponding to each of the multiple service groups may be the same or different. For example, the maximum number of threads of each service group in the plurality of service groups may all be 60, 70 or other values. In this embodiment, each thread number is used to respond to a service request sent by the platform corresponding to the service group.
在一个实施例中,应用服务器还统计所述多个服务组中的每个服务组的运行状况。其中,所述运行状况包括每个服务组启用最大线程数时的时间。例如,统计到服务组A1在2018/11/11,01:00am至2018/11/12,00:00am期间一直启用最大线程数。In an embodiment, the application server also counts the operating status of each service group in the multiple service groups. Wherein, the operating status includes the time when the maximum number of threads is enabled for each service group. For example, the statistics show that the service group A1 has been using the maximum number of threads during the period from 01: 00 am on November 11, 2018 to 00: 00 am on November 12, 2018.
步骤S2、通讯服务器接收从所述多个平台发送过来的业务请求。当接收到所述多个平台中的其中某个平台发送过来的业务请求时,通讯服务器根据所述某个平台检索所述路由配置表,从所述多个服务组中确定一个目标服务组以及所述目标服务组所对应的端口,将所接收到的业务请求发送到所述目标服务组所对应的端口。其中,所述目标服务组为所述路由配置表所记录的多个服务组中,与所述某个平台对应的服务组。Step S2: The communication server receives service requests sent from the multiple platforms. When receiving a service request sent by a certain platform among the multiple platforms, the communication server retrieves the routing configuration table according to the certain platform, determines a target service group from the multiple service groups, and The port corresponding to the target service group sends the received service request to the port corresponding to the target service group. Wherein, the target service group is a service group corresponding to the certain platform among multiple service groups recorded in the routing configuration table.
在一个实施例中,所述通讯服务器可以实时侦测从所述多个平台发送过来的所述业务请求。需要说明的是,所述某个平台为所述路由配置表所记录的多个平台中的任意一个平台。In an embodiment, the communication server can detect the service request sent from the multiple platforms in real time. It should be noted that the certain platform is any one of the multiple platforms recorded in the routing configuration table.
举例而言,假设通讯服务器接收到电商平台A1发送过来的业务请求,并根据所述电商平台A1检索所述路由配置表,确定目标服务组为服务组B1以及所述服务组B1所对应的端口9001。所述通讯服务器则将所接收到的业务请求发送到所述服务组B1所对应的端口9001。For example, suppose that the communication server receives the service request sent by the e-commerce platform A1, and retrieves the routing configuration table according to the e-commerce platform A1 to determine that the target service group is the service group B1 and the service group B1 corresponds Port 9001. The communication server sends the received service request to the port 9001 corresponding to the service group B1.
本实施例中,应用服务器实时侦测所述多个服务组分别对应的端口是否接收到从所述通讯服务器所发送过来的业务请求。当所述多个服务组中的某个服务组(例如,所述目标服务组)所对应的端口接收到所述业务请求时,应用服务器控制所述某个服务组执行所述业务请求。In this embodiment, the application server detects in real time whether the ports corresponding to the multiple service groups receive the service request sent from the communication server. When a port corresponding to a certain service group (for example, the target service group) of the multiple service groups receives the service request, the application server controls the certain service group to execute the service request.
需要说明的是,所述某个服务组可以为所述多个服务组中的任意一个服务组。It should be noted that the certain service group may be any one of the multiple service groups.
本实施例中,所述执行所述业务请求指从与所述某个服务组所对应的目标数据库中读取所述业务请求所请求的数据,或者将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组所对应的所述目标数据库。换句话来讲,所述业务请求可以是指读取数据的请求、存储数据的请求,或者更新数据的请求。In this embodiment, the execution of the service request refers to reading the data requested by the service request from the target database corresponding to the certain service group, or storing/updating the data requested by the service request The data is stored/updated to the target database corresponding to the certain service group. In other words, the service request may refer to a request to read data, a request to store data, or a request to update data.
在一个实施例中,当所述执行所述业务请求是指从与所述某个服务组(例如,所述目标服务组)所对应的目标数据库中读取所述业务请求所请求的数据 时,应用服务器控制所述某个服务组将所读取的数据返回给所述通讯服务器,所述通讯服务器则将所读取的数据回传给所述某个平台。当所述执行所述业务请求是指将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组(例如,所述目标服务组)所对应的目标数据库时,当所述某个服务组将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组所对应的目标数据库后,应用服务器还控制所述某个服务组发送一个完成数据更新的通知到所述通讯服务器,所述通讯服务器则将所述完成数据更新的通知回传给所述某个平台。In an embodiment, when the execution of the service request refers to reading the data requested by the service request from the target database corresponding to the certain service group (for example, the target service group) The application server controls the certain service group to return the read data to the communication server, and the communication server returns the read data to the certain platform. When the execution of the service request refers to storing/updating the stored/updated data requested by the service request to the target database corresponding to the certain service group (for example, the target service group), when After the certain service group stores/updates the stored/updated data requested by the service request to the target database corresponding to the certain service group, the application server also controls the certain service group to send a completion data The update notification is sent to the communication server, and the communication server returns the notification of completing the data update to the certain platform.
本实施例中,当数据库服务器所包括的多个数据库中的其中某个数据库(例如所述目标数据库)的数据有更新时,数据库服务器还同步更新所述多个数据库中的其他数据库。In this embodiment, when data in a certain database (for example, the target database) of the multiple databases included in the database server is updated, the database server also synchronously updates other databases in the multiple databases.
举例而言,假设所述服务组B1在所述多个数据库中的其中某个数据库(例如目标数据库D1)存储了一笔交易数据,则数据库服务器检测到所目标数据库D1存在数据更新时,对所述多个数据库中的其他数据库(例如目标数据库D2和D3)也同步更新,从而实现各个数据库的数据同步更新。即使得所述多个数据库中的每个数据库的数据一致。For example, suppose the service group B1 stores a transaction data in one of the multiple databases (for example, the target database D1), and the database server detects that there is a data update in the target database D1. Other databases in the multiple databases (for example, the target databases D2 and D3) are also updated synchronously, so as to realize the synchronous update of the data of each database. Even if the data in each of the multiple databases is consistent.
在一个实施例中,数据库服务器还根据所述目标数据库所存储的所述多个平台的业务数据的数据量确定是否对所述目标数据库进行分表处理。In an embodiment, the database server further determines whether to perform table splitting processing on the target database according to the data volume of the business data of the multiple platforms stored in the target database.
需要说明的是,可以于每个目标数据库应用一段时间后再来根据所存储的所述多个平台的业务数据的数据量来确定是否分表。例如,应用所述目标数据库的第一个月内可以不分表,即将所有平台的数据放在同一个公共表中。而在所述目标数据库应用了一个月后则根据所存储的所述多个平台的业务数据的数据量来确定是否分表。It should be noted that, after each target database is applied for a period of time, it is possible to determine whether to split the table according to the data volume of the stored business data of the multiple platforms. For example, in the first month of applying the target database, tables may not be divided, that is, data of all platforms are placed in the same common table. After the target database has been applied for one month, it is determined whether to split tables according to the data volume of the stored business data of the multiple platforms.
具体地,所述根据所述目标数据库所存储的所述多个平台的业务数据的数据量确定是否对所述目标数据库进行分表处理包括(a1)-(a3):Specifically, the determining whether to perform table splitting processing on the target database according to the data volume of the business data of the multiple platforms stored in the target database includes (a1)-(a3):
(a1)定期(例如,每隔一天、每月1日、每月15日)分析所述目标数据库所存储的所述多个平台中的每个平台的业务数据的数据量是否大于一个预设数值。(a1) Periodically (for example, every other day, 1st of every month, 15th of every month) analyze whether the data volume of the business data of each of the multiple platforms stored in the target database is greater than a preset Numerical value.
(a2)若所述多个平台中的每个平台的业务数据的数据量都小于或者等于所述预设数值,则确定不对所述目标数据库分表。若所述多个平台中的至少一个平台的业务数据的数据量大于所述预设数值,则确定对所述目标数据库分表。(a2) If the data volume of the business data of each of the multiple platforms is less than or equal to the preset value, it is determined not to partition the target database. If the data amount of the business data of at least one of the multiple platforms is greater than the preset value, it is determined to partition the target database.
(a3)当确定对所述目标数据库分表时,新建一个数据库表,将业务数据的数据量大于所述预设数值的平台所对应的业务数据存储在所述新建的数据库表。(a3) When it is determined that the target database is divided into tables, a new database table is created, and the business data corresponding to the platform whose data amount of business data is greater than the preset value is stored in the newly created database table.
步骤S3、通讯服务器定期(例如每日00:00am)从所述应用服务器获取所述多个服务组中的每个服务组在预设时间段(例如,最近一天、最近一周、最近一个月)内的运行状况。Step S3: The communication server regularly (for example, 00:00am every day) obtains from the application server each service group in the plurality of service groups in a preset time period (for example, the last day, the last week, the last month) Operating conditions within.
如前面所述,所述运行状况包括每个服务组启用最大线程数时的时间。As mentioned earlier, the operating status includes the time when the maximum number of threads is enabled for each service group.
步骤S4、通讯服务器根据所述多个服务组中的每个服务组在所述预设时间段内的运行状况调整所述路由配置表。Step S4: The communication server adjusts the routing configuration table according to the operating status of each service group of the plurality of service groups within the preset time period.
在一个实施例中,所述根据所述多个服务组中的每个服务组在所述预设时间段内的运行状况调整所述路由配置表包括(b1)-(b3):In an embodiment, the adjusting the routing configuration table according to the operating status of each service group of the plurality of service groups within the preset time period includes (b1)-(b3):
(b1)统计所述多个服务组中的每个服务组在所述预设时间段内启用最大线程数时的总时长,从而为所述多个服务组中的每个服务组统计到一个总时长,确定每个服务组所对应的总时长是否超过预定时长。(b1) Count the total duration of each service group in the plurality of service groups when the maximum number of threads is enabled within the preset time period, so as to count one for each service group in the plurality of service groups Total duration, to determine whether the total duration corresponding to each service group exceeds the predetermined duration.
(b2)若所述多个服务组中的每个服务组所对应的总时长都小于或者等于所述预定时长,则确定无需更新所述路由配置表。若所述多个服务组中至少一个服务组所对应的总时长大于所述预定时长,则确定需更新所述路由配置表。(b2) If the total duration corresponding to each of the multiple service groups is less than or equal to the predetermined duration, it is determined that there is no need to update the routing configuration table. If the total duration corresponding to at least one of the multiple service groups is greater than the predetermined duration, it is determined that the routing configuration table needs to be updated.
(b3)当确定需更新所述路由配置表,在所述路由配置表中,将与最长总时长所对应的服务组和与最短总时长所对应的服务组对调。(b3) When it is determined that the routing configuration table needs to be updated, in the routing configuration table, the service group corresponding to the longest total duration is swapped with the service group corresponding to the shortest total duration.
举例而言,假设在所述步骤(b1)中统计得出服务组B1所对应的总时长最长,服务组B3所对应的总时长最短,则在所述路由配置表中,调整设置为所述服务组B1与电商平台A3对应,以及所述服务组B3与电商平台A1对应。For example, if it is calculated in the step (b1) that the total duration corresponding to service group B1 is the longest and the total duration corresponding to service group B3 is the shortest, then in the routing configuration table, the adjustment setting is The service group B1 corresponds to the e-commerce platform A3, and the service group B3 corresponds to the e-commerce platform A1.
综上所述,本申请实施例中所述的动态分库路由方法,通过设置一个路由配置表,其中,所述路由配置表记录多个平台、所述多个服务组,以及所述多个服务组中的每个服务组所对应的端口,其中,不同的平台对应不同的服务组;接收从所述多个平台发送过来的业务请求;当接收到所述多个平台中的其中某个平台发送过来的业务请求时,根据所述某个平台检索所述路由配置表,从所述多个服务组中确定一个目标服务组以及所述目标服务组所对应的端口,其中,所述目标服务组为所述路由配置表所记录的多个服务组中,与所述某个平台对应的服务组;及将所接收到的业务请求发送到所述目标服务组所对应的端口,可以实现动态交易路由,将业务请求分发到不同的服务组端口,有效解决不能灵活处理量大的交易的技术问题。In summary, the dynamic database routing method described in the embodiments of the present application sets a routing configuration table, wherein the routing configuration table records multiple platforms, the multiple service groups, and the multiple The port corresponding to each service group in the service group, where different platforms correspond to different service groups; receive service requests sent from the multiple platforms; when one of the multiple platforms is received When a service request is sent by the platform, the routing configuration table is retrieved according to the certain platform, and a target service group and the port corresponding to the target service group are determined from the multiple service groups, wherein the target The service group is the service group corresponding to the certain platform among the multiple service groups recorded in the routing configuration table; and sending the received service request to the port corresponding to the target service group can be realized Dynamic transaction routing, which distributes business requests to different service group ports, effectively solves the technical problem of not being able to flexibly handle large transactions.
实施例三Example three
图3是本申请实施例三提供的用于动态分库路由方法的流程图。Fig. 3 is a flowchart of a routing method for dynamic database partitioning provided in the third embodiment of the present application.
在本实施例中,所述用于动态分库路由方法可以应用于应用服务器中,对于需要进行动态分库路由方法的应用服务器,可以直接在应用服务器上集成本申请的方法所提供的用于动态分库路由的功能,或者以软件开发工具包(Software Development Kit,SDK)的形式运行在应用服务器上。In this embodiment, the routing method for dynamic database partitioning can be applied to an application server. For an application server that needs to perform a dynamic database partitioning routing method, the application server can be directly integrated with the method provided by this application. The function of dynamic sub-library routing, or run on the application server in the form of a software development kit (SDK).
如图3所示,所述用于动态分库路由方法具体包括以下步骤,根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。As shown in FIG. 3, the routing method for dynamic database partitioning specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
步骤S21、应用服务器为所述多个服务组中的每个服务组配置一个目标数据库,所述目标数据库为数据库服务器所包括的多个数据库中的其中一个数据库。每个目标数据库用于存储所述多个平台的业务数据。Step S21: The application server configures a target database for each of the multiple service groups, where the target database is one of the multiple databases included in the database server. Each target database is used to store business data of the multiple platforms.
如前面所述,所述多个平台的业务数据可以是指电商交易相关的数据,例如订单数量,每笔订单所涉及的金额等数据。As mentioned above, the business data of the multiple platforms may refer to data related to e-commerce transactions, such as the number of orders, the amount involved in each order, and other data.
举例而言,应用服务器可以为服务组B1配置目标数据库D1,为服务组B2配置目标数据库D2,为服务组B3配置目标数据库D3,所述目标数据库D1、D2、D3分别用于存储所述电商平台A1、A2、A3的所述业务数据。换句话来讲,所述目标数据库D1用于存储所述电商平台A1、A2、A3的所述业务数据,所述目标数据库D2用于存储所述电商平台A1、A2、A3的所述业务数据,所述目标数据库D3用于存储所述电商平台A1、A2、A3的所述业务数据。For example, the application server may configure a target database D1 for the service group B1, a target database D2 for the service group B2, and a target database D3 for the service group B3. The target databases D1, D2, and D3 are respectively used to store the electricity The business data of the business platforms A1, A2, A3. In other words, the target database D1 is used to store the business data of the e-commerce platforms A1, A2, A3, and the target database D2 is used to store all the business data of the e-commerce platforms A1, A2, A3. The business data, the target database D3 is used to store the business data of the e-commerce platforms A1, A2, A3.
在一个实施例中,所述多个服务组中的每个服务组所对应的最大线程数可以相同或者不同。例如,所述多个服务组中的每个服务组的最大线程数可以都为60、70或其他数值。本实施例中,每个线程数用于响应与服务组所对应的平台所发送的一个业务请求。In an embodiment, the maximum number of threads corresponding to each of the multiple service groups may be the same or different. For example, the maximum number of threads of each service group in the plurality of service groups may all be 60, 70 or other values. In this embodiment, each thread number is used to respond to a service request sent by the platform corresponding to the service group.
在一个实施例中,应用服务器还统计所述多个服务组中的每个服务组的运行状况。其中,所述运行状况包括每个服务组启用最大线程数时的时间。例如,统计到服务组A1在2018/11/11,01:00am至2018/11/12,00:00am期间一直启用最大线程数。In an embodiment, the application server also counts the operating status of each service group in the multiple service groups. Wherein, the operating status includes the time when the maximum number of threads is enabled for each service group. For example, the statistics show that the service group A1 has been using the maximum number of threads during the period from 01: 00 am on November 11, 2018 to 00: 00 am on November 12, 2018.
步骤S22、应用服务器实时侦测所述多个服务组分别对应的端口是否接收到从所述通讯服务器所发送过来的业务请求。当所述多个服务组中的某个服务组(例如,前面所述的目标服务组)所对应的端口接收到所述业务请求时,应用服务器控制所述某个服务组执行所述业务请求。所述执行所述业务请求是指从与所述某个服务组所对应的目标数据库中读取所述业务请求所请求的数据,或者将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组所对应的所述目标数据库。Step S22: The application server detects in real time whether the ports corresponding to the multiple service groups receive the service request sent from the communication server. When a port corresponding to a certain service group (for example, the aforementioned target service group) of the multiple service groups receives the service request, the application server controls the certain service group to execute the service request . The execution of the service request refers to reading the data requested by the service request from the target database corresponding to the certain service group, or storing/update the data requested by the service request to store/update To the target database corresponding to the certain service group.
换句话来讲,所述业务请求可以是指读取数据的请求、存储数据的请求,或者更新数据的请求。In other words, the service request may refer to a request to read data, a request to store data, or a request to update data.
在一个实施例中,当所述执行所述业务请求是指从与所述某个服务组(例如所述目标服务组)所对应的目标数据库中读取所述业务请求所请求的数据时,应用服务器控制所述某个服务组将所读取的数据返回给所述通讯服务器,所述通讯服务器则将所读取的数据回传给所述某个平台。当所述执行所述业务请求是指将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组(例如,所述目标服务组)所对应的目标数据库时,当所述某个服务组将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组所对应的目标数据库后,应用服务器还控制所述某个服务组发送一个完成数据更新的通知到所述通讯服务器,所述通讯服务器则将所述完成数据更新的通知回传给所述某个平台。In an embodiment, when the execution of the service request refers to reading the data requested by the service request from a target database corresponding to the certain service group (for example, the target service group), The application server controls the certain service group to return the read data to the communication server, and the communication server returns the read data to the certain platform. When the execution of the service request refers to storing/updating the stored/updated data requested by the service request to the target database corresponding to the certain service group (for example, the target service group), when After the certain service group stores/updates the stored/updated data requested by the service request to the target database corresponding to the certain service group, the application server also controls the certain service group to send a completion data The update notification is sent to the communication server, and the communication server returns the notification of completing the data update to the certain platform.
综上所述,本申请实施例中所述的动态分库路由方法,通过为所述多个服务组中的每个服务组配置一个目标数据库,其中,所述目标数据库为所述多个数据库中的其中一个数据库,每个目标数据库用于存储多个平台的业务数据,所述多个服务组中的每个服务组对应一个端口;及实时侦测所述多个服务组分别对应的端口是否接收到从所述通讯服务器所发送过来的业务请求,当所述多个服务组中的某个服务组所对应的端口接收到所述业务请求时,控制所述某个服务组执行所述业务请求,其中,所述执行所述业务请求指从与所述某个服务组所对应的目标数据库中读取所述业务请求所请求的数据,或者将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组所对应的所述目标数据库,可以实现动态分库,支撑海量交易,系统处理灵活,能够有效支持交易大并发高的场景。In summary, the dynamic database routing method described in the embodiment of the present application configures a target database for each of the multiple service groups, wherein the target database is the multiple databases Each target database is used to store business data of multiple platforms, and each service group in the multiple service groups corresponds to a port; and real-time detection of the respective ports corresponding to the multiple service groups Whether the service request sent from the communication server is received, when the port corresponding to a certain service group in the multiple service groups receives the service request, control the certain service group to execute the A business request, wherein the execution of the business request refers to reading the data requested by the business request from the target database corresponding to the certain service group, or storing/update the data requested by the business request Data storage/update to the target database corresponding to the certain service group can realize dynamic sub-database, support massive transactions, flexible system processing, and can effectively support scenarios with high transaction concurrency.
上述图2和图3详细介绍了本申请的动态分库路由方法,下面结合图4至图7,分别对实现所述动态分库路由方法的软件装置的功能模块以及实现所述动态分库路由方法的硬件装置架构进行介绍。The above-mentioned figures 2 and 3 describe in detail the dynamic sub-database routing method of the present application. In the following, with reference to Figures 4 to 7, the functional modules of the software device for implementing the dynamic sub-database routing method and the realization of the dynamic sub-database routing are respectively described The hardware device architecture of the method is introduced.
实施例四Example four
参阅图4所示,是本申请实施例四提供的动态分库路由装置的结构图。Refer to FIG. 4, which is a structural diagram of a dynamic sub-library routing device provided in Embodiment 4 of the present application.
在一些实施例中,所述动态分库路由装置30运行于通讯服务器中。所述通讯服务器通过网络连接了应用服务器,所述应用服务器通过网络连接了数据库服务器。所述动态分库路由装置30可以包括多个由程序代码段所组成的功能模块。所述动态分库路由装置30中的各个程序段的程序代码可以存储于通讯服务器的存储器中,并由所述至少一个处理器所执行,以执行(详见图2描述)动态分库路由。In some embodiments, the dynamic branch routing device 30 runs in a communication server. The communication server is connected to the application server through the network, and the application server is connected to the database server through the network. The dynamic sub-library routing device 30 may include multiple functional modules composed of program code segments. The program code of each program segment in the dynamic sub-library routing device 30 can be stored in the memory of the communication server and executed by the at least one processor to execute (see Figure 2 for details) dynamic sub-library routing.
本实施例中,所述动态分库路由装置30根据其所执行的功能,可以被划分为多个功能模块。所述功能模块可以包括:设置模块301、接收模块302、执行模块303。本申请所称的模块是指一种能够被至少一个处理器所执行并且能够完成固定功能的一系列计算机可读指令段,其存储在存储器中。在本实施例中, 关于各模块的功能将在后续的实施例中详述。In this embodiment, the dynamic branch routing device 30 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a setting module 301, a receiving module 302, and an executing module 303. The module referred to in this application refers to a series of computer-readable instruction segments that can be executed by at least one processor and can complete fixed functions, and are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
设置模块301设置一个路由配置表,其中,所述路由配置表用于记录多个平台与多个服务组之间的对应关系,以及记录所述多个服务组中的每个服务组所对应的端口,其中,不同的平台对应不同的服务组。The setting module 301 sets a routing configuration table, where the routing configuration table is used to record the correspondence between multiple platforms and multiple service groups, and to record the corresponding relationship between each of the multiple service groups. Port, where different platforms correspond to different service groups.
本实施例中,所述多个平台可以是互联网电商平台,或其他需要用到数据库的平台。在一个实施例中,在所述路由配置表中,所述多个平台可以分别采用不同的代码表示。In this embodiment, the multiple platforms may be Internet e-commerce platforms, or other platforms that require a database. In one embodiment, in the routing configuration table, the multiple platforms may be represented by different codes.
举例而言,假设所述多个平台包括电商平台A1、电商平台A2、电商平台A3,则在所述路由配置表中可以利用代码“3001”代表电商平台A1,利用代码“3002”代表电商平台A2,利用代码“3003”代表电商平台A3。For example, assuming that the multiple platforms include e-commerce platform A1, e-commerce platform A2, and e-commerce platform A3, the code "3001" can be used to represent the e-commerce platform A1 in the routing configuration table, and the code "3002" "Represents e-commerce platform A2, and the code "3003" represents e-commerce platform A3.
举例而言,在所述路由配置表中,设置模块301可以设置代码“3001”对应服务组B1,服务组B1与端口9001对应;设置代码“3002”对应服务组B2,服务组B2与端口9002对应;设置代码“3003”对应服务组B3,服务组B3与端口9003对应。由此,通过所示路由配置表为所述三个电商平台(即电商平台A1、A2、A3)分别配置了一个服务组。For example, in the routing configuration table, the setting module 301 can set the code "3001" to correspond to service group B1, and service group B1 to correspond to port 9001; to set code "3002" to correspond to service group B2, service group B2 to port 9002 Corresponding; the setting code "3003" corresponds to service group B3, and service group B3 corresponds to port 9003. Therefore, a service group is configured for the three e-commerce platforms (ie, the e-commerce platforms A1, A2, A3) through the routing configuration table shown.
本实施例中,所述多个服务组可以分别是软件程序模块,运行在应用服务器中,每个服务组用于执行对应平台的业务请求。In this embodiment, the multiple service groups may be software program modules, respectively, running in an application server, and each service group is used to execute service requests of the corresponding platform.
本实施例中,应用服务器为所述多个服务组中的每个服务组配置一个目标数据库,每个目标数据库用于存储所述多个平台的业务数据。本实施例中,所述目标数据库为数据库服务器所包括的多个数据库中的其中一个数据库。In this embodiment, the application server configures a target database for each of the multiple service groups, and each target database is used to store business data of the multiple platforms. In this embodiment, the target database is one of multiple databases included in the database server.
本实施例中,所述多个平台的业务数据可以是指电商交易相关的数据,例如订单数量,每笔订单所涉及的金额等数据。In this embodiment, the business data of the multiple platforms may refer to data related to e-commerce transactions, such as the number of orders, the amount involved in each order, and other data.
举例而言,应用服务器可以为服务组B1配置目标数据库D1,为服务组B2配置目标数据库D2,为服务组B3配置目标数据库D3,所述目标数据库D1、D2、D3分别用于存储所述电商平台A1、A2、A3的所述业务数据。换句话来讲,所述目标数据库D1用于存储所述电商平台A1、A2、A3的所述业务数据,所述目标数据库D2用于存储所述电商平台A1、A2、A3的所述业务数据,所述目标数据库D3用于存储所述电商平台A1、A2、A3的所述业务数据。For example, the application server may configure a target database D1 for the service group B1, a target database D2 for the service group B2, and a target database D3 for the service group B3. The target databases D1, D2, and D3 are respectively used to store the electricity The business data of the business platforms A1, A2, A3. In other words, the target database D1 is used to store the business data of the e-commerce platforms A1, A2, A3, and the target database D2 is used to store all the business data of the e-commerce platforms A1, A2, A3. The business data, the target database D3 is used to store the business data of the e-commerce platforms A1, A2, A3.
在一个实施例中,所述多个服务组中的每个服务组所对应的最大线程数可以相同或者不同。例如,所述多个服务组中的每个服务组的最大线程数可以都为60、70或其他数值。本实施例中,每个线程数用于响应与服务组所对应的平台所发送的一个业务请求。In an embodiment, the maximum number of threads corresponding to each of the multiple service groups may be the same or different. For example, the maximum number of threads of each service group in the plurality of service groups may all be 60, 70 or other values. In this embodiment, each thread number is used to respond to a service request sent by the platform corresponding to the service group.
在一个实施例中,应用服务器还统计所述多个服务组中的每个服务组的运行状况。其中,所述运行状况包括每个服务组启用最大线程数时的时间。例如,统计到服务组A1在2018/11/11,01:00am至2018/11/12,00:00am期间一直启用最大线程数。In an embodiment, the application server also counts the operating status of each service group in the plurality of service groups. Wherein, the operating status includes the time when the maximum number of threads is enabled for each service group. For example, it is calculated that the service group A1 has been enabled for the maximum number of threads during the period from 01: 00 am on 11 November 2018 to 00: 00 am on 11 November 2018.
接收模块302接收从所述多个平台发送过来的业务请求。当接收模块302接收到所述多个平台中的其中某个平台发送过来的业务请求时,执行模块303根据所述某个平台检索所述路由配置表,从所述多个服务组中确定一个目标服务组以及所述目标服务组所对应的端口。执行模块303将所接收到的业务请求发送到所述目标服务组所对应的端口。其中,所述目标服务组为所述路由配置表所记录的多个服务组中,与所述某个平台对应的服务组。The receiving module 302 receives service requests sent from the multiple platforms. When the receiving module 302 receives a service request sent by a certain platform among the multiple platforms, the execution module 303 retrieves the routing configuration table according to the certain platform, and determines one from the multiple service groups The target service group and the port corresponding to the target service group. The execution module 303 sends the received service request to the port corresponding to the target service group. Wherein, the target service group is a service group corresponding to the certain platform among multiple service groups recorded in the routing configuration table.
在一个实施例中,所述接收模块302可以实时侦测从所述多个平台发送过来的所述业务请求。In an embodiment, the receiving module 302 can detect the service request sent from the multiple platforms in real time.
需要说明的是,所述某个平台为所述路由配置表所记录的多个平台中的任意一个平台。It should be noted that the certain platform is any one of the multiple platforms recorded in the routing configuration table.
举例而言,假设接收模块302接收到电商平台A1发送过来的业务请求,执行模块303根据所述电商平台A1检索所述路由配置表,确定目标服务组为服务组B1以及所述服务组B1所对应的端口9001。所述执行模块303则将所接收到的业务请求发送到所述服务组B1所对应的端口9001。For example, suppose the receiving module 302 receives the service request sent by the e-commerce platform A1, the execution module 303 retrieves the routing configuration table according to the e-commerce platform A1, and determines that the target service group is the service group B1 and the service group Port 9001 corresponding to B1. The execution module 303 sends the received service request to the port 9001 corresponding to the service group B1.
本实施例中,应用服务器实时侦测所述多个服务组分别对应的端口是否接收到从所述通讯服务器所发送过来的业务请求。当所述多个服务组中的某个服务组(例如,所述目标服务组)所对应的端口接收到所述业务请求时,应用服务器控制所述某个服务组执行所述业务请求。In this embodiment, the application server detects in real time whether the ports corresponding to the multiple service groups receive the service request sent from the communication server. When a port corresponding to a certain service group (for example, the target service group) of the multiple service groups receives the service request, the application server controls the certain service group to execute the service request.
需要说明的是,所述某个服务组可以为所述多个服务组中的任意一个服务组。It should be noted that the certain service group may be any one of the multiple service groups.
本实施例中,所述执行所述业务请求指从与所述某个服务组所对应的目标数据库中读取所述业务请求所请求的数据,或者将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组所对应的所述目标数据库。换句话来讲,所述业务请求可以是指读取数据的请求、存储数据的请求,或者更新数据的请求。In this embodiment, the execution of the service request refers to reading the data requested by the service request from the target database corresponding to the certain service group, or storing/updating the data requested by the service request The data is stored/updated to the target database corresponding to the certain service group. In other words, the service request may refer to a request to read data, a request to store data, or a request to update data.
在一个实施例中,当所述执行所述业务请求是指从与所述某个服务组(例如,所述目标服务组)所对应的目标数据库中读取所述业务请求所请求的数据时,应用服务器控制所述某个服务组将所读取的数据返回给所述通讯服务器,所述执行模块303则将所读取的数据回传给所述某个平台。当所述执行所述业务请求是指将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组(例如,所述目标服务组)所对应的目标数据库时,当所述某个服务组将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组所对应的目标数据库后,应用服务器还控制所述某个服务组发送一个完成数据更新的通知到所述通讯服务器,所述执行模块303则将所述完成数据更新的通知回传给所述某个平台。In an embodiment, when the execution of the service request refers to reading the data requested by the service request from the target database corresponding to the certain service group (for example, the target service group) , The application server controls the certain service group to return the read data to the communication server, and the execution module 303 returns the read data to the certain platform. When the execution of the service request refers to storing/updating the stored/updated data requested by the service request to the target database corresponding to the certain service group (for example, the target service group), when After the certain service group stores/updates the stored/updated data requested by the service request to the target database corresponding to the certain service group, the application server also controls the certain service group to send a completion data The update notification is sent to the communication server, and the execution module 303 returns the notification of completing the data update to the certain platform.
本实施例中,当数据库服务器所包括的多个数据库中的其中某个数据库(例如所述目标数据库)的数据有更新时,数据库服务器还同步更新所述多个数据库中的其他数据库。In this embodiment, when data in a certain database (for example, the target database) of the multiple databases included in the database server is updated, the database server also synchronously updates other databases in the multiple databases.
举例而言,假设所述服务组B1在所述多个数据库中的其中某个数据库(例如目标数据库D1)存储了一笔交易数据,则数据库服务器检测到所目标数据库D1存在数据更新时,对所述多个数据库中的其他数据库(例如目标数据库D2和D3)也同步更新,从而实现各个数据库的数据同步更新。即使得所述多个数据库中的每个数据库的数据一致。For example, suppose the service group B1 stores a transaction data in one of the multiple databases (for example, the target database D1), and the database server detects that there is a data update in the target database D1. Other databases in the multiple databases (for example, the target databases D2 and D3) are also updated synchronously, so as to realize the synchronous update of the data of each database. Even if the data in each of the multiple databases is consistent.
在一个实施例中,数据库服务器还根据所述目标数据库所存储的所述多个平台的业务数据的数据量确定是否对所述目标数据库进行分表处理。In an embodiment, the database server further determines whether to perform table splitting processing on the target database according to the data volume of the business data of the multiple platforms stored in the target database.
需要说明的是,可以于每个目标数据库应用一段时间后再来根据所存储的所述多个平台的业务数据的数据量来确定是否分表。例如,应用所述目标数据库的第一个月内可以不分表,即将所有平台的数据放在同一个公共表中。而在所述目标数据库应用了一个月后则根据所存储的所述多个平台的业务数据的数据量来确定是否分表。It should be noted that, after each target database is applied for a period of time, it is possible to determine whether to split the table according to the data volume of the stored business data of the multiple platforms. For example, in the first month of applying the target database, tables may not be divided, that is, data of all platforms are placed in the same common table. After the target database has been applied for one month, it is determined whether to split tables according to the data volume of the stored business data of the multiple platforms.
具体地,所述根据所述目标数据库所存储的所述多个平台的业务数据的数据量确定是否对所述目标数据库进行分表处理包括(a1)-(a3):Specifically, the determining whether to perform table splitting processing on the target database according to the data volume of the business data of the multiple platforms stored in the target database includes (a1)-(a3):
(a1)定期(例如,每隔一天、每月1日、每月15日)分析所述目标数据库所存储的所述多个平台中的每个平台的业务数据的数据量是否大于一个预设数值。(a1) Periodically (for example, every other day, 1st of every month, 15th of every month) analyze whether the data volume of the business data of each of the multiple platforms stored in the target database is greater than a preset Numerical value.
(a2)若所述多个平台中的每个平台的业务数据的数据量都小于或者等于所述预设数值,则确定不对所述目标数据库分表。若所述多个平台中的至少一个平台的业务数据的数据量大于所述预设数值,则确定对所述目标数据库分表。(a2) If the data volume of the business data of each of the multiple platforms is less than or equal to the preset value, it is determined not to partition the target database. If the data amount of the business data of at least one of the multiple platforms is greater than the preset value, it is determined to partition the target database.
(a3)当确定对所述目标数据库分表时,新建一个数据库表,将业务数据的数据量大于所述预设数值的平台所对应的业务数据存储在所述新建的数据库表。(a3) When it is determined that the target database is divided into tables, a new database table is created, and the business data corresponding to the platform whose data amount of business data is greater than the preset value is stored in the newly created database table.
执行模块303定期(例如每日00:00am)从所述应用服务器获取所述多个服务组中的每个服务组在预设时间段(例如,最近一天、最近一周、最近一个月)内的运行状况。The execution module 303 regularly (for example, 00:00am every day) obtains from the application server each service group in the plurality of service groups within a preset time period (for example, the last day, the last week, the last month) Health status.
如前面所述,所述运行状况包括每个服务组启用最大线程数时的时间。As mentioned earlier, the operating status includes the time when the maximum number of threads is enabled for each service group.
执行模块303根据所述多个服务组中的每个服务组在所述预设时间段内的运行状况调整所述路由配置表。The execution module 303 adjusts the routing configuration table according to the operating status of each service group in the plurality of service groups within the preset time period.
在一个实施例中,所述根据所述多个服务组中的每个服务组在所述预设时间段内的运行状况调整所述路由配置表包括(b1)-(b3):In an embodiment, the adjusting the routing configuration table according to the operating status of each service group of the plurality of service groups within the preset time period includes (b1)-(b3):
(b1)统计所述多个服务组中的每个服务组在所述预设时间段内启用最大线程数时的总时长,从而为所述多个服务组中的每个服务组统计到一个总时长,确定每个服务组所对应的总时长是否超过预定时长。(b1) Count the total duration of each service group in the plurality of service groups when the maximum number of threads is enabled within the preset time period, so as to count one for each service group in the plurality of service groups Total duration, to determine whether the total duration corresponding to each service group exceeds the predetermined duration.
(b2)若所述多个服务组中的每个服务组所对应的总时长都小于或者等于所述预定时长,则确定无需更新所述路由配置表。若所述多个服务组中至少一个服务组所对应的总时长大于所述预定时长,则确定需更新所述路由配置表。(b2) If the total duration corresponding to each of the multiple service groups is less than or equal to the predetermined duration, it is determined that there is no need to update the routing configuration table. If the total duration corresponding to at least one of the multiple service groups is greater than the predetermined duration, it is determined that the routing configuration table needs to be updated.
(b3)当确定需更新所述路由配置表,在所述路由配置表中,将与最长总时长所对应的服务组和与最短总时长所对应的服务组对调。(b3) When it is determined that the routing configuration table needs to be updated, in the routing configuration table, the service group corresponding to the longest total duration is swapped with the service group corresponding to the shortest total duration.
举例而言,假设在所述步骤(b1)中统计得出服务组B1所对应的总时长最长,服务组B3所对应的总时长最短,则在所述路由配置表中,调整设置为所述服务组B1与电商平台A3对应,以及所述服务组B3与电商平台A1对应。For example, if it is calculated in the step (b1) that the total duration corresponding to service group B1 is the longest and the total duration corresponding to service group B3 is the shortest, then in the routing configuration table, the adjustment setting is The service group B1 corresponds to the e-commerce platform A3, and the service group B3 corresponds to the e-commerce platform A1.
综上所述,本申请实施例中所述的动态分库路由装置,通过设置一个路由配置表,其中,所述路由配置表记录多个平台、所述多个服务组,以及所述多个服务组中的每个服务组所对应的端口,其中,不同的平台对应不同的服务组;接收从所述多个平台发送过来的业务请求;当接收到所述多个平台中的其中某个平台发送过来的业务请求时,根据所述某个平台检索所述路由配置表,从所述多个服务组中确定一个目标服务组以及所述目标服务组所对应的端口,其中,所述目标服务组为所述路由配置表所记录的多个服务组中,与所述某个平台对应的服务组;及将所接收到的业务请求发送到所述目标服务组所对应的端口,可以实现动态交易路由,将业务请求分发到不同的服务组端口,有效解决不能灵活处理量大的交易的技术问题。To sum up, the dynamic database routing device described in the embodiment of the present application sets a routing configuration table, wherein the routing configuration table records multiple platforms, the multiple service groups, and the multiple The port corresponding to each service group in the service group, where different platforms correspond to different service groups; receive service requests sent from the multiple platforms; when one of the multiple platforms is received When a service request is sent by the platform, the routing configuration table is retrieved according to the certain platform, and a target service group and the port corresponding to the target service group are determined from the multiple service groups, wherein the target The service group is the service group corresponding to the certain platform among the multiple service groups recorded in the routing configuration table; and sending the received service request to the port corresponding to the target service group can be realized Dynamic transaction routing, which distributes business requests to different service group ports, effectively solves the technical problem of not being able to flexibly handle large transactions.
实施例五Example five
参阅图5所示,是本申请实施例五提供的动态分库路由装置的结构图。Refer to FIG. 5, which is a structural diagram of a dynamic sub-library routing device provided in Embodiment 5 of the present application.
在一些实施例中,所述动态分库路由装置40运行于应用服务器中。所述应用服务器通过网络连接了通讯服务器和数据库服务器。所述动态分库路由装置40可以包括多个由程序代码段所组成的功能模块。所述动态分库路由装置40中的各个程序段的可读指令代码可以存储于应用服务器的存储器中,并由所述至少一个处理器所执行,以执行(详见图3描述)动态分库路由的功能。In some embodiments, the dynamic database routing device 40 runs in an application server. The application server is connected to the communication server and the database server through the network. The dynamic sub-library routing device 40 may include multiple functional modules composed of program code segments. The readable instruction codes of each program segment in the dynamic sub-library routing device 40 can be stored in the memory of the application server and executed by the at least one processor to execute the dynamic sub-library (see Figure 3 for details) The function of routing.
本实施例中,所述动态分库路由装置40根据其所执行的功能,可以被划分为多个功能模块。所述功能模块可以包括:配置模块401、控制模块402。本申请所称的模块是指一种能够被至少一个处理器所执行并且能够完成固定功能的一系列计算机可读指令段,其存储在存储器中。In this embodiment, the dynamic branching routing device 40 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a configuration module 401 and a control module 402. The module referred to in this application refers to a series of computer-readable instruction segments that can be executed by at least one processor and can complete fixed functions, and are stored in a memory.
配置模块401为所述多个服务组中的每个服务组配置一个目标数据库,所述目标数据库为数据库服务器所包括的多个数据库中的其中一个数据库。每个目标数据库用于存储所述多个平台的业务数据。The configuration module 401 configures a target database for each of the multiple service groups, where the target database is one of the multiple databases included in the database server. Each target database is used to store business data of the multiple platforms.
如前面所述,所述多个平台的业务数据可以是指电商交易相关的数据,例如订单数量,每笔订单所涉及的金额等数据。As mentioned above, the business data of the multiple platforms may refer to data related to e-commerce transactions, such as the number of orders, the amount involved in each order, and other data.
举例而言,配置模块401可以为服务组B1配置目标数据库D1,为服务组B2配置目标数据库D2,为服务组B3配置目标数据库D3,所述目标数据库D1、D2、D3分别用于存储所述电商平台A1、A2、A3的所述业务数据。换句话来讲,所述目标数据库D1用于存储所述电商平台A1、A2、A3的所述业务数据,所述目标数据库D2用于存储所述电商平台A1、A2、A3的所述业务数据,所述目标数据库D3用于存储所述电商平台A1、A2、A3的所述业务数据。For example, the configuration module 401 may configure a target database D1 for the service group B1, a target database D2 for the service group B2, and a target database D3 for the service group B3. The target databases D1, D2, and D3 are respectively used to store the The business data of the e-commerce platforms A1, A2, A3. In other words, the target database D1 is used to store the business data of the e-commerce platforms A1, A2, A3, and the target database D2 is used to store all the business data of the e-commerce platforms A1, A2, A3. The business data, the target database D3 is used to store the business data of the e-commerce platforms A1, A2, A3.
在一个实施例中,所述多个服务组中的每个服务组所对应的最大线程数可以相同或者不同。例如,所述多个服务组中的每个服务组的最大线程数可以都为60、70或其他数值。本实施例中,每个线程数用于响应与服务组所对应的平台所发送的一个业务请求。In an embodiment, the maximum number of threads corresponding to each of the multiple service groups may be the same or different. For example, the maximum number of threads of each service group in the plurality of service groups may all be 60, 70 or other values. In this embodiment, each thread number is used to respond to a service request sent by the platform corresponding to the service group.
在一个实施例中,配置模块401还统计所述多个服务组中的每个服务组的运行状况。其中,所述运行状况包括每个服务组启用最大线程数时的时间。例如,统计到服务组A1在2018/11/11,01:00am至2018/11/12,00:00am期间一直启用最大线程数。In an embodiment, the configuration module 401 also counts the operating status of each service group in the multiple service groups. Wherein, the operating status includes the time when the maximum number of threads is enabled for each service group. For example, it is calculated that the service group A1 has been enabled for the maximum number of threads during the period from 01: 00 am on 11 November 2018 to 00: 00 am on 11 November 2018.
控制模块402实时侦测所述多个服务组分别对应的端口是否接收到从所述通讯服务器所发送过来的业务请求。当所述多个服务组中的某个服务组(例如,前面所述的目标服务组)所对应的端口接收到所述业务请求时,控制模块402控制所述某个服务组执行所述业务请求。所述执行所述业务请求是指从与所述某个服务组所对应的目标数据库中读取所述业务请求所请求的数据,或者将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组所对应的所述目标数据库。The control module 402 detects in real time whether the respective ports corresponding to the multiple service groups receive the service request sent from the communication server. When a port corresponding to a certain service group (for example, the aforementioned target service group) of the multiple service groups receives the service request, the control module 402 controls the certain service group to execute the service request. The execution of the service request refers to reading the data requested by the service request from the target database corresponding to the certain service group, or storing/update the data requested by the service request to store/update To the target database corresponding to the certain service group.
换句话来讲,所述业务请求可以是指读取数据的请求、存储数据的请求,或者更新数据的请求。In other words, the service request may refer to a request to read data, a request to store data, or a request to update data.
在一个实施例中,当所述执行所述业务请求是指从与所述某个服务组(例如所述目标服务组)所对应的目标数据库中读取所述业务请求所请求的数据时,控制模块402控制所述某个服务组将所读取的数据返回给所述通讯服务器,所述通讯服务器则将所读取的数据回传给所述某个平台。当所述执行所述业务请求是指将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组(例如,所述目标服务组)所对应的目标数据库时,当所述某个服务组将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组所对应的目标数据库后,控制模块402还控制所述某个服务组发送一个完成数据更新的通知到所述通讯服务器,所述通讯服务器则将所述完成数据更新的通知回传给所述某个平台。In an embodiment, when the execution of the service request refers to reading the data requested by the service request from a target database corresponding to the certain service group (for example, the target service group), The control module 402 controls the certain service group to return the read data to the communication server, and the communication server returns the read data to the certain platform. When the execution of the service request refers to storing/updating the stored/updated data requested by the service request to the target database corresponding to the certain service group (for example, the target service group), when After the certain service group stores/updates the stored/updated data requested by the service request to the target database corresponding to the certain service group, the control module 402 also controls the certain service group to send a completion The data update notification is sent to the communication server, and the communication server returns the notification of completion of the data update to the certain platform.
综上所述,本申请实施例中所述的动态分库路由装置,通过为所述多个服务组中的每个服务组配置一个目标数据库,其中,所述目标数据库为所述多个数据库中的其中一个数据库,每个目标数据库用于存储多个平台的业务数据, 所述多个服务组中的每个服务组对应一个端口;及实时侦测所述多个服务组分别对应的端口是否接收到从所述通讯服务器所发送过来的业务请求,当所述多个服务组中的某个服务组所对应的端口接收到所述业务请求时,控制所述某个服务组执行所述业务请求,其中,所述执行所述业务请求指从与所述某个服务组所对应的目标数据库中读取所述业务请求所请求的数据,或者将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组所对应的所述目标数据库,可以实现动态分库,支撑海量交易,系统处理灵活,能够有效支持交易大并发高的场景。In summary, the dynamic database routing device described in the embodiment of the present application configures a target database for each of the multiple service groups, wherein the target database is the multiple databases Each target database is used to store business data of multiple platforms, and each service group in the multiple service groups corresponds to a port; and real-time detection of the respective ports corresponding to the multiple service groups Whether the service request sent from the communication server is received, when the port corresponding to a certain service group in the multiple service groups receives the service request, control the certain service group to execute the A business request, wherein the execution of the business request refers to reading the data requested by the business request from the target database corresponding to the certain service group, or storing/update the data requested by the business request Data storage/update to the target database corresponding to the certain service group can realize dynamic sub-database, support massive transactions, flexible system processing, and can effectively support scenarios with high transaction concurrency.
实施例六Example Six
参阅图6所示,为本申请实施例六提供的通讯服务器的结构示意图。在本申请较佳实施例中,所述通讯服务器3包括存储器31、至少一个处理器32、至少一条通信总线33。Refer to FIG. 6, which is a schematic structural diagram of the communication server provided in the sixth embodiment of this application. In a preferred embodiment of the present application, the communication server 3 includes a memory 31, at least one processor 32, and at least one communication bus 33.
本领域技术人员应该了解,图6示出的通讯服务器的结构并不构成本申请实施例的限定,既可以是总线型结构,也可以是星形结构,所述通讯服务器3还可以包括比图示更多或更少的其他硬件或者软件,或者不同的部件布置。Those skilled in the art should understand that the structure of the communication server shown in FIG. 6 does not constitute a limitation of the embodiment of the present application. It may be a bus-type structure or a star structure. The communication server 3 may also include a graph Show more or less other hardware or software, or different component arrangements.
在一些实施例中,所述通讯服务器3包括一种能够按照事先设定或存储的计算机可读指令,自动进行数值计算和/或信息处理的终端,其硬件包括但不限于微处理器、专用集成电路、可编程门阵列、数字处理器及嵌入式设备等。In some embodiments, the communication server 3 includes a terminal that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored computer-readable instructions. Its hardware includes but is not limited to a microprocessor, a dedicated Integrated circuits, programmable gate arrays, digital processors and embedded devices, etc.
需要说明的是,所述通讯服务器3仅为举例,其他现有的或今后可能出现的电子产品如可适应于本申请,也应包含在本申请的保护范围以内,并以引用方式包含于此。It should be noted that the communication server 3 is only an example. If other existing or future electronic products can be adapted to this application, they should also be included in the scope of protection of this application and included here by reference. .
在一些实施例中,所述存储器31用于存储程序代码和各种数据,例如安装在所述通讯服务器3中的动态分库路由装置30,并在通讯服务器3的运行过程中实现高速、自动地完成程序或数据的存取。所述存储器31包括只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable Read-Only Memory,PROM)、可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)、一次可编程只读存储器(One-time Programmable Read-Only Memory,OTPROM)、电子擦除式可复写只读存储器(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储器、磁盘存储器、磁带存储器、或者任何其他能够用于携带或存储数据的非易失性可读的存储介质。In some embodiments, the memory 31 is used to store program codes and various data, such as the dynamic sub-library routing device 30 installed in the communication server 3, and realizes high-speed and automatic operation during the operation of the communication server 3. Complete the program or data access. The memory 31 includes Read-Only Memory (ROM), Programmable Read-Only Memory (PROM), and Erasable Programmable Read-Only Memory (EPROM) , One-time Programmable Read-Only Memory (OTPROM), Electronically-Erasable Programmable Read-Only Memory (EEPROM), CD-ROM (Compact Disc Read- Only Memory, CD-ROM) or other optical disk storage, magnetic disk storage, tape storage, or any other non-volatile readable storage medium that can be used to carry or store data.
在一些实施例中,所述至少一个处理器32可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述至少一个处理器32是所述通讯服务器3的控制核心(Control Unit),利用各种接口和线路连接整个通讯服务器3的各个部件,通过运行或执行存储在所述存储器31内的程序或者模块,以及调用存储在所述存储器31内的数据,以执行通讯服务器3的各种功能和处理数据,例如执行动态分库路由的功能。In some embodiments, the at least one processor 32 may be composed of integrated circuits, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same function or different functions, including one Or a combination of multiple central processing units (CPU), microprocessors, digital processing chips, graphics processors, and various control chips. The at least one processor 32 is the control core (Control Unit) of the communication server 3, which uses various interfaces and lines to connect the various components of the entire communication server 3, by running or executing programs stored in the memory 31 or Modules, and call data stored in the memory 31 to perform various functions of the communication server 3 and process data, for example, perform dynamic sub-library routing functions.
在一些实施例中,所述至少一条通信总线33被设置为实现所述存储器31以及所述至少一个处理器32等之间的连接通信。In some embodiments, the at least one communication bus 33 is configured to implement connection and communication between the memory 31 and the at least one processor 32 and the like.
尽管未示出,所述通讯服务器3还可以包括给各个部件供电的电源(比如电池),优选的,电源可以通过电源管理装置与所述至少一个处理器32逻辑相连,从而通过电源管理装置实现管理充电、放电、以及功耗管理等功能。电源 还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述通讯服务器3还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。Although not shown, the communication server 3 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 32 through a power management device, so as to be realized by the power management device. Manage functions such as charging, discharging, and power management. The power supply may also include one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components. The communication server 3 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。It should be understood that the described embodiments are for illustrative purposes only, and are not limited by this structure in the scope of the patent application.
上述以软件功能模块的形式实现的集成的单元,可以存储在一个非易失性可读取存储介质中。上述软件功能模块包括若干计算机可读指令,该计算机可读指令用以使得一台计算机设备(可以是个人计算机,终端,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的部分。The above-mentioned integrated unit implemented in the form of a software function module may be stored in a nonvolatile readable storage medium. The above-mentioned software function module includes a number of computer-readable instructions, which are used to make a computer device (which may be a personal computer, a terminal, or a network device, etc.) or a processor execute the various embodiments of the present application. Method part.
在进一步的实施例中,结合图4,所述至少一个处理器32可执行所述通讯服务器3的操作装置以及安装的各类应用程序(如所述的动态分库路由装置30)等,例如,上述的各个模块。In a further embodiment, with reference to FIG. 4, the at least one processor 32 can execute the operating device of the communication server 3 and various installed applications (such as the dynamic sub-library routing device 30), etc., for example , The various modules mentioned above.
所述存储器31中存储有计算机可读指令,且所述至少一个处理器32可调用所述存储器31中存储的计算机可读指令以执行相关的功能。例如,图4中所述的各个模块是存储在所述存储器31中的计算机可读指令,并由所述至少一个处理器32所执行,从而实现所述各个模块的功能以达到动态分库路由的目的。The memory 31 stores computer-readable instructions, and the at least one processor 32 can call the computer-readable instructions stored in the memory 31 to perform related functions. For example, the various modules described in FIG. 4 are computer-readable instructions stored in the memory 31 and executed by the at least one processor 32, so as to realize the functions of the various modules to achieve dynamic database routing. the goal of.
在本申请的一个实施例中,所述存储器31存储多个计算机可读指令,所述多个计算机可读指令被所述至少一个处理器32所执行以实现动态分库路由。In an embodiment of the present application, the memory 31 stores a plurality of computer readable instructions, and the plurality of computer readable instructions are executed by the at least one processor 32 to implement dynamic database routing.
具体地,所述至少一个处理器32对上述计算机可读指令的具体实现方法可参考图2对应实施例中相关步骤的描述,在此不赘述。Specifically, for the specific implementation method of the at least one processor 32 on the foregoing computer-readable instructions, reference may be made to the description of the relevant steps in the embodiment corresponding to FIG. 2, which is not repeated here.
实施例七Example Seven
参阅图7所示,为本申请实施例七提供的应用服务器的结构示意图。在本申请较佳实施例中,所述应用服务器4包括存储器41、至少一个处理器42、至少一条通信总线43。Refer to FIG. 7, which is a schematic structural diagram of the application server provided in the seventh embodiment of this application. In a preferred embodiment of the present application, the application server 4 includes a memory 41, at least one processor 42, and at least one communication bus 43.
本领域技术人员应该了解,图7示出的应用服务器的结构并不构成本申请实施例的限定,既可以是总线型结构,也可以是星形结构,所述应用服务器4还可以包括比图示更多或更少的其他硬件或者软件,或者不同的部件布置。Those skilled in the art should understand that the structure of the application server shown in FIG. 7 does not constitute a limitation of the embodiment of the present application. It may be a bus-type structure or a star structure. The application server 4 may also include a graph Show more or less other hardware or software, or different component arrangements.
在一些实施例中,所述应用服务器4包括一种能够按照事先设定或存储的计算机可读指令,自动进行数值计算和/或信息处理的终端,其硬件包括但不限于微处理器、专用集成电路、可编程门阵列、数字处理器及嵌入式设备等。In some embodiments, the application server 4 includes a terminal that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored computer-readable instructions, and its hardware includes, but is not limited to, a microprocessor, a dedicated Integrated circuits, programmable gate arrays, digital processors and embedded devices, etc.
需要说明的是,所述应用服务器4仅为举例,其他现有的或今后可能出现的电子产品如可适应于本申请,也应包含在本申请的保护范围以内,并以引用方式包含于此。It should be noted that the application server 4 is only an example, and other existing or future electronic products that can be adapted to this application should also be included in the scope of protection of this application and included here by reference .
在一些实施例中,所述存储器41用于存储程序代码和各种数据,例如安装在所述应用服务器4中的动态分库路由装置40,并在应用服务器4的运行过程中实现高速、自动地完成程序或数据的存取。所述存储器41包括只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable Read-Only Memory,PROM)、可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)、一次可编程只读存储器(One-time Programmable Read-Only Memory,OTPROM)、电子擦除式可复写只读存储器(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储器、磁盘存储器、磁带存储器、或者任何其他能够用于携带或存储数据的非易失性可读的存储介质。In some embodiments, the memory 41 is used to store program codes and various data, such as a dynamic sub-library routing device 40 installed in the application server 4, and realizes high-speed and automatic operation during the operation of the application server 4. Complete the program or data access. The memory 41 includes read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable Read-Only Memory, PROM), and erasable Programmable Read-Only Memory (EPROM) , One-time Programmable Read-Only Memory (OTPROM), Electronically-Erasable Programmable Read-Only Memory (EEPROM), CD-ROM (Compact Disc Read- Only Memory, CD-ROM) or other optical disk storage, magnetic disk storage, tape storage, or any other non-volatile readable storage medium that can be used to carry or store data.
在一些实施例中,所述至少一个处理器42可以由集成电路组成,例如可以 由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述至少一个处理器42是所述应用服务器4的控制核心(Control Unit),利用各种接口和线路连接整个应用服务器4的各个部件,通过运行或执行存储在所述存储器41内的程序或者模块,以及调用存储在所述存储器41内的数据,以执行应用服务器4的各种功能和处理数据,例如执行动态分库路由的功能。In some embodiments, the at least one processor 42 may be composed of integrated circuits, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same function or different functions, including one Or a combination of multiple central processing units (CPU), microprocessors, digital processing chips, graphics processors, and various control chips. The at least one processor 42 is the control core (Control Unit) of the application server 4, which uses various interfaces and lines to connect the various components of the entire application server 4, and runs or executes programs stored in the memory 41 or Modules, and call the data stored in the memory 41 to perform various functions of the application server 4 and process data, for example, perform the function of dynamic sub-database routing.
在一些实施例中,所述至少一条通信总线43被设置为实现所述存储器41以及所述至少一个处理器42等之间的连接通信。In some embodiments, the at least one communication bus 43 is configured to implement connection and communication between the memory 41 and the at least one processor 42 and the like.
尽管未示出,所述应用服务器4还可以包括给各个部件供电的电源(比如电池),优选的,电源可以通过电源管理装置与所述至少一个处理器42逻辑相连,从而通过电源管理装置实现管理充电、放电、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述应用服务器4还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。Although not shown, the application server 4 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 42 through a power management device, thereby being implemented by the power management device. Manage functions such as charging, discharging, and power management. The power supply may also include one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, power supply status indicators and other arbitrary components. The application server 4 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。It should be understood that the described embodiments are for illustrative purposes only, and are not limited by this structure in the scope of the patent application.
上述以软件功能模块的形式实现的集成的单元,可以存储在一个非易失性可读取存储介质中。上述软件功能模块包括若干计算机可读指令,该计算机可读指令用以使得一台计算机设备(可以是个人计算机,终端,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的部分。The above-mentioned integrated unit implemented in the form of a software function module may be stored in a nonvolatile readable storage medium. The above-mentioned software function module includes a number of computer-readable instructions, which are used to make a computer device (which may be a personal computer, a terminal, or a network device, etc.) or a processor execute the various embodiments of the present application. Method part.
在进一步的实施例中,结合图5,所述至少一个处理器42可执行所述应用服务器4的操作装置以及安装的各类应用程序(如所述的动态分库路由装置40)等,例如,上述的各个模块。In a further embodiment, with reference to FIG. 5, the at least one processor 42 can execute the operating device of the application server 4 and various installed applications (such as the dynamic sub-library routing device 40), etc., for example , The various modules mentioned above.
所述存储器41中存储有计算机可读指令,且所述至少一个处理器42可调用所述存储器41中存储的计算机可读指令以执行相关的功能。例如,图5中所述的各个模块是存储在所述存储器41中的计算机可读指令,并由所述至少一个处理器42所执行,从而实现所述各个模块的功能以达到动态分库路由的目的。The memory 41 stores computer readable instructions, and the at least one processor 42 can call the computer readable instructions stored in the memory 41 to perform related functions. For example, the various modules described in FIG. 5 are computer-readable instructions stored in the memory 41 and executed by the at least one processor 42 to realize the functions of the various modules to achieve dynamic database routing. the goal of.
在本申请的一个实施例中,所述存储器41存储多个计算机可读指令,所述多个计算机可读指令被所述至少一个处理器42所执行以实现动态分库路由。In an embodiment of the present application, the memory 41 stores a plurality of computer-readable instructions, and the plurality of computer-readable instructions are executed by the at least one processor 42 to implement dynamic database routing.
具体地,所述至少一个处理器42对上述计算机可读指令的具体实现方法可参考图3对应实施例中相关步骤的描述,在此不赘述。Specifically, for the specific implementation method of the at least one processor 42 on the foregoing computer-readable instructions, reference may be made to the description of the relevant steps in the embodiment corresponding to FIG. 3, which is not repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided in this application, it should be understood that the disclosed device and method may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional modules.
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节, 而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或,单数不排除复数。装置权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。For those skilled in the art, it is obvious that the present application is not limited to the details of the foregoing exemplary embodiments, and the present application can be implemented in other specific forms without departing from the spirit or basic characteristics of the application. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of this application is defined by the appended claims rather than the above description, and therefore it is intended to fall into the claims. All changes in the meaning and scope of the equivalent elements of are included in this application. Any reference signs in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "include" does not exclude other elements or, and the singular does not exclude the plural. Multiple units or devices stated in the device claims can also be implemented by one unit or device through software or hardware. Words such as first and second are used to denote names, but do not denote any specific order.
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the application and not to limit them. Although the application has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the application can be Modifications or equivalent replacements are made without departing from the spirit and scope of the technical solution of this application.

Claims (20)

  1. 一种动态分库路由方法,应用于通讯服务器中,所述通讯服务器与包括多个服务组的应用服务器连接,其特征在于,所述方法包括:A dynamic database routing method applied to a communication server connected to an application server including multiple service groups, characterized in that the method includes:
    设置一个路由配置表,其中,所述路由配置表用于记录多个平台与所述多个服务组之间的对应关系,以及记录所述多个服务组中的每个服务组所对应的端口,其中,不同的平台对应不同的服务组;Set up a routing configuration table, where the routing configuration table is used to record the correspondence between multiple platforms and the multiple service groups, and to record the port corresponding to each service group in the multiple service groups , Where different platforms correspond to different service groups;
    当接收到所述多个平台中的任一平台发送过来的业务请求时,根据所述发送业务请求的平台检索所述路由配置表,从所述多个服务组中确定一个目标服务组以及所述目标服务组所对应的端口,其中,所述目标服务组为所述路由配置表所记录的多个服务组中,与所述发送业务请求的平台对应的服务组;及When a service request sent by any one of the multiple platforms is received, the routing configuration table is retrieved according to the platform sending the service request, and a target service group and all service groups are determined from the multiple service groups. The port corresponding to the target service group, wherein the target service group is a service group corresponding to the platform that sends the service request among the multiple service groups recorded in the routing configuration table; and
    将所接收到的业务请求发送到所述目标服务组所对应的端口。Send the received service request to the port corresponding to the target service group.
  2. 如权利要求1所述的动态分库路由方法,其特征在于,所述方法还包括:3. The dynamic routing method for database division according to claim 1, wherein the method further comprises:
    定期从所述应用服务器获取所述多个服务组中的每个服务组在预设时间段内的运行状况,其中,所述运行状况包括每个服务组启用最大线程数时的时间;及Obtain the operating status of each service group in the plurality of service groups in a preset time period from the application server on a regular basis, wherein the operating status includes the time when the maximum number of threads is enabled for each service group; and
    根据所述多个服务组中的每个服务组在所述预设时间段内的运行状况调整所述路由配置表。The routing configuration table is adjusted according to the operating status of each service group in the plurality of service groups within the preset time period.
  3. 如权利要求2所述的动态分库路由方法,其特征在于,所述根据所述多个服务组中的每个服务组在所述预设时间段内的运行状况调整所述路由配置表包括:The dynamic database routing method according to claim 2, wherein the adjusting the routing configuration table according to the operating status of each of the multiple service groups in the preset time period comprises :
    统计所述多个服务组中的每个服务组在所述预设时间段内启用最大线程数时的总时长,以得到所述多个服务组中的每个服务组对应的总时长;Counting the total time length of each service group in the plurality of service groups when the maximum number of threads is activated within the preset time period to obtain the total time length corresponding to each service group in the plurality of service groups;
    确定每个服务组所对应的总时长是否超过预定时长;Determine whether the total duration corresponding to each service group exceeds the predetermined duration;
    若所述多个服务组中的每个服务组所对应的总时长都小于或者等于所述预定时长,则确定无需更新所述路由配置表;If the total duration corresponding to each of the multiple service groups is less than or equal to the predetermined duration, it is determined that there is no need to update the routing configuration table;
    若所述多个服务组中至少一个服务组所对应的总时长大于所述预定时长,则确定需更新所述路由配置表;及If the total duration corresponding to at least one of the multiple service groups is greater than the predetermined duration, it is determined that the routing configuration table needs to be updated; and
    当确定需更新所述路由配置表时,在所述路由配置表中,将与最长总时长所对应的服务组和与最短总时长所对应的服务组对调。When it is determined that the routing configuration table needs to be updated, in the routing configuration table, the service group corresponding to the longest total duration is swapped with the service group corresponding to the shortest total duration.
  4. 一种动态分库路由方法,应用于包括多个服务组的应用服务器中,所述应用服务器与通讯服务器和包括多个数据库的数据库服务器连接,其特征在于,所述方法包括:A dynamic database routing method, applied to an application server including multiple service groups, the application server being connected to a communication server and a database server including multiple databases, characterized in that the method includes:
    为所述多个服务组中的每个服务组配置一个目标数据库,其中,所述目标数据库为所述多个数据库中的其中一个数据库,每个目标数据库用于存储多个平台的业务数据,所述多个服务组中的每个服务组对应一个端口;及Configure a target database for each of the multiple service groups, where the target database is one of the multiple databases, and each target database is used to store business data of multiple platforms, Each service group in the plurality of service groups corresponds to a port; and
    实时侦测所述多个服务组分别对应的端口是否接收到从所述通讯服务器所发送过来的业务请求,当所述多个服务组中的某个服务组所对应的端口接收到所述业务请求时,控制所述某个服务组执行所述业务请求。Real-time detection of whether the ports corresponding to the multiple service groups receive the service request sent from the communication server, and when the port corresponding to a certain service group in the multiple service groups receives the service When requested, control the certain service group to execute the service request.
  5. 如权利要求4所述的动态分库路由方法,其特征在于,所述执行所述业务请求指从与所述某个服务组所对应的目标数据库中读取所述业务请求所请求的数据,或者将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组所对应的所述目标数据库。The dynamic database routing method according to claim 4, wherein the execution of the service request refers to reading the data requested by the service request from a target database corresponding to the certain service group, Or store/update the data requested to be stored/updated by the service request to the target database corresponding to the certain service group.
  6. 如权利要求4所述的动态分库路由方法,其特征在于,所述方法还包括:The dynamic routing method for database division according to claim 4, wherein the method further comprises:
    统计所述多个服务组中的每个服务组的运行状况,其中,所述运行状况包 括每个服务组启用最大线程数时的时间,其中,所述多个服务组中的每个服务组所对应的最大线程数相同或者不同。Calculate the operating status of each service group in the multiple service groups, where the operating status includes the time when the maximum number of threads is enabled for each service group, wherein each service group in the multiple service groups The corresponding maximum number of threads is the same or different.
  7. 一种动态分库路由装置,运行于通讯服务器中,所述通讯服务器与包括多个服务组的应用服务器连接,其特征在于,所述装置包括:A dynamic sub-library routing device running in a communication server connected to an application server including multiple service groups, characterized in that the device includes:
    设置模块,用于设置一个路由配置表,其中,所述路由配置表用于记录多个平台与所述多个服务组之间的对应关系,以及记录所述多个服务组中的每个服务组所对应的端口,其中,不同的平台对应不同的服务组;The setting module is used to set a routing configuration table, wherein the routing configuration table is used to record the correspondence between multiple platforms and the multiple service groups, and to record each service in the multiple service groups The port corresponding to the group, where different platforms correspond to different service groups;
    执行模块,用于当接收到所述多个平台中的任一平台发送过来的业务请求时,根据所述发送业务请求的平台检索所述路由配置表,从所述多个服务组中确定一个目标服务组以及所述目标服务组所对应的端口,其中,所述目标服务组为所述路由配置表所记录的多个服务组中,与所述发送业务请求的平台对应的服务组;及The execution module is configured to, when a service request sent by any one of the multiple platforms is received, retrieve the routing configuration table according to the platform that sent the service request, and determine one from the multiple service groups A target service group and a port corresponding to the target service group, wherein the target service group is a service group corresponding to the platform that sends the service request among the multiple service groups recorded in the routing configuration table; and
    所述执行模块,还用于将所接收到的业务请求发送到所述目标服务组所对应的端口。The execution module is also used to send the received service request to the port corresponding to the target service group.
  8. 一种动态分库路由装置,运行于包括多个服务组的应用服务器中,所述应用服务器与通讯服务器和包括多个数据库的数据库服务器连接,其特征在于,所述装置包括:A dynamic sub-database routing device runs in an application server including multiple service groups, the application server is connected to a communication server and a database server including multiple databases, characterized in that the device includes:
    配置模块,用于为所述多个服务组中的每个服务组配置一个目标数据库,其中,所述目标数据库为所述多个数据库中的其中一个数据库,每个目标数据库用于存储多个平台的业务数据,所述多个服务组中的每个服务组对应一个端口;及The configuration module is used to configure a target database for each of the multiple service groups, where the target database is one of the multiple databases, and each target database is used to store multiple Business data of the platform, each of the multiple service groups corresponds to a port; and
    控制模块,用于实时侦测所述多个服务组分别对应的端口是否接收到从所述通讯服务器所发送过来的业务请求,当所述多个服务组中的任一服务组所对应的端口接收到所述业务请求时,控制接收到所述业务请求的服务组执行所述业务请求,其中,所述执行所述业务请求是指从与所述接收到所述业务请求的服务组所对应的目标数据库中读取所述业务请求所请求的数据,或者将所述业务请求所请求存储/更新的数据存储/更新到与所述接收到所述业务请求的服务组所对应的所述目标数据库。The control module is used to detect in real time whether the respective ports corresponding to the multiple service groups receive the service request sent from the communication server, when the port corresponding to any one of the multiple service groups When the service request is received, the service group that has received the service request is controlled to execute the service request, where the execution of the service request refers to the service group corresponding to the service group that received the service request Read the data requested by the service request in the target database, or store/update the data requested to be stored/updated by the service request to the target corresponding to the service group that received the service request database.
  9. 一种通讯服务器,所述通讯服务器与包括多个服务组的应用服务器连接,其特征在于,所述通讯服务器包括处理器,所述处理器执行存储器中存储的计算机可读指令以实现以下步骤:A communication server connected to an application server including multiple service groups, characterized in that the communication server includes a processor, and the processor executes computer-readable instructions stored in a memory to implement the following steps:
    设置一个路由配置表,其中,所述路由配置表用于记录多个平台与所述多个服务组之间的对应关系,以及记录所述多个服务组中的每个服务组所对应的端口,其中,不同的平台对应不同的服务组;Set up a routing configuration table, where the routing configuration table is used to record the correspondence between multiple platforms and the multiple service groups, and to record the port corresponding to each service group in the multiple service groups , Where different platforms correspond to different service groups;
    当接收到所述多个平台中的任一平台发送过来的业务请求时,根据所述发送业务请求的平台检索所述路由配置表,从所述多个服务组中确定一个目标服务组以及所述目标服务组所对应的端口,其中,所述目标服务组为所述路由配置表所记录的多个服务组中,与所述发送业务请求的平台对应的服务组;及When a service request sent by any one of the multiple platforms is received, the routing configuration table is retrieved according to the platform sending the service request, and a target service group and all service groups are determined from the multiple service groups. The port corresponding to the target service group, wherein the target service group is a service group corresponding to the platform that sends the service request among the multiple service groups recorded in the routing configuration table; and
    将所接收到的业务请求发送到所述目标服务组所对应的端口。Send the received service request to the port corresponding to the target service group.
  10. 如权利要求9所述的通讯服务器,其特征在于,所述处理器执行存储器中存储的计算机可读指令还用以实现以下步骤:9. The communication server of claim 9, wherein the processor executes the computer-readable instructions stored in the memory and is further used to implement the following steps:
    定期从应用服务器获取所述多个服务组中的每个服务组在预设时间段内的运行状况,其中,所述运行状况包括每个服务组启用最大线程数时的时间;及Obtain the operating status of each service group in the plurality of service groups in a preset time period from the application server on a regular basis, wherein the operating status includes the time when the maximum number of threads is enabled for each service group; and
    根据所述多个服务组中的每个服务组在所述预设时间段内的运行状况调整所述路由配置表。The routing configuration table is adjusted according to the operating status of each service group in the plurality of service groups within the preset time period.
  11. 如权利要求10所述的通讯服务器,其特征在于,所述根据所述多个服务组中的每个服务组在所述预设时间段内的运行状况调整所述路由配置表包括:The communication server according to claim 10, wherein the adjusting the routing configuration table according to the operating status of each service group in the plurality of service groups within the preset time period comprises:
    统计所述多个服务组中的每个服务组在所述预设时间段内启用最大线程数时的总时长,以得到所述多个服务组中的每个服务组对应的总时长;Counting the total time length of each service group in the plurality of service groups when the maximum number of threads is activated within the preset time period to obtain the total time length corresponding to each service group in the plurality of service groups;
    确定每个服务组所对应的总时长是否超过预定时长;Determine whether the total duration corresponding to each service group exceeds the predetermined duration;
    若所述多个服务组中的每个服务组所对应的总时长都小于或者等于所述预定时长,则确定无需更新所述路由配置表;If the total duration corresponding to each of the multiple service groups is less than or equal to the predetermined duration, it is determined that there is no need to update the routing configuration table;
    若所述多个服务组中至少一个服务组所对应的总时长大于所述预定时长,则确定需更新所述路由配置表;及If the total duration corresponding to at least one of the multiple service groups is greater than the predetermined duration, it is determined that the routing configuration table needs to be updated; and
    当确定需更新所述路由配置表时,在所述路由配置表中,将与最长总时长所对应的服务组和与最短总时长所对应的服务组对调。When it is determined that the routing configuration table needs to be updated, in the routing configuration table, the service group corresponding to the longest total duration is swapped with the service group corresponding to the shortest total duration.
  12. 一种应用服务器,所述应用服务器包括多个服务组,所述应用服务器与通讯服务器和包括多个数据库的数据库服务器连接,其特征在于,所述服务器包括处理器,所述处理器执行存储器中存储的计算机可读指令以实现以下步骤:An application server, the application server includes a plurality of service groups, the application server is connected to a communication server and a database server including a plurality of databases, wherein the server includes a processor, and the processor executes Stored computer readable instructions to implement the following steps:
    为所述多个服务组中的每个服务组配置一个目标数据库,其中,所述目标数据库为所述多个数据库中的其中一个数据库,每个目标数据库用于存储多个平台的业务数据,所述多个服务组中的每个服务组对应一个端口;及Configure a target database for each of the multiple service groups, where the target database is one of the multiple databases, and each target database is used to store business data of multiple platforms, Each service group in the plurality of service groups corresponds to a port; and
    实时侦测所述多个服务组分别对应的端口是否接收到从所述通讯服务器所发送过来的业务请求,当所述多个服务组中的某个服务组所对应的端口接收到所述业务请求时,控制所述某个服务组执行所述业务请求。Real-time detection of whether the ports corresponding to the multiple service groups receive the service request sent from the communication server, and when the port corresponding to a certain service group in the multiple service groups receives the service When requested, control the certain service group to execute the service request.
  13. 如权利要求12所述的应用服务器,其特征在于,所述执行所述业务请求指从与所述某个服务组所对应的目标数据库中读取所述业务请求所请求的数据,或者将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组所对应的所述目标数据库。The application server of claim 12, wherein the execution of the service request refers to reading the data requested by the service request from a target database corresponding to the certain service group, or converting all The stored/updated data requested by the service request is stored/updated to the target database corresponding to the certain service group.
  14. 如权利要求12所述的应用服务器,其特征在于,所述处理器执行存储器中存储的计算机可读指令还用以实现以下步骤:The application server of claim 12, wherein the processor executes the computer-readable instructions stored in the memory and is further configured to implement the following steps:
    统计所述多个服务组中的每个服务组的运行状况,其中,所述运行状况包括每个服务组启用最大线程数时的时间,其中,所述多个服务组中的每个服务组所对应的最大线程数相同或者不同。Calculate the operating status of each service group in the multiple service groups, where the operating status includes the time when the maximum number of threads is enabled for each service group, wherein each service group in the multiple service groups The corresponding maximum number of threads is the same or different.
  15. 一种非易失性可读存储介质,其上存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现以下步骤:A non-volatile readable storage medium having computer readable instructions stored thereon, characterized in that, when the computer readable instructions are executed by a processor, the following steps are implemented:
    设置一个路由配置表,其中,所述路由配置表用于记录多个平台与应用服务器中的多个服务组之间的对应关系,以及记录所述多个服务组中的每个服务组所对应的端口,其中,不同的平台对应不同的服务组;Set up a routing configuration table, where the routing configuration table is used to record the correspondence between multiple platforms and multiple service groups in the application server, and to record the correspondence between each service group in the multiple service groups , Where different platforms correspond to different service groups;
    当接收到所述多个平台中的任一平台发送过来的业务请求时,根据所述发送业务请求的平台检索所述路由配置表,从所述多个服务组中确定一个目标服务组以及所述目标服务组所对应的端口,其中,所述目标服务组为所述路由配置表所记录的多个服务组中,与所述发送业务请求的平台对应的服务组;及When a service request sent by any one of the multiple platforms is received, the routing configuration table is retrieved according to the platform sending the service request, and a target service group and all service groups are determined from the multiple service groups. The port corresponding to the target service group, wherein the target service group is a service group corresponding to the platform that sends the service request among the multiple service groups recorded in the routing configuration table; and
    将所接收到的业务请求发送到所述目标服务组所对应的端口。Send the received service request to the port corresponding to the target service group.
  16. 如权利要求15所述的存储介质,其特征在于,所述计算机可读指令被处理器执行时还用以实现以下步骤:15. The storage medium of claim 15, wherein the computer-readable instructions are further used to implement the following steps when executed by the processor:
    定期从应用服务器获取所述多个服务组中的每个服务组在预设时间段内的运行状况,其中,所述运行状况包括每个服务组启用最大线程数时的时间;及Obtain the operating status of each service group in the plurality of service groups in a preset time period from the application server on a regular basis, wherein the operating status includes the time when the maximum number of threads is enabled for each service group; and
    根据所述多个服务组中的每个服务组在所述预设时间段内的运行状况调整 所述路由配置表。The routing configuration table is adjusted according to the operating status of each service group in the plurality of service groups within the preset time period.
  17. 如权利要求16所述的存储介质,其特征在于,所述根据所述多个服务组中的每个服务组在所述预设时间段内的运行状况调整所述路由配置表包括:15. The storage medium of claim 16, wherein the adjusting the routing configuration table according to the operating status of each of the multiple service groups within the preset time period comprises:
    统计所述多个服务组中的每个服务组在所述预设时间段内启用最大线程数时的总时长,以得到所述多个服务组中的每个服务组对应的总时长;Counting the total time length of each service group in the plurality of service groups when the maximum number of threads is activated within the preset time period to obtain the total time length corresponding to each service group in the plurality of service groups;
    确定每个服务组所对应的总时长是否超过预定时长;Determine whether the total duration corresponding to each service group exceeds the predetermined duration;
    若所述多个服务组中的每个服务组所对应的总时长都小于或者等于所述预定时长,则确定无需更新所述路由配置表;If the total duration corresponding to each of the multiple service groups is less than or equal to the predetermined duration, it is determined that there is no need to update the routing configuration table;
    若所述多个服务组中至少一个服务组所对应的总时长大于所述预定时长,则确定需更新所述路由配置表;及If the total duration corresponding to at least one of the multiple service groups is greater than the predetermined duration, it is determined that the routing configuration table needs to be updated; and
    当确定需更新所述路由配置表时,在所述路由配置表中,将与最长总时长所对应的服务组和与最短总时长所对应的服务组对调。When it is determined that the routing configuration table needs to be updated, in the routing configuration table, the service group corresponding to the longest total duration is swapped with the service group corresponding to the shortest total duration.
  18. 一种非易失性可读存储介质,其上存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现以下步骤:A non-volatile readable storage medium having computer readable instructions stored thereon, characterized in that, when the computer readable instructions are executed by a processor, the following steps are implemented:
    为应用服务器中的多个服务组中的每个服务组配置一个目标数据库,其中,所述目标数据库为数据可服务器中多个数据库中的其中一个数据库,每个目标数据库用于存储多个平台的业务数据,所述多个服务组中的每个服务组对应一个端口;及A target database is configured for each of the multiple service groups in the application server, where the target database is one of the multiple databases in the data server, and each target database is used to store multiple platforms Each of the service groups in the plurality of service groups corresponds to a port; and
    实时侦测所述多个服务组分别对应的端口是否接收到从通讯服务器所发送过来的业务请求,当所述多个服务组中的某个服务组所对应的端口接收到所述业务请求时,控制所述某个服务组执行所述业务请求。Real-time detection of whether the ports corresponding to the multiple service groups receive the service request sent from the communication server, and when the port corresponding to a certain service group in the multiple service groups receives the service request To control the certain service group to execute the service request.
  19. 如权利要求18所述的存储介质,其特征在于,所述执行所述业务请求指从与所述某个服务组所对应的目标数据库中读取所述业务请求所请求的数据,或者将所述业务请求所请求存储/更新的数据存储/更新到与所述某个服务组所对应的所述目标数据库。The storage medium according to claim 18, wherein the execution of the service request refers to reading the data requested by the service request from a target database corresponding to the certain service group, or converting all The stored/updated data requested by the service request is stored/updated to the target database corresponding to the certain service group.
  20. 如权利要求18所述的存储介质,其特征在于,所述计算机可读指令被处理器执行时还用以实现以下步骤:The storage medium of claim 18, wherein the computer-readable instructions are further used to implement the following steps when executed by the processor:
    统计所述多个服务组中的每个服务组的运行状况,其中,所述运行状况包括每个服务组启用最大线程数时的时间,其中,所述多个服务组中的每个服务组所对应的最大线程数相同或者不同。Calculate the operating status of each service group in the multiple service groups, where the operating status includes the time when the maximum number of threads is enabled for each service group, wherein each service group in the multiple service groups The corresponding maximum number of threads is the same or different.
PCT/CN2019/103386 2019-05-23 2019-08-29 Dynamic sub-database routing method and device, server, and storage medium WO2020232895A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910436135.5A CN110324403A (en) 2019-05-23 2019-05-23 Dynamic divides library method for routing, device, server and storage medium
CN201910436135.5 2019-05-23

Publications (1)

Publication Number Publication Date
WO2020232895A1 true WO2020232895A1 (en) 2020-11-26

Family

ID=68119370

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/103386 WO2020232895A1 (en) 2019-05-23 2019-08-29 Dynamic sub-database routing method and device, server, and storage medium

Country Status (2)

Country Link
CN (1) CN110324403A (en)
WO (1) WO2020232895A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117648383A (en) * 2024-01-30 2024-03-05 中国人民解放军国防科技大学 Heterogeneous database real-time data synchronization method, device, equipment and medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597222A (en) * 2020-12-16 2021-04-02 中国建设银行股份有限公司 Financial database connection processing method, device, equipment and storage medium
CN113938525B (en) * 2021-08-30 2024-03-19 宝信软件(武汉)有限公司 5G universal terminal access management and resource scheduling platform server, system and method
CN114036031B (en) * 2022-01-05 2022-06-24 阿里云计算有限公司 Scheduling system and method for resource service application in enterprise digital middleboxes

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170223136A1 (en) * 2016-01-29 2017-08-03 AppDynamics, Inc. Any Web Page Reporting and Capture
CN108055312A (en) * 2017-12-07 2018-05-18 畅捷通信息技术股份有限公司 Method for routing and its device and computer installation and its readable storage medium storing program for executing
CN108052615A (en) * 2017-12-15 2018-05-18 泰康保险集团股份有限公司 Processing method, device, medium and the electronic equipment of access request

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7426518B2 (en) * 2003-03-28 2008-09-16 Netlogic Microsystems, Inc. System and method for efficiently searching a forwarding database that is split into a bounded number of sub-databases having a bounded size
CN106326252B (en) * 2015-06-24 2020-05-22 中兴通讯股份有限公司 Data processing method and device for database
CN106055587A (en) * 2016-05-21 2016-10-26 乐视控股(北京)有限公司 Partitioning database system and routing method thereof
CN107798038B (en) * 2017-05-05 2020-02-14 平安科技(深圳)有限公司 Data response method and data response equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170223136A1 (en) * 2016-01-29 2017-08-03 AppDynamics, Inc. Any Web Page Reporting and Capture
CN108055312A (en) * 2017-12-07 2018-05-18 畅捷通信息技术股份有限公司 Method for routing and its device and computer installation and its readable storage medium storing program for executing
CN108052615A (en) * 2017-12-15 2018-05-18 泰康保险集团股份有限公司 Processing method, device, medium and the electronic equipment of access request

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117648383A (en) * 2024-01-30 2024-03-05 中国人民解放军国防科技大学 Heterogeneous database real-time data synchronization method, device, equipment and medium

Also Published As

Publication number Publication date
CN110324403A (en) 2019-10-11

Similar Documents

Publication Publication Date Title
WO2020232895A1 (en) Dynamic sub-database routing method and device, server, and storage medium
CN105426439B (en) Metadata processing method and device
JP6731201B2 (en) Time-based node selection method and apparatus
EP3410288B1 (en) Online upgrade method, device and system
US11210308B2 (en) Metadata tables for time-series data management
US10656874B2 (en) Storage device operation control method, and storage device
US20190280915A1 (en) System and Method For Resolving Master Node Failures Within Node Clusters
US11068499B2 (en) Method, device, and system for peer-to-peer data replication and method, device, and system for master node switching
CN111639061B (en) Data management method, device, medium and electronic equipment in Redis cluster
US20150281114A1 (en) Systems and methods for allocating work for various types of services among nodes in a distributed computing system
CN110275680B (en) Double-control double-active storage system
US9092272B2 (en) Preparing parallel tasks to use a synchronization register
US11057465B2 (en) Time-based data placement in a distributed storage system
WO2018133414A1 (en) Packet cutting method, request processing method and apparatus, and computer storage medium
WO2021072847A1 (en) Method and apparatus for monitoring condition of computer network, computer device, and storage medium
CN111221840A (en) Data processing method and device, data caching method, storage medium and system
US10581997B2 (en) Techniques for storing or accessing a key-value item
US9501485B2 (en) Methods for facilitating batch analytics on archived data and devices thereof
CN111552701B (en) Method for determining data consistency in distributed cluster and distributed data system
US11176506B2 (en) Blockchain expense and resource utilization optimization
CN111885158A (en) Cluster task processing method and device, electronic equipment and storage medium
CN111209333A (en) Data updating method, device, terminal and storage medium
JP2021508867A (en) Systems, methods and equipment for querying databases
WO2022100364A1 (en) Method, apparatus and computing device for configuring compute mode
CN115328608A (en) Kubernetes container vertical expansion adjusting method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19929811

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19929811

Country of ref document: EP

Kind code of ref document: A1