WO2019179026A1 - 电子装置、集群访问域名自动生成方法及存储介质 - Google Patents

电子装置、集群访问域名自动生成方法及存储介质 Download PDF

Info

Publication number
WO2019179026A1
WO2019179026A1 PCT/CN2018/102093 CN2018102093W WO2019179026A1 WO 2019179026 A1 WO2019179026 A1 WO 2019179026A1 CN 2018102093 W CN2018102093 W CN 2018102093W WO 2019179026 A1 WO2019179026 A1 WO 2019179026A1
Authority
WO
WIPO (PCT)
Prior art keywords
domain name
server cluster
access domain
service
access
Prior art date
Application number
PCT/CN2018/102093
Other languages
English (en)
French (fr)
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 WO2019179026A1 publication Critical patent/WO2019179026A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • 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/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/3015Name registration, generation or assignment
    • H04L61/3025Domain name generation or assignment

Definitions

  • the present application relates to the field of server cluster management technologies, and in particular, to an electronic device, a cluster access domain automatic generation method, and a storage medium.
  • An open platform refers to a software system that allows an external program to increase the functionality of the software system or use the resources of the software system by exposing its application programming interface (API) or function without changing the source of the software system.
  • API application programming interface
  • the back-end systems of the open platform are usually run by different server clusters according to the service areas of the services provided. Since different server clusters have different access domain names, the client is calling. When accessing different service ports of the platform, you need to obtain the access domain name corresponding to different server clusters in advance, which not only complicates the access process of the service port, consumes a large amount of network traffic, and affects access efficiency.
  • the present application provides an electronic device, a cluster access domain automatic generation method, and a storage medium, which can simplify the access process of the server cluster, save a large amount of network traffic, and improve access efficiency.
  • the present application provides an electronic device including a memory and a processor connected to the memory, where the processor is configured to execute a cluster access domain name automatic generation program stored on the memory.
  • the cluster access domain name automatic generation program is executed by the processor to implement the following steps:
  • the preset first access domain name is configured to each of the predetermined clients. If a service call request sent by the client is received, the service call request is parsed to parse the service information.
  • the service information obtained by the parsing is written into the access token of the client, where the access token is the access authorization authentication information acquired by the client in advance;
  • A3. Determine a second access domain name of the server cluster corresponding to the access token according to a first mapping relationship between the pre-stored service information and the access domain name of the server cluster.
  • A4 Replace the first access domain name with the second access domain name, and send the service call request to the corresponding server cluster based on the second access domain name.
  • the present application further provides a method for automatically generating a cluster access domain name, and the method includes the following steps:
  • the service information obtained by the parsing is written into the access token of the client, where the access token is the access authorization authentication information acquired by the client in advance;
  • the present application further provides a computer readable storage medium storing a cluster access domain name automatic generation program, the cluster access domain name automatic generation program being at least one processor Executing to cause the at least one processor to perform the following steps:
  • the service information obtained by the parsing is written into the access token of the client, where the access token is the access authorization authentication information acquired by the client in advance;
  • the first access domain name is replaced with the second access domain name, and the service call request is sent to the corresponding server cluster based on the second access domain name.
  • the electronic device, the cluster access domain automatic generation method, and the storage medium provided by the present application receive the service sent by the client by configuring a preset first access domain name to each of the predetermined clients.
  • the service call request is parsed to parse the service information; the parsed service information is written into the access token of the client; and the mapping relationship between the pre-stored service information and the access domain name of the server cluster is determined.
  • a second access domain name of the server cluster corresponding to the access token; replacing the first access domain name with the second access domain name, and sending the service call request to the determined primary service cluster based on the second access domain name . It can simplify the access process of server clusters and improve access efficiency.
  • FIG. 1 is a schematic diagram of an optional hardware architecture of an electronic device proposed by the present application.
  • FIG. 2 is a schematic diagram of a program module of a cluster access domain name automatic generation program in an embodiment of an electronic device of the present application
  • FIG. 3 is a flowchart of an implementation of a preferred embodiment of a method for automatically generating a cluster access domain name according to the present application.
  • the electronic device 10 may include, but is not limited to, a memory 11, a processor 12, and a network interface 13 that are communicably connected to each other through a communication bus 14. It should be noted that FIG. 1 only shows the electronic device 10 having the components 11-14, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the memory 11 includes at least one type of computer readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (for example, SD or DX memory, etc.), a random access memory (RAM), and a static memory.
  • the memory 11 may be an internal storage unit of the electronic device 10, such as a hard disk or memory of the electronic device 10.
  • the memory 11 may also be an outsourced storage device of the electronic device 10, such as a plug-in hard disk equipped on the electronic device 10, a smart memory card (SMC), and a secure digital (Secure Digital) (SD). Card, flash card, etc.
  • the memory 11 can also include both an internal storage unit of the electronic device 10 and an outsourced storage device thereof.
  • the memory 11 is generally used to store an operating system installed on the electronic device 10 and various types of application software, such as a cluster access domain name automatic generation program. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
  • Processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 12 is typically used to control the overall operation of the electronic device 10.
  • the processor 12 is configured to run program code or processing data stored in the memory 11, such as a running cluster access domain name automatic generation program.
  • the network interface 13 may include a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 10 and other electronic devices.
  • Communication bus 14 is used to implement a communication connection between components 11-13.
  • Figure 1 shows only an electronic device 10 having components 11-14 and a cluster access domain name auto-generating program, but it should be understood that not all illustrated components may be implemented and that more or fewer components may be implemented instead. .
  • the electronic device 10 may further include a user interface (not shown in FIG. 1), and the user interface may include a display, an input unit such as a keyboard, wherein the user interface may further include a standard wired interface, a wireless interface, and the like.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED touch device, or the like. Further, the display may also be referred to as a display screen or display unit for displaying information processed in the electronic device 10 and a user interface for displaying visualizations.
  • the cluster access domain name automatic generation program stored in the memory 11 performs the following operations when the cluster access domain name automatic generation program is executed by the processor 12:
  • the service information obtained by the parsing is written into the access token of the client, where the access token is the access authorization authentication information acquired by the client in advance;
  • each of the predetermined clients is a client that invokes a service port of the open platform, and the open platform provides multiple service ports, and the background systems of different service ports are configured with different server clusters to process corresponding servers.
  • Business request Generally, different server clusters have different access domain names. The client needs to obtain the access domain name corresponding to the accessed server cluster before accessing the server cluster.
  • Server clustering refers to bringing together many servers to perform the same service. It seems to the client that there is only one server. Server clusters can use multiple computers for parallel computing to achieve high computing speeds, and can also be backed up by multiple computers, so that any one machine can break the whole system and still function properly. Once the cluster service is installed and running on the server, it is a server in the server cluster. Clustering can reduce the number of single points of failure and achieve high availability of clustered resources.
  • the server or the server cluster needs to verify whether the login name and the login password entered by the client are correct, and generate the access token information of the client after the determination is correct, and the generated
  • the access token information is the access authorization authentication information obtained by the client.
  • the client sends an access request to the corresponding server system based on the access domain name
  • the corresponding server system determines whether the client has the right to send according to the access token information of the client.
  • Business call request After receiving the login request sent by the client, the server or the server cluster needs to verify whether the login name and the login password entered by the client are correct, and generate the access token information of the client after the determination is correct, and the generated
  • the access token information is the access authorization authentication information obtained by the client.
  • the client sends an access request to the corresponding server system based on the access domain name
  • the corresponding server system determines whether the client has the right to send according to the access token information of the client.
  • Business call request After receiving the login request sent by the client, the server or the server cluster needs to
  • the first access domain name is configured by the terminal, and the first access domain name may be a unified access domain name; after receiving the service call request sent by the client, parsing the service call request to parse the service request.
  • the mapping relationship between the stored service information and the access domain name of the server cluster determines the second access domain name of the server cluster corresponding to the access token of the client.
  • the server cluster includes at least one primary server cluster and a standby server cluster corresponding to each primary server cluster, according to pre-stored service information and the primary A second mapping relationship between the access domain names of the server cluster determines a second access domain name corresponding to the primary server cluster that processes the service call request.
  • the server cluster includes at least one primary server cluster and a standby server cluster corresponding to each primary server cluster, according to pre-stored service information and the primary A second mapping relationship between the access domain names of the server cluster determines a second access domain name corresponding to the primary server cluster that processes the service call request.
  • the server cluster includes at least one primary server cluster and a standby server cluster corresponding to each primary server cluster, according to pre-stored service information and the primary
  • a second mapping relationship between the access domain names of the server cluster determines a second access domain name corresponding to the primary server cluster that processes the service call request.
  • the server cluster includes at least one primary server cluster and a standby server cluster corresponding to each primary server cluster, according to pre-stored service information
  • the second access domain name sends the service call request to the determined primary service cluster; or, if it is determined that the standby server cluster corresponding to the primary server cluster executes the service call request, acquiring the third access corresponding to the standby server cluster And the domain name, the first access domain name is replaced with the third access domain name, and a service call request is sent to the corresponding standby server cluster based on the third access domain name.
  • the predetermined cluster task assignment rule may be, for example, calculating, after the service call request is added to the first task queue of the primary service cluster, according to a predetermined task processing weight calculation formula.
  • the processing weight threshold is 70%, and the standby server cluster corresponding to the primary server cluster is determined to process the service call request; if the calculated task processing weight corresponding to the primary server cluster is smaller than a preset task processing weight threshold, The primary server cluster processes the service call request; wherein the predetermined task processing weight calculation formula is:
  • z is the task processing weight
  • X is the number of first requests to be processed in the first task queue of the primary server cluster
  • Y is the to-be-processed second in the second task queue of the standby server cluster corresponding to the primary server cluster Two requests.
  • the electronic device proposed by the present application configures a preset first access domain name to each of the predetermined clients, and if a service call request sent by the client is received, the service call request is parsed. Parsing the service information; writing the parsed service information to the access token of the client, the access token is the access authorization authentication information acquired by the client in advance; and accessing the server cluster according to the pre-stored service information a mapping relationship between the domain names, determining a second access domain name of the server cluster corresponding to the access token; replacing the first access domain name with the second access domain name, and determining the master based on the second access domain name
  • the service cluster sends the service call request.
  • the client does not need to obtain the access domain name corresponding to each server cluster separately when accessing different server clusters, which simplifies the access process, saves a large amount of network traffic, and improves access efficiency.
  • the cluster access domain name automatic generation program of the present application may be described by using a program module having the same function according to different functions implemented by each part thereof.
  • FIG. 2 is a schematic diagram of a program module of a cluster access domain name automatic generation program in an embodiment of the electronic device of the present application.
  • the cluster access domain name automatic generation program may be divided into the parsing module 201, the writing module 202, the determining module 203, and the sending module 204 according to different functions implemented by the respective parts.
  • the program module referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program to describe the execution process of the cluster access domain name automatic generation program in the electronic device 10.
  • the functions or operational steps implemented by the modules 201-204 are similar to the above, and are not described in detail herein, by way of example, for example:
  • the parsing module 201 is configured to configure a preset first access domain name to each of the predetermined clients, and if the service invocation request sent by the client is received, parsing the service invocation request to parse the service information;
  • the writing module 202 is configured to write the parsed service information into the access token of the client, where the access token is the access authorization authentication information acquired by the client in advance;
  • the determining module 203 is configured to determine a second access domain name of the server cluster corresponding to the access token according to a first mapping relationship between the pre-stored service information and the access domain name of the server cluster;
  • the sending module 204 is configured to replace the first access domain name with the second access domain name, and send the service call request to the corresponding server cluster based on the second access domain name.
  • the present application further provides a method for automatically generating a cluster access domain name.
  • the method for automatically generating a cluster access domain name includes the following steps:
  • Step S301 configuring a preset first access domain name to each of the predetermined clients, and if receiving a service call request sent by the client, parsing the service call request to parse the service information;
  • Step S302 the service information obtained by the parsing is written into the access token of the client, where the access token is the access authorization authentication information acquired by the client in advance;
  • Step S303 determining a second access domain name of the server cluster corresponding to the access token according to a first mapping relationship between the pre-stored service information and the access domain name of the server cluster;
  • Step S304 replacing the first access domain name with the second access domain name, and sending the service call request to the corresponding server cluster based on the second access domain name.
  • each of the predetermined clients is a client that invokes a service port of the open platform, and the open platform provides multiple service ports, and the background systems of different service ports are configured with different server clusters to process corresponding servers.
  • Business request Generally, different server clusters have different access domain names. The client needs to obtain the access domain name corresponding to the accessed server cluster before accessing the server cluster.
  • Server clustering refers to bringing together many servers to perform the same service. It seems to the client that there is only one server. Server clusters can use multiple computers for parallel computing to achieve high computing speeds, and can also be backed up by multiple computers, so that any one machine can break the whole system and still function properly. Once the cluster service is installed and running on the server, it is a server in the server cluster. Clustering can reduce the number of single points of failure and achieve high availability of clustered resources.
  • the server or the server cluster needs to verify whether the login name and the login password entered by the client are correct, and generate the access token information of the client after the determination is correct, and the generated
  • the access token information is the access authorization authentication information obtained by the client.
  • the client sends an access request to the corresponding server system based on the access domain name
  • the corresponding server system determines whether the client has the right to send according to the access token information of the client.
  • Business call request After receiving the login request sent by the client, the server or the server cluster needs to verify whether the login name and the login password entered by the client are correct, and generate the access token information of the client after the determination is correct, and the generated
  • the access token information is the access authorization authentication information obtained by the client.
  • the client sends an access request to the corresponding server system based on the access domain name
  • the corresponding server system determines whether the client has the right to send according to the access token information of the client.
  • Business call request After receiving the login request sent by the client, the server or the server cluster needs to
  • the first access domain name is configured by the terminal, and the first access domain name may be a unified access domain name; after receiving the service call request sent by the client, parsing the service call request to parse the service request.
  • the mapping relationship between the stored service information and the access domain name of the server cluster determines the second access domain name of the server cluster corresponding to the access token of the client.
  • the server cluster includes at least one primary server cluster and a standby server cluster corresponding to each primary server cluster, according to pre-stored service information and the primary A second mapping relationship between the access domain names of the server cluster determines a second access domain name corresponding to the primary server cluster that processes the service call request.
  • the server cluster includes at least one primary server cluster and a standby server cluster corresponding to each primary server cluster, according to pre-stored service information and the primary A second mapping relationship between the access domain names of the server cluster determines a second access domain name corresponding to the primary server cluster that processes the service call request.
  • the server cluster includes at least one primary server cluster and a standby server cluster corresponding to each primary server cluster, according to pre-stored service information and the primary
  • a second mapping relationship between the access domain names of the server cluster determines a second access domain name corresponding to the primary server cluster that processes the service call request.
  • the server cluster includes at least one primary server cluster and a standby server cluster corresponding to each primary server cluster, according to pre-stored service information
  • the second access domain name sends the service call request to the determined primary service cluster; or, if it is determined that the standby server cluster corresponding to the primary server cluster executes the service call request, acquiring the third access corresponding to the standby server cluster And the domain name, the first access domain name is replaced with the third access domain name, and a service call request is sent to the corresponding standby server cluster based on the third access domain name.
  • the predetermined cluster task assignment rule may be, for example, calculating, after the service call request is added to the first task queue of the primary service cluster, according to a predetermined task processing weight calculation formula.
  • the processing weight threshold is 70%, and the standby server cluster corresponding to the primary server cluster is determined to process the service call request; if the calculated task processing weight corresponding to the primary server cluster is smaller than a preset task processing weight threshold, The primary server cluster processes the service call request; wherein the predetermined task processing weight calculation formula is:
  • z is the task processing weight
  • X is the number of first requests to be processed in the first task queue of the primary server cluster
  • Y is the to-be-processed second in the second task queue of the standby server cluster corresponding to the primary server cluster Two requests.
  • the method for automatically generating a cluster access domain name is provided by configuring a preset first access domain name to each of the predetermined clients, and if the service call request sent by the client is received, parsing the The service invokes the request to parse the service information; the service information obtained by the parsing is written into the access token of the client, where the access token is the access authorization authentication information acquired by the client in advance; according to the pre-stored service information and the a mapping relationship between the access domain names of the server cluster, determining a second access domain name of the server cluster corresponding to the access token; replacing the first access domain name with the second access domain name, based on the second access domain name
  • the service call request is sent to the determined primary service cluster.
  • the client does not need to obtain the access domain name corresponding to each server cluster when accessing different server clusters. This simplifies the access process and saves a lot of network traffic and improves access efficiency.
  • the present application further provides a computer readable storage medium, where the cluster access domain name automatic generation program is stored on the computer readable storage medium, and the cluster access domain name automatic generation program is executed by the processor to:
  • the service information obtained by the parsing is written into the access token of the client, where the access token is the access authorization authentication information acquired by the client in advance;
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本申请公开了一种电子装置、集群访问域名自动生成方法及存储介质,通过向预先确定的各个客户端配置预设的第一访问域名,接收到有客户端发送的业务调用请求后,解析业务调用请求以解析出业务信息;将解析得到的业务信息写入该客户端的访问令牌;根据预先存储的业务信息与所述服务器集群的访问域名之间的映射关系,确定所述访问令牌对应的服务器集群的第二访问域名;将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向确定的服务集群发送所述业务调用请求。能够简化服务器集群的访问过程,提高访问效率。

Description

电子装置、集群访问域名自动生成方法及存储介质
本申请要求于2018年3月21日提交中国专利局、申请号为2018102332194,发明名称为“电子装置、集群访问域名自动生成方法及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及服务器集群管理技术领域,尤其涉及一种电子装置、集群访问域名自动生成方法及存储介质。
背景技术
开放平台是指软件系统通过公开其应用程序编程接口(API)或函数(function)来使外部的程序可以增加该软件系统的功能或使用该软件系统的资源,而不需要更改该软件系统的源代码。
目前,随着业务的不断发展壮大,开放平台的后台系统通常根据所提供服务的业务领域不同而由不同的服务器集群来运行,由于不同的服务器集群对应有不同的访问域名,导致客户端在调用开放平台的不同服务端口时需要预先获取不同服务器集群对应的访问域名,不仅使服务端口的访问过程复杂、耗费大量的网络流量,且影响访问效率。
发明内容
有鉴于此,本申请提出一种电子装置、集群访问域名自动生成方法及存储介质,能够简化服务器集群的访问过程节省大量网络流量,提高访问效率。
首先,为实现上述目的,本申请提出一种电子装置,所述电子装置包括存储器、及与所述存储器连接的处理器,所述处理器用于执行所述存储器上存储的集群访问域名自动生成程序,所述集群访问域名自动生成程序被所述 处理器执行时实现如下步骤:
A1、向预先确定的各个客户端配置预设的第一访问域名,若接收到有客户端发送的业务调用请求,则解析所述业务调用请求以解析出业务信息;
A2、将解析得到的业务信息写入该客户端的访问令牌,所述访问令牌为该客户端预先获取的访问授权认证信息;
A3、根据预先存储的业务信息与服务器集群的访问域名之间的第一映射关系,确定所述访问令牌对应的服务器集群的第二访问域名;
A4、将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向对应的服务器集群发送所述业务调用请求。
此外,为实现上述目的,本申请还提供一种集群访问域名自动生成方法,该方法包括如下步骤:
S1、向预先确定的各个客户端配置预设的第一访问域名,若接收到有客户端发送的业务调用请求,则解析所述业务调用请求以解析出业务信息;
S2、将解析得到的业务信息写入该客户端的访问令牌,所述访问令牌为该客户端预先获取的访问授权认证信息;
S3、根据预先存储的业务信息与服务器集群的访问域名之间的第一映射关系,确定所述访问令牌对应的服务器集群的第二访问域名;
S4、将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向对应的服务器集群发送所述业务调用请求。
进一步地,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有集群访问域名自动生成程序,所述集群访问域名自动生成程序可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:
向预先确定的各个客户端配置预设的第一访问域名,若接收到有客户端发送的业务调用请求,则解析所述业务调用请求以解析出业务信息;
将解析得到的业务信息写入该客户端的访问令牌,所述访问令牌为该客 户端预先获取的访问授权认证信息;
根据预先存储的业务信息与服务器集群的访问域名之间的第一映射关系,确定所述访问令牌对应的服务器集群的第二访问域名;
将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向对应的服务器集群发送所述业务调用请求。
相较于现有技术,本申请所提出的电子装置、集群访问域名自动生成方法及存储介质,通过向预先确定的各个客户端配置预设的第一访问域名,接收到有客户端发送的业务调用请求后,解析业务调用请求以解析出业务信息;将解析得到的业务信息写入该客户端的访问令牌;根据预先存储的业务信息与所述服务器集群的访问域名之间的映射关系,确定所述访问令牌对应的服务器集群的第二访问域名;将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向确定的主服务集群发送所述业务调用请求。能够简化服务器集群的访问过程,提高访问效率。
附图说明
图1是本申请提出的电子装置一可选的硬件架构的示意图;
图2是本申请电子装置一实施例中集群访问域名自动生成程序的程序模块示意图;
图3是本申请集群访问域名自动生成方法较佳实施例的实施流程图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领 域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。
参阅图1所示,是本申请提出的电子装置一可选的硬件架构示意图。本实施例中,电子装置10可包括,但不仅限于,可通过通信总线14相互通信连接的存储器11、处理器12、以及网络接口13。需要指出的是,图1仅示出了具有组件11-14的电子装置10,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
其中,存储器11至少包括一种类型的计算机可读存储介质,计算机可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器11可以是电子装置10的内部存储单元,例如电子装置10的硬盘或内存。在另一些实施例中,存储器11也可以是电子装置10的外包存储设备,例如电子装置10上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(SecureDigital,SD)卡,闪存卡(Flash Card)等。当然,存储器11还可以既包括电子装置10的内部存储单元也包括其外包存储设备。本实施例中,存储器11通常用于存储安装于电子装置10的操作系统和各类应用软件,例如集群访问域名自动生成程序等。此外,存储器11还可以用于暂时地存储已经输出或者 将要输出的各类数据。
处理器12在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。处理器12通常用于控制电子装置10的总体操作。本实施例中,处理器12用于运行存储器11中存储的程序代码或者处理数据,例如运行的集群访问域名自动生成程序等。
网络接口13可包括无线网络接口或有线网络接口,网络接口13通常用于在电子装置10与其他电子设备之间建立通信连接。
通信总线14用于实现组件11-13之间的通信连接。
图1仅示出了具有组件11-14以及集群访问域名自动生成程序的电子装置10,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
可选地,电子装置10还可以包括用户接口(图1中未示出),用户接口可以包括显示器、输入单元比如键盘,其中,用户接口还可以包括标准的有线接口、无线接口等。
可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED触摸器等。进一步地,显示器也可称为显示屏或显示单元,用于显示在电子装置10中处理的信息以及用于显示可视化的用户界面。
在一实施例中,存储器11中存储的集群访问域名自动生成程序,所述集群访问域名自动生成程序被处理器12执行时,实现如下操作:
A、向预先确定的各个客户端配置预设的第一访问域名,若接收到有客户端发送的业务调用请求,则解析所述业务调用请求以解析出业务信息;
B、将解析得到的业务信息写入该客户端的访问令牌,所述访问令牌为该客户端预先获取的访问授权认证信息;
C、根据预先存储的业务信息与服务器集群的访问域名之间的第一映射关系,确定该客户端的访问令牌对应的服务器集群的第二访问域名;
D、将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向对应的服务器集群发送所述业务调用请求。
在本实施例中,预先确定的各个客户端为调用开放平台的服务端口的客户端,所述开放平台提供多个服务端口,不同的服务端口的后台系统搭建有不同的服务器集群来处理对应的业务请求。通常不同的服务器集群对应有独立不同的访问域名,客户端在访问服务器集群前需要预先获取访问的服务器集群对应的访问域名。
需要说明的是,由于客户端在发起业务调用请求之前,首先需要获得登录名和登录密码,然后在登陆信息界面中输入登录名和登录密码来登录到对应的服务器或服务器集群。服务器集群是指将很多服务器集中起来一起进行同一种服务,在客户端看来就像是只有一个服务器。服务器集群可以利用多个计算机进行并行计算从而获得很高的计算速度,也可以用多个计算机做备份,从而使得任何一个机器坏了整个系统还是能正常运行。一旦在服务器上安装并运行了集群服务,该服务器即为服务器群集中的一台服务器。集群化操作可以减少单点故障的数量,并且实现了群集化资源的高可用性。
通常,服务器或者服务器集群在接收到客户端发送的登录请求之后,需要验证该客户端输入的登录名及登录密码是否无误,并在确定无误之后生成该客户端的访问令牌信息,生成的所述访问令牌信息为该客户端获取的访问授权认证信息,客户端基于访问域名向对应的服务器系统发出访问请求之后,对应的服务器系统根据该客户端的访问令牌信息确定该客户端是否有权限发送业务调用请求。
在本实例例中,为了避免不同的客户端在访问不同的服务器集群时,需要获取多个不同的访问域名,而导致访问过程复杂且耗费大量的网络流量的问题,通过为预先确定的各个客户端配置预设的第一访问域名,所述第一访 问域名可以为统一的访问域名;在接收到有客户端发送的业务调用请求后,通过解析所述业务调用请求以解析出该业务请求中包含的业务信息,其中,所述业务信息可以是业务领域类型,例如保险业务领域、银行业务领域等业务领域类型;并将解析得到的业务信息写入该客户端的访问令牌,然后,根据预先存储的业务信息与服务器集群的访问域名之间的映射关系,确定执行该客户端的访问令牌对应的服务器集群的第二访问域名。
进一需要说明的是,在本实施例的另一种实施方式中,所述服务器集群包括至少一个主服务器集群及各个主服务器集群对应的备服务器集群,根据预先存储的业务信息与所述主服务器集群的访问域名之间的第二映射关系,确定处理所述业务调用请求的主服务器集群对应的第二访问域名。同样地,在确定出处理该客户端发送的业务调用请求的主服务器集群对应的第二访问域名之后,根据预先确定的集群任务分配规则确定由所述第二访问域名对应的主服务器集群执行所述业务调用请求,或者确定由该主服务器集群对应的备服务器集群执行所述业务调用请求;
同样地,在本实施方式中,若确定由所述第二访问域名对应的主服务器集群执行所述业务调用请求,则将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向确定的主服务集群发送所述业务调用请求;或者,若确定由该主服务器集群对应的备服务器集群执行所述业务调用请求,则获取所述备服务器集群对应的第三访问域名,将所述第一访问域名替换为所述第三访问域名,基于所述第三访问域名向对应的备服务器集群发送业务调用请求。这样可以避免主服务器集群对应的业务处理请求所需的线程出现拥塞的故障,以及降低业务请求等待的时间,提高处理的效率。
在本实施例中,所述预先确定的集群任务分配规则可以为,例如,根据预先确定的任务处理权重计算公式计算将所述业务调用请求加入所述主服务集群的第一任务队列之后,所述主服务器集群对应的任务处理权重与预设的任务处理权重阈值之间的大小,若计算得到的主服务器集群对应的任务处理 权重大于或等于预设的任务处理权重阈值,例如预设的任务处理权重阈值为70%,则确定所述主服务器集群对应的备服务器集群处理所述业务调用请求;若计算得到的主服务器集群对应的任务处理权重小于预设的任务处理权重阈值,则确定所述主服务器集群处理所述业务调用请求;其中,所述预先确定的任务处理权重计算公式为:
Figure PCTCN2018102093-appb-000001
其中z为任务处理权重,X为所述主服务器集群的第一任务队列中待处理的第一请求数,Y为所述主服务器集群对应的备服务器集群的第二任务队列中待处理的第二请求数。
由上述事实施例可知,本申请提出的电子装置通过向预先确定的各个客户端配置预设的第一访问域名,若接收到有客户端发送的业务调用请求,则解析所述业务调用请求以解析出业务信息;将解析得到的业务信息写入该客户端的访问令牌,所述访问令牌为该客户端预先获取的访问授权认证信息;根据预先存储的业务信息与所述服务器集群的访问域名之间的映射关系,确定所述访问令牌对应的服务器集群的第二访问域名;将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向确定的主服务集群发送所述业务调用请求。使得客户端在访问不同的服务器集群时不需要分别获取各个服务器集群对应的访问域名,能够简化访问过程、节省大量网络流量,且提高访问效率。
进一步需要说明的是,本申请的集群访问域名自动生成程序依据其各部分所实现的功能不同,可用具有相同功能的程序模块进行描述。请参阅图2所示,是本申请电子装置一实施例中集群访问域名自动生成程序的程序模块示意图。本实施例中,集群访问域名自动生成程序依据其各部分所实现的功能的不同,可以被分割成解析模块201、写入模块202、确定模块203、以及发送模块204。由上面的描述可知,本申请所称的程序模块是指能够完成特定功能的一系列计算机程序指令段,比程序更适合于描述集群访问域名自动生 成程序在电子装置10中的执行过程。所述模块201-204所实现的功能或操作步骤均与上文类似,此处不再详述,示例性地,例如其中:
解析模块201用于向预先确定的各个客户端配置预设的第一访问域名,若接收到有客户端发送的业务调用请求,则解析所述业务调用请求以解析出业务信息;
写入模块202用于将解析得到的业务信息写入该客户端的访问令牌,所述访问令牌为该客户端预先获取的访问授权认证信息;
确定模块203用于根据预先存储的业务信息与服务器集群的访问域名之间的第一映射关系,确定所述访问令牌对应的服务器集群的第二访问域名;
发送模块204用于将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向对应的服务器集群发送所述业务调用请求。
此外,本申请还提出一种集群访问域名自动生成方法,请参阅图3所示,所述集群访问域名自动生成方法包括如下步骤:
步骤S301,向预先确定的各个客户端配置预设的第一访问域名,若接收到有客户端发送的业务调用请求,则解析所述业务调用请求以解析出业务信息;
步骤S302,将解析得到的业务信息写入该客户端的访问令牌,所述访问令牌为该客户端预先获取的访问授权认证信息;
步骤S303,根据预先存储的业务信息与服务器集群的访问域名之间的第一映射关系,确定所述访问令牌对应的服务器集群的第二访问域名;
步骤S304,将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向对应的服务器集群发送所述业务调用请求。
在本实施例中,预先确定的各个客户端为调用开放平台的服务端口的客户端,所述开放平台提供多个服务端口,不同的服务端口的后台系统搭建有不同的服务器集群来处理对应的业务请求。通常不同的服务器集群对应有独 立不同的访问域名,客户端在访问服务器集群前需要预先获取访问的服务器集群对应的访问域名。
需要说明的是,由于客户端在发起业务调用请求之前,首先需要获得登录名和登录密码,然后在登陆信息界面中输入登录名和登录密码来登录到对应的服务器或服务器集群。服务器集群是指将很多服务器集中起来一起进行同一种服务,在客户端看来就像是只有一个服务器。服务器集群可以利用多个计算机进行并行计算从而获得很高的计算速度,也可以用多个计算机做备份,从而使得任何一个机器坏了整个系统还是能正常运行。一旦在服务器上安装并运行了集群服务,该服务器即为服务器群集中的一台服务器。集群化操作可以减少单点故障的数量,并且实现了群集化资源的高可用性。
通常,服务器或者服务器集群在接收到客户端发送的登录请求之后,需要验证该客户端输入的登录名及登录密码是否无误,并在确定无误之后生成该客户端的访问令牌信息,生成的所述访问令牌信息为该客户端获取的访问授权认证信息,客户端基于访问域名向对应的服务器系统发出访问请求之后,对应的服务器系统根据该客户端的访问令牌信息确定该客户端是否有权限发送业务调用请求。
在本实例例中,为了避免不同的客户端在访问不同的服务器集群时,需要获取多个不同的访问域名,而导致访问过程复杂且耗费大量的网络流量的问题,通过为预先确定的各个客户端配置预设的第一访问域名,所述第一访问域名可以为统一的访问域名;在接收到有客户端发送的业务调用请求后,通过解析所述业务调用请求以解析出该业务请求中包含的业务信息,其中,所述业务信息可以是业务领域类型,例如保险业务领域、银行业务领域等业务领域类型;并将解析得到的业务信息写入该客户端的访问令牌,然后,根据预先存储的业务信息与服务器集群的访问域名之间的映射关系,确定执行该客户端的访问令牌对应的服务器集群的第二访问域名。
进一需要说明的是,在本实施例的另一种实施方式中,所述服务器集群包括至少一个主服务器集群及各个主服务器集群对应的备服务器集群,根据预先存储的业务信息与所述主服务器集群的访问域名之间的第二映射关系,确定处理所述业务调用请求的主服务器集群对应的第二访问域名。同样地,在确定出处理该客户端发送的业务调用请求的主服务器集群对应的第二访问域名之后,根据预先确定的集群任务分配规则确定由所述第二访问域名对应的主服务器集群执行所述业务调用请求,或者确定由该主服务器集群对应的备服务器集群执行所述业务调用请求;
同样地,在本实施方式中,若确定由所述第二访问域名对应的主服务器集群执行所述业务调用请求,则将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向确定的主服务集群发送所述业务调用请求;或者,若确定由该主服务器集群对应的备服务器集群执行所述业务调用请求,则获取所述备服务器集群对应的第三访问域名,将所述第一访问域名替换为所述第三访问域名,基于所述第三访问域名向对应的备服务器集群发送业务调用请求。这样可以避免主服务器集群对应的业务处理请求所需的线程出现拥塞的故障,以及降低业务请求等待的时间,提高处理的效率。
在本实施例中,所述预先确定的集群任务分配规则可以为,例如,根据预先确定的任务处理权重计算公式计算将所述业务调用请求加入所述主服务集群的第一任务队列之后,所述主服务器集群对应的任务处理权重与预设的任务处理权重阈值之间的大小,若计算得到的主服务器集群对应的任务处理权重大于或等于预设的任务处理权重阈值,例如预设的任务处理权重阈值为70%,则确定所述主服务器集群对应的备服务器集群处理所述业务调用请求;若计算得到的主服务器集群对应的任务处理权重小于预设的任务处理权重阈值,则确定所述主服务器集群处理所述业务调用请求;其中,所述预先确定的任务处理权重计算公式为:
Figure PCTCN2018102093-appb-000002
其中z为任务处理权重,X为所述主服务器集群的第一任务队列中待处理的第一请求数,Y为所述主服务器集群对应的备服务器集群的第二任务队列中待处理的第二请求数。
由上述事实施例可知,本申请提出的集群访问域名自动生成方法通过向预先确定的各个客户端配置预设的第一访问域名,若接收到有客户端发送的业务调用请求,则解析所述业务调用请求以解析出业务信息;将解析得到的业务信息写入该客户端的访问令牌,所述访问令牌为该客户端预先获取的访问授权认证信息;根据预先存储的业务信息与所述服务器集群的访问域名之间的映射关系,确定所述访问令牌对应的服务器集群的第二访问域名;将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向确定的主服务集群发送所述业务调用请求。使得客户端在访问不同的服务器集群时不需要分别获取各个服务器集群对应的访问域名,简化访问过程节省大量网络流量,提高访问效率。
此外,本申请还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有集群访问域名自动生成程序,所述集群访问域名自动生成程序被处理器执行时实现如下操作:
向预先确定的各个客户端配置预设的第一访问域名,若接收到有客户端发送的业务调用请求,则解析所述业务调用请求以解析出业务信息;
将解析得到的业务信息写入该客户端的访问令牌,所述访问令牌为该客户端预先获取的访问授权认证信息;
根据预先存储的业务信息与所述服务器集群的访问域名之间的第一映射关系,确定该客户端的访问令牌对应的服务器集群的第二访问域名;将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向对应的服务器集群发送所述业务调用请求。
本申请计算机可读存储介质具体实施方式与上述电子装置以及集群访问域名自动生成方法各实施例基本相同,在此不作累述。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种电子设备,其特征在于,所述电子装置包括存储器、及与所述存储器连接的处理器,所述处理器用于执行所述存储器上存储的集群访问域名自动生成程序,所述集群访问域名自动生成程序被所述处理器执行时实现如下步骤:
    A1、向预先确定的各个客户端配置预设的第一访问域名,若接收到有客户端发送的业务调用请求,则解析所述业务调用请求以解析出业务信息;
    A2、将解析得到的业务信息写入该客户端的访问令牌,所述访问令牌为该客户端预先获取的访问授权认证信息;
    A3、根据预先存储的业务信息与服务器集群的访问域名之间的第一映射关系,确定所述访问令牌对应的服务器集群的第二访问域名;
    A4、将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向对应的服务器集群发送所述业务调用请求。
  2. 如权利要求1所述的电子装置,其特征在于,所述服务器集群包括至少一个主服务器集群及各个主服务器集群分别对应的备服务器集群,所述步骤A3可替换为如下步骤:
    根据预先存储的业务信息与所述主服务器集群的访问域名之间的第二映射关系,确定处理所述业务调用请求的主服务器集群对应的第二访问域名。
  3. 如权利要求2所述的电子装置,其特征在于,所述步骤A4可替换为如下步骤:
    根据预先确定的集群任务分配规则确定由所述第二访问域名对应的主服务器集群处理所述业务调用请求,或者确定由该主服务器集群对应的备服务器集群处理所述业务调用请求;
    若确定由该主服务集群处理所述业务调用请求,则将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向对应的服务器集群发送所述业务调用请求;
    若确定由该主服务器集群对应的备服务器集群处理所述业务调用请求,则获取该备服务器集群对应的第三访问域名,将所述第一访问域名替换为所述第三访问域名,基于所述第三访问域名向对应的备服务器集群发送所述业务调用请求。
  4. 如权利要求3所述的电子装置,其特征在于,所述预先确定的集群任务分配规则为:
    根据预先确定的任务处理权重计算公式计算将所述业务调用请求加入所述主服务集群的第一任务队列之后,所述主服务器集群对应的任务处理权重与预设的任务处理权重阈值之间的大小;
    若计算得到的主服务器集群对应的任务处理权重大于或等于预设的任务处理权重阈值,则确定由所述主服务器集群对应的备服务器集群处理所述业务调用请求;
    若计算得到的主服务器集群对应的任务处理权重小于预设的任务处理权重阈值,则确定所述主服务器集群处理所述业务调用请求,其中,所述预先确定的任务处理权重计算公式为:
    Figure PCTCN2018102093-appb-100001
    其中z为任务处理权重,其中X为所述主服务器集群的第一任务队列中待处理的第一请求数,Y为所述主服务器集群对应的备服务器集群的第二任务队列中待处理的第二请求数。
  5. 如权利要求1所述的电子装置,其特征在于,在所述步骤A1中,所述业务信息为业务领域类型。
  6. 如权利要求2所述的电子装置,其特征在于,在所述步骤A1中,所述业务信息为业务领域类型。
  7. 如权利要求3所述的电子装置,其特征在于,在所述步骤A1中,所述业务信息为业务领域类型。
  8. 如权利要求4所述的电子装置,其特征在于,在所述步骤A1中,所 述业务信息为业务领域类型。
  9. 一种集群访问域名自动生成方法,其特征在于,所述方法包括如下步骤:
    S1、向预先确定的各个客户端配置预设的第一访问域名,若接收到有客户端发送的业务调用请求,则解析所述业务调用请求以解析出业务信息;
    S2、将解析得到的业务信息写入该客户端的访问令牌,所述访问令牌为该客户端预先获取的访问授权认证信息;
    S3、根据预先存储的业务信息与服务器集群的访问域名之间的第一映射关系,确定所述访问令牌对应的服务器集群的第二访问域名;
    S4、将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向对应的服务器集群发送所述业务调用请求。
  10. 如权利要求9所述的集群访问域名自动生成方法,其特征在于,所述服务器集群包括至少一个主服务器集群及与各个主服务器集群分别对应的备服务器集群,所述步骤S3可替换为如下步骤:
    根据预先存储的业务信息与所述主服务器集群的访问域名之间的第二映射关系,确定处理所述业务调用请求的主服务器集群对应的第二访问域名。
  11. 如权利要求10所述的集群访问域名自动生成方法,其特征在于,所述步骤A4可替换为如下步骤:
    根据预先确定的集群任务分配规则确定由所述第二访问域名对应的主服务器集群处理所述业务调用请求,或者确定由该主服务器集群对应备服务器集群处理所述业务调用请求;
    若确定由该主服务集群处理所述业务调用请求,则将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向对应的服务器集群发送所述业务调用请求;
    若确定由该主服务器集群对应的备服务器集群处理所述业务调用请求,则获取该备服务器集群对应的第三访问域名,将所述第一访问域名替换为所 述第三访问域名,基于所述第三访问域名向对应的备服务器集群发送所述业务调用请求。
  12. 如权利要求10所述的集群访问域名自动生成方法,其特征在于,所述预先确定的集群任务分配规则为:
    根据预先确定的任务处理权重计算公式计算将所述业务调用请求加入所述主服务集群的第一任务队列之后,所述主服务器集群对应的任务处理权重与预设的任务处理权重阈值之间的大小;
    若计算得到的主服务器集群对应的任务处理权重大于或等于预设的任务处理权重阈值,则确定由所述主服务器集群对应的备服务器集群处理所述业务调用请求;
    若计算得到的主服务器集群对应的任务处理权重小于预设的任务处理权重阈值,则确定所述主服务器集群处理所述业务调用请求,其中,所述预先确定的任务处理权重计算公式为:
    Figure PCTCN2018102093-appb-100002
    其中z为任务处理权重,X为所述主服务器集群的第一任务队列中待处理的第一请求数,Y为所述主服务器集群对应的备服务器集群的第二任务队列中待处理的第二请求数。
  13. 如权利要求9所述的集群访问域名自动生成方法,其特征在于,在所述步骤A1中,所述业务信息为业务领域类型。
  14. 如权利要求10所述的集群访问域名自动生成方法,其特征在于,在所述步骤A1中,所述业务信息为业务领域类型。
  15. 如权利要求11所述的集群访问域名自动生成方法,其特征在于,在所述步骤A1中,所述业务信息为业务领域类型。
  16. 如权利要求12所述的集群访问域名自动生成方法,其特征在于,在所述步骤A1中,所述业务信息为业务领域类型。
  17. 一种计算机可读存储介质,所述计算机可读存储介质存储有集群访问 域名自动生成程序,所述集群访问域名自动生成程序可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:
    向预先确定的各个客户端配置预设的第一访问域名,若接收到有客户端发送的业务调用请求,则解析所述业务调用请求以解析出业务信息;
    将解析得到的业务信息写入该客户端的访问令牌,所述访问令牌为该客户端预先获取的访问授权认证信息;
    根据预先存储的业务信息与服务器集群的访问域名之间的第一映射关系,确定所述访问令牌对应的服务器集群的第二访问域名;
    将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向对应的服务器集群发送所述业务调用请求。
  18. 如权利要求17所述的存储介质,其特征在于,所述服务器集群包括至少一个主服务器集群及与各个主服务器集群分别对应的备服务器集群,所述根据预先存储的业务信息与服务器集群的访问域名之间的第一映射关系,确定所述访问令牌对应的服务器集群的第二访问域名的步骤可替换为如下步骤:
    根据预先存储的业务信息与所述主服务器集群的访问域名之间的第二映射关系,确定处理所述业务调用请求的主服务器集群对应的第二访问域名。
  19. 如权利要求18所述的存储介质,其特征在于,所述将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向对应的服务器集群发送所述业务调用请求的步骤可替换为如下步骤:
    根据预先确定的集群任务分配规则确定由所述第二访问域名对应的主服务器集群处理所述业务调用请求,或者确定由该主服务器集群对应备服务器集群处理所述业务调用请求;
    若确定由该主服务集群处理所述业务调用请求,则将所述第一访问域名替换为所述第二访问域名,基于所述第二访问域名向对应的服务器集群发送所述业务调用请求;
    若确定由该主服务器集群对应的备服务器集群处理所述业务调用请求,则获取该备服务器集群对应的第三访问域名,将所述第一访问域名替换为所述第三访问域名,基于所述第三访问域名向对应的备服务器集群发送所述业务调用请求。
  20. 如权利要求19所述的存储介质,其特征在于,所述预先确定的集群任务分配规则为:
    根据预先确定的任务处理权重计算公式计算将所述业务调用请求加入所述主服务集群的第一任务队列之后,所述主服务器集群对应的任务处理权重与预设的任务处理权重阈值之间的大小;
    若计算得到的主服务器集群对应的任务处理权重大于或等于预设的任务处理权重阈值,则确定由所述主服务器集群对应的备服务器集群处理所述业务调用请求;
    若计算得到的主服务器集群对应的任务处理权重小于预设的任务处理权重阈值,则确定所述主服务器集群处理所述业务调用请求,其中,所述预先确定的任务处理权重计算公式为:
    其中z为任务处理权重,X为所述主服务器集群的第一任务队列中待处理的第一请求数,Y为所述主服务器集群对应的备服务器集群的第二任务队列中待处理的第二请求数。
PCT/CN2018/102093 2018-03-21 2018-08-24 电子装置、集群访问域名自动生成方法及存储介质 WO2019179026A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810233219.4 2018-03-21
CN201810233219.4A CN108462760B (zh) 2018-03-21 2018-03-21 电子装置、集群访问域名自动生成方法及存储介质

Publications (1)

Publication Number Publication Date
WO2019179026A1 true WO2019179026A1 (zh) 2019-09-26

Family

ID=63237640

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/102093 WO2019179026A1 (zh) 2018-03-21 2018-08-24 电子装置、集群访问域名自动生成方法及存储介质

Country Status (2)

Country Link
CN (1) CN108462760B (zh)
WO (1) WO2019179026A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026709A (zh) * 2019-12-10 2020-04-17 中盈优创资讯科技有限公司 基于集群访问的数据处理方法及装置
CN112153143A (zh) * 2020-09-24 2020-12-29 新浪网技术(中国)有限公司 Kubernetes集群的流量调度方法、装置及电子设备
CN112153155A (zh) * 2020-09-28 2020-12-29 平安数字信息科技(深圳)有限公司 服务器集群中的服务请求方法、装置、计算机设备及介质
CN113741924A (zh) * 2020-05-28 2021-12-03 中国移动通信集团浙江有限公司 一种应用部署方法、系统和服务器

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109787951B (zh) * 2018-11-22 2022-09-02 北京奇艺世纪科技有限公司 一种网络数据访问方法、装置及电子设备
CN112019584B (zh) * 2019-05-31 2022-05-31 阿里巴巴集团控股有限公司 资源访问控制方法、装置及计算机系统
CN111526038B (zh) * 2020-03-26 2023-01-20 口碑(上海)信息技术有限公司 业务请求分发方法、装置、计算机设备及可读存储介质
CN113285920B (zh) * 2021-04-20 2023-06-30 北京奇艺世纪科技有限公司 业务访问方法、装置、设备及存储介质
CN113992627A (zh) * 2021-10-26 2022-01-28 北京字节跳动网络技术有限公司 一种域名解析方法、装置、设备及介质
CN114168071B (zh) * 2021-10-29 2023-11-03 济南浪潮数据技术有限公司 一种分布式集群扩容方法、分布式集群扩容装置及介质
CN114710314B (zh) * 2022-02-21 2023-06-06 深圳腾银信息咨询有限责任公司 一种配置化的软件服务平台访问方法、装置、系统及介质
CN114884724B (zh) * 2022-05-06 2024-03-22 杭州联吉技术有限公司 一种云服务器交互方法、装置、可读存储介质及终端设备
CN115426333A (zh) * 2022-08-26 2022-12-02 济南浪潮数据技术有限公司 一种用于对象存储的多集群访问系统及方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080320003A1 (en) * 2007-06-25 2008-12-25 Microsoft Corporation Scaling network services using dns
CN101873358A (zh) * 2010-06-11 2010-10-27 杭州华三通信技术有限公司 一种基于域名解析的链路负载均衡方法和设备
CN105812323A (zh) * 2014-12-30 2016-07-27 Tcl集团股份有限公司 一种网络跨域访问数据的方法和装置
CN106161043A (zh) * 2014-11-28 2016-11-23 三星电子株式会社 用于在用户设备之间提供赞助服务的方法和设备
CN107071078A (zh) * 2017-02-19 2017-08-18 网宿科技股份有限公司 域名解析系统、域名解析服务器和域名解析方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040098615A1 (en) * 2002-11-16 2004-05-20 Mowers David R. Mapping from a single sign-in service to a directory service
US9231904B2 (en) * 2006-09-25 2016-01-05 Weaved, Inc. Deploying and managing networked devices
CN102395054A (zh) * 2011-09-21 2012-03-28 深圳市同洲电子股份有限公司 一种更新门户页面的方法、系统和装置
CN103051630B (zh) * 2012-12-21 2016-01-27 微梦创科网络科技(中国)有限公司 基于开放平台实现第三方应用授权的方法、装置及系统
CN104753872B (zh) * 2013-12-30 2018-10-12 中国移动通信集团公司 认证方法、认证平台、业务平台、网元及系统
CN103929508A (zh) * 2014-05-04 2014-07-16 上海大亚科技有限公司 实现业务与域名解析服务器绑定的系统及方法
CN105897497A (zh) * 2015-07-20 2016-08-24 广州华多网络科技有限公司 一种接口测试方法、应用设备以及服务设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080320003A1 (en) * 2007-06-25 2008-12-25 Microsoft Corporation Scaling network services using dns
CN101873358A (zh) * 2010-06-11 2010-10-27 杭州华三通信技术有限公司 一种基于域名解析的链路负载均衡方法和设备
CN106161043A (zh) * 2014-11-28 2016-11-23 三星电子株式会社 用于在用户设备之间提供赞助服务的方法和设备
CN105812323A (zh) * 2014-12-30 2016-07-27 Tcl集团股份有限公司 一种网络跨域访问数据的方法和装置
CN107071078A (zh) * 2017-02-19 2017-08-18 网宿科技股份有限公司 域名解析系统、域名解析服务器和域名解析方法

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026709A (zh) * 2019-12-10 2020-04-17 中盈优创资讯科技有限公司 基于集群访问的数据处理方法及装置
CN111026709B (zh) * 2019-12-10 2024-03-12 中盈优创资讯科技有限公司 基于集群访问的数据处理方法及装置
CN113741924A (zh) * 2020-05-28 2021-12-03 中国移动通信集团浙江有限公司 一种应用部署方法、系统和服务器
CN113741924B (zh) * 2020-05-28 2023-02-24 中国移动通信集团浙江有限公司 一种应用部署方法、系统和服务器
CN112153143A (zh) * 2020-09-24 2020-12-29 新浪网技术(中国)有限公司 Kubernetes集群的流量调度方法、装置及电子设备
CN112153143B (zh) * 2020-09-24 2023-04-28 新浪技术(中国)有限公司 Kubernetes集群的流量调度方法、装置及电子设备
CN112153155A (zh) * 2020-09-28 2020-12-29 平安数字信息科技(深圳)有限公司 服务器集群中的服务请求方法、装置、计算机设备及介质
CN112153155B (zh) * 2020-09-28 2023-03-24 深圳平安智汇企业信息管理有限公司 服务器集群中的服务请求方法、装置、计算机设备及介质

Also Published As

Publication number Publication date
CN108462760A (zh) 2018-08-28
CN108462760B (zh) 2020-01-10

Similar Documents

Publication Publication Date Title
WO2019179026A1 (zh) 电子装置、集群访问域名自动生成方法及存储介质
WO2019205371A1 (zh) 服务器、消息分配的方法及存储介质
WO2019140828A1 (zh) 电子装置、分布式系统日志查询方法及存储介质
WO2019148722A1 (zh) 电子装置、数据迁移及调用方法及存储介质
WO2019179027A1 (zh) 电子装置、防火墙开通验证方法、系统及存储介质
WO2020181810A1 (zh) 应用于集群内多级缓存的数据处理方法和装置
US20140245394A1 (en) Trust-based computing resource authorization in a networked computing environment
WO2019148727A1 (zh) 电子装置、基于redis的异常预警方法及存储介质
WO2021139224A1 (zh) 云场景下的文件备份方法、装置、介质、电子设备
US20140006789A1 (en) Devices, systems, and methods for monitoring and asserting trust level using persistent trust log
WO2020224100A1 (zh) 区块链配置文件的处理装置、系统、方法及存储介质
US8484342B2 (en) Organizing individual java client request flows into a single server transaction
CN112118286A (zh) 基于mdc多线程链路追踪方法、装置及计算机可读存储介质
WO2019169763A1 (zh) 电子装置、业务系统风险控制方法及存储介质
WO2023193687A1 (zh) 一种共享内存的访问方法、装置、设备和存储介质
WO2019140829A1 (zh) 电子装置、应用升级版本发布的方法及存储介质
WO2019169771A1 (zh) 电子装置、访问指令信息获取方法及存储介质
US20150058926A1 (en) Shared Page Access Control Among Cloud Objects In A Distributed Cloud Environment
WO2022142008A1 (zh) 数据处理方法、装置、电子设备及存储介质
US20230114321A1 (en) Cloud Data Ingestion System
WO2022133827A1 (zh) 一种任务处理请求的处理方法、装置以及区块链节点设备
US9218211B2 (en) Priority promotion for service requests
CN114266072A (zh) 一种权限分配控制方法、装置、电子设备及存储介质
CN110058866B (zh) 集群组件安装方法及设备
CN114124475A (zh) 一种网络资产端口扫描及服务识别方法、装置

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: 18911187

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 20.01.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18911187

Country of ref document: EP

Kind code of ref document: A1