CN109842689B - Method and device for selecting server access - Google Patents

Method and device for selecting server access Download PDF

Info

Publication number
CN109842689B
CN109842689B CN201910242239.2A CN201910242239A CN109842689B CN 109842689 B CN109842689 B CN 109842689B CN 201910242239 A CN201910242239 A CN 201910242239A CN 109842689 B CN109842689 B CN 109842689B
Authority
CN
China
Prior art keywords
client
server
condition setting
access
selecting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910242239.2A
Other languages
Chinese (zh)
Other versions
CN109842689A (en
Inventor
王淑玲
胡云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201910242239.2A priority Critical patent/CN109842689B/en
Publication of CN109842689A publication Critical patent/CN109842689A/en
Application granted granted Critical
Publication of CN109842689B publication Critical patent/CN109842689B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method and a device for selecting server access, relates to the technical field of communication management, and is used for providing a method for selecting server access. The method comprises the following steps: receiving registration information from a first client, wherein the registration information comprises at least one condition setting when the first client accesses, and each condition setting corresponds to a weight; respectively obtaining multidimensional sampling samples of a plurality of clients accessed to the candidate server from the candidate servers, wherein the multidimensional sampling samples of each client comprise at least one condition setting when the corresponding client is accessed; for each condition setting, calculating a similarity value between the condition setting at the time of the first client access and the condition setting at the time of the respective client access in each candidate server; calculating the total value of each server under the setting of a plurality of conditions according to the similar values and the corresponding weights; and sending the server with the maximum total value to the first client as the access selection.

Description

Method and device for selecting server access
Technical Field
The present invention relates to the field of communications management technologies, and in particular, to a method and an apparatus for selecting a server access.
Background
In recent years, the internet of things has risen to the research enthusiasm in the whole industry. As a source of data and services of the Internet of things, equipment and related contents of the Internet of things are greatly concerned. The demand for device management of the internet of things is increasing. When the remote network technology is applied to the internet of things devices in a large scale, a plurality of devices can be placed in a long-term unattended place, and functions related to device management, such as states of the devices, troubleshooting after failures, configuration updating of the devices and the like, are realized through a remote end. Therefore, there is a need for a software system at the remote site to manage the device.
The current device management structure is a client/Server (CS) architecture, a terminal device serves as a client and initiates a registration application to a Server, and after the registration application passes, the Server takes over the management of the device. Thus, the first step in device management is the terminal device selecting the client. In existing device management systems, servers are often deployed in a distributed manner. And a guide server is in charge of verifying the priority authority of the server or the current load condition of the server, and assigning a server to the client according to the calculation result. In the prior art, a server with a high priority is selected by setting a priority for the server. In this case, load imbalance occurs, and once a server with a high priority fails, the impact will be devastating.
Disclosure of Invention
The embodiment of the invention provides a method and a device for selecting a server to access, which are used for solving the technical problems of load imbalance, fault influence and the like caused by selecting an access client through the priority of the server in the prior art.
In order to solve the technical problem, the embodiment of the invention adopts the following technical scheme:
in a first aspect, an embodiment of the present invention provides a method for selecting server access, where the method includes:
receiving registration information from a first client, wherein the registration information comprises at least one condition setting when the first client accesses, and each condition setting corresponds to a weight;
respectively obtaining multidimensional sampling samples of a plurality of clients accessed to the candidate server from the candidate servers, wherein the multidimensional sampling samples of each client comprise at least one condition setting when the corresponding client is accessed;
for each condition setting, calculating a similarity value between the condition setting at the time of the first client access and the condition setting at the time of the respective client access in each candidate server;
calculating the total value of each server under a plurality of condition settings according to the similar values and the corresponding weights;
and sending the server with the maximum total value to the first client as the access selection.
In a second aspect, an embodiment of the present invention provides an apparatus for selecting server access, where the apparatus includes:
a receiving unit, configured to receive registration information from a first client, where the registration information includes at least one condition setting when the first client accesses, and each condition setting corresponds to a weight;
the system comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for respectively acquiring multidimensional sampling samples of a plurality of clients which have access to a plurality of candidate servers from the plurality of candidate servers, and the multidimensional sampling samples of each client comprise at least one condition setting when the corresponding client is accessed;
a calculation unit configured to calculate, for each condition setting, a similarity value between the condition setting at the time of the first client access and the condition setting at the time of the respective client accesses in each candidate server;
the computing unit is further configured to compute a total value of each server under multiple condition settings according to the similarity value and the corresponding weight;
and the sending unit is used for sending the server with the maximum total value to the first client as the access selection.
In a third aspect, there is provided a computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computer, cause the computer to perform the method of selecting server access of the first aspect.
In a fourth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of selecting server access according to the first aspect.
In a fifth aspect, an apparatus for selecting server access is provided, including: the processor and the memory, the memory is used for storing programs, and the processor calls the programs stored in the memory to execute the method for selecting the server access in the first aspect.
The embodiment of the invention provides a method and a device for selecting server access, aiming at the characteristics of a first client and relevant condition setting, a guide server carries out similarity calculation with a client which has access to a candidate server, and selects a server with the maximum total value under all condition settings. The client-side characteristics are taken as consideration standards, abstract modeling is carried out on the selection strategy of the server, and the problems of unbalanced load, fault influence and the like in the prior art are solved.
Drawings
Fig. 1 is a schematic diagram illustrating a method for selecting a server access according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an apparatus for selecting server access according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described below with reference to the accompanying drawings.
Referring to fig. 1, an embodiment of the present invention provides a method for selecting server access, where the method includes steps S101 to S105:
s101, registration information is received from a first client.
The first client initiates a registration request to the bootstrap server and sends registration information, and correspondingly, the bootstrap server receives the registration information from the first client. The registration information includes at least one condition setting when the first client accesses, the condition setting includes an IP network number, a manufacturer and the like of the client, and each condition setting corresponds to a weight value which represents the proportion of each condition setting in the whole decision.
S102, obtaining multi-dimensional sampling samples of a plurality of clients which have access to the candidate server from the candidate servers respectively.
The candidate server comprises a plurality of candidate servers, each candidate server has access to a plurality of clients, and a multidimensional sampling sample of each accessed client is obtained from each candidate server, and the multidimensional sampling sample of each client comprises at least one condition setting when the corresponding client is accessed, and the multidimensional sampling sample can be expressed as: sm={epmj,epmj,.。。,epmjM represents different clients, j represents different condition settings, and ep represents sample data.
S103, for each condition setting, calculating a similarity value between the condition setting at the time of the first client access and the condition setting at the time of the client access for each candidate server.
And aiming at all condition settings of the multi-dimensional sampling samples, listing data of the first client under all condition settings, and comparing each data with the multi-dimensional sampling samples of all clients respectively. A similarity value between the first client and all multi-dimensional sampled samples is determined.
For example, three clients form a matrix array, S, of multidimensional sampling samples under three different conditions of x, y, and z1={ep1x,ep1y,ep1z}、S2={ep2x,ep2y,ep2z}、S3={ep3x,ep3y,ep3zThe data of the first client under the three conditions of x, y and z is A, B, C, where a is equal to ep in the matrix1x,ep2x,ep3xComparing, if an identical item appears, the similarity value under the condition setting 1 is 0.33, and continuing to compare B with ep in the matrix1y,ep2y,ep3yComparing, if two identical terms appear, the similarity value under condition setting y is 0.67, and C is compared with ep in the matrix1z,ep2z,ep3zIn contrast, if three identical terms appear, the similarity value at the condition setting z is 1.
And S104, calculating the total value of each server under a plurality of condition settings according to the similarity value and the corresponding weight value.
Obtaining the similarity value between the condition setting when the first client accesses and the condition setting when each client accesses in each candidate server through step S103, wherein each condition setting corresponds to a weight, then according to Fi=∑pj*fjCalculating the total value of each server under a plurality of condition settings, wherein FiDenotes the total value, pjRepresents a weight value, fjThe similarity value is shown, i is a different server number, and j is a different condition setting.
Continuing with the example in step S103, let the weights set by the three conditions x, y, and z be px、py、pzThen the total value F of the candidate server1=px*0.33+py*0.67+pz1, the total value of all candidate servers can be obtained in the same way.
And S105, sending the server with the maximum total value to the first client as an access selection.
The total values of all candidate servers are obtained through step S104, a maximum value is selected from the total values, the server corresponding to the maximum value is used as an access selection to send access notification information to the first client, and the first client receives the access notification information of the server, and then access can be performed.
The embodiment of the invention provides a method for selecting a server to access, which is used for guiding a server to perform similarity calculation with a client which has accessed a candidate server aiming at the characteristics of a first client and relevant condition setting, and selecting the server with the maximum total value under all condition settings. The client-side characteristics are taken as consideration standards, abstract modeling is carried out on the selection strategy of the server, and the problems of unbalanced load, fault influence and the like in the prior art are solved.
Referring to fig. 2, an embodiment of the present invention provides an apparatus for selecting server access, which may be applied to the method for selecting server access shown above. The device 100 for selecting server access comprises:
a receiving unit 101, configured to receive registration information from a first client, where the registration information includes at least one condition setting when the first client accesses, and each condition setting corresponds to a weight.
An obtaining unit 102, configured to obtain, from a plurality of candidate servers, multidimensional sampling samples of a plurality of clients that have accessed the candidate server, respectively, where the multidimensional sampling samples of each client include at least one condition setting when the corresponding client accesses.
A calculating unit 103, configured to calculate, for each condition setting, a similarity value between the condition setting at the time of the first client access and the condition setting at the time of the client access in each candidate server.
The calculating unit 103 is further configured to calculate a total value of each server under multiple condition settings according to the similarity value and the corresponding weight.
A sending unit 104, configured to send, to the first client, the server with the largest total value as the access selection.
Optionally, the condition setting includes an IP network number and a manufacturer of the client.
Optionally, the computing unit includes:
according to Fi=∑pj*fjCalculating a total value of each server under the plurality of condition settings, wherein FiDenotes the total value, pjRepresents a weight value, fjThe similarity value is shown, i is a different server number, and j is a different condition setting.
Embodiments of the present invention provide a computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computer, cause the computer to perform a method of selecting server access as described in fig. 1.
Embodiments of the present invention provide a computer program product containing instructions which, when run on a computer, cause the computer to perform a method of selecting server access as described in figure 1.
The embodiment of the invention provides a device for selecting server access, which comprises: a processor and a memory, the memory for storing a program, the processor calling the program stored in the memory to perform the method of selecting server access as described in fig. 1.
Since the apparatus for selecting server access, the computer-readable storage medium, and the computer program product in the embodiments of the present invention may be applied to the method described above, the technical effect obtained by the apparatus may also refer to the method embodiments described above, and the embodiments of the present invention are not described herein again.
The above units may be individually configured processors, or may be implemented by being integrated into one of the processors of the controller, or may be stored in a memory of the controller in the form of program codes, and the functions of the above units may be called and executed by one of the processors of the controller. The processor described herein may be a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention.
It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided by the present invention, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.

Claims (8)

1. A method for selecting server access, comprising:
receiving registration information from a first client, wherein the registration information comprises at least one condition setting when the first client accesses, and each condition setting corresponds to a weight;
respectively obtaining multidimensional sampling samples of a plurality of clients accessed to the candidate server from the candidate servers, wherein the multidimensional sampling samples of each client comprise at least one condition setting when the corresponding client is accessed;
for each condition setting, calculating a similarity value between the condition setting at the time of the first client access and the condition setting at the time of the respective client access in each candidate server;
calculating the total value of each server under a plurality of condition settings according to the similar values and the corresponding weights;
and sending the server with the maximum total value to the first client as the access selection.
2. The method for selecting server access according to claim 1, wherein the condition setting comprises an IP network number of the client and a manufacturer.
3. The method according to claim 1, wherein the calculating a total value of each server under the multiple condition settings according to the similarity value and the corresponding weight value comprises:
according to Fi=∑pj*fjComputing each serviceTotal value of the device under the plurality of condition settings, wherein FiDenotes the total value, pjRepresents a weight value, fjThe similarity value is shown, i is a different server number, and j is a different condition setting.
4. An apparatus for selecting server access, comprising:
a receiving unit, configured to receive registration information from a first client, where the registration information includes at least one condition setting when the first client accesses, and each condition setting corresponds to a weight;
the system comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for respectively acquiring multidimensional sampling samples of a plurality of clients which have access to a plurality of candidate servers from the plurality of candidate servers, and the multidimensional sampling samples of each client comprise at least one condition setting when the corresponding client is accessed;
a calculation unit configured to calculate, for each condition setting, a similarity value between the condition setting at the time of the first client access and the condition setting at the time of the respective client accesses in each candidate server;
the computing unit is further configured to compute a total value of each server under multiple condition settings according to the similarity value and the corresponding weight;
and the sending unit is used for sending the server with the maximum total value to the first client as the access selection.
5. The apparatus for selecting server access according to claim 4, wherein the condition setting comprises the IP network number of the client and the manufacturer.
6. The apparatus for selecting server access according to claim 4, wherein the computing unit comprises:
according to Fi=∑pj*fjCalculating a total value of each server under the plurality of condition settings, wherein FiDenotes the total value, pjRepresents a weight value, fjRepresenting similar values, i representing different server compilationsThe numbers j indicate different condition settings.
7. A computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computer, cause the computer to perform the method of selecting server access of any of claims 1-3.
8. An apparatus for selecting server access, comprising: a processor and a memory, the memory for storing a program, the processor calling the program stored in the memory to perform the method of selecting server access according to any of claims 1-3.
CN201910242239.2A 2019-03-28 2019-03-28 Method and device for selecting server access Active CN109842689B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910242239.2A CN109842689B (en) 2019-03-28 2019-03-28 Method and device for selecting server access

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910242239.2A CN109842689B (en) 2019-03-28 2019-03-28 Method and device for selecting server access

Publications (2)

Publication Number Publication Date
CN109842689A CN109842689A (en) 2019-06-04
CN109842689B true CN109842689B (en) 2021-07-27

Family

ID=66886344

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910242239.2A Active CN109842689B (en) 2019-03-28 2019-03-28 Method and device for selecting server access

Country Status (1)

Country Link
CN (1) CN109842689B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111092948A (en) * 2019-12-20 2020-05-01 深圳前海达闼云端智能科技有限公司 Guiding method, guiding server, server and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103945005A (en) * 2014-05-06 2014-07-23 江苏物联网研究发展中心 Multiple evaluation indexes based dynamic load balancing framework
CN105871983A (en) * 2015-12-10 2016-08-17 乐视云计算有限公司 Method and device for selecting servers
CN106657379A (en) * 2017-01-06 2017-05-10 重庆邮电大学 Implementation method and system for NGINX server load balancing
CN108762935A (en) * 2018-06-04 2018-11-06 郑州云海信息技术有限公司 A kind of selection method and server of destination host

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10079877B2 (en) * 2016-02-04 2018-09-18 Citrix Systems, Inc. System and method for cloud aware application delivery controller

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103945005A (en) * 2014-05-06 2014-07-23 江苏物联网研究发展中心 Multiple evaluation indexes based dynamic load balancing framework
CN105871983A (en) * 2015-12-10 2016-08-17 乐视云计算有限公司 Method and device for selecting servers
CN106657379A (en) * 2017-01-06 2017-05-10 重庆邮电大学 Implementation method and system for NGINX server load balancing
CN108762935A (en) * 2018-06-04 2018-11-06 郑州云海信息技术有限公司 A kind of selection method and server of destination host

Also Published As

Publication number Publication date
CN109842689A (en) 2019-06-04

Similar Documents

Publication Publication Date Title
CN110765024B (en) Simulation test method, simulation test device, electronic equipment and computer readable storage medium
CN111327647B (en) Method and device for providing service to outside by container and electronic equipment
CN104199957A (en) Redis universal agent implementation method
CN114095567B (en) Data access request processing method and device, computer equipment and medium
CN111190551B (en) Redis data migration system, migration method, migration device and terminal
CN111679968A (en) Interface calling abnormity detection method and device, computer equipment and storage medium
CN111176843A (en) Multi-dimension-based load balancing method and device and related equipment
CN106506269A (en) Execute method, system, computing device and the test system of test assignment
CN110162322A (en) A kind of upgrade method and device
CN111556135A (en) Request scheduling method, system and device and electronic equipment
CN112000518A (en) Application program fault risk processing method, device and system, terminal and equipment
CN109842689B (en) Method and device for selecting server access
WO2018157105A1 (en) Automatic recovery in remote management services
CN111147605A (en) Service registration method, device and equipment
CN111400051B (en) Resource scheduling method, device and system
CN106776034A (en) A kind of task batch processing computational methods, master station computer and system
CN111371825A (en) Load balancing method, device and equipment based on HTTP2.0 protocol
CN114546842A (en) Interface test method and device, storage medium and electronic equipment
CN110391929B (en) Fault-tolerant control method and device and fault-tolerant component
CN107766232A (en) A kind of plug-in management method and device
CN116208660B (en) Method, device, system, equipment and medium for dynamically connecting remote desktop with cloud server
CN117313856B (en) Reliability test planning system and method
CN109815134A (en) The methods, devices and systems of combined data library auto Analysis test result
CN109818767A (en) A kind of method, apparatus and storage medium of the adjustment of Redis cluster capacity
CN112035288B (en) Operation fault influence determining method and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant