技术领域technical field
本发明涉及互联网应用技术领域,特别是涉及一种网络访问请求的业务分配方法、装置及系统。The present invention relates to the technical field of Internet applications, in particular to a service distribution method, device and system for network access requests.
背景技术Background technique
IDC(Internet Data Center,互联网数据中心)就是电信部门利用已有的互联网通信线路、带宽资源,建立标准化的电信专业级机房环境,为企业、政府提供服务器托管、租用以及相关增值等方面的全方位服务。目前,客户端访问服务器以获取服务器提供的数据信息时,客户端访问哪个地区的服务器都是通过人工提前配置好的,且配置原则大部分采用就近原则,即为客户端配置距该客户端所在地区最近的服务器。IDC (Internet Data Center, Internet Data Center) is the use of existing Internet communication lines and bandwidth resources by the telecommunications department to establish a standardized telecommunications professional-grade computer room environment to provide enterprises and governments with all-round services in server hosting, leasing and related value-added aspects. Serve. At present, when the client accesses the server to obtain the data information provided by the server, the server in which region the client accesses is manually configured in advance, and most of the configuration principles adopt the principle of proximity, that is, configure the distance to the client where the client is located. The closest server for the region.
但是,现有技术中为客户端配置最近的服务器并不代表该服务器相对于客户端是最优的选择,而应考虑如何选择可以为客户端在相对较短的时间内提供客户端所需数据信息的服务器。此外,现有技术通过提前为客户端配置好其访问哪个地区的服务器,也不能实现各个地区的服务器的灵活应用,易导致某个地区的服务器负载过高,而某些地区的服务器得不到有效地利用的问题。因此,如何合理地为客户端提供优选服务器成为一项亟待解决的技术问题。However, configuring the closest server for the client in the prior art does not mean that the server is the optimal choice for the client, but it should be considered how to choose the server that can provide the client with the data required by the client in a relatively short period of time information server. In addition, the existing technology can not realize the flexible application of servers in various regions by configuring the server in which region it visits for the client in advance, which will easily lead to the high load of the server in a certain region, while the servers in some regions cannot get problem of effective use. Therefore, how to reasonably provide the preferred server for the client has become an urgent technical problem to be solved.
发明内容Contents of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的一种网络访问请求的业务分配方法、装置及系统。In view of the above problems, the present invention is proposed to provide a service distribution method, device and system for network access requests that overcome the above problems or at least partially solve the above problems.
依据本发明的一方面,提供了一种网络访问请求的业务分配方法,所述网络中包含有多个应用的客户端,当客户端向所述网络中的服务器发送数据访问请求时,接收服务器返回的响应消息,所述方法包括:According to one aspect of the present invention, a service allocation method for network access requests is provided. The network includes multiple application clients. When the client sends a data access request to a server in the network, the receiving server The returned response message, the method includes:
将所述网络划分为多个子网络;dividing the network into a plurality of sub-networks;
针对划分的各个子网络,获取所述各个子网络中的至少一个客户端,并收集所述至少一个客户端各自访问服务器的访问相关信息;For each divided sub-network, obtain at least one client in each sub-network, and collect access-related information of each access server of the at least one client;
基于收集的所述至少一个客户端各自访问服务器的访问相关信息,生成所述各个子网络中提供数据服务的服务器的访问优先列表;Generate an access priority list of servers providing data services in each sub-network based on the collected access-related information of the respective access servers of the at least one client;
当接收到来自任意客户端的数据访问请求时,确定该任意客户端所属的目标子网络,并根据所述目标子网络对应的访问优先列表为该任意客户端分配优选服务器,以由分配的优选服务器为该任意客户端提供数据服务。When receiving a data access request from any client, determine the target subnet to which any client belongs, and assign a preferred server to any client according to the access priority list corresponding to the target subnet, so that the assigned preferred server Provide data services for this arbitrary client.
可选地,所述将所述网络划分为多个子网络,包括:Optionally, the dividing the network into multiple sub-networks includes:
获取所述网络中的多个IP地址和/或域名信息;Obtain information on multiple IP addresses and/or domain names in the network;
基于所述多个IP地址和/或域名信息确定多个IP地址段,其中,一个IP地址段对应一个子网络。Multiple IP address segments are determined based on the multiple IP addresses and/or domain name information, where one IP address segment corresponds to one subnetwork.
可选地,所述获取所述各个子网络中的至少一个客户端,包括:Optionally, the acquiring at least one client in each subnet includes:
获取所述各个IP地址段中的所述至少一个客户端各自的IP地址和/或域名信息,从而获取到所述各个子网络中的至少一个客户端。Obtain the respective IP address and/or domain name information of the at least one client in each IP address segment, so as to obtain at least one client in each subnet.
可选地,所述收集所述至少一个客户端各自访问服务器的访问相关信息,包括:Optionally, the collecting access-related information of the at least one client accessing the server respectively includes:
主动获取所述至少一个客户端各自访问服务器的访问相关信息;或者Actively obtain access-related information of the at least one client accessing the server; or
接收由所述至少一个客户端上传的其各自访问服务器的访问相关信息。Receiving access-related information uploaded by the at least one client to its respective access server.
可选地,所述访问相关信息包括以下至少之一:Optionally, the access-related information includes at least one of the following:
访问次数、访问成功次数、任意一次访问成功所需访问时间。The number of visits, the number of successful visits, and the visit time required for any successful visit.
可选地,所述方法还包括:Optionally, the method also includes:
为每个所述访问相关信息分配权重;assigning a weight to each of said access-related information;
基于分配的所述访问相关信息的权重,对所述至少一个客户端各自访问服务器的访问相关信息分别进行加权求和以得到综合值;Based on the assigned weights of the access-related information, performing weighted summation on the access-related information of the respective access servers of the at least one client to obtain a comprehensive value;
依据所述综合值的大小,对所述访问优先列表中的服务器进行排序。The servers in the access priority list are sorted according to the size of the integrated value.
可选地,所述在生成所述各个子网络中提供数据服务的服务器的访问优先列表之后,所述方法包括:Optionally, after generating the access priority lists of servers providing data services in each subnetwork, the method includes:
判断所述访问优先列表中的各个服务器是否处于在线状态,若任意服务器不处于在线状态,则将该任意服务器从所述访问优先列表中剔除,并更新所述访问优先列表。Judging whether each server in the access priority list is online, if any server is not online, removing the arbitrary server from the access priority list, and updating the access priority list.
可选地,所述在生成所述各个子网络中提供数据服务的服务器的访问优先列表之后,所述方法还包括:Optionally, after generating the access priority lists of servers providing data services in each subnetwork, the method further includes:
收集所述至少一个客户端各自访问服务器的访问相关信息;Collect access-related information of the at least one client accessing the server respectively;
基于收集的所述至少一个客户端各自访问服务器的访问相关信息,更新所述各个子网络中提供数据服务的服务器的访问优先列表。Updating the access priority lists of servers providing data services in the respective subnets based on the collected access related information of the respective access servers of the at least one client.
可选地,所述确定该任意客户端所属的目标子网络,包括:Optionally, the determining the target subnet to which any client belongs includes:
获取该任意客户端的IP地址和/或域名信息;Obtain the IP address and/or domain name information of any client;
确定该任意客户端的IP地址和/或域名信息所属的IP地址段,从而确定该任意客户端所属IP地址段对应的子网络为该任意客户端所属目标子网络。Determine the IP address segment to which the IP address and/or domain name information of the arbitrary client belongs, thereby determining that the subnet corresponding to the IP address segment to which the arbitrary client belongs is the target subnet to which the arbitrary client belongs.
可选地,根据任意客户端所属的目标子网络对应的访问优先列表为该任意客户端分配优选服务器,包括:Optionally, assigning a preferred server to any client according to the access priority list corresponding to the target subnet to which any client belongs includes:
从所述任意客户端所属IP地址段对应的访问优先列表中,为该任意客户端分配优选服务器。Allocating a preferred server to any client from the access priority list corresponding to the IP address segment to which any client belongs.
可选地,所述根据所述目标子网络对应的访问优先列表为该任意客户端分配优选服务器之后,所述方法还包括:Optionally, after assigning a preferred server to any client according to the access priority list corresponding to the target subnet, the method further includes:
判断所述优选服务器的当前负载状态值是否达到预设阈值,若已经达到预设阈值,则从所述目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端。Judging whether the current load status value of the preferred server reaches a preset threshold, and if it has reached the preset threshold, select other servers from the access priority list corresponding to the target subnet as preferred servers and assign them to any client.
可选地,所述根据所述目标子网络对应的访问优先列表为该任意客户端分配优选服务器之后,所述方法还包括:Optionally, after assigning a preferred server to any client according to the access priority list corresponding to the target subnet, the method further includes:
判断所述优选服务器是否处于在线状态;judging whether the preferred server is online;
若所述优选服务器处于在线状态,则判断所述优选服务器的当前负载状态值是否达到预设阈值,若未达到预设阈值,则将该优选服务器分配至该任意客户端;若已经达到预设阈值,则从所述目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端;If the preferred server is in the online state, it is judged whether the current load status value of the preferred server reaches the preset threshold, if it does not reach the preset threshold, then the preferred server is allocated to the arbitrary client; if it has reached the preset threshold threshold, select other servers from the access priority list corresponding to the target subnet as preferred servers and assign them to any client;
若所述优选服务器不处于在线状态,则从所述目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端。If the preferred server is not online, select other servers from the access priority list corresponding to the target subnet as preferred servers and assign them to any client.
可选地,所述方法还包括:Optionally, the method also includes:
基于收集的所述至少一个客户端各自访问服务器的访问相关信息以及被访问服务器的提供数据服务的能力,生成所述各个子网络中提供数据服务的服务器的访问优先列表。An access priority list of servers providing data services in each subnetwork is generated based on the collected access related information of the respective access servers of the at least one client and the capabilities of the accessed servers to provide data services.
可选地,当任意客户端所属的目标子网络对应的访问优先列表中未存在优选服务器时,所述方法还包括:Optionally, when there is no preferred server in the access priority list corresponding to the target subnet to which any client belongs, the method further includes:
确定所述目标子网路的相邻子网络;determining adjacent subnetworks of the target subnetwork;
根据所述目标子网络的相邻子网络对应的访问优先列表为该任意客户端分配优选服务器,以由分配的优选服务器为该任意客户端提供数据服务。Allocating a preferred server to any client according to an access priority list corresponding to an adjacent subnet of the target subnet, so that the allocated preferred server provides data services for the arbitrary client.
依据本发明的另一方面,还提供了一种网络访问请求的业务分配装置,所述网络中包含有多个应用的客户端,当客户端向所述网络中的服务器发送数据访问请求时,接收服务器返回的响应消息,所述装置包括:According to another aspect of the present invention, a device for distributing services for network access requests is also provided. The network includes multiple application clients. When the client sends a data access request to a server in the network, Receiving the response message returned by the server, the device includes:
划分模块,适于将所述网络划分为多个子网络;a division module adapted to divide the network into a plurality of sub-networks;
收集模块,适于针对划分的各个子网络,获取所述各个子网络中的至少一个客户端,并收集所述至少一个客户端各自访问服务器的访问相关信息;The collection module is adapted to obtain at least one client in each divided subnetwork, and collect access-related information of each access server of the at least one client;
生成模块,适于基于收集的所述至少一个客户端各自访问服务器的访问相关信息,生成所述各个子网络中提供数据服务的服务器的访问优先列表;A generating module, adapted to generate an access priority list of servers providing data services in each subnet based on the collected access related information of the at least one client accessing the server;
第一分配模块,适于当接收到来自任意客户端的数据访问请求时,确定该任意客户端所属的目标子网络,并根据所述目标子网络对应的访问优先列表为该任意客户端分配优选服务器,以由分配的优选服务器为该任意客户端提供数据服务。The first assignment module is adapted to determine the target subnet to which the arbitrary client belongs when receiving a data access request from any client, and assign a preferred server to the arbitrary client according to the access priority list corresponding to the target subnet , to serve data to that arbitrary client by the assigned preferred server.
可选地,所述划分模块还适于:Optionally, the division module is also suitable for:
获取所述网络中的多个IP地址和/或域名信息;Obtain information on multiple IP addresses and/or domain names in the network;
基于所述多个IP地址和/或域名信息确定多个IP地址段,其中,一个IP地址段对应一个子网络。Multiple IP address segments are determined based on the multiple IP addresses and/or domain name information, where one IP address segment corresponds to one subnetwork.
可选地,所述收集模块还适于:Optionally, the collection module is also suitable for:
获取所述各个IP地址段中的所述至少一个客户端各自的IP地址和/或域名信息,从而获取到所述各个子网络中的至少一个客户端。Obtain the respective IP address and/or domain name information of the at least one client in each IP address segment, so as to obtain at least one client in each subnet.
可选地,所述收集模块还适于:Optionally, the collection module is also suitable for:
主动获取所述至少一个客户端各自访问服务器的访问相关信息;或者Actively obtain access-related information of the at least one client accessing the server; or
接收由所述至少一个客户端上传的其各自访问服务器的访问相关信息。Receiving access-related information uploaded by the at least one client to its respective access server.
可选地,所述访问相关信息包括以下至少之一:Optionally, the access-related information includes at least one of the following:
访问次数、访问成功次数、任意一次访问成功所需访问时间。The number of visits, the number of successful visits, and the visit time required for any successful visit.
可选地,所述装置还包括:Optionally, the device also includes:
第二分配模块,适于为每个所述访问相关信息分配权重;a second assigning module adapted to assign a weight to each of said access-related information;
计算模块,适于基于分配的所述访问相关信息的权重,对所述至少一个客户端各自访问服务器的访问相关信息分别进行加权求和以得到综合值;A calculation module, adapted to perform weighted summation on the access related information of the respective access servers of the at least one client based on the assigned weights of the access related information to obtain a comprehensive value;
排序模块,适于依据所述综合值的大小,对所述访问优先列表中的服务器进行排序。The sorting module is adapted to sort the servers in the access priority list according to the size of the integrated value.
可选地,所述的装置还包括更新模块,适于:Optionally, the device further includes an update module adapted to:
在所述生成模块生成所述各个子网络中提供数据服务的服务器的访问优先列表之后,判断所述访问优先列表中的各个服务器是否处于在线状态,若任意服务器不处于在线状态,则将该任意服务器从所述访问优先列表中剔除,并更新所述访问优先列表。After the generation module generates the access priority list of servers providing data services in each subnetwork, it is judged whether each server in the access priority list is in an online state, and if any server is not in an online state, then any The server removes from the access priority list, and updates the access priority list.
可选地,所述更新模块还适于:在所述生成模块生成所述各个子网络中提供数据服务的服务器的访问优先列表之后,Optionally, the updating module is further adapted to: after the generating module generates the access priority list of servers providing data services in each subnetwork,
收集所述至少一个客户端各自访问服务器的访问相关信息;Collect access-related information of the at least one client accessing the server respectively;
基于收集的所述至少一个客户端各自访问服务器的访问相关信息,更新所述各个子网络中提供数据服务的服务器的访问优先列表。Updating the access priority lists of servers providing data services in the respective subnets based on the collected access related information of the respective access servers of the at least one client.
可选地,所述第一分配模块还适于:Optionally, the first distribution module is also suitable for:
获取该任意客户端的IP地址和/或域名信息;Obtain the IP address and/or domain name information of any client;
确定该任意客户端的IP地址和/或域名信息所属的IP地址段,从而确定该任意客户端所属IP地址段对应的子网络为该任意客户端所属目标子网络。Determine the IP address segment to which the IP address and/or domain name information of the arbitrary client belongs, thereby determining that the subnet corresponding to the IP address segment to which the arbitrary client belongs is the target subnet to which the arbitrary client belongs.
可选地,所述第一分配模块还适于:Optionally, the first distribution module is also suitable for:
从所述任意客户端所属IP地址段对应的访问优先列表中,为该任意客户端分配优选服务器。Allocating a preferred server to any client from the access priority list corresponding to the IP address segment to which any client belongs.
可选地,所述装置还包括判断模块,适于:Optionally, the device also includes a judging module, adapted to:
在第一分配模块根据所述目标子网络对应的访问优先列表为该任意客户端分配优选服务器之后,判断所述优选服务器的当前负载状态值是否达到预设阈值,若已经达到预设阈值,则从所述目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端。After the first assignment module assigns a preferred server to any client according to the access priority list corresponding to the target subnetwork, it is judged whether the current load status value of the preferred server reaches a preset threshold, and if it has reached a preset threshold, then Selecting other servers from the access priority list corresponding to the target subnet as preferred servers and assigning them to any client.
可选地,所述判断模块还适于:在第一分配模块根据所述目标子网络对应的访问优先列表为该任意客户端分配优选服务器之后,Optionally, the judgment module is further adapted to: after the first assignment module assigns a preferred server to any client according to the access priority list corresponding to the target subnet,
判断所述优选服务器是否处于在线状态;judging whether the preferred server is online;
若所述优选服务器处于在线状态,则判断所述优选服务器的当前负载状态值是否达到预设阈值,若未达到预设阈值,则将该优选服务器分配至该任意客户端;若已经达到预设阈值,则从所述目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端;If the preferred server is in the online state, it is judged whether the current load status value of the preferred server reaches the preset threshold, if it does not reach the preset threshold, then the preferred server is allocated to the arbitrary client; if it has reached the preset threshold threshold, select other servers from the access priority list corresponding to the target subnet as preferred servers and assign them to any client;
若所述优选服务器不处于在线状态,则从所述目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端。If the preferred server is not online, select other servers from the access priority list corresponding to the target subnet as preferred servers and assign them to any client.
可选地,所述生成模块还适于:Optionally, the generating module is also suitable for:
基于收集的所述至少一个客户端各自访问服务器的访问相关信息以及被访问服务器的提供数据服务的能力,生成所述各个子网络中提供数据服务的服务器的访问优先列表。An access priority list of servers providing data services in each subnetwork is generated based on the collected access related information of the respective access servers of the at least one client and the capabilities of the accessed servers to provide data services.
可选地,所述第一分配模块还适于:当任意客户端所属的目标子网络对应的访问优先列表中未存在优选服务器时,Optionally, the first allocation module is further adapted to: when there is no preferred server in the access priority list corresponding to the target subnet to which any client belongs,
确定所述目标子网路的相邻子网络;determining adjacent subnetworks of the target subnetwork;
根据所述目标子网络的相邻子网络对应的访问优先列表为该任意客户端分配优选服务器,以由分配的优选服务器为该任意客户端提供数据服务。Allocating a preferred server to any client according to an access priority list corresponding to an adjacent subnet of the target subnet, so that the allocated preferred server provides data services for the arbitrary client.
依据本发明的再一方面,还提供了一种网络访问请求的业务分配系统,包括多个应用的客户端、服务器以及如上文实施例中所述的网络访问请求的业务分配装置。According to another aspect of the present invention, there is also provided a network access request service distribution system, including multiple application clients, a server, and the network access request service distribution device as described in the above embodiments.
在本发明实施例中,首先,将网络划分为多个子网络。然后,针对划分的各个子网络,获取各个子网络中的至少一个客户端。通过收集各个子网络中的客户端访问其对应的服务器的访问相关信息,生成各个子网络中提供数据服务的服务器的访问优先列表。当接收到任意客户端的数据访问请求时,通过分析该客户端所属子网络,进而从该子网络对应的访问优先列表中为该任意客户端分配优选服务器。由此可见,本发明实施例通过收集客户端访问其对应的服务器的访问相关信息,并分析各项访问相关信息为客户端分配优选服务器,从而实现灵活地为客户端分配更为优选的服务器,而不是采用传统的提前为客户端分配好指定的服务器。并且,本发明实施例不仅可以提高客户端访问服务器并获取服务器提供数据服务的效率,同时还可以提高用户使用客户端获取相关信息的操作体验。In the embodiment of the present invention, firstly, the network is divided into multiple sub-networks. Then, for each divided sub-network, at least one client in each sub-network is obtained. An access priority list of servers providing data services in each subnet is generated by collecting access related information of clients in each subnet accessing their corresponding servers. When receiving a data access request from any client, by analyzing the subnet to which the client belongs, and then assigning a preferred server to any client from the access priority list corresponding to the subnet. It can be seen that the embodiment of the present invention allocates a preferred server for the client by collecting the access related information of the client accessing its corresponding server, and analyzing each item of access related information, so as to flexibly assign a more preferred server to the client. Instead of using the traditional method of assigning a designated server to the client in advance. Moreover, the embodiments of the present invention can not only improve the efficiency of the client accessing the server and obtaining data services provided by the server, but also improve the user's operation experience of using the client to obtain relevant information.
进一步的,本发明实施例通过收集客户端访问服务器的访问相关信息,并生成、实时更新各个子网络对应的服务器列表,有效地避免了某些服务器负载过高,而某些服务器则处于空闲状态的情况,可以使各项服务器得到充分的利用,保证各项服务器接入客户端的数量均衡。Furthermore, the embodiment of the present invention collects the access related information of the client accessing the server, and generates and updates the server list corresponding to each subnet in real time, effectively avoiding that some servers are overloaded while some servers are in an idle state. In this case, each server can be fully utilized, and the number of clients connected to each server can be guaranteed to be balanced.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.
根据下文结合附图对本发明具体实施例的详细描述,本领域技术人员将会更加明了本发明的上述以及其他目的、优点和特征。According to the following detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art will be more aware of the above and other objects, advantages and features of the present invention.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same parts. In the attached picture:
图1示出了根据本发明一个实施例的网络访问请求的业务分配方法的流程示意图;FIG. 1 shows a schematic flow diagram of a service allocation method for a network access request according to an embodiment of the present invention;
图2示出了根据本发明另一个实施例的网络访问请求的业务分配方法的流程示意图;Fig. 2 shows a schematic flow diagram of a service allocation method for a network access request according to another embodiment of the present invention;
图3示出了根据本发明再一个实施例的网络访问请求的业务分配方法的流程示意图;Fig. 3 shows a schematic flow diagram of a service allocation method for network access requests according to yet another embodiment of the present invention;
图4示出了根据本发明一个实施例的网络访问请求的业务分配装置的结构示意图;FIG. 4 shows a schematic structural diagram of a service distribution device for network access requests according to an embodiment of the present invention;
图5示出了根据本发明另一个实施例的网络访问请求的业务分配装置的结构示意图;Fig. 5 shows a schematic structural diagram of a service allocation device for network access requests according to another embodiment of the present invention;
图6示出了根据本发明再一个实施例的网络访问请求的业务分配装置的结构示意图;以及FIG. 6 shows a schematic structural diagram of a device for allocating network access requests according to yet another embodiment of the present invention; and
图7示出了根据本发明一个实施例的网络访问请求的业务分配系统的结构示意图。Fig. 7 shows a schematic structural diagram of a service distribution system for network access requests according to an embodiment of the present invention.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
为解决上述技术问题,本发明实施例提供了一种网络访问请求的业务分配方法,该实施例中的网络中包含有多个应用的客户端,当客户端向网络中的服务器发送数据访问请求时,接收服务器返回的响应消息。图1示出了根据本发明一个实施例的网络访问请求的业务分配方法的流程示意图。参见图1,该方法至少可以包括步骤S102至步骤S108。In order to solve the above-mentioned technical problems, an embodiment of the present invention provides a service distribution method for network access requests. In this embodiment, the network includes multiple application clients. When the client sends a data access request to a server in the network , receive the response message returned by the server. Fig. 1 shows a schematic flowchart of a method for allocating network access requests according to an embodiment of the present invention. Referring to Fig. 1, the method may at least include step S102 to step S108.
步骤S102,将网络划分为多个子网络。Step S102, divide the network into multiple sub-networks.
在该步骤中,可以获取某一个局域网作为网络,并使该局域网所覆盖的区域中的各个分区域对应各个子网络。例如,公司的整栋大楼使用同一局域网,将该局域网作为网络,通过将这栋大楼划分为各个楼层,可以使得每个楼层对应一个子网络。此外,还可以将多个IP地址和/或域名信息的组合作为网络,从多个IP地址和/或域名信息中确定出多个IP地址段,并使得每一个IP地址段对应一个子网络。本发明对网络以及子网络的具体概念不做限定。In this step, a certain local area network may be obtained as a network, and each sub-area in the area covered by the local area network corresponds to each sub-network. For example, the entire building of a company uses the same LAN, and the LAN is used as a network. By dividing the building into floors, each floor corresponds to a subnetwork. In addition, a combination of multiple IP addresses and/or domain name information can also be used as a network, multiple IP address segments are determined from the multiple IP addresses and/or domain name information, and each IP address segment corresponds to a subnetwork. The present invention does not limit the specific concepts of the network and the sub-network.
步骤S104,针对划分的各个子网络,获取各个子网络中的至少一个客户端,并收集至少一个客户端各自访问服务器的访问相关信息。Step S104, for each divided sub-network, obtain at least one client in each sub-network, and collect access-related information of each access server of the at least one client.
在该步骤中,客户端与服务器之间可以实现信息的交互,客户端为360安全卫士,360手机卫士等,服务器可以为360云查杀服务器等。此外,在本发明实施例中,服务器位于IDC机房中,IDC就是电信部门利用已有的互联网通信线路、带宽资源,建立标准化的电信专业级机房环境,为企业、政府提供服务器托管、租用以及相关增值等方面的全方位服务。本发明对客户端和服务器的具体内容不做限定,只要客户端和服务器之间能够实现信息交互都属于本发明的保护范围。In this step, information interaction can be realized between the client and the server. The client is 360 Security Guard, 360 Mobile Guard, etc., and the server can be 360 Cloud Scanning and Killing Server. In addition, in the embodiment of the present invention, the server is located in the IDC computer room. The IDC is that the telecommunications department uses the existing Internet communication lines and bandwidth resources to establish a standardized telecom professional-grade computer room environment, and provides server hosting, leasing and related services for enterprises and governments. A full range of value-added services. The present invention does not limit the specific content of the client and the server, as long as the information exchange between the client and the server is within the protection scope of the present invention.
另外,该步骤中的访问相关信息可以包括以下至少之一:访问次数、访问成功次数、任意一次访问成功所需访问时间等。其中,访问次数可以为同一服务器接收至少一个客户端访问的访问总次数。访问成功次数可以为至少一个客户端访问同一服务器的过程中,其访问成功的总次数。任意一次访问成功所需访问时间可以为,任意客户端访问服务器时,任意一次访问信息获取成功所花费的时间。In addition, the visit-related information in this step may include at least one of the following: number of visits, number of successful visits, visit time required for any successful visit, and the like. Wherein, the number of visits may be the total number of visits received by the same server from at least one client. The number of successful access times may be the total number of successful access times of at least one client accessing the same server. The access time required for any successful access may be the time it takes for any successful access information to be obtained when any client accesses the server.
步骤S106,基于收集的至少一个客户端各自访问服务器的访问相关信息,生成各个子网络中提供数据服务的服务器的访问优先列表。Step S106, based on the collected access related information of at least one client accessing the server, an access priority list of servers providing data services in each subnet is generated.
在该步骤中,访问优先列表中的各个服务器可以通过各个服务器的信息来体现,例如,访问优先列表中保存各个服务器对应的唯一标识信息,如服务器的IP地址、序列号、注册申请码等,每一个唯一标识信息代表了其对应的服务器。In this step, each server in the access priority list can be reflected by the information of each server. For example, the unique identification information corresponding to each server is stored in the access priority list, such as the IP address, serial number, and registration application code of the server. Each unique identification information represents its corresponding server.
步骤S108,当接收到来自任意客户端的数据访问请求时,确定该任意客户端所属的目标子网络,并根据目标子网络对应的访问优先列表为该任意客户端分配优选服务器,以由分配的优选服务器为该任意客户端提供数据服务。Step S108, when receiving a data access request from any client, determine the target subnet to which any client belongs, and assign a preferred server to any client according to the access priority list corresponding to the target subnet, so that the assigned preferred server The server provides data services for this arbitrary client.
在本发明实施例中,首先,将网络划分为多个子网络。然后,针对划分的各个子网络,获取各个子网络中的至少一个客户端。通过收集各个子网络中的客户端访问其对应的服务器的访问相关信息,生成各个子网络中提供数据服务的服务器的访问优先列表。当接收到任意客户端的数据访问请求时,通过分析该客户端所属子网络,进而从该子网络对应的访问优先列表中为该任意客户端分配优选服务器。由此可见,本发明实施例通过收集客户端访问其对应的服务器的访问相关信息,并分析各项访问相关信息为客户端分配优选服务器,从而实现灵活地为客户端分配更为优选的服务器,而不是采用传统的提前为客户端分配好指定的服务器。并且,本发明实施例不仅可以提高客户端访问服务器并获取服务器提供数据服务的效率,同时还可以提高用户使用客户端获取相关信息的操作体验。In the embodiment of the present invention, firstly, the network is divided into multiple sub-networks. Then, for each divided sub-network, at least one client in each sub-network is obtained. An access priority list of servers providing data services in each subnet is generated by collecting access related information of clients in each subnet accessing their corresponding servers. When receiving a data access request from any client, by analyzing the subnet to which the client belongs, and then assigning a preferred server to any client from the access priority list corresponding to the subnet. It can be seen that the embodiment of the present invention allocates a preferred server for the client by collecting the access related information of the client accessing its corresponding server, and analyzing each item of access related information, so as to flexibly assign a more preferred server to the client. Instead of using the traditional method of assigning a designated server to the client in advance. Moreover, the embodiments of the present invention can not only improve the efficiency of the client accessing the server and obtaining data services provided by the server, but also improve the user's operation experience of using the client to obtain relevant information.
进一步的,本发明实施例通过收集客户端访问服务器的访问相关信息,并生成、实时更新各个子网络对应的服务器列表,有效地避免了某些服务器负载过高,而某些服务器则处于空闲状态的情况,可以使各项服务器得到充分的利用,保证各项服务器的接入客户端的数量均衡。Furthermore, the embodiment of the present invention collects the access related information of the client accessing the server, and generates and updates the server list corresponding to each subnet in real time, effectively avoiding that some servers are overloaded while some servers are in an idle state. In this case, each server can be fully utilized, and the number of access clients of each server can be guaranteed to be balanced.
参见上文步骤S102和步骤S104,在本发明一实施例中,当网络为多个IP地址时,上文实施例中的将网络划分为多个子网络,可以为将多个IP地址划分为多个IP地址段,其中,一个IP地址段对应一个子网络。当获取各个子网络中的至少一个客户端时,可以通过获取各个IP地址段中的至少一个客户端各自的IP地址,从而获取到各个子网络中的至少一个客户端。Referring to step S102 and step S104 above, in one embodiment of the present invention, when the network has multiple IP addresses, dividing the network into multiple subnets in the above embodiment may be to divide multiple IP addresses into multiple subnets IP address segments, where one IP address segment corresponds to one subnet. When acquiring at least one client in each subnet, the at least one client in each subnet can be acquired by acquiring the respective IP addresses of at least one client in each IP address segment.
在该实施例中,客户端IP地址段的划分可以依据客户端的IP地址的前三段(即IP地址的前24bit)的数字相同的IP地址为一个IP段。例如,IP地址处于192.168.0.1至192.168.0.254之间的客户端为一个IP地址段的客户端,该IP地址段对应一个子网络。IP地址处于193.170.0.1至193.170.0.254之间的客户端为另一个IP地址段的客户端,该IP地址段对应另外一个子网络。In this embodiment, the IP address segment of the client may be divided according to the fact that the first three segments of the IP address of the client (ie, the first 24 bits of the IP address) have the same IP address as an IP segment. For example, a client whose IP address is between 192.168.0.1 and 192.168.0.254 is a client of an IP address segment, and the IP address segment corresponds to a subnet. Clients with IP addresses between 193.170.0.1 and 193.170.0.254 are clients of another IP address segment, and this IP address segment corresponds to another subnet.
继续参见上文步骤S102和步骤S104,在本发明另一实施例中,当网络为多个域名信息时,上文实施例中的将网络划分为多个子网络,可以为将多个域名信息划分为多个IP地址段,其中,一个IP地址段对应一个子网络。当获取各个子网络中的至少一个客户端时,可以通过获取各个IP地址段中的至少一个客户端各自的域名信息,从而获取到各个子网络中的至少一个客户端。Continue to refer to step S102 and step S104 above. In another embodiment of the present invention, when the network contains multiple domain name information, the division of the network into multiple sub-networks in the above embodiment can be divided into multiple domain name information These are multiple IP address segments, where one IP address segment corresponds to one subnet. When at least one client in each subnet is obtained, at least one client in each subnet can be obtained by obtaining domain name information of at least one client in each IP address segment.
在该实施例中,客户端IP地址段还可以依据客户端的域名信息进行划分,令一个域名对应一个IP地址段,且一个IP地址段对应一个子网络。例如,以域名360doc.com或者cctv.com等作为一个IP地址段。当任意一客户端的域名为360doc.com时,该客户端属于360doc.com对应的IP地址段。In this embodiment, the IP address segment of the client may also be divided according to the domain name information of the client, so that one domain name corresponds to one IP address segment, and one IP address segment corresponds to one subnet. For example, take the domain name 360doc.com or cctv.com as an IP address segment. When the domain name of any client is 360doc.com, the client belongs to the IP address segment corresponding to 360doc.com.
参见上文步骤S104,在本发明一实施例中,可以使客户端通过HttpDns(域名解析调度系统)来访问服务器,从而利用HttpDns获取并解析出该客户端的IP地址,以得到该IP地址具体所对应的客户端,进一步收集该客户端访问服务器的访问相关信息。本发明涉及技术领域中,HttpDns使用Http(HyperText Transfer Protocol,超文本传输协议)协议进行域名解析,代替现有基于UDP(User Datagram Protocol,用户数据报协议)的DNS(DomainName System,域名系统)协议,域名解析请求直接发送到HttpDns服务器,从而绕过运营商的Local Dns,能够避免Local Dns造成的域名劫持问题和调度不精准问题。Referring to step S104 above, in one embodiment of the present invention, the client can be made to access the server through HttpDns (domain name resolution dispatching system), thereby utilizing HttpDns to obtain and resolve the IP address of the client, to obtain the specific address of the IP address The corresponding client further collects access-related information of the client's access to the server. The present invention relates to in technical field, HttpDns uses Http (HyperText Transfer Protocol, hypertext transfer protocol) agreement to carry out domain name analysis, replaces existing DNS (DomainName System, domain name system) agreement based on UDP (User Datagram Protocol, User Datagram Protocol) , The domain name resolution request is sent directly to the HttpDns server, thereby bypassing the operator's Local DNS, which can avoid domain name hijacking and inaccurate scheduling problems caused by Local DNS.
继续参见上文步骤S104,在收集至少一个客户端各自访问服务器的访问相关信息时,收集的方式可以是主动获取至少一个客户端各自访问服务器的访问相关信息,也可以是接收由至少一个客户端上传的其各自访问服务器的访问相关信息。Continuing to refer to step S104 above, when collecting the access-related information of at least one client’s respective access to the server, the method of collection may be to actively obtain the access-related information of at least one client’s respective access to the server, or to receive the access-related information of at least one client’s respective access to the server. The uploaded access-related information of their respective access servers.
参见上文步骤S106和步骤S108,在本发明一实施例中,每个子网络对应一个访问优先列表,该访问优先列表中存储了用于为客户端提供数据服务的多个服务器。访问优先列表中的服务器的当前处理数据、提供信息的能力可能有所不同,因此,可以通过对访问优先列表中的各个服务器进行综合判定,从而可以根据综合判定结果来为客户端分配优选的服务器。例如,本发明实施例可以通过对服务器进行排名的方式作为服务器的综合判定结果,而对服务器的排名依据可以是客户端访问服务器的访问相关信息加权求和得到的综合数值的大小。具体地,首先,分别为每个访问相关信息分配权重。然后,基于分配的访问相关信息的权重,对至少一个客户端各自访问服务器的访问相关信息分别进行加权求和以得到综合值。进而,依据综合值的大小,对访问优先列表中的服务器进行排序。Referring to step S106 and step S108 above, in an embodiment of the present invention, each subnet corresponds to an access priority list, and the access priority list stores multiple servers for providing data services for clients. The current processing data and information providing capabilities of the servers in the access priority list may be different. Therefore, a comprehensive judgment can be made on each server in the access priority list, so that the client can be assigned a preferred server based on the comprehensive judgment results. . For example, in the embodiment of the present invention, the ranking of servers may be used as the comprehensive judgment result of the server, and the ranking basis of the server may be the size of the comprehensive value obtained by weighting and summing the access related information of the client accessing the server. Specifically, firstly, weights are assigned to each piece of access-related information. Then, based on the assigned weights of the access-related information, the access-related information of at least one client accessing the server is respectively weighted and summed to obtain a comprehensive value. Furthermore, the servers in the access priority list are sorted according to the size of the comprehensive value.
例如,提前设定访问成功次数的权重为0.4,提前设定任意一次访问成功所需访问时间的权重为0.3。在此,访问成功次数的权重比任意一次访问成功所需访问时间的权重大,说明对于用户来讲更为关心其在使用客户端访问服务器时,可以成功的访问服务器并获取到所需的相关信息。For example, the weight of the number of successful access times is set in advance as 0.4, and the weight of the access time required for any successful access is set in advance as 0.3. Here, the weight of the number of successful accesses is greater than the weight of the access time required for any successful access, which means that users are more concerned about whether they can successfully access the server and obtain the required relevant information when using the client to access the server. information.
假设计算在客户端A访问服务器A和服务器B访问次数分别为6次时,其客户端A访问服务器A在这个6次的访问过程中有5次访问成功,每一次访问成功花费的时间分别为0.2秒、0.3秒、0.2秒、0.1秒、0.2秒,而客户端A访问服务器B,在这个6次的访问过程中有4次访问成功,每一次访问成功花费的时间分别为0.2秒、0.3秒、0.2秒、0.3秒。那么客户端A访问服务器A得到的综合数值为0.4*5+0.3*0.2+0.3*0.3+0.3*0.2+0.3*0.1+0.3*0.2=2.3,客户端A访问服务器B得到的综合数值为0.4*4+0.3*0.2+0.3*0.3+0.3*0.2+0.3*0.3=1.9,可以得到,服务器A的综合值2.3大于服务器B的综合值1.9,因此,在访问优先列表中服务器A的排名在服务器B的前面。Assume that when client A visits server A and server B for 6 visits, client A visits server A successfully 5 times during the 6 visits, and the time spent on each successful visit is respectively 0.2 seconds, 0.3 seconds, 0.2 seconds, 0.1 seconds, 0.2 seconds, while client A accesses server B, 4 of the 6 visits are successful, and the time spent on each successful visit is 0.2 seconds and 0.3 seconds respectively. seconds, 0.2 seconds, 0.3 seconds. Then the comprehensive value obtained by client A accessing server A is 0.4*5+0.3*0.2+0.3*0.3+0.3*0.2+0.3*0.1+0.3*0.2=2.3, and the comprehensive value obtained by client A accessing server B is 0.4 *4+0.3*0.2+0.3*0.3+0.3*0.2+0.3*0.3=1.9, it can be obtained that the comprehensive value 2.3 of server A is greater than the comprehensive value 1.9 of server B, therefore, the ranking of server A in the access priority list is Front of Server B.
此外,在本发明另一实施例中,还可以对访问相关信息进行计算,根据计算结果对访问优先列表中的服务器进行排序。例如,客户端A访问服务器A和服务器B访问次数分别为20次,客户端A访问服务器A在这个20次的访问过程中有18次访问成功,而客户端A访问服务器B,在这个20次的访问过程中有15次访问成功。那么客户端A访问服务器A的访问成功率为18/20=0.9,而客户端A访问服务器B的访问成功率为15/20=0.75。可见,客户端A访问服务器A的访问成功率0.9大于客户端A访问服务器B的访问成功率0.75,因此,在访问优先列表中服务器A的排名在服务器B的前面。In addition, in another embodiment of the present invention, the access related information may also be calculated, and the servers in the access priority list may be sorted according to the calculation result. For example, client A visits server A and server B for 20 times respectively, and client A visits server A successfully 18 times during the 20 visits, while client A visits server B during the 20 visits. There are 15 successful visits during the visit. Then the access success rate of client A accessing server A is 18/20=0.9, and the access success rate of client A accessing server B is 15/20=0.75. It can be seen that the access success rate of 0.9 for client A accessing server A is greater than the access success rate 0.75 for client A accessing server B. Therefore, server A ranks ahead of server B in the access priority list.
为了更加清楚地体现本发明实施例,现以一个具体实施例对本发明进行介绍。在该实施例中,以客户端为360安全卫士,服务器为360云查杀服务器为例进行说明。In order to more clearly reflect the embodiment of the present invention, the present invention is described by using a specific embodiment. In this embodiment, the client is a 360 security guard, and the server is a 360 cloud scanning and killing server as an example for illustration.
首先,获取网络中的多个IP地址,基于多个IP地址确定出多个IP地址段,每个IP地址段对应一个子网络,通过获取各个IP地址段中的多个360安全卫士,并分别收集多个360安全卫士访问360云查杀服务器的访问次数、访问成功次数等访问相关信息,进而依据收集到的访问相关信息生成各个IP地址段中服务器的访问优先列表。例如,在IP地址段为192.168.0.1至192.168.0.254的子网络对应的访问优先列表中,各个服务器的排名依次为,360云查杀服务器A、360云查杀服务器B和360云查杀服务器C。First, obtain multiple IP addresses in the network, and determine multiple IP address segments based on the multiple IP addresses. Each IP address segment corresponds to a subnet. By obtaining multiple 360 security guards in each IP address segment, and separately Collect access-related information such as the number of visits by multiple 360 security guards to the 360 cloud scanning and killing server, the number of successful visits, and then generate an access priority list for servers in each IP address segment based on the collected access-related information. For example, in the access priority list corresponding to the subnet with the IP address range from 192.168.0.1 to 192.168.0.254, the rankings of each server are 360 cloud scanning and killing server A, 360 cloud scanning and killing server B, and 360 cloud scanning and killing server c.
当接收到来自任意360安全卫士的数据访问请求时,获取到该任意360安全卫士的IP地址为192.168.0.23,则可以判定该360安全卫士的IP地址属于192.168.0.1至192.168.0.254这个IP地址段,进而从该IP地址段对应的访问优先列表中优先将360云查杀服务器A作为优选服务器分配给360安全卫士,以由该360安全卫士从360云查杀服务器A中获取数据服务。When receiving a data access request from any 360 security guard, and the IP address of any 360 security guard is 192.168.0.23, it can be determined that the IP address of the 360 security guard belongs to the IP address 192.168.0.1 to 192.168.0.254 segment, and then assign 360 cloud scanning and killing server A as the preferred server to 360 security guards from the access priority list corresponding to the IP address segment, so that the 360 security guards can obtain data services from 360 cloud scanning and killing server A.
依据本发明的另一方面,本发明实施例还提供了另一种网络访问请求的业务分配方法,该实施例中网络中包含有多个应用的客户端,当客户端向网络中的服务器发送数据访问请求时,接收服务器返回的响应消息。图2示出了根据本发明另一个实施例的网络访问请求的业务分配方法的流程示意图。参见图2,该方法至少可以包括步骤S202至步骤S216。According to another aspect of the present invention, the embodiment of the present invention also provides another service distribution method for network access requests. In this embodiment, the network contains multiple application clients. When the client sends Receive the response message returned by the server when the data access request is made. Fig. 2 shows a schematic flowchart of a method for allocating network access requests according to another embodiment of the present invention. Referring to Fig. 2, the method may at least include step S202 to step S216.
步骤S202,将网络划分为多个子网络。Step S202, divide the network into multiple sub-networks.
步骤S204,针对划分的各个子网络,获取各个子网络中的至少一个客户端,并收集至少一个客户端各自访问服务器的访问相关信息。Step S204, for each divided sub-network, obtain at least one client in each sub-network, and collect access-related information of each access server of the at least one client.
在该步骤中,客户端与服务器之间可以实现信息的交互,客户端可以为360安全卫士,360手机卫士等,服务器可以为360云查杀服务器等。本发明对客户端和服务器的具体内容不做限定,只要客户端和服务器之间能够实现信息交互都属于本发明的保护范围。In this step, information interaction can be realized between the client and the server. The client can be 360 Security Guard, 360 Mobile Guard, etc., and the server can be 360 Cloud Scanning and Killing Server. The present invention does not limit the specific content of the client and the server, as long as the information exchange between the client and the server is within the protection scope of the present invention.
步骤S206,基于收集的至少一个客户端各自访问服务器的访问相关信息,生成各个子网络中提供数据服务的服务器的访问优先列表。Step S206, based on the collected access related information of at least one client accessing the server, an access priority list of servers providing data services in each subnet is generated.
步骤S208,判断访问优先列表中的各个服务器是否处于在线状态,若否,则执行步骤S210;若是,则执行步骤S212。Step S208, judging whether each server in the access priority list is online, if not, execute step S210; if yes, execute step S212.
在该步骤中,在线状态指的是服务器是否处于正常工作状态,若服务器处于正常工作状态,则服务器处于在线状态,若服务器不处于正常工作状态,则服务器不处于在线状态。在本发明实施例中,可以通过status.html来判断访问优先列表中的各个服务器是否处于在线状态。Status属性是一个可读可写的字符串,其声明了要在窗口状态栏中显示的一条消息。In this step, the online state refers to whether the server is in a normal working state. If the server is in a normal working state, the server is in an online state. If the server is not in a normal working state, the server is not in an online state. In the embodiment of the present invention, status.html can be used to determine whether each server in the access priority list is online. The Status property is a readable and writable string that declares a message to be displayed in the window's status bar.
此外,在该步骤中,判断服务器是否处于在线状态,可以是实时监测访问优先列表中的各个服务器的在线状态,也可以设定判断服务器是否处于在线状态的时间间隔。例如,对于不成熟的、新研发出的服务器可以设定每隔半个小时判断一次服务器的在线状态,以保证服务器的正常工作。而对于很成熟的服务器可以设定每隔半天判断一次服务器的在线状态。具体的设定时间可以根据实际需要进行设定,在此不做具体限定。In addition, in this step, judging whether the server is online may be to monitor the online status of each server in the access priority list in real time, or to set a time interval for judging whether the server is online. For example, for an immature, newly developed server, it can be set to judge the online status of the server every half hour to ensure the normal operation of the server. For a very mature server, it can be set to judge the online status of the server every half a day. The specific setting time may be set according to actual needs, and is not specifically limited here.
步骤S210,将不处于在线状态的任意服务器从访问优先列表中剔除,并更新访问优先列表。Step S210, removing any server that is not online from the access priority list, and updating the access priority list.
在该步骤中,通过将不处于在线状态的任意服务器从访问优先列表中剔除,可以实现对访问优先列表的更新,从而有效地保证访问优先列表中的服务器都是有效可行的,同时可以避免存储空间的浪费。In this step, by removing any server that is not online from the access priority list, the access priority list can be updated, thereby effectively ensuring that the servers in the access priority list are all valid and feasible, and at the same time avoiding storage Waste of space.
步骤S212,收集至少一个客户端各自访问服务器的访问相关信息。Step S212, collecting access related information of at least one client accessing the server.
步骤S214,基于收集的至少一个客户端各自访问服务器的访问相关信息,更新各个子网络中提供数据服务的服务器的访问优先列表。Step S214, based on the collected access related information of at least one client accessing the server, updating the access priority list of the server providing the data service in each subnetwork.
在上文步骤S212和步骤S214中,在包含有服务器的访问优先列表生成之后,可以对生成的访问优先列表进行更新,从而保证访问优先列表中的服务器资源可靠。并且,还可以通过对更新后的访问优先列表中的服务器进行排序,具体的排名依据、以及排序过程请参见上文实施例。In step S212 and step S214 above, after the server-containing access priority list is generated, the generated access priority list may be updated, so as to ensure that the server resources in the access priority list are reliable. In addition, it is also possible to sort the servers in the updated access priority list. For specific ranking basis and sorting process, please refer to the above embodiments.
步骤S216,当接收到来自任意客户端的数据访问请求时,确定该任意客户端所属的目标子网络,并根据目标子网络对应的访问优先列表为该任意客户端分配优选服务器,以由分配的优选服务器为该任意客户端提供数据服务。Step S216, when receiving a data access request from any client, determine the target subnet to which any client belongs, and assign a preferred server to any client according to the access priority list corresponding to the target subnet, so that the assigned preferred server The server provides data services for this arbitrary client.
上述步骤S202至步骤S206的具体分析请参见本发明上文中关于的步骤S102至步骤S106的具体内容介绍,在此不再进行介绍。For the specific analysis of the above step S202 to step S206, please refer to the specific content introduction of step S102 to step S106 mentioned above in the present invention, and no further introduction will be made here.
在本发明一实施例中,当网络为多个IP地址和/或域名信息时,各个子网络对应多个IP地址和/或域名信息划分成的各个IP地址段。在上文步骤S216中,确定该任意客户端所属的目标子网络可以通过获取该任意客户端的IP地址和/或域名信息,并确定该任意客户端的IP地址和/或域名信息所属的IP地址段,从而确定该任意客户端所属IP地址段对应的子网络为该任意客户端所属目标子网络。在该实施例中,根据任意客户端所属的目标子网络对应的访问优先列表为该任意客户端分配优选服务器可以为,从任意客户端所属IP地址段对应的访问优先列表中,为该任意客户端分配优选服务器。In an embodiment of the present invention, when the network includes multiple IP addresses and/or domain name information, each subnet corresponds to each IP address segment into which the multiple IP addresses and/or domain name information are divided. In step S216 above, determining the target subnet to which any client belongs can be obtained by obtaining the IP address and/or domain name information of any client, and determining the IP address segment to which the IP address and/or domain name information of any client belongs , so as to determine that the subnet corresponding to the IP address segment to which any client belongs is the target subnet to which any client belongs. In this embodiment, assigning a preferred server to any client according to the access priority list corresponding to the target subnet to which any client belongs may be: from the access priority list corresponding to the IP address segment to which any client belongs, assign The end assigns the preferred server.
在本发明实施例中,通过在访问优先列表生成之后,将不处于在线状态的任意服务器从访问优先列表中剔除、以及继续收集最新的客户端访问服务器的访问相关信息,可以使得访问优先列表中的各项数据为最新数据,从而在客户端访问服务器时,能够依据客户端的所属目标子网络,从访问优先列表中为客户端分配更为优选的服务器。In this embodiment of the present invention, after the access priority list is generated, any server that is not online is removed from the access priority list, and the latest access related information of the server accessed by the client can be continuously collected, so that the server in the access priority list The data of each item is the latest data, so that when the client accesses the server, the client can be allocated a more preferred server from the access priority list according to the target subnet to which the client belongs.
依据本发明的再一方面,还提供了另一种网络访问请求的业务分配方法,该实施例中的网络中包含有多个应用的客户端,当客户端向网络中的服务器发送数据访问请求时,接收服务器返回的响应消息。图3示出了根据本发明另一个实施例的网络访问请求的业务分配方法的流程示意图。参见图3,该方法至少可以包括步骤S302至步骤S314。According to yet another aspect of the present invention, another service distribution method for network access requests is provided. In this embodiment, the network includes multiple application clients. When the client sends a data access request to a server in the network , receive the response message returned by the server. Fig. 3 shows a schematic flowchart of a method for allocating network access requests according to another embodiment of the present invention. Referring to Fig. 3, the method may at least include step S302 to step S314.
步骤S302,将网络划分为多个子网络。Step S302, divide the network into multiple sub-networks.
步骤S304,针对划分的各个子网络,获取各个子网络中的至少一个客户端,并收集至少一个客户端各自访问服务器的访问相关信息。Step S304, for each divided sub-network, obtain at least one client in each sub-network, and collect access-related information of each access server of the at least one client.
在该步骤中,客户端与服务器之间可以实现信息的交互,客户端可以为360安全卫士,360手机卫士等,服务器可以为360云查杀服务器等。本发明对客户端和服务器的具体内容不做限定,只要客户端和服务器之间能够实现信息交互都属于本发明的保护范围。In this step, information interaction can be realized between the client and the server. The client can be 360 Security Guard, 360 Mobile Guard, etc., and the server can be 360 Cloud Scanning and Killing Server. The present invention does not limit the specific content of the client and the server, as long as the information exchange between the client and the server is within the protection scope of the present invention.
另外,该步骤中的访问相关信息可以包括以下至少之一:访问次数、访问成功次数、任意一次访问成功所需访问时间等。In addition, the visit-related information in this step may include at least one of the following: number of visits, number of successful visits, visit time required for any successful visit, and the like.
步骤S306,基于收集的至少一个客户端各自访问服务器的访问相关信息以及被访问服务器的提供数据服务的能力,生成各个子网络中提供数据服务的服务器的访问优先列表。Step S306, based on the collected access related information of at least one client accessing the server and the ability of the accessed server to provide data services, generate an access priority list of servers providing data services in each subnetwork.
在该步骤中,被访问服务器的提供数据服务的能力包括被访问服务器负载能力。负载能力可以通过利用服务器的QPS(Query Per Second,每秒查询率)体现,服务器的QPS越大,服务器的负载能力越强。另外,负载能力也可以通过利用服务器的QPS计算得到的权值(weight)体现,权值越大,服务器的当前负载能力越强。QPS是对一个特定的查询服务器在规定时间内所处理流量多少的衡量标准。In this step, the ability of the accessed server to provide data services includes the load capacity of the accessed server. The load capacity can be reflected by using the QPS (Query Per Second) of the server. The larger the QPS of the server, the stronger the load capacity of the server. In addition, the load capacity can also be reflected by a weight (weight) calculated by using the QPS of the server. The greater the weight, the stronger the current load capacity of the server. QPS is a measure of how much traffic a specific query server handles within a specified time.
本发明实施例通过同时对被访问服务器的访问相关信息和提供数据服务的能力进行综合考虑来生成服务器的访问优先列表,可以在后续为客户端提供更加符合其需求,以及更加优选的服务器。The embodiment of the present invention generates the access priority list of the server by comprehensively considering the access-related information of the accessed server and the ability to provide data services, and can subsequently provide the client with a server that better meets its needs and is more preferred.
在该步骤中,访问优先列表中的各个服务器可以通过各个服务器的信息来体现,例如,访问优先列表中保存各个服务器对应的唯一标识信息,如服务器的IP地址、序列号、注册申请码等,每一个唯一标识信息代表了其对应的服务器。In this step, each server in the access priority list can be reflected by the information of each server. For example, the unique identification information corresponding to each server is stored in the access priority list, such as the IP address, serial number, and registration application code of the server. Each unique identification information represents its corresponding server.
步骤S308,当接收到来自任意客户端的数据访问请求时,确定该任意客户端所属的目标子网络,并根据目标子网络对应的访问优先列表为该任意客户端分配优选服务器,以由分配的优选服务器为该任意客户端提供数据服务。Step S308, when receiving a data access request from any client, determine the target subnet to which any client belongs, and assign a preferred server to any client according to the access priority list corresponding to the target subnet, so that the assigned preferred server The server provides data services for this arbitrary client.
在该步骤中,参见上文实施例,若被访问服务器的提供数据服务的能力包括被访问服务器负载能力。且负载能力通过利用服务器的QPS权值(weight)体现。那么,在本发明一实施例中,当根据目标子网络对应的访问优先列表为该任意客户端分配优选服务器时,可以从目标子网络对应的访问优先列表中按照各个服务器的QPS权值的大小为该任意客户端分配两个优选服务器,服务器的QPS权值越大,被分配至该任意客户端的几率也就越大。当目标子网络对应的访问优先列表中的优选服务器的个数小于两个的时候,还可以从其它的访问优先列表中继续为该任意客户端分配优选服务器,那么该任意客户端可以访问被分配的两个优选服务器中的任何一个优选服务器。In this step, referring to the above embodiment, if the ability of the accessed server to provide data services includes the load capacity of the accessed server. And the load capacity is reflected by using the QPS weight (weight) of the server. Then, in an embodiment of the present invention, when assigning a preferred server to any client according to the access priority list corresponding to the target subnet, the QPS weight value of each server can be selected from the access priority list corresponding to the target subnet. Assign two preferred servers to any client, the larger the server's QPS weight, the greater the probability of being assigned to this arbitrary client. When the number of preferred servers in the access priority list corresponding to the target subnet is less than two, you can continue to assign preferred servers to any client from other access priority lists, then any client can access the assigned server Either of the two preferred servers for .
步骤S310,判断优选服务器的当前负载状态值是否达到预设阈值,若是,则执行步骤S312,若否,执行步骤S314。Step S310, judging whether the current load status value of the preferred server reaches a preset threshold, if yes, execute step S312, if not, execute step S314.
步骤S312,从目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端。Step S312, selecting other servers from the access priority list corresponding to the target subnet as preferred servers and assigning them to any client.
步骤S314,将该优选服务器分配至该任意客户端。Step S314, assigning the preferred server to the arbitrary client.
参见上文步骤S310和步骤S312,负载状态值可以是服务器的QPS的值,也可以是根据服务器的QPS计算得到的权值(weight)。Referring to step S310 and step S312 above, the load status value may be the value of the QPS of the server, or may be a weight calculated according to the QPS of the server.
在本发明一实施例中,当以QPS的值作为负载状态值时,例如,若预设优选服务器A的QPS的最大值(即负载状态值的预设阈值)为5000,当通过判断得到该优选服务器A的QPS的当前值为6000,由于优选服务器A的QPS的当前值6000大于优选服务器A的QPS的最大值5000,即优选服务器A的当前负载状态值已经超出预设阈值,超出了其负载的能力,因此,为了减轻优选服务器A的负载,则不再将该优选服务器A分配给任意客户端。In an embodiment of the present invention, when the value of QPS is used as the load status value, for example, if the maximum value of the QPS of the preset preferred server A (that is, the preset threshold value of the load status value) is 5000, when the value obtained by judging The current value of QPS of the preferred server A is 6000. Since the current value of 6000 of the QPS of the preferred server A is greater than the maximum value of 5000 of the QPS of the preferred server A, that is, the current load status value of the preferred server A has exceeded the preset threshold, exceeding its Therefore, in order to reduce the load of the preferred server A, the preferred server A is no longer assigned to any client.
继续参见上文步骤S310和步骤S312,在本发明另一实施例中,当以QPS计算得到的权值作为负载状态值时,具体的计算规则可以为,QPS权值=round(10*(QPS最大值-QPS当前值)/QPS最大值)。QPS权值越大,其对应的服务器的负载能力越强。QPS权值的数据文件格式可以采用protobuf(Protocol Buffer,一种数据交换的格式),其是google的一种数据交换的格式,它独立于语言,独立于平台。在该实施例中,round函数的功能为:四舍五入取整。其使用方法为:B=round(A),该公式代表了:对数组A中每个元素朝最近的方向取整数部分,并返回与A同维的整数数组B,对于一个复数参量A,则分别对其实部和虚数朝最近的方向取整数部分,并返回一复数数据B。通过上述计算规则,可以保证计算得到的QPS权值为一个整数,从而方便后续的判断。Continue to refer to the above step S310 and step S312, in another embodiment of the present invention, when the weight value calculated by QPS is used as the load state value, the specific calculation rule can be, QPS weight=round(10*(QPS Maximum value-QPS current value)/QPS maximum value). The larger the QPS weight, the stronger the load capacity of the corresponding server. The data file format of the QPS weight can use protobuf (Protocol Buffer, a data exchange format), which is a data exchange format of Google, which is independent of language and platform. In this embodiment, the function of the round function is: rounding and rounding. Its usage method is: B=round(A), this formula represents: take the integer part of each element in the array A towards the nearest direction, and return the integer array B with the same dimension as A, for a complex parameter A, then Take the integer part of the real part and the imaginary number towards the nearest direction respectively, and return a complex number data B. Through the above calculation rules, it can be guaranteed that the calculated QPS weight is an integer, thereby facilitating subsequent judgments.
参见上文步骤S310,在判断优选服务器的当前负载状态值是否达到预设阈值之前,还可以先判断优选服务器是否处于在线状态。Referring to step S310 above, before judging whether the current load status value of the preferred server reaches a preset threshold, it may also be determined first whether the preferred server is in an online state.
若优选服务器处于在线状态,则继续执行步骤S310,判断优选服务器的当前负载状态值是否达到预设阈值,若是,则执行步骤S312,从目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端;若否,则将该优选服务器分配至该任意客户端。If the preferred server is in the online state, continue to execute step S310 to determine whether the current load status value of the preferred server reaches the preset threshold, and if so, execute step S312 to select other servers from the access priority list corresponding to the target subnet as the preferred server and assign to the arbitrary client; if not, assign the preferred server to the arbitrary client.
若优选服务器不处于在线状态,则从目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端。If the preferred server is not online, select another server from the access priority list corresponding to the target subnet as the preferred server and assign it to any client.
在本发明一实施例中,当任意客户端所属的目标子网络对应的访问优先列表中未存在优选服务器时,可以先确定目标子网路的相邻子网络,然后,根据目标子网络的相邻子网络对应的访问优先列表为该任意客户端分配优选服务器,以由分配的优选服务器为该任意客户端提供数据服务。In an embodiment of the present invention, when there is no preferred server in the access priority list corresponding to the target subnet to which any client belongs, the adjacent subnets of the target subnet can be determined first, and then, according to the corresponding The access priority list corresponding to the adjacent sub-network allocates a preferred server for any client, so that the allocated preferred server provides data services for the arbitrary client.
在该实施例中,若网络为某一空间区域,而子网络对应该空间区域所划分成的各个子区域,那么客户端所属的目标子网络也可以理解为目标子区域。当任意客户端所属的目标子区域对应的访问优先列表中未存在优选服务器时,由于与目标子区域相邻的子区域是与目标子区域距离相对较近的子区域,其对应的访问优先列表中的各个服务器差别相对较小,因此,可以从与该目标子区域相邻的子区域对应的访问优先列表为该任意客户端分配优选服务器。In this embodiment, if the network is a certain spatial region, and the subnetworks correspond to the subregions into which the spatial region is divided, then the target subnetwork to which the client belongs can also be understood as the target subregion. When there is no preferred server in the access priority list corresponding to the target sub-area to which any client belongs, since the sub-area adjacent to the target sub-area is relatively close to the target sub-area, its corresponding access priority list The differences among the servers in the target sub-area are relatively small, therefore, the preferred server can be assigned to any client from the access priority list corresponding to the sub-area adjacent to the target sub-area.
基于同一发明构思,本发明实施例还提供了一种网络访问请求的业务分配装置,访问的网络中包含有多个应用的客户端,当客户端向网络中的服务器发送数据访问请求时,接收服务器返回的响应消息。图4示出了根据本发明一个实施例的网络访问请求的业务分配装置的结构示意图。如图4所示,该网络访问请求的业务分配装置400至少可以包括:划分模块410、收集模块420、生成模块430以及第一分配模块440。Based on the same inventive concept, an embodiment of the present invention also provides a service distribution device for network access requests. The accessed network contains clients of multiple applications. When the client sends a data access request to a server in the network, the received The response message returned by the server. Fig. 4 shows a schematic structural diagram of an apparatus for allocating network access requests according to an embodiment of the present invention. As shown in FIG. 4 , the apparatus 400 for allocating network access requests may at least include: a dividing module 410 , a collecting module 420 , a generating module 430 and a first allocating module 440 .
现介绍本发明实施例的网络访问请求的业务分配装置400的各组成或器件的功能以及各部分间的连接关系:The functions of each component or device and the connection relationship between each part of the service distribution device 400 for network access requests in the embodiment of the present invention are now introduced:
划分模块410,适于将网络划分为多个子网络;A division module 410, adapted to divide the network into a plurality of sub-networks;
收集模块420,与划分模块410相耦合,适于针对划分的各个子网络,获取各个子网络中的至少一个客户端,并收集至少一个客户端各自访问服务器的访问相关信息;The collection module 420, coupled with the division module 410, is adapted to obtain at least one client in each subnet for each divided subnet, and collect access-related information of each access server of at least one client;
生成模块430,与收集模块420相耦合,适于基于收集的至少一个客户端各自访问服务器的访问相关信息,生成各个子网络中提供数据服务的服务器的访问优先列表;The generation module 430, coupled with the collection module 420, is adapted to generate an access priority list of servers providing data services in each subnet based on the collected access related information of at least one client accessing the server;
第一分配模块440,与生成模块430相耦合,适于当接收到来自任意客户端的数据访问请求时,确定该任意客户端所属的目标子网络,并根据目标子网络对应的访问优先列表为该任意客户端分配优选服务器,以由分配的优选服务器为该任意客户端提供数据服务。The first allocating module 440, coupled with the generating module 430, is adapted to determine the target subnet to which any client belongs when receiving a data access request from any client, and assign the target subnet according to the access priority list corresponding to the target subnet. Any client assigns a preferred server, so that the assigned preferred server provides data services for the arbitrary client.
在本发明一实施例中,划分模块410还适于首先,获取网络中的多个IP地址和/或域名信息,然后,基于多个IP地址和/或域名信息确定多个IP地址段,其中,一个IP地址段对应一个子网络。In an embodiment of the present invention, the division module 410 is further adapted to firstly acquire multiple IP addresses and/or domain name information in the network, and then determine multiple IP address segments based on the multiple IP addresses and/or domain name information, wherein , an IP address segment corresponds to a subnet.
在本发明一实施例中,收集模块420还适于获取各个IP地址段中的至少一个客户端各自的IP地址和/或域名信息,从而获取到各个子网络中的至少一个客户端。In an embodiment of the present invention, the collection module 420 is further adapted to obtain the respective IP address and/or domain name information of at least one client in each IP address segment, so as to obtain at least one client in each subnet.
在本发明一实施例中,收集模块420还适于,主动获取至少一个客户端各自访问服务器的访问相关信息,或者接收由至少一个客户端上传的其各自访问服务器的访问相关信息。In an embodiment of the present invention, the collection module 420 is further adapted to actively acquire access-related information of at least one client's respective access server, or receive access-related information of its respective access server uploaded by at least one client.
在本发明一实施例中,访问相关信息包括以下至少之一:访问次数、访问成功次数、任意一次访问成功所需访问时间。In an embodiment of the present invention, the access-related information includes at least one of the following: number of visits, number of successful visits, and access time required for any successful visit.
本发明实施例还提供了另一种网络访问请求的业务分配装置。图5示出了根据本发明另一个实施例的网络访问请求的业务分配装置的结构示意图。如图5所示,该网络访问请求的业务分配装置500除了包括图4中网络访问请求的业务分配装置400包含的各个模块之外,还可以包括第二分配模块510、计算模块520、排序模块530以及更新模块540。The embodiment of the present invention also provides another device for allocating network access requests. Fig. 5 shows a schematic structural diagram of an apparatus for allocating network access requests according to another embodiment of the present invention. As shown in FIG. 5 , the network access request service distribution device 500 may include a second distribution module 510, a calculation module 520, and a sorting module in addition to the various modules included in the network access request service distribution device 400 in FIG. 4 . 530 and update module 540.
第二分配模块510,与生成模块430相耦合,适于为每个访问相关信息分配权重;The second assignment module 510, coupled with the generation module 430, is adapted to assign a weight to each access-related information;
计算模块520,与第二分配模块510相耦合,适于基于分配的访问相关信息的权重,对至少一个客户端各自访问服务器的访问相关信息分别进行加权求和以得到综合值;The calculation module 520, coupled with the second allocation module 510, is adapted to perform weighted summation on the access-related information of the respective access servers of at least one client based on the weight of the allocated access-related information to obtain a comprehensive value;
排序模块530,与计算模块520相耦合,适于依据综合值的大小,对访问优先列表中的服务器进行排序;The sorting module 530, coupled with the calculation module 520, is adapted to sort the servers in the access priority list according to the size of the integrated value;
更新模块540,与生成模块430相耦合,适于在生成模块430生成各个子网络中提供数据服务的服务器的访问优先列表之后,判断访问优先列表中的各个服务器是否处于在线状态,若任意服务器不处于在线状态,则将该任意服务器从访问优先列表中剔除,并更新访问优先列表。The updating module 540 is coupled with the generation module 430, and is suitable for determining whether each server in the access priority list is online after the generation module 430 generates the access priority list of servers providing data services in each subnetwork, if any server is not If it is online, remove the arbitrary server from the access priority list, and update the access priority list.
在本发明一实施例中,更新模块540还适于在生成模块430生成各个子网络中提供数据服务的服务器的访问优先列表之后,收集至少一个客户端各自访问服务器的访问相关信息,并基于收集的至少一个客户端各自访问服务器的访问相关信息,更新各个子网络中提供数据服务的服务器的访问优先列表。In an embodiment of the present invention, the update module 540 is further adapted to collect the access-related information of at least one client accessing the server respectively after the generation module 430 generates the access priority list of servers providing data services in each subnet, and based on the collected At least one client accesses the access related information of the server respectively, and updates the access priority list of the server providing the data service in each subnetwork.
在本发明一实施例中,第一分配模块440还适于,获取该任意客户端的IP地址和/或域名信息,并确定该任意客户端的IP地址和/或域名信息所属的IP地址段,从而确定该任意客户端所属IP地址段对应的子网络为该任意客户端所属目标子网络。In an embodiment of the present invention, the first allocation module 440 is further adapted to obtain the IP address and/or domain name information of the arbitrary client, and determine the IP address segment to which the IP address and/or domain name information of the arbitrary client belongs, so that Determine that the subnet corresponding to the IP address segment to which the arbitrary client belongs is the target subnet to which the arbitrary client belongs.
在本发明一实施例中,第一分配模块440还适于,从任意客户端所属IP地址段对应的访问优先列表中,为该任意客户端分配优选服务器。In an embodiment of the present invention, the first assignment module 440 is further adapted to assign a preferred server to any client from the access priority list corresponding to the IP address segment to which any client belongs.
本发明实施例还提供了再一种网络访问请求的业务分配装置。图6示出了根据本发明另一个实施例的网络访问请求的业务分配装置的结构示意图。如图6所示,该网络访问请求的业务分配装置600除了包括图5中网络访问请求的业务分配装置500包含的各个模块之外,还可以包括判断模块610。The embodiment of the present invention also provides another device for allocating network access requests. Fig. 6 shows a schematic structural diagram of an apparatus for allocating network access requests according to another embodiment of the present invention. As shown in FIG. 6 , the apparatus 600 for allocating network access requests may further include a judging module 610 in addition to the various modules included in the apparatus 500 for allocating services for network access requests in FIG. 5 .
判断模块610,与第一分配模块440相耦合,适于在第一分配模块440根据目标子网络对应的访问优先列表为该任意客户端分配优选服务器之后,判断优选服务器的当前负载状态值是否达到预设阈值,若已经达到预设阈值,则从目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端。The judging module 610, coupled with the first allocation module 440, is suitable for judging whether the current load status value of the preferred server reaches The preset threshold, if the preset threshold has been reached, select another server from the access priority list corresponding to the target subnet as the preferred server and assign it to any client.
在本发明一实施例中,判断模块610还适于在第一分配模块440根据目标子网络对应的访问优先列表为该任意客户端分配优选服务器之后,判断优选服务器是否处于在线状态。In an embodiment of the present invention, the judging module 610 is further adapted to judge whether the preferred server is online after the first allocating module 440 assigns the preferred server to any client according to the access priority list corresponding to the target subnet.
若优选服务器处于在线状态,则判断优选服务器的当前负载状态值是否达到预设阈值,若未达到预设阈值,则将该优选服务器分配至该任意客户端;若已经达到预设阈值,则从目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端;If the preferred server is in the online state, it is judged whether the current load status value of the preferred server reaches the preset threshold, if it does not reach the preset threshold, then the preferred server is assigned to this arbitrary client; if it has reached the preset threshold, then from Select other servers in the access priority list corresponding to the target subnet as preferred servers and assign them to any client;
若优选服务器不处于在线状态,则从目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端。If the preferred server is not online, select another server from the access priority list corresponding to the target subnet as the preferred server and assign it to any client.
在本发明一实施例中,生成模块430还适于基于收集的至少一个客户端各自访问服务器的访问相关信息以及被访问服务器的提供数据服务的能力,生成各个子网络中提供数据服务的服务器的访问优先列表。In an embodiment of the present invention, the generation module 430 is further adapted to generate the information of servers providing data services in each subnetwork based on the collected access-related information of at least one client accessing the server and the ability of the accessed server to provide data services. Visit the priority list.
在本发明一实施例中,第一分配模块440还适于当任意客户端所属的目标子网络对应的访问优先列表中未存在优选服务器时,确定目标子网路的相邻子网络,并根据目标子网络的相邻子网络对应的访问优先列表为该任意客户端分配优选服务器,以由分配的优选服务器为该任意客户端提供数据服务。In an embodiment of the present invention, the first allocation module 440 is further adapted to determine the adjacent subnets of the target subnet when there is no preferred server in the access priority list corresponding to the target subnet to which any client belongs, and according to The access priority list corresponding to the adjacent subnet of the target subnet assigns a preferred server to any client, so that the assigned preferred server provides data services for the arbitrary client.
基于同一发明构思,本发明实例还提供了一种网络访问请求的业务分配系统,图7示出了根据本发明一个实施例的网络访问请求的业务分配系统700的结构示意图。如图7所示,该网络访问请求的业务分配系统700包括多个应用的客户端、服务器以及如上文任意一个实施例中的网络访问请求的业务分配装置,该任意一个网络访问请求的业务分配装置包括如图4所示的网络访问装置400,或者图5所示的网络访问装置500,或者图6所示的网络访问装置600,图7所示为网络访问请求的业务分配系统700包含网络访问装置400。Based on the same inventive concept, the example of the present invention also provides a service distribution system for network access requests. FIG. 7 shows a schematic structural diagram of a service distribution system 700 for network access requests according to an embodiment of the present invention. As shown in FIG. 7 , the network access request service distribution system 700 includes multiple application clients, servers, and a network access request service distribution device as in any one of the above embodiments. The service distribution of any network access request The device includes a network access device 400 as shown in FIG. 4, or a network access device 500 as shown in FIG. 5, or a network access device 600 as shown in FIG. Access device 400 .
根据上述任意一个优选实施例或多个优选实施例的组合,本发明实施例能够达到如下有益效果:According to any one of the above preferred embodiments or a combination of multiple preferred embodiments, the embodiments of the present invention can achieve the following beneficial effects:
在本发明实施例中,首先,将网络划分为多个子网络。然后,针对划分的各个子网络,获取各个子网络中的至少一个客户端。通过收集各个子网络中的客户端访问其对应的服务器的访问相关信息,生成各个子网络中提供数据服务的服务器的访问优先列表。当接收到任意客户端的数据访问请求时,通过分析该客户端所属子网络,进而从该子网络对应的访问优先列表中为该任意客户端分配优选服务器。由此可见,本发明实施例通过收集客户端访问其对应的服务器的访问相关信息,并分析各项访问相关信息为客户端分配优选服务器,从而实现灵活地为客户端分配更为优选的服务器,而不是采用传统的提前为客户端分配好指定的服务器。并且,本发明实施例不仅可以提高客户端访问服务器并获取服务器提供数据服务的效率,同时还可以提高用户使用客户端获取相关信息的操作体验。In the embodiment of the present invention, firstly, the network is divided into multiple sub-networks. Then, for each divided sub-network, at least one client in each sub-network is obtained. An access priority list of servers providing data services in each subnet is generated by collecting access related information of clients in each subnet accessing their corresponding servers. When receiving a data access request from any client, by analyzing the subnet to which the client belongs, and then assigning a preferred server to any client from the access priority list corresponding to the subnet. It can be seen that the embodiment of the present invention allocates a preferred server for the client by collecting the access related information of the client accessing its corresponding server, and analyzing each item of access related information, so as to flexibly assign a more preferred server to the client. Instead of using the traditional method of assigning a designated server to the client in advance. Moreover, the embodiments of the present invention can not only improve the efficiency of the client accessing the server and obtaining data services provided by the server, but also improve the user's operation experience of using the client to obtain relevant information.
进一步的,本发明实施例通过收集客户端访问服务器的访问相关信息,并生成、实时更新各个子网络对应的服务器列表,有效地避免了某些服务器负载过高,而某些服务器则处于空闲状态的情况,可以使各项服务器得到充分的利用,保证各项服务器的接入客户端的数量均衡。Furthermore, the embodiment of the present invention collects the access related information of the client accessing the server, and generates and updates the server list corresponding to each subnet in real time, effectively avoiding that some servers are overloaded while some servers are in an idle state. In this case, each server can be fully utilized, and the number of access clients of each server can be guaranteed to be balanced.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the claims, any one of the claimed embodiments can be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的网络访问请求的业务分配装置及系统中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of some or all components of the service distribution device and system for network access requests according to the embodiments of the present invention. Full functionality. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.
至此,本领域技术人员应认识到,虽然本文已详尽示出和描述了本发明的多个示例性实施例,但是,在不脱离本发明精神和范围的情况下,仍可根据本发明公开的内容直接确定或推导出符合本发明原理的许多其他变型或修改。因此,本发明的范围应被理解和认定为覆盖了所有这些其他变型或修改。So far, those skilled in the art should appreciate that, although a number of exemplary embodiments of the present invention have been shown and described in detail herein, without departing from the spirit and scope of the present invention, the disclosed embodiments of the present invention can still be used. Many other variations or modifications consistent with the principles of the invention are directly identified or derived from the content. Accordingly, the scope of the present invention should be understood and deemed to cover all such other variations or modifications.
本发明实施例还提供了A1、一种网络访问请求的业务分配方法,所述网络中包含有多个应用的客户端,当客户端向所述网络中的服务器发送数据访问请求时,接收服务器返回的响应消息,所述方法包括:The embodiment of the present invention also provides A1, a service distribution method for a network access request. The network includes multiple application clients. When the client sends a data access request to a server in the network, the receiving server The returned response message, the method includes:
将所述网络划分为多个子网络;dividing the network into a plurality of sub-networks;
针对划分的各个子网络,获取所述各个子网络中的至少一个客户端,并收集所述至少一个客户端各自访问服务器的访问相关信息;For each divided sub-network, obtain at least one client in each sub-network, and collect access-related information of each access server of the at least one client;
基于收集的所述至少一个客户端各自访问服务器的访问相关信息,生成所述各个子网络中提供数据服务的服务器的访问优先列表;Generate an access priority list of servers providing data services in each sub-network based on the collected access-related information of the respective access servers of the at least one client;
当接收到来自任意客户端的数据访问请求时,确定该任意客户端所属的目标子网络,并根据所述目标子网络对应的访问优先列表为该任意客户端分配优选服务器,以由分配的优选服务器为该任意客户端提供数据服务。When receiving a data access request from any client, determine the target subnet to which any client belongs, and assign a preferred server to any client according to the access priority list corresponding to the target subnet, so that the assigned preferred server Provide data services for this arbitrary client.
A2、根据A1所述的方法,其中,所述将所述网络划分为多个子网络,包括:A2. The method according to A1, wherein said dividing the network into multiple sub-networks includes:
获取所述网络中的多个IP地址和/或域名信息;Obtain information on multiple IP addresses and/or domain names in the network;
基于所述多个IP地址和/或域名信息确定多个IP地址段,其中,一个IP地址段对应一个子网络。Multiple IP address segments are determined based on the multiple IP addresses and/or domain name information, where one IP address segment corresponds to one subnetwork.
A3、根据A2所述的方法,其中,所述获取所述各个子网络中的至少一个客户端,包括:A3. The method according to A2, wherein said obtaining at least one client in each subnet includes:
获取所述各个IP地址段中的所述至少一个客户端各自的IP地址和/或域名信息,从而获取到所述各个子网络中的至少一个客户端。Obtain the respective IP address and/or domain name information of the at least one client in each IP address segment, so as to obtain at least one client in each subnet.
A4、根据A1所述的方法,其中,所述收集所述至少一个客户端各自访问服务器的访问相关信息,包括:A4. The method according to A1, wherein the collecting the access-related information of the at least one client accessing the server respectively includes:
主动获取所述至少一个客户端各自访问服务器的访问相关信息;或者Actively obtain access-related information of the at least one client accessing the server; or
接收由所述至少一个客户端上传的其各自访问服务器的访问相关信息。Receiving access-related information uploaded by the at least one client to its respective access server.
A5、根据A1所述的方法,其中,所述访问相关信息包括以下至少之一:A5. The method according to A1, wherein the access-related information includes at least one of the following:
访问次数、访问成功次数、任意一次访问成功所需访问时间。The number of visits, the number of successful visits, and the visit time required for any successful visit.
A6、根据A1所述的方法,其中,所述方法还包括:A6. The method according to A1, wherein the method also includes:
为每个所述访问相关信息分配权重;assigning a weight to each of said access-related information;
基于分配的所述访问相关信息的权重,对所述至少一个客户端各自访问服务器的访问相关信息分别进行加权求和以得到综合值;Based on the assigned weights of the access-related information, performing weighted summation on the access-related information of the respective access servers of the at least one client to obtain a comprehensive value;
依据所述综合值的大小,对所述访问优先列表中的服务器进行排序。The servers in the access priority list are sorted according to the size of the integrated value.
A7、根据A1所述的方法,其中,所述在生成所述各个子网络中提供数据服务的服务器的访问优先列表之后,所述方法包括:A7. The method according to A1, wherein, after generating the access priority list of servers providing data services in each subnetwork, the method includes:
判断所述访问优先列表中的各个服务器是否处于在线状态,若任意服务器不处于在线状态,则将该任意服务器从所述访问优先列表中剔除,并更新所述访问优先列表。Judging whether each server in the access priority list is online, if any server is not online, removing the arbitrary server from the access priority list, and updating the access priority list.
A8、根据A1所述的方法,其中,所述在生成所述各个子网络中提供数据服务的服务器的访问优先列表之后,所述方法还包括:A8. The method according to A1, wherein, after generating the access priority list of servers providing data services in each subnetwork, the method further includes:
收集所述至少一个客户端各自访问服务器的访问相关信息;Collect access-related information of the at least one client accessing the server respectively;
基于收集的所述至少一个客户端各自访问服务器的访问相关信息,更新所述各个子网络中提供数据服务的服务器的访问优先列表。Updating the access priority lists of servers providing data services in the respective subnets based on the collected access related information of the respective access servers of the at least one client.
A9、根据A2所述的方法,其中,所述确定该任意客户端所属的目标子网络,包括:A9. The method according to A2, wherein said determining the target subnet to which any client belongs includes:
获取该任意客户端的IP地址和/或域名信息;Obtain the IP address and/or domain name information of any client;
确定该任意客户端的IP地址和/或域名信息所属的IP地址段,从而确定该任意客户端所属IP地址段对应的子网络为该任意客户端所属目标子网络。Determine the IP address segment to which the IP address and/or domain name information of the arbitrary client belongs, thereby determining that the subnet corresponding to the IP address segment to which the arbitrary client belongs is the target subnet to which the arbitrary client belongs.
A10、根据A9所述的方法,其中,根据任意客户端所属的目标子网络对应的访问优先列表为该任意客户端分配优选服务器,包括:A10. The method according to A9, wherein assigning a preferred server to any client according to the access priority list corresponding to the target subnet to which any client belongs includes:
从所述任意客户端所属IP地址段对应的访问优先列表中,为该任意客户端分配优选服务器。Allocating a preferred server to any client from the access priority list corresponding to the IP address segment to which any client belongs.
A11、根据A1所述的方法,其中,所述根据所述目标子网络对应的访问优先列表为该任意客户端分配优选服务器之后,所述方法还包括:A11. The method according to A1, wherein, after assigning a preferred server to any client according to the access priority list corresponding to the target subnet, the method further includes:
判断所述优选服务器的当前负载状态值是否达到预设阈值,若已经达到预设阈值,则从所述目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端。Judging whether the current load status value of the preferred server reaches a preset threshold, and if it has reached the preset threshold, select other servers from the access priority list corresponding to the target subnet as preferred servers and assign them to any client.
A12、根据A1所述的方法,其中,所述根据所述目标子网络对应的访问优先列表为该任意客户端分配优选服务器之后,所述方法还包括:A12. The method according to A1, wherein, after assigning a preferred server to any client according to the access priority list corresponding to the target subnet, the method further includes:
判断所述优选服务器是否处于在线状态;judging whether the preferred server is online;
若所述优选服务器处于在线状态,则判断所述优选服务器的当前负载状态值是否达到预设阈值,若未达到预设阈值,则将该优选服务器分配至该任意客户端;若已经达到预设阈值,则从所述目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端;If the preferred server is in the online state, it is judged whether the current load status value of the preferred server reaches the preset threshold, if it does not reach the preset threshold, then the preferred server is allocated to the arbitrary client; if it has reached the preset threshold threshold, then select other servers from the access priority list corresponding to the target subnet as preferred servers and assign them to any client;
若所述优选服务器不处于在线状态,则从所述目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端。If the preferred server is not online, select other servers from the access priority list corresponding to the target subnet as preferred servers and assign them to any client.
A13、根据A1所述的方法,其中,所述方法还包括:A13. The method according to A1, wherein the method further comprises:
基于收集的所述至少一个客户端各自访问服务器的访问相关信息以及被访问服务器的提供数据服务的能力,生成所述各个子网络中提供数据服务的服务器的访问优先列表。An access priority list of servers providing data services in each subnetwork is generated based on the collected access related information of the respective access servers of the at least one client and the capabilities of the accessed servers to provide data services.
A14、根据A1所述的方法,其中,当任意客户端所属的目标子网络对应的访问优先列表中未存在优选服务器时,所述方法还包括:A14. The method according to A1, wherein, when there is no preferred server in the access priority list corresponding to the target subnet to which any client belongs, the method further includes:
确定所述目标子网路的相邻子网络;determining adjacent subnetworks of the target subnetwork;
根据所述目标子网络的相邻子网络对应的访问优先列表为该任意客户端分配优选服务器,以由分配的优选服务器为该任意客户端提供数据服务。Allocating a preferred server to any client according to an access priority list corresponding to an adjacent subnet of the target subnet, so that the allocated preferred server provides data services for the arbitrary client.
本发明实施例还提供了B15、一种网络访问请求的业务分配装置,所述网络中包含有多个应用的客户端,当客户端向所述网络中的服务器发送数据访问请求时,接收服务器返回的响应消息,所述装置包括:The embodiment of the present invention also provides B15, a service distribution device for network access requests. The network includes multiple application clients. When the client sends a data access request to a server in the network, the receiving server The response message returned by the device includes:
划分模块,适于将所述网络划分为多个子网络;a division module adapted to divide the network into a plurality of sub-networks;
收集模块,适于针对划分的各个子网络,获取所述各个子网络中的至少一个客户端,并收集所述至少一个客户端各自访问服务器的访问相关信息;The collection module is adapted to obtain at least one client in each divided subnetwork, and collect access-related information of each access server of the at least one client;
生成模块,适于基于收集的所述至少一个客户端各自访问服务器的访问相关信息,生成所述各个子网络中提供数据服务的服务器的访问优先列表;A generating module, adapted to generate an access priority list of servers providing data services in each subnet based on the collected access related information of the at least one client accessing the server;
第一分配模块,适于当接收到来自任意客户端的数据访问请求时,确定该任意客户端所属的目标子网络,并根据所述目标子网络对应的访问优先列表为该任意客户端分配优选服务器,以由分配的优选服务器为该任意客户端提供数据服务。The first assignment module is adapted to determine the target subnet to which the arbitrary client belongs when receiving a data access request from any client, and assign a preferred server to the arbitrary client according to the access priority list corresponding to the target subnet , to serve data to that arbitrary client by the assigned preferred server.
B16、根据B15所述的装置,其中,所述划分模块还适于:B16. The device according to B15, wherein the dividing module is further adapted to:
获取所述网络中的多个IP地址和/或域名信息;Obtain information on multiple IP addresses and/or domain names in the network;
基于所述多个IP地址和/或域名信息确定多个IP地址段,其中,一个IP地址段对应一个子网络。Multiple IP address segments are determined based on the multiple IP addresses and/or domain name information, where one IP address segment corresponds to one subnetwork.
B17、根据B16所述的装置,其中,所述收集模块还适于:B17. The device according to B16, wherein the collecting module is further adapted to:
获取所述各个IP地址段中的所述至少一个客户端各自的IP地址和/或域名信息,从而获取到所述各个子网络中的至少一个客户端。Obtain the respective IP address and/or domain name information of the at least one client in each IP address segment, so as to obtain at least one client in each subnet.
B18、根据B15所述的装置,其中,所述收集模块还适于:B18. The device according to B15, wherein the collection module is further adapted to:
主动获取所述至少一个客户端各自访问服务器的访问相关信息;或者Actively obtain access-related information of the at least one client accessing the server; or
接收由所述至少一个客户端上传的其各自访问服务器的访问相关信息。Receiving access-related information uploaded by the at least one client to its respective access server.
B19、根据B15所述的装置,其中,所述访问相关信息包括以下至少之一:B19. The device according to B15, wherein the access-related information includes at least one of the following:
访问次数、访问成功次数、任意一次访问成功所需访问时间。The number of visits, the number of successful visits, and the visit time required for any successful visit.
B20、根据B15所述的装置,其中,所述装置还包括:B20, the device according to B15, wherein the device also includes:
第二分配模块,适于为每个所述访问相关信息分配权重;a second assigning module adapted to assign a weight to each of said access-related information;
计算模块,适于基于分配的所述访问相关信息的权重,对所述至少一个客户端各自访问服务器的访问相关信息分别进行加权求和以得到综合值;A calculation module, adapted to perform weighted summation on the access related information of the respective access servers of the at least one client based on the assigned weights of the access related information to obtain a comprehensive value;
排序模块,适于依据所述综合值的大小,对所述访问优先列表中的服务器进行排序。The sorting module is adapted to sort the servers in the access priority list according to the size of the integrated value.
B21、根据B15所述的装置,其中,还包括更新模块,适于:B21. The device according to B15, further comprising an update module, suitable for:
在所述生成模块生成所述各个子网络中提供数据服务的服务器的访问优先列表之后,判断所述访问优先列表中的各个服务器是否处于在线状态,若任意服务器不处于在线状态,则将该任意服务器从所述访问优先列表中剔除,并更新所述访问优先列表。After the generation module generates the access priority list of servers providing data services in each subnetwork, it is judged whether each server in the access priority list is in an online state, and if any server is not in an online state, then any The server removes from the access priority list, and updates the access priority list.
B22、根据B15所述的装置,其中,所述更新模块还适于:在所述生成模块生成所述各个子网络中提供数据服务的服务器的访问优先列表之后,B22. The device according to B15, wherein the update module is further adapted to: after the generation module generates the access priority list of servers providing data services in each subnetwork,
收集所述至少一个客户端各自访问服务器的访问相关信息;Collect access-related information of the at least one client accessing the server respectively;
基于收集的所述至少一个客户端各自访问服务器的访问相关信息,更新所述各个子网络中提供数据服务的服务器的访问优先列表。Updating the access priority lists of servers providing data services in the respective subnets based on the collected access related information of the respective access servers of the at least one client.
B23、根据B16所述的装置,其中,所述第一分配模块还适于:B23. The device according to B16, wherein the first distribution module is further adapted to:
获取该任意客户端的IP地址和/或域名信息;Obtain the IP address and/or domain name information of any client;
确定该任意客户端的IP地址和/或域名信息所属的IP地址段,从而确定该任意客户端所属IP地址段对应的子网络为该任意客户端所属目标子网络。Determine the IP address segment to which the IP address and/or domain name information of the arbitrary client belongs, thereby determining that the subnet corresponding to the IP address segment to which the arbitrary client belongs is the target subnet to which the arbitrary client belongs.
B24、根据B23所述的装置,其中,所述第一分配模块还适于:B24. The device according to B23, wherein the first distribution module is further adapted to:
从所述任意客户端所属IP地址段对应的访问优先列表中,为该任意客户端分配优选服务器。Allocating a preferred server to any client from the access priority list corresponding to the IP address segment to which any client belongs.
B25、根据B15所述的装置,其中,还包括判断模块,适于:B25. The device according to B15, which also includes a judging module, suitable for:
在第一分配模块根据所述目标子网络对应的访问优先列表为该任意客户端分配优选服务器之后,判断所述优选服务器的当前负载状态值是否达到预设阈值,若已经达到预设阈值,则从所述目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端。After the first assignment module assigns a preferred server to any client according to the access priority list corresponding to the target subnetwork, it is judged whether the current load status value of the preferred server reaches a preset threshold, and if it has reached a preset threshold, then Selecting other servers from the access priority list corresponding to the target subnet as preferred servers and assigning them to any client.
B26、根据B15所述的装置,其中,所述判断模块还适于:在第一分配模块根据所述目标子网络对应的访问优先列表为该任意客户端分配优选服务器之后,B26. The device according to B15, wherein the judgment module is further adapted to: after the first assignment module assigns a preferred server to any client according to the access priority list corresponding to the target subnet,
判断所述优选服务器是否处于在线状态;judging whether the preferred server is online;
若所述优选服务器处于在线状态,则判断所述优选服务器的当前负载状态值是否达到预设阈值,若未达到预设阈值,则将该优选服务器分配至该任意客户端;若已经达到预设阈值,则从所述目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端;If the preferred server is in the online state, it is judged whether the current load status value of the preferred server reaches the preset threshold, if it does not reach the preset threshold, then the preferred server is allocated to the arbitrary client; if it has reached the preset threshold threshold, select other servers from the access priority list corresponding to the target subnet as preferred servers and assign them to any client;
若所述优选服务器不处于在线状态,则从所述目标子网络对应的访问优先列表中选取其它服务器作为优选服务器并分配至该任意客户端。If the preferred server is not online, select other servers from the access priority list corresponding to the target subnet as preferred servers and assign them to any client.
B27、根据B15所述的装置,其中,所述生成模块还适于:B27. The device according to B15, wherein the generating module is further adapted to:
基于收集的所述至少一个客户端各自访问服务器的访问相关信息以及被访问服务器的提供数据服务的能力,生成所述各个子网络中提供数据服务的服务器的访问优先列表。An access priority list of servers providing data services in each subnetwork is generated based on the collected access related information of the respective access servers of the at least one client and the capabilities of the accessed servers to provide data services.
B28、根据B15所述的装置,其中,所述第一分配模块还适于:当任意客户端所属的目标子网络对应的访问优先列表中未存在优选服务器时,B28. The device according to B15, wherein the first allocation module is further adapted to: when there is no preferred server in the access priority list corresponding to the target subnet to which any client belongs,
确定所述目标子网路的相邻子网络;determining adjacent subnetworks of the target subnetwork;
根据所述目标子网络的相邻子网络对应的访问优先列表为该任意客户端分配优选服务器,以由分配的优选服务器为该任意客户端提供数据服务。Allocating a preferred server to any client according to an access priority list corresponding to an adjacent subnet of the target subnet, so that the allocated preferred server provides data services for the arbitrary client.
C29、一种网络访问请求的业务分配系统,包括多个应用的客户端、服务器以及如上述B15-B28中任一项所述的网络访问请求的业务分配装置。C29. A service distribution system for network access requests, comprising a plurality of application clients, a server, and the service distribution device for network access requests as described in any one of B15-B28 above.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610955119.3ACN106453600A (en) | 2016-10-27 | 2016-10-27 | Service distribution method, device and system for network access request |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610955119.3ACN106453600A (en) | 2016-10-27 | 2016-10-27 | Service distribution method, device and system for network access request |
| Publication Number | Publication Date |
|---|---|
| CN106453600Atrue CN106453600A (en) | 2017-02-22 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610955119.3APendingCN106453600A (en) | 2016-10-27 | 2016-10-27 | Service distribution method, device and system for network access request |
| Country | Link |
|---|---|
| CN (1) | CN106453600A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107395406A (en)* | 2017-07-12 | 2017-11-24 | 广州市百果园信息技术有限公司 | The presence data processing method of on-line system, apparatus and system |
| CN110851311A (en)* | 2019-11-12 | 2020-02-28 | 深圳前海微众银行股份有限公司 | Service failure identification method, device, equipment and storage medium |
| CN111010453A (en)* | 2019-12-29 | 2020-04-14 | 中建材信息技术股份有限公司 | Service request processing method, system, electronic device and computer readable medium |
| CN112218131A (en)* | 2019-07-09 | 2021-01-12 | 中国移动通信集团吉林有限公司 | Set-top box working method and device, electronic device and computer-readable storage medium |
| CN112261172A (en)* | 2020-10-19 | 2021-01-22 | 腾讯科技(深圳)有限公司 | Service addressing access method, device, system, equipment and medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080155647A1 (en)* | 2006-11-28 | 2008-06-26 | Toui Miyawaki | Access control system |
| CN101325559A (en)* | 2008-07-28 | 2008-12-17 | 腾讯科技(深圳)有限公司 | A method, system and game server for recommending game rooms |
| CN101729328A (en)* | 2008-10-27 | 2010-06-09 | 中兴通讯股份有限公司 | Automatic configuration server redirection method and automatic configuration server |
| CN104301454A (en)* | 2014-11-13 | 2015-01-21 | 国家电网公司 | Method, device and intelligent domain name system for domain name resolution and redirection |
| CN105847425A (en)* | 2016-05-17 | 2016-08-10 | 乐视控股(北京)有限公司 | Service request processing method and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080155647A1 (en)* | 2006-11-28 | 2008-06-26 | Toui Miyawaki | Access control system |
| CN101325559A (en)* | 2008-07-28 | 2008-12-17 | 腾讯科技(深圳)有限公司 | A method, system and game server for recommending game rooms |
| CN101729328A (en)* | 2008-10-27 | 2010-06-09 | 中兴通讯股份有限公司 | Automatic configuration server redirection method and automatic configuration server |
| CN104301454A (en)* | 2014-11-13 | 2015-01-21 | 国家电网公司 | Method, device and intelligent domain name system for domain name resolution and redirection |
| CN105847425A (en)* | 2016-05-17 | 2016-08-10 | 乐视控股(北京)有限公司 | Service request processing method and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107395406A (en)* | 2017-07-12 | 2017-11-24 | 广州市百果园信息技术有限公司 | The presence data processing method of on-line system, apparatus and system |
| CN107395406B (en)* | 2017-07-12 | 2020-12-25 | 广州市百果园信息技术有限公司 | Online state data processing method, device and system of online system |
| CN112218131A (en)* | 2019-07-09 | 2021-01-12 | 中国移动通信集团吉林有限公司 | Set-top box working method and device, electronic device and computer-readable storage medium |
| CN110851311A (en)* | 2019-11-12 | 2020-02-28 | 深圳前海微众银行股份有限公司 | Service failure identification method, device, equipment and storage medium |
| CN110851311B (en)* | 2019-11-12 | 2025-01-24 | 深圳前海微众银行股份有限公司 | Service failure identification method, device, equipment and storage medium |
| CN111010453A (en)* | 2019-12-29 | 2020-04-14 | 中建材信息技术股份有限公司 | Service request processing method, system, electronic device and computer readable medium |
| CN111010453B (en)* | 2019-12-29 | 2022-05-24 | 中建材信息技术股份有限公司 | Service request processing method, system, electronic device and computer readable medium |
| CN112261172A (en)* | 2020-10-19 | 2021-01-22 | 腾讯科技(深圳)有限公司 | Service addressing access method, device, system, equipment and medium |
| CN112261172B (en)* | 2020-10-19 | 2023-10-17 | 腾讯云计算(北京)有限责任公司 | Service addressing access method, device, system, equipment and medium |
| Publication | Publication Date | Title |
|---|---|---|
| CN106453600A (en) | Service distribution method, device and system for network access request | |
| CN106656800B (en) | Path selection method and system, network acceleration node and network acceleration system | |
| US9674279B2 (en) | Methods, devices, and systems for allocating service nodes in a network | |
| CN103051740B (en) | Domain name analytic method, dns server and domain name analysis system | |
| CN105516391B (en) | A kind of DNS name resolution method based on CNAME | |
| CN109040243B (en) | Message processing method and device | |
| CN103701950B (en) | The distribution method and device of a kind of IP address | |
| CN101501669A (en) | Domain name resolution resource allocation | |
| CN104348798B (en) | A kind of method, apparatus, dispatch server and system for distributing network | |
| WO2017107780A1 (en) | Method, device and system for recognizing illegitimate proxy for charging fraud | |
| CN110233866A (en) | A kind of load-balancing method and load balancer | |
| CN106534301A (en) | Method and device for balancing network outbound load | |
| CN108124020A (en) | Domain name analytic method, system and equipment | |
| KR102773167B1 (en) | A system for providing accurate communication delay guarantees for request responses for distributed services. | |
| CN106027354B (en) | The reflow method and device of VPN client | |
| CN111385357A (en) | A network resource management method and related device | |
| CN110198267B (en) | Traffic scheduling method, system and server | |
| CN107612759B (en) | Network access acceleration method and shunting device | |
| CN104734869A (en) | Intelligent DNS domain name system and method based on dynamic detection | |
| CN107634882A (en) | Load balancing method based on elevator scheduling algorithm under SDN architecture | |
| CN112968915B (en) | Processing method, processing system and processing device for DNS (Domain name Server) attack | |
| CN108040118A (en) | Visit capacity statistical method, device and storage medium | |
| CN114257536B (en) | Industrial data acquisition method and system | |
| CN1761263B (en) | System and method for avoiding a network address collision | |
| Dimogerontakis et al. | Internet access for all: Assessing a crowdsourced web proxy service in a community network |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20170222 |